@chatbi-v/cli 2.1.6 → 2.1.8

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/package.json CHANGED
@@ -1,11 +1,18 @@
1
1
  {
2
2
  "name": "@chatbi-v/cli",
3
- "version": "2.1.6",
3
+ "version": "2.1.8",
4
4
  "description": "Standardized CLI tooling for ChatBI Monorepo",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./package.json": "./package.json"
15
+ },
9
16
  "bin": {
10
17
  "chatbi-cli": "./bin/chatbi-cli.js"
11
18
  },
@@ -1,5 +1,5 @@
1
1
  # API Base URL
2
- VITE_API_BASE_URL=/bron-chat-bi
2
+ VITE_API_BASE_URL=/
3
3
 
4
4
  # 是否开启 Mock 模式 (能力开关,需配合 url mock=true 使用)
5
5
  VITE_USE_MOCK=false
@@ -7,7 +7,7 @@
7
7
  - **插件化架构**: 自动发现并加载符合规范的业务插件。
8
8
  - **微内核设计**: 核心逻辑下沉到 `@chatbi-v/core`,容器层只负责骨架维护。
9
9
  - **主题与布局**: 内置主题同步与响应式布局切换支持。
10
- - **配置驱动**: 通过 `chatbi.config.ts` 统一管理应用和插件配置。
10
+ - **配置驱动**: 通过 `app.config.ts` 统一管理应用和插件配置。
11
11
 
12
12
  ## 快速开始
13
13
 
@@ -12,12 +12,8 @@
12
12
  "dependencies": {
13
13
  "@ant-design/icons": "^5.2.6",
14
14
  "@ant-design/x": "^2.1.1",
15
- "@chatbi-v/core": "^2.1.6",
16
- "@chatbi-v/mocks": "^2.1.6",
17
- "@chatbi-v/cli": "^2.1.6",
18
- "@chatbi-v/plugin-theme-manager": "2.0.4",
19
- "@chatbi-v/plugin-layout-transform": "2.0.4",
20
- "@chatbi-v/plugin-system-monitor": "2.0.4",
15
+ "@chatbi-v/core": "^2.1.8",
16
+ "@chatbi-v/mocks": "^2.1.8",
21
17
  "antd": "^5.29.3",
22
18
  "react": "^18.3.1",
23
19
  "react-dom": "^18.3.1",
@@ -25,7 +21,8 @@
25
21
  "zustand": "^5.0.9"
26
22
  },
27
23
  "devDependencies": {
28
- "@chatbi-v/config":"^2.1.6",
24
+ "@chatbi-v/cli": "^2.1.8",
25
+ "@chatbi-v/config":"^2.1.8",
29
26
  "@types/node": "^25.0.3",
30
27
  "@types/react": "^18.2.43",
31
28
  "@types/react-dom": "^18.2.17",
@@ -0,0 +1,14 @@
1
+ import path from 'path';
2
+ import { fileURLToPath } from 'url';
3
+
4
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
5
+
6
+ export default {
7
+ plugins: {
8
+ 'tailwindcss/nesting': {},
9
+ tailwindcss: {
10
+ config: path.resolve(__dirname, 'tailwind.config.js'),
11
+ },
12
+ autoprefixer: {},
13
+ },
14
+ }
@@ -1,7 +1,7 @@
1
1
  import { usePluginLoader as useCorePluginLoader } from '@chatbi-v/core';
2
2
  import { useMemo } from 'react';
3
3
 
4
- import { chatbiConfig } from '../../chatbi.config';
4
+ import { appConfig } from '../../app.config';
5
5
  import { api } from '../services/api';
6
6
 
7
7
  /**
@@ -45,8 +45,8 @@ export const usePluginLoader = () => {
45
45
 
46
46
  return {
47
47
  modules: normalizedModules,
48
- pluginConfigs: chatbiConfig.plugins,
49
- systemConfig: chatbiConfig.system,
48
+ pluginConfigs: appConfig.plugins,
49
+ systemConfig: appConfig.system,
50
50
  sharedContext: { api },
51
51
  };
52
52
  }, []);
@@ -40,7 +40,7 @@ export const exportSystemConfig = () => {
40
40
  const url = URL.createObjectURL(blob);
41
41
  const a = document.createElement('a');
42
42
  a.href = url;
43
- a.download = `chatbi-config-${dateUtils.formatDate()}.json`;
43
+ a.download = `app-config-${dateUtils.formatDate()}.json`;
44
44
  document.body.appendChild(a);
45
45
  a.click();
46
46
  document.body.removeChild(a);
@@ -51,7 +51,7 @@ export const useUIStore = create<UIState>()(
51
51
  setIsSettingsOpen: (v) => set({ isSettingsOpen: v }),
52
52
 
53
53
  currentThemeId: 'default',
54
- themeMode: 'dark',
54
+ themeMode: 'light',
55
55
  setThemeId: (id) => set({ currentThemeId: id }),
56
56
  setThemeMode: (mode) => set({ themeMode: mode }),
57
57
  toggleThemeMode: () => set((state) => ({ themeMode: state.themeMode === 'dark' ? 'light' : 'dark' })),
@@ -1,8 +1,11 @@
1
- const baseConfig = require('@chatbi-v/config/tailwind');
2
- const path = require('path');
1
+ import baseConfig from '@chatbi-v/config/tailwind';
2
+ import path from 'path';
3
+ import { fileURLToPath } from 'url';
4
+
5
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
3
6
 
4
7
  /** @type {import('tailwindcss').Config} */
5
- module.exports = {
8
+ export default {
6
9
  ...baseConfig,
7
10
  darkMode: 'class',
8
11
  content: [
@@ -32,4 +35,4 @@ module.exports = {
32
35
  }
33
36
  },
34
37
  plugins: []
35
- }
38
+ }
@@ -11,9 +11,13 @@
11
11
  },
12
12
  "workspaces": [
13
13
  "apps/*",
14
- "plugins/*"
14
+ "plugins/*",
15
+ "packages/*",
16
+ "libs/*"
15
17
  ],
16
18
  "dependencies": {
19
+ "@chatbi-v/core": "^2.1.8",
20
+ "@chatbi-v/mocks": "^2.1.8",
17
21
  "react": "^18.3.1",
18
22
  "react-dom": "^18.3.1",
19
23
  "antd": "^5.29.3",
@@ -24,8 +28,8 @@
24
28
  },
25
29
  "devDependencies": {
26
30
  "typescript": "^5.0.0",
27
- "@chatbi-v/config": "^2.1.6",
28
- "@chatbi-v/cli": "^2.1.6",
31
+ "@chatbi-v/config": "^2.1.8",
32
+ "@chatbi-v/cli": "^2.1.8",
29
33
  "@ant-design/icons": "^5.6.1",
30
34
  "@types/react": "^18.3.1",
31
35
  "@types/react-dom": "^18.3.1",
@@ -6,5 +6,5 @@ packages:
6
6
  - 'plugins/*'
7
7
 
8
8
  # 增量配置:如果添加了核心库或工具库,可在此处包含
9
- # - 'packages/*'
10
- # - 'libs/*'
9
+ - 'packages/*'
10
+ - 'libs/*'
@@ -11,7 +11,7 @@
11
11
  "strict": true,
12
12
  "forceConsistentCasingInFileNames": true,
13
13
  "module": "ESNext",
14
- "moduleResolution": "Node",
14
+ "moduleResolution": "bundler",
15
15
  "resolveJsonModule": true,
16
16
  "isolatedModules": true,
17
17
  "noEmit": true,
@@ -25,7 +25,7 @@
25
25
 
26
26
  ## 插件配置
27
27
 
28
- 在主应用的 `chatbi.config.ts` 中进行配置:
28
+ 在主应用的 `app.config.ts` 中进行配置:
29
29
 
30
30
  ```typescript
31
31
  plugins: {
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "plugin": true,
23
23
  "peerDependencies": {
24
- "@chatbi-v/core": "^2.1.6",
24
+ "@chatbi-v/core": "^2.1.8",
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.1.6",
31
- "@chatbi-v/config": "^2.1.6",
30
+ "@chatbi-v/core": "^2.1.8",
31
+ "@chatbi-v/config": "^2.1.8",
32
32
  "tsup": "^8.5.1",
33
33
  "vite": "^5.0.0"
34
34
  }
@@ -1,10 +0,0 @@
1
- const path = require('path');
2
- module.exports = {
3
- plugins: {
4
- 'tailwindcss/nesting': {},
5
- tailwindcss: {
6
- config: path.resolve(__dirname, 'tailwind.config.cjs'),
7
- },
8
- autoprefixer: {},
9
- },
10
- }