Merge pull request #248 from trheyi/main

[optimize] engine load & start cmd
This commit is contained in:
Max 2022-11-10 12:43:57 +08:00 committed by GitHub
commit 720a140f7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 2 deletions

View file

@ -18,7 +18,11 @@ jobs:
runs-on: "macos-11"
steps:
- name: Install coscmd
run: sudo pip3 install coscmd
run: |
sudo /Library/Frameworks/Python.framework/Versions/3.11/bin/python -m pip install --upgrade pip
sudo pip3 install coscmd
whereis coscmd
coscmd -v
- name: Install pnpm
run: npm install -g pnpm

View file

@ -320,7 +320,12 @@ func printApis(silent bool) {
continue
}
fmt.Printf(color.CyanString("\n%s(%d)\n", api.Name, len(api.HTTP.Paths)))
deprecated := ""
if strings.HasPrefix(api.Name, "xiang.") {
deprecated = " WILL BE DEPRECATED"
}
fmt.Printf("%s%s\n", color.CyanString("\n%s(%d)", api.Name, len(api.HTTP.Paths)), color.RedString(deprecated))
for _, p := range api.HTTP.Paths {
fmt.Println(
colorMehtod(p.Method),

View file

@ -156,6 +156,11 @@ func Load(cfg config.Config) (err error) {
}
delete(gou.APIs, "xiang.table")
delete(gou.APIs, "xiang.page")
delete(gou.APIs, "xiang.chart")
delete(gou.APIs, "xiang.xiang")
delete(gou.APIs, "xiang.user")
delete(gou.APIs, "xiang.storage")
} else { // old version
err = table.Load(cfg) // 加载数据表格 table