dsh-mobile-plugin 0.5.106 → 0.5.108

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * 插件入口(**稳定外壳**)。
3
3
  *
4
+ * 2026-11-24:查新版改为与装包同源(优先问 npm,市场兜底),修 106 卡住不放。
5
+ *
4
6
  * 这个文件是整条自更新链路的锚点,所以它必须尽量不变。真正的实现在**代**里:随包发布的
5
7
  * 那份是 `lib/impl.js`,市场装新版之后 profile 里那份是新一代(新 realpath)。
6
8
  * 外壳负责挑一代、装上去,并在更新到位后换过去,见 `lib/shell/runtime.js`。
@@ -78,7 +80,13 @@ export function apply(ctx) {
78
80
  updateState.checking = true
79
81
  try {
80
82
  await deviceOta.reconcileOfficial()
81
- updateState.result = await updater.checkUpdate(base())
83
+ // 与真正装包同源:先问盘上那一代的 npm 查询模块;只有那一代没有查询模块(老版本 /
84
+ // 无头源码部署)才退回市场。市场没同步到新版就让自动更新停摆、而 App 走 npm 看得到
85
+ // 新版 —— 这正是 0.5.106 卡住不放的原因,两处判据必须走同一个源。
86
+ const fromNpm = await updater.checkFromGeneration({
87
+ packageManager: hostService('profileContext')?.packageManager ?? null,
88
+ })
89
+ updateState.result = fromNpm ?? await updater.checkUpdate(base())
82
90
  updateState.lastError = null
83
91
  } catch (error) {
84
92
  updateState.result = null