feat: Verdaccio 缓存可视化管理面板(前端 + 后端 + Docker)

- 前端 Vue3+Vite+Element Plus 按需引入,双主题(bright/dark)CSS 变量
- 三端响应式(桌面/平板/手机),登录/概览/检索/阈值/忽略/动态 6 页面
- 后端 Express + better-sqlite3,目录扫描 + demo 模式,清理原子写入
- Dockerfile 多阶段构建 + docker-compose(storage 只读挂载)
This commit is contained in:
陈银军
2026-09-19 15:00:04 +08:00
parent 338c1a0a95
commit 0a9ca8894a
43 changed files with 7036 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
/**
* semver 数值比较(轻量实现,无第三方依赖)
* 支持 v 前缀与 prerelease 后缀(仅比较主版本号主体)
*/
export default function compare(a, b) {
const pa = parse(a)
const pb = parse(b)
for (let i = 0; i < 3; i++) {
if (pa[i] !== pb[i]) return pa[i] - pb[i]
}
return 0
}
function parse(v) {
const main = String(v).replace(/^v/, '').split(/[-+]/)[0]
const parts = main.split('.')
return [
parseInt(parts[0], 10) || 0,
parseInt(parts[1], 10) || 0,
parseInt(parts[2], 10) || 0,
]
}