@chatbi-v/cli 1.0.10 → 1.0.13

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatbi-v/cli",
3
- "version": "1.0.10",
3
+ "version": "1.0.13",
4
4
  "description": "Standardized CLI tooling for ChatBI Monorepo",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -14,6 +14,11 @@
14
14
  "publishConfig": {
15
15
  "access": "public"
16
16
  },
17
+ "scripts": {
18
+ "build": "tsup",
19
+ "dev": "tsup --watch",
20
+ "test": "vitest"
21
+ },
17
22
  "dependencies": {
18
23
  "boxen": "^8.0.1",
19
24
  "cac": "^6.7.14",
@@ -29,11 +34,7 @@
29
34
  "prompts": "^2.4.2",
30
35
  "tsup": "^8.5.1",
31
36
  "typescript": "^5.0.0",
32
- "vite": "^5.4.21",
33
- "@chatbi-v/core": "2.0.0",
34
- "@chatbi-v/plugin-system-monitor": "2.0.0",
35
- "@chatbi-v/plugin-theme-manager": "2.0.0",
36
- "@chatbi-v/mocks": "2.0.0"
37
+ "vite": "^5.4.21"
37
38
  },
38
39
  "devDependencies": {
39
40
  "@types/boxen": "^3.0.5",
@@ -43,12 +44,6 @@
43
44
  "@types/node": "^20.0.0",
44
45
  "@types/prompts": "^2.4.9",
45
46
  "tsup": "^8.5.1",
46
- "vitest": "^1.0.0",
47
- "@chatbi-v/tsconfig": "1.0.2"
48
- },
49
- "scripts": {
50
- "build": "tsup",
51
- "dev": "tsup --watch",
52
- "test": "vitest"
47
+ "vitest": "^1.0.0"
53
48
  }
54
- }
49
+ }
@@ -15,13 +15,9 @@
15
15
  "antd": "^5.29.3",
16
16
  "react": "^18.3.1",
17
17
  "react-dom": "^18.3.1",
18
- "react-router-dom": "^7.10.1",
19
- "zustand": "^5.0.9",
20
- "@chatbi-v/core": "^1.0.4",
21
- "@chatbi-v/mocks": "^1.0.2",
22
- "@chatbi-v/plugin-theme-manager": "^1.0.3",
23
- "@chatbi-v/plugin-layout-transform": "^1.0.0",
24
- "@chatbi-v/plugin-system-monitor": "^1.0.2"
18
+ "react-router": "^6.22.3",
19
+ "react-router-dom": "^6.22.3",
20
+ "zustand": "^5.0.9"
25
21
  },
26
22
  "devDependencies": {
27
23
  "@types/node": "^20.0.0",
@@ -16,10 +16,7 @@
16
16
  "composite": false,
17
17
  "jsx": "react-jsx",
18
18
  "types": ["vite/client", "node"],
19
- "baseUrl": ".",
20
- "paths": {
21
- "@/*": ["./src/*"]
22
- }
19
+ "baseUrl": "."
23
20
  },
24
21
  "include": ["src"],
25
22
  "references": []
@@ -37,6 +37,17 @@ function manualChunks(id: string) {
37
37
  export default defineConfig(({ mode }) => {
38
38
  const env = loadEnv(mode, process.cwd(), '');
39
39
 
40
+ // 加载内核生成的虚拟别名
41
+ let coreAlias = {};
42
+ const aliasPath = path.resolve(__dirname, './.chatbi/vite.alias.json');
43
+ if (fs.existsSync(aliasPath)) {
44
+ try {
45
+ coreAlias = JSON.parse(fs.readFileSync(aliasPath, 'utf-8'));
46
+ } catch (e) {
47
+ console.error('Failed to load core aliases:', e);
48
+ }
49
+ }
50
+
40
51
  return {
41
52
  base: env.VITE_APP_BASE_URL || '/',
42
53
 
@@ -49,6 +60,7 @@ export default defineConfig(({ mode }) => {
49
60
  resolve: {
50
61
  alias: {
51
62
  '@': path.resolve(__dirname, './src'),
63
+ ...coreAlias
52
64
  },
53
65
  // 强制统一核心依赖实例,避免多副本导致的 Context 失效
54
66
  dedupe: [
@@ -10,9 +10,13 @@
10
10
  ".": "./src/index.tsx"
11
11
  },
12
12
  "scripts": {
13
+ "dev": "chatbi-cli dev",
13
14
  "build": "chatbi-cli build"
14
15
  },
15
16
  "devDependencies": {
17
+ "@ant-design/icons": "^5.2.6",
18
+ "@types/react": "^18.3.1",
19
+ "@types/react-dom": "^18.3.1"
16
20
  },
17
21
  "peerDependencies": {
18
22
  "@chatbi-v/core": "^1.0.4",
@@ -1,14 +1,21 @@
1
1
  {
2
2
  "extends": "{{tsconfigPath}}",
3
3
  "compilerOptions": {
4
- "baseUrl": ".",
4
+ "target": "ESNext",
5
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
6
+ "module": "ESNext",
7
+ "skipLibCheck": true,
8
+ "moduleResolution": "bundler",
9
+ "allowImportingTsExtensions": true,
10
+ "resolveJsonModule": true,
11
+ "isolatedModules": true,
5
12
  "noEmit": false,
6
13
  "declaration": true,
7
14
  "emitDeclarationOnly": true,
8
15
  "declarationDir": "./dist",
9
- "paths": {
10
- "@/*": ["./src/*"]
11
- }
16
+ "jsx": "react-jsx",
17
+ "esModuleInterop": true,
18
+ "baseUrl": "."
12
19
  },
13
20
  "include": ["src"]
14
21
  }