reactnativecn / react-native-pushy

React Native 极速热更新服务
https://pushy.reactnative.cn
Other
1.77k stars 257 forks source link

[✨ Feature Request] 希望支持类似 topics 的功能,以便检查更新的时候根据 topic 命中匹配条件中的最新版本 #419

Open microJ opened 10 months ago

microJ commented 10 months ago

如题。 场景:灰度、多项目并行。

sunnylqm commented 10 months ago

可以通过metainfo来实现 https://pushy.reactnative.cn/docs/bestpractice.html#%E5%85%83%E4%BF%A1%E6%81%AFmeta-info%E7%9A%84%E4%BD%BF%E7%94%A8

microJ commented 10 months ago

@sunnylqm 本质上希望的是在检查更新时,携带某些匹配条件,加强命中意图。

需求描述

例如现在有 version histories with id and topic :

[
  {id: 100, topics: []},
  {id: 99, topics: ['feature1']},
  {id: 98, topics: ['feature2', 'bugfix']},
]

现有功能只能被动的获取整个 version history 中 最新版本(id==100),进而根据 metainfo 继续做业务判断,但是最新的 version 并非客户端需要的。此时,用户希望命中 version history 中 topics 含有 feature2 的最新版本(id==98)。

修改建议

  1. 管理后台新增命中条件字段;
  2. 客户端在 checkUpdate() 入参携带条件,返回命中的最新结果或者有限长度的list。