webui 仓库验证报告

openUBMC Web 前端组件 | Vue 3 + Element Plus + OpenDesign V2
仓库: webui
地址: https://gitcode.com/openUBMC/webui
开始: 2026-10-12 21:50
结束: 2026-10-12 22:15
耗时: 约 25 分钟
构建结果
成功
bingo build --stage=dev | 81秒
单元测试
210/211
vitest | 1 个失败
静态检查
全部通过
pre-commit 12 hooks | lint-runner 未配置
DevContainer
已配置
Ubuntu 24.04 | VS Code 扩展

机器规格与镜像

宿主机

架构x86_64
CPU 核心32 核
内存62Gi
磁盘96G 可用
DockerDocker version 29.1.3

容器环境

操作系统Ubuntu 24.04.3 LTS
架构x86_64
CPU 核心32 核
内存62Gi (无限制)
镜像swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06

镜像选择理由:README.md 和 devcontainer.json 均明确指定该镜像,Ubuntu 24.04 LTS 为文档要求唯一支持的操作系统。

文档阅读摘要

提取项来源内容
架构要求README.md - 系统要求x86-64 (amd64)
推荐镜像README.md + devcontainer.jsonswr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06
构建依赖README.md + package.json + conanfile.py + manifest/README.mdPython >= 3.10, Node.js >= 18 LTS, Conan 2.x, bingo, npm >= 8, libcurl4t64, libcurl4-openssl-dev, pkg-config, git, wget, curl, make
构建命令README.md - 组件级构建bingo build --stage=dev
测试命令README.md - 测试 + package.jsonnpm run lint, npx vue-tsc --noEmit, npx vitest run
样例命令README.md - 本地开发调试npm install && npm run dev (开发服务器 http://localhost:5173)
特殊依赖README.md + manifest/README.md需先执行 init.py 初始化环境(安装 bingo、Conan、Node.js 等);需配置 Conan 远程仓库并登录;Docker 容器需设置 OPENUBMC_LICENSE=true

静态检查

Pre-commit

已配置 12 hooks 全部通过 耗时: 30秒

查看 hooks 详情
conventional-commit⊘
add-signoff-and-change-id⊘
check-sr⊘
check-json✓
check-yaml✓
prettier✓
trailing-whitespace✓
end-of-file-fixer✓
check-merge-conflict✓
check-added-large-files✓
check-case-conflict✓
detect-private-key✓
normalize-package-lock✓

Lint-runner

未配置 未找到 lint-runner 相关配置文件

DevContainer

配置项值
配置目录.devcontainer/
配置文件devcontainer.json
镜像swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06
工作目录/workspace
VS Code 扩展cpptools, cmake-tools, python, pylance, ruff, gitlens, rainbow-csv, editorconfig, spell-checker, toml, yaml, cmake
端口转发8000, 8080

构建结果

构建成功 耗时: 81 秒

构建步骤

#步骤说明
1npm install安装前端依赖(1032 个包)
2vite buildVite 前端构建(39.96秒,输出 dist/ 目录)
3gzip compress压缩 426 个静态资源文件
4post-build执行 post-build.config.js 后处理
5npm install --production安装生产依赖(94 个包)
6Conan 打包打包到 Conan 本地缓存

构建产物

webui Conan 包
路径: /root/.conan2/p/b/webuic9b9ff9028107/p | 大小: 4.4 MB
引用: webui/1.100.122@openubmc.dev/dev#3846a065ce86ce88ff2cd0322e93596d:867734cea45654f856023628afb56a05e45da4e5#014b5dbd43237872d05f2df46f74ec42
Web 前端静态资源
路径: opt/bmc/web/htdocs/ | 大小: 4.4 MB
内容: index.html, assets/ (JS/CSS/gz), font/, image/, style/, style_config.json

测试结果

测试项状态耗时详情
ESLint (npm run lint) 部分通过 15 秒 283 个问题(255 错误, 28 警告)。主要错误: max-lines-per-function, complexity, camelcase
vue-tsc --noEmit 失败 31 秒 1 个错误: tsconfig.json 中 suppressImplicitAnyIndexErrors 选项在 TypeScript 5.5 中已弃用
vitest (单元测试) 部分通过 17 秒 210/211 通过。1 个失败: date.spec.ts > should format hour correctly(期望 '20' 实际 '12')

执行时间线

2026-10-12T21:50:00
开始验证流程
已启动
2026-10-12T21:50:05
读取 README.md 了解构建说明
成功 — 阅读了系统要求、环境依赖、构建、测试等章节
2026-10-12T21:50:10
读取 conanfile.py 确认构建流程
成功 — 确认构建步骤: npm install + npm run build + Conan 打包
2026-10-12T21:50:15
读取 package.json 确认前端依赖和脚本
成功 — Vue 3.5.13, Element Plus 2.8.1, Vite 4.5.14
2026-10-12T21:50:20
读取 manifest/README.md 了解环境初始化流程
成功 — 了解了 Docker 容器环境、init.py 执行、Docker 非交互环境等流程
2026-10-12T21:50:30
检查 pre-commit 配置
已配置 — 12 个 hooks,3 个 repo
2026-10-12T21:50:35
执行 pre-commit run --all-files
全部通过 — 10 通过, 2 跳过
2026-10-12T21:50:36
检查 lint-runner 配置
未配置
2026-10-12T21:50:37
检查 .devcontainer 目录
已配置 — 基于 Ubuntu 24.04 镜像
2026-10-12T21:51:00
选择基础镜像
swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06
2026-10-12T21:51:05
拉取镜像并启动容器
成功 — 容器名: ttfhw-webui-env
2026-10-12T21:51:10
安装容器基础工具
成功 — python3, git, wget, curl, make, pkg-config 等
2026-10-12T21:53:10
克隆 manifest 仓库
成功 — https://gitcode.com/openUBMC/manifest.git
2026-10-12T21:53:30
执行 init.py 一键环境初始化
成功 — bingo 0.8.29, Conan 2.30.0, Node v20.18.0, npm 10.8.2
2026-10-12T22:01:35
验证 Conan 远程仓库认证
成功 — 用户: ******, 4552 个包可用
2026-10-12T22:02:05
执行 bingo build --stage=dev 构建组件
成功 — 构建耗时 81 秒, Conan 包已创建
2026-10-12T22:04:00
执行 ESLint 代码检查
部分通过 — 283 个问题(255 错误, 28 警告)
2026-10-12T22:04:20
执行 TypeScript 类型检查
失败 — tsconfig.json 中 suppressImplicitAnyIndexErrors 已弃用
2026-10-12T22:05:00
执行单元测试 (vitest)
部分通过 — 210/211 通过, 1 个失败
2026-10-12T22:06:00
验证构建产物
成功 — 4.4 MB, opt/bmc/web/htdocs/
2026-10-12T22:06:30
停止并删除容器
成功
2026-10-12T22:07:00
生成验证报告
成功 — verification_report_WSL_webui_20261012

执行日志

1. pre-commit run --all-files
pre-commit run --all-files
Check JSON...Passed Check YAML...Passed prettier...Passed trim trailing whitespace...Passed fix end of files...Passed check for merge conflicts...Passed check for added large files...Passed check for case conflicts...Passed detect private key...Passed normalize-package-lock...Passed
returncode: 0success: trueduration: 30s
2. lint-runner 配置检查
find . -name '.lint-runner.*' -o -name 'lint-runner.config.*'
未找到 lint-runner 配置文件
returncode: 0success: trueduration: 1s
3. devcontainer 检查
ls .devcontainer/ && cat .devcontainer/devcontainer.json
devcontainer.json 已找到 image: swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06
returncode: 0success: trueduration: 1s
4. docker pull 镜像
docker pull swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06
Digest: sha256:fb8475c8c5a1ab9e4ae27348954fcb8d9e14bd52df96f5b2f4a3f19eaf8a6303 Status: Image is up to date
returncode: 0success: trueduration: 5s
5. docker run 启动容器
docker run -d --name ttfhw-webui-env -w /home/workspace swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06 tail -f /dev/null
Container ID: cc5c579a5303
returncode: 0success: trueduration: 2s
6. 安装基础工具
apt-get update && apt-get install -y python3 python3-pip python3-venv sudo make locales wget curl git libcurl4t64 libcurl4-openssl-dev pkg-config unzip
基础工具安装完成
returncode: 0success: trueduration: 120s
7. 克隆 manifest 仓库
git clone https://gitcode.com/openUBMC/manifest.git
Cloning into 'manifest'...完成
returncode: 0success: trueduration: 15s
8. 执行 init.py 环境初始化
export OPENUBMC_LICENSE=true && cd /home/workspace/manifest && echo 'Y' | python3 init.py -user ****** -psw '****'
[INFO] ========== 初始化摘要 ========== [INFO] 系统: ubuntu(legacy-full) [INFO] board: openUBMC [INFO] installed: bootstrap: apt-get, bingo, pre-commit 工具, bmc_sdk, QEMU 环境 [INFO] skipped: BMC Studio [INFO] openUBMC开发者环境初始化完成!
returncode: 0success: trueduration: 480snote: Conan 密码已脱敏
9. 验证工具版本
bingo --version && conan --version && node --version && npm --version
bingo 版本为: 0.8.29 Conan version 2.30.0 v20.18.0 10.8.2
returncode: 0success: trueduration: 5s
10. 验证 Conan 远程仓库
conan search --remote openubmc_opensource "*"
Connecting to remote 'openubmc_opensource' with user '******' Found 4552 pkg/version recipes matching * in openubmc_opensource
returncode: 0success: trueduration: 10s
11. 复制仓库到容器
docker cp /opt/agent_build_hk_02/workspace/j_HAvV6XKD ttfhw-webui-env:/home/workspace/webui
仓库源码已复制到容器内
returncode: 0success: trueduration: 5s
12. 执行 bingo build --stage=dev
cd /home/workspace/webui && bingo build --stage=dev
npm install -> vite build (39.96s) -> gzip compress (426 files) -> npm install --production -> Conan 打包 webui/1.100.122@openubmc.dev/dev: Package created Full package reference: webui/1.100.122@openubmc.dev/dev#3846a065ce86ce88ff2cd0322e93596d:867734cea45654f856023628afb56a05e45da4e5#014b5dbd43237872d05f2df46f74ec42 构建成功
returncode: 0success: trueduration: 81s
13. npm install (恢复 devDependencies)
npm install
added 1032 packages in 18s
returncode: 0success: trueduration: 18s
14. ESLint 代码检查
npx eslint "src/**/*.{js,ts,vue,jsx,tsx}" --fix
283 problems (255 errors, 28 warnings) 主要错误类型: max-lines-per-function, complexity, camelcase
returncode: 0success: trueduration: 15snote: npm run lint 因 shell brace expansion 对 .js 无匹配文件报错;用引号包裹模式后可执行
15. TypeScript 类型检查
npx vue-tsc --noEmit
tsconfig.json(17,5): error TS5101: Option 'suppressImplicitAnyIndexErrors' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
returncode: 1success: falseduration: 31s
16. vitest 单元测试
npx vitest run
Test Files: 1 failed | 9 passed (10) Tests: 1 failed | 210 passed (211) Duration: 3.34s 失败用例: tests/unit/utils/date.spec.ts > Date.prototype.pattern Tests > should format hour correctly AssertionError: expected '12' to be '20'
returncode: 0success: trueduration: 17s
17. 验证构建产物
conan cache path "webui/1.100.122@openubmc.dev/dev:867734cea45654f856023628afb56a05e45da4e5"
Package folder: /root/.conan2/p/b/webuic9b9ff9028107/p 产物结构: opt/bmc/web/htdocs/ (index.html, assets/, font/, image/, style/) 总大小: 4.4M
returncode: 0success: trueduration: 2s
18. 清理容器
docker rm -f ttfhw-webui-env
容器已停止并删除
returncode: 0success: trueduration: 2s

遇到的问题

1. npm run lint 命令报错

问题:No files matching the pattern src/**/*.js were found

原因:bash 对 src/**/*.{js,ts,vue,jsx,tsx} 进行 brace expansion,src 目录下无 .js 文件导致字面量传入 eslint 报错。

解决方案:使用引号包裹模式 npx eslint "src/**/*.{js,ts,vue,jsx,tsx}" --fix 可正常执行。

来源: package.json scripts.lint

2. vue-tsc 类型检查失败

问题:tsconfig.json(17,5): error TS5101: Option 'suppressImplicitAnyIndexErrors' is deprecated

原因:tsconfig.json 中使用了 TypeScript 5.5 已弃用的 suppressImplicitAnyIndexErrors 选项。

解决方案:需添加 "ignoreDeprecations": "5.0" 或移除该选项。

来源: tsconfig.json 第17行

3. vitest 时间格式化测试失败

问题:date.spec.ts 中 should format hour correctly 失败:期望 '20' 实际得到 '12'

原因:该测试用例使用硬编码的日期对象进行时间格式化验证,期望小时为 20 但实际得到 12,可能与测试运行时环境时间设置相关。

解决方案:需检查测试用例中的日期对象初始化和时区设置,确保测试与运行环境无关。

来源: tests/unit/utils/date.spec.ts:38

文档差距

README.md 中 lint 命令 npm run lint 使用了 shell brace expansion(src/**/*.{js,ts,vue,jsx,tsx}),在 bash 环境下因无 .js 文件导致报错,需用引号包裹
README.md 未提及 tsconfig.json 中 suppressImplicitAnyIndexErrors 选项在 TypeScript 5.5 下已弃用的问题
README.md 中测试章节仅列出 lint 和 vue-tsc,未提及 vitest 单元测试命令(但 package.json scripts 中有配置)

嵌入的 JSON 原始数据

查看完整 JSON 数据