| 架构 | x86_64 |
|---|---|
| CPU 核心 | 32 核 |
| 内存 | 62Gi |
| 磁盘 | 96G 可用 |
| Docker | Docker 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.json | swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06 |
| 构建依赖 | README.md + package.json + conanfile.py + manifest/README.md | Python >= 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.json | npm 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 |
已配置 12 hooks 全部通过 耗时: 30秒
未配置 未找到 lint-runner 相关配置文件
| 配置项 | 值 |
|---|---|
| 配置目录 | .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 |
| # | 步骤 | 说明 |
|---|---|---|
| 1 | npm install | 安装前端依赖(1032 个包) |
| 2 | vite build | Vite 前端构建(39.96秒,输出 dist/ 目录) |
| 3 | gzip compress | 压缩 426 个静态资源文件 |
| 4 | post-build | 执行 post-build.config.js 后处理 |
| 5 | npm install --production | 安装生产依赖(94 个包) |
| 6 | Conan 打包 | 打包到 Conan 本地缓存 |
| 测试项 | 状态 | 耗时 | 详情 |
|---|---|---|---|
| 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') |
问题: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
问题:tsconfig.json(17,5): error TS5101: Option 'suppressImplicitAnyIndexErrors' is deprecated
原因:tsconfig.json 中使用了 TypeScript 5.5 已弃用的 suppressImplicitAnyIndexErrors 选项。
解决方案:需添加 "ignoreDeprecations": "5.0" 或移除该选项。
来源: tsconfig.json 第17行
问题:date.spec.ts 中 should format hour correctly 失败:期望 '20' 实际得到 '12'
原因:该测试用例使用硬编码的日期对象进行时间格式化验证,期望小时为 20 但实际得到 12,可能与测试运行时环境时间设置相关。
解决方案:需检查测试用例中的日期对象初始化和时区设置,确保测试与运行环境无关。
来源: tests/unit/utils/date.spec.ts:38