@chatbi-v/cli 1.0.7 → 1.0.9
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/app/.env +8 -0
- package/dist/app/.env.hbs +8 -0
- package/dist/app/README.md.hbs +16 -0
- package/dist/app/chatbi.config.ts.hbs +60 -0
- package/{templates/default/apps/main → dist/app}/index.html.hbs +3 -4
- package/dist/app/package.json.hbs +34 -0
- package/dist/app/src/App.tsx.hbs +92 -0
- package/dist/app/src/components/GlobalErrorBoundary.tsx.hbs +69 -0
- package/dist/app/src/components/GlobalSettingsModal.tsx.hbs +35 -0
- package/dist/app/src/components/LayoutSkeletons.tsx.hbs +79 -0
- package/dist/app/src/components/index.ts.hbs +2 -0
- package/dist/app/src/custom-antd.less.hbs +7 -0
- package/dist/app/src/features/settings/ConfigRenderStrategy.tsx.hbs +119 -0
- package/dist/app/src/features/settings/ExtensionSettings.tsx.hbs +52 -0
- package/dist/app/src/features/settings/PluginList.tsx.hbs +115 -0
- package/dist/app/src/features/settings/PluginSettings.tsx.hbs +123 -0
- package/dist/app/src/features/settings/SchemaSettingsRenderer.tsx.hbs +56 -0
- package/dist/app/src/hooks/useAppRoutes.ts.hbs +39 -0
- package/dist/app/src/hooks/usePluginLoader.ts.hbs +22 -0
- package/dist/app/src/hooks/usePluginSettings.ts.hbs +29 -0
- package/dist/app/src/hooks/useThemeSync.ts.hbs +108 -0
- package/dist/app/src/index.css.hbs +45 -0
- package/dist/app/src/layouts/BackgroundEffects.tsx.hbs +10 -0
- package/dist/app/src/layouts/MainContent.tsx.hbs +58 -0
- package/dist/app/src/layouts/SidebarNav.tsx.hbs +182 -0
- package/dist/app/src/main.tsx.hbs +43 -0
- package/dist/app/src/providers/AppProviders.tsx.hbs +36 -0
- package/dist/app/src/services/api/index.ts.hbs +37 -0
- package/dist/app/src/services/api/modules/auth.ts.hbs +18 -0
- package/dist/app/src/services/config-service.ts.hbs +48 -0
- package/dist/app/src/stores/storage-adapter.ts.hbs +29 -0
- package/dist/app/src/stores/useSessionStore.ts.hbs +22 -0
- package/dist/app/src/stores/useUIStore.ts.hbs +64 -0
- package/dist/app/tailwind.config.cjs.hbs +14 -0
- package/dist/app/tsconfig.json.hbs +26 -0
- package/dist/app/vite.config.ts.hbs +89 -0
- package/dist/index.js +5662 -4194
- package/{templates/default → dist/monorepo}/package.json.hbs +5 -0
- package/dist/monorepo/pnpm-workspace.yaml.hbs +10 -0
- package/dist/{default → monorepo}/tsconfig.json.hbs +3 -1
- package/{templates/default/plugins/demo-plugin → dist/plugin}/package.json.hbs +9 -3
- package/dist/plugin/src/index.tsx.hbs +90 -0
- package/dist/plugin/tsconfig.json.hbs +14 -0
- package/package.json +18 -6
- package/templates/app/.env.hbs +8 -0
- package/templates/app/README.md.hbs +16 -0
- package/templates/app/chatbi.config.ts.hbs +60 -0
- package/{dist/default/apps/main → templates/app}/index.html.hbs +3 -4
- package/templates/app/package.json.hbs +34 -0
- package/templates/app/src/App.tsx.hbs +92 -0
- package/templates/app/src/components/GlobalErrorBoundary.tsx.hbs +69 -0
- package/templates/app/src/components/GlobalSettingsModal.tsx.hbs +35 -0
- package/templates/app/src/components/LayoutSkeletons.tsx.hbs +79 -0
- package/templates/app/src/components/index.ts.hbs +2 -0
- package/templates/app/src/custom-antd.less.hbs +7 -0
- package/templates/app/src/features/settings/ConfigRenderStrategy.tsx.hbs +119 -0
- package/templates/app/src/features/settings/ExtensionSettings.tsx.hbs +52 -0
- package/templates/app/src/features/settings/PluginList.tsx.hbs +115 -0
- package/templates/app/src/features/settings/PluginSettings.tsx.hbs +123 -0
- package/templates/app/src/features/settings/SchemaSettingsRenderer.tsx.hbs +56 -0
- package/templates/app/src/hooks/useAppRoutes.ts.hbs +39 -0
- package/templates/app/src/hooks/usePluginLoader.ts.hbs +22 -0
- package/templates/app/src/hooks/usePluginSettings.ts.hbs +29 -0
- package/templates/app/src/hooks/useThemeSync.ts.hbs +108 -0
- package/templates/app/src/index.css.hbs +45 -0
- package/templates/app/src/layouts/BackgroundEffects.tsx.hbs +10 -0
- package/templates/app/src/layouts/MainContent.tsx.hbs +58 -0
- package/templates/app/src/layouts/SidebarNav.tsx.hbs +182 -0
- package/templates/app/src/main.tsx.hbs +43 -0
- package/templates/app/src/providers/AppProviders.tsx.hbs +36 -0
- package/templates/app/src/services/api/index.ts.hbs +37 -0
- package/templates/app/src/services/api/modules/auth.ts.hbs +18 -0
- package/templates/app/src/services/config-service.ts.hbs +48 -0
- package/templates/app/src/stores/storage-adapter.ts.hbs +29 -0
- package/templates/app/src/stores/useSessionStore.ts.hbs +22 -0
- package/templates/app/src/stores/useUIStore.ts.hbs +64 -0
- package/templates/app/tailwind.config.cjs.hbs +14 -0
- package/templates/app/tsconfig.json.hbs +26 -0
- package/templates/app/vite.config.ts.hbs +89 -0
- package/templates/monorepo/.gitignore.hbs +3 -0
- package/{dist/default → templates/monorepo}/package.json.hbs +5 -0
- package/templates/monorepo/pnpm-workspace.yaml.hbs +10 -0
- package/templates/{default → monorepo}/tsconfig.json.hbs +3 -1
- package/{dist/default/plugins/demo-plugin → templates/plugin}/package.json.hbs +9 -3
- package/templates/plugin/src/index.tsx.hbs +90 -0
- package/templates/plugin/tsconfig.json.hbs +14 -0
- package/dist/default/apps/main/package.json.hbs +0 -20
- package/dist/default/apps/main/src/App.tsx.hbs +0 -162
- package/dist/default/apps/main/src/components/NavIcon.tsx.hbs +0 -41
- package/dist/default/apps/main/src/hooks/usePluginLoader.ts.hbs +0 -25
- package/dist/default/apps/main/src/index.css.hbs +0 -8
- package/dist/default/apps/main/src/main.tsx.hbs +0 -13
- package/dist/default/apps/main/src/pages/Guide.tsx.hbs +0 -133
- package/dist/default/apps/main/tailwind.config.cjs.hbs +0 -17
- package/dist/default/apps/main/tsconfig.json.hbs +0 -10
- package/dist/default/apps/main/vite.config.ts.hbs +0 -16
- package/dist/default/plugins/demo-plugin/src/index.tsx.hbs +0 -44
- package/dist/default/plugins/demo-plugin/tsconfig.json.hbs +0 -10
- package/dist/default/pnpm-workspace.yaml.hbs +0 -3
- package/templates/default/apps/main/package.json.hbs +0 -20
- package/templates/default/apps/main/src/App.tsx.hbs +0 -162
- package/templates/default/apps/main/src/components/NavIcon.tsx.hbs +0 -41
- package/templates/default/apps/main/src/hooks/usePluginLoader.ts.hbs +0 -25
- package/templates/default/apps/main/src/index.css.hbs +0 -8
- package/templates/default/apps/main/src/main.tsx.hbs +0 -13
- package/templates/default/apps/main/src/pages/Guide.tsx.hbs +0 -133
- package/templates/default/apps/main/tailwind.config.cjs.hbs +0 -17
- package/templates/default/apps/main/tsconfig.json.hbs +0 -10
- package/templates/default/apps/main/vite.config.ts.hbs +0 -16
- package/templates/default/plugins/demo-plugin/src/index.tsx.hbs +0 -44
- package/templates/default/plugins/demo-plugin/tsconfig.json.hbs +0 -10
- package/templates/default/pnpm-workspace.yaml.hbs +0 -3
- /package/dist/{default/apps/main → app}/postcss.config.cjs.hbs +0 -0
- /package/{templates/default → dist/monorepo}/.gitignore.hbs +0 -0
- /package/dist/{default → monorepo}/README.md.hbs +0 -0
- /package/templates/{default/apps/main → app}/postcss.config.cjs.hbs +0 -0
- /package/templates/{default → monorepo}/README.md.hbs +0 -0
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
2
|
-
import react from '@vitejs/plugin-react'
|
|
3
|
-
import path from 'path'
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [react()],
|
|
7
|
-
resolve: {
|
|
8
|
-
alias: {
|
|
9
|
-
'@chatbi-v/core': path.resolve(__dirname, '../../.chatbi/core'),
|
|
10
|
-
'@chatbi-v/plugin-theme-manager': path.resolve(__dirname, '../../.chatbi/plugins/theme-manager/dist/index.mjs'),
|
|
11
|
-
'@chatbi-v/plugin-system-user': path.resolve(__dirname, '../../.chatbi/plugins/system-user/dist/index.mjs'),
|
|
12
|
-
'@chatbi-v/plugin-system-monitor': path.resolve(__dirname, '../../.chatbi/plugins/system-monitor/dist/index.mjs'),
|
|
13
|
-
'@chatbi-v/plugin-demo-plugin': path.resolve(__dirname, '../../plugins/demo-plugin/src/index.tsx'),
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
})
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Plugin, PluginContext, Slot } from '@chatbi-v/core'
|
|
3
|
-
import { MessageOutlined } from '@ant-design/icons'
|
|
4
|
-
|
|
5
|
-
export class DemoPlugin implements Plugin {
|
|
6
|
-
id = 'demo-plugin'
|
|
7
|
-
metadata = {
|
|
8
|
-
id: 'demo-plugin',
|
|
9
|
-
name: 'Demo Business Plugin',
|
|
10
|
-
version: '1.0.0',
|
|
11
|
-
type: 'business' as const,
|
|
12
|
-
routes: [
|
|
13
|
-
{
|
|
14
|
-
path: '/demo',
|
|
15
|
-
component: () => <div style=\{{ padding: '20px', background: '#f5f5f5', borderRadius: '8px' }}>
|
|
16
|
-
<h3>Hello from Demo Plugin!</h3>
|
|
17
|
-
<p>This is a business plugin generated by ChatBI CLI.</p>
|
|
18
|
-
</div>,
|
|
19
|
-
meta: {
|
|
20
|
-
title: '演示',
|
|
21
|
-
icon: 'MessageOutlined'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
extensions: [
|
|
26
|
-
{
|
|
27
|
-
slot: Slot.Sidebar,
|
|
28
|
-
component: () => null,
|
|
29
|
-
order: 10,
|
|
30
|
-
meta: {
|
|
31
|
-
title: '演示',
|
|
32
|
-
icon: <MessageOutlined />,
|
|
33
|
-
path: '/demo'
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
onLoad(context: PluginContext) {
|
|
40
|
-
context.logger.info('Demo Plugin Loaded!')
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export default DemoPlugin
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|