@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/dist/index.js +990 -912
- package/package.json +8 -1
- package/templates/app/.env.hbs +1 -1
- package/templates/app/README.md.hbs +1 -1
- package/templates/app/package.json.hbs +4 -7
- package/templates/app/postcss.config.js.hbs +14 -0
- package/templates/app/src/hooks/usePluginLoader.ts.hbs +3 -3
- package/templates/app/src/services/config-service.ts.hbs +1 -1
- package/templates/app/src/stores/useUIStore.ts.hbs +1 -1
- package/templates/app/{tailwind.config.cjs.hbs → tailwind.config.js.hbs} +7 -4
- package/templates/monorepo/package.json.hbs +7 -3
- package/templates/monorepo/pnpm-workspace.yaml.hbs +2 -2
- package/templates/monorepo/tsconfig.json.hbs +1 -1
- package/templates/plugin/README.md.hbs +1 -1
- package/templates/plugin/package.json.hbs +3 -3
- package/templates/app/postcss.config.cjs.hbs +0 -10
- /package/templates/app/{chatbi.config.ts.hbs → app.config.ts.hbs} +0 -0
package/package.json
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatbi-v/cli",
|
|
3
|
-
"version": "2.1.
|
|
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
|
},
|
package/templates/app/.env.hbs
CHANGED
|
@@ -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.
|
|
16
|
-
"@chatbi-v/mocks": "^2.1.
|
|
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/
|
|
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 {
|
|
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:
|
|
49
|
-
systemConfig:
|
|
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 = `
|
|
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: '
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
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.
|
|
28
|
-
"@chatbi-v/cli": "^2.1.
|
|
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",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"plugin": true,
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@chatbi-v/core": "^2.1.
|
|
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.
|
|
31
|
-
"@chatbi-v/config": "^2.1.
|
|
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
|
}
|
|
File without changes
|