mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-31 08:33:36 +00:00
fix(web): resolved web build issues with yarn and missing dependencies (#1658)
This commit is contained in:
50
.github/workflows/build-web.yml
vendored
Normal file
50
.github/workflows/build-web.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: Build Web Application
|
||||
|
||||
# Triggered when the web directory or this file is changed
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- web/**
|
||||
- .github/workflows/build-web.yml
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- web/**
|
||||
- .github/workflows/build-web.yml
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.event.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
# Runs all jobs in the web directory
|
||||
working-directory: ./web
|
||||
|
||||
jobs:
|
||||
build-web:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# FIXME: Add windows-latest support
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
yarn install
|
||||
|
||||
- name: Build web application
|
||||
run: |
|
||||
yarn build
|
23
setup.py
23
setup.py
@@ -1,4 +1,5 @@
|
||||
import functools
|
||||
import json
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
@@ -753,6 +754,25 @@ else:
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
class PrintExtrasCommand(setuptools.Command):
|
||||
description = "print extras_require"
|
||||
user_options = [
|
||||
('output=', 'o', 'Path to output the extras_require JSON'),
|
||||
]
|
||||
|
||||
def initialize_options(self):
|
||||
self.output = None
|
||||
|
||||
def finalize_options(self):
|
||||
if self.output is None:
|
||||
raise ValueError("output is not set")
|
||||
|
||||
def run(self):
|
||||
with open(self.output, 'w') as f:
|
||||
json.dump(setup_spec.unique_extras, f, indent=2)
|
||||
|
||||
|
||||
setuptools.setup(
|
||||
name="dbgpt",
|
||||
packages=packages,
|
||||
@@ -770,6 +790,9 @@ setuptools.setup(
|
||||
license="https://opensource.org/license/mit/",
|
||||
python_requires=">=3.10",
|
||||
extras_require=setup_spec.unique_extras,
|
||||
cmdclass={
|
||||
'print_extras': PrintExtrasCommand,
|
||||
},
|
||||
entry_points={
|
||||
"console_scripts": [
|
||||
"dbgpt=dbgpt.cli.cli_scripts:main",
|
||||
|
@@ -36,14 +36,14 @@ Also, it is a **LLM to Vision** solution.
|
||||
### Prerequisites
|
||||
|
||||
- [Node.js](https://nodejs.org/) >= 16
|
||||
- [npm](https://npmjs.com/) >= 8
|
||||
- [yarn](https://yarnpkg.com/) >= 1.22
|
||||
- Supported OSes: Linux, macOS and Windows
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
# Install dependencies
|
||||
npm install
|
||||
yarn install
|
||||
```
|
||||
|
||||
### Usage
|
||||
@@ -54,13 +54,13 @@ edit the `API_BASE_URL` to the real address
|
||||
|
||||
```sh
|
||||
# development model
|
||||
npm run dev
|
||||
yarn dev
|
||||
```
|
||||
|
||||
## 🚀 Use In DB-GPT
|
||||
|
||||
```sh
|
||||
npm run compile
|
||||
yarn compile
|
||||
|
||||
# copy compile file to DB-GPT static file dictory
|
||||
cp -rf out/* ../dbgpt/app/static
|
||||
|
20050
web/package-lock.json
generated
20050
web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -17,10 +17,13 @@
|
||||
"@antv/g2": "^5.1.8",
|
||||
"@antv/s2": "^1.51.2",
|
||||
"@berryv/g2-react": "^0.1.0",
|
||||
"@emotion/react": "^11.11.4",
|
||||
"@emotion/styled": "^11.11.5",
|
||||
"@microsoft/fetch-event-source": "^2.0.1",
|
||||
"@monaco-editor/react": "^4.5.2",
|
||||
"@mui/icons-material": "^5.11.16",
|
||||
"@mui/joy": "5.0.0-beta.5",
|
||||
"@mui/material": "^5.15.20",
|
||||
"@oceanbase-odc/monaco-plugin-ob": "^1.0.3",
|
||||
"ahooks": "^3.7.8",
|
||||
"antd": "^5.6.2",
|
||||
@@ -32,6 +35,7 @@
|
||||
"i18next": "^23.4.5",
|
||||
"lodash": "^4.17.21",
|
||||
"moment": "^2.29.4",
|
||||
"monaco-editor": ">=0.31.0",
|
||||
"next": "13.4.7",
|
||||
"next-auth": "^4.20.1",
|
||||
"nprogress": "^0.2.0",
|
||||
|
6722
web/yarn.lock
Normal file
6722
web/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user