feat(store): 实现混合仓库优先级配置功能

添加优先级配置文件支持,根据配置决定默认展示的仓库版本
新增优先级规则匹配逻辑,支持包名、分类和标签匹配
修改应用详情和合并应用的默认来源判断逻辑
This commit is contained in:
2026-04-05 09:52:06 +08:00
parent 70f6c8e812
commit d74e05a327
4 changed files with 252 additions and 8 deletions

View File

@@ -0,0 +1,27 @@
{
"_comment": "优先级配置文件 - 放在服务器 ${arch}-store/ 目录下,文件名为 priority-config.json",
"_comment2": "默认 APM 优先,此文件配置例外规则",
"_comment3": "判断优先级从高到低apmPriority.pkgnames > sparkPriority.pkgnames > apmPriority.categories > sparkPriority.categories > apmPriority.tags > sparkPriority.tags > 默认APM",
"_comment4": "如果服务器没有这个文件,所有应用都默认优先 APM",
"sparkPriority": {
"_comment": "优先使用 Spark 的规则(例外于默认 APM 优先)",
"pkgnames": [],
"categories": [
"development"
],
"tags": [
"prefer-spark"
]
},
"apmPriority": {
"_comment": "优先使用 APM 的规则(例外于 sparkPriority具有更高优先级",
"_comment2": "例如games 分类默认优先 Spark但其中的某些应用仍优先 APM",
"pkgnames": [],
"categories": [],
"tags": [
"prefer-apm"
]
}
}