dsh-pocket 1.0.18 → 1.0.19

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/client/client.js CHANGED
@@ -1482,7 +1482,7 @@ function PocketSettingsTab({ rpcCall }) {
1482
1482
  (0, import_react2.createElement)(
1483
1483
  "div",
1484
1484
  { style: styles.muted, marginTop: 4 },
1485
- updateInfo.result === "ok" ? "\u2705 \u5DF2\u66F4\u65B0\uFF0C\u91CD\u542F dsh web \u751F\u6548 | updated \u2014 restart dsh web" : updateInfo.result === "fail" ? `\u274C \u66F4\u65B0\u5931\u8D25\uFF1A${updateInfo.output || "\u672A\u77E5"}\uFF08\u4E5F\u53EF\u624B\u52A8\u6267\u884C dsh plugin --profile web update dsh-pocket --latest -w\uFF09` : `\u5F53\u524D v${updateInfo.current} \u2192 \u6700\u65B0 v${updateInfo.latest}`
1485
+ updateInfo.result === "ok" ? "\u2705 \u5DF2\u66F4\u65B0\uFF0C\u91CD\u542F dsh web \u751F\u6548 | updated \u2014 restart dsh web" : updateInfo.result === "fail" ? `\u274C \u5931\u8D25\uFF1A${updateInfo.output || "\u672A\u77E5"}\uFF08\u624B\u52A8\u66F4\u65B0\uFF1Adsh plugin --profile web update dsh-pocket --latest -w\uFF09` : `\u5F53\u524D v${updateInfo.current} \u2192 \u6700\u65B0 v${updateInfo.latest}`
1486
1486
  )
1487
1487
  ) : null,
1488
1488
  // 局域网
package/client/index.jsx CHANGED
@@ -233,7 +233,7 @@ function PocketSettingsTab({ rpcCall }) {
233
233
  ),
234
234
  h('div', { style: styles.muted, marginTop: 4 },
235
235
  updateInfo.result === 'ok' ? '✅ 已更新,重启 dsh web 生效 | updated — restart dsh web'
236
- : updateInfo.result === 'fail' ? `❌ 更新失败:${updateInfo.output || '未知'}(也可手动执行 dsh plugin --profile web update dsh-pocket --latest -w)`
236
+ : updateInfo.result === 'fail' ? `❌ 失败:${updateInfo.output || '未知'}(手动更新:dsh plugin --profile web update dsh-pocket --latest -w)`
237
237
  : `当前 v${updateInfo.current} → 最新 v${updateInfo.latest}`),
238
238
  ) : null,
239
239
 
package/lib/index.js CHANGED
@@ -60,7 +60,7 @@ function writeRestartNotice() {
60
60
  /** 自重启(先落 notice,让重启后的页面提示停止方法)。 */
61
61
  function pocketRestart() {
62
62
  writeRestartNotice().catch(() => {});
63
- return restartHost({ internals });
63
+ return restartHost(); // 不传 internals:模块级函数里没有该变量(曾导致 ReferenceError)
64
64
  }
65
65
 
66
66
  /** 执行更新:dsh plugin --profile <p> update dsh-pocket --latest -w(超时保护)。 */
package/lib/push.mjs CHANGED
@@ -135,7 +135,14 @@ export async function createPushService({
135
135
  subs.delete(endpoint);
136
136
  await persist();
137
137
  } else {
138
- log.warn?.('dsh-pocket: push send failed (endpoint %s…) | 推送失败: %s', String(endpoint).slice(0, 48), err?.message ?? err);
138
+ // 完整记录状态码与响应体,方便判断是 FCM 拒绝(401/403)还是网络/代理问题
139
+ log.warn?.(
140
+ 'dsh-pocket: push send failed | 推送失败: %s (status=%s, body=%s, endpoint=%s…)',
141
+ err?.message ?? String(err),
142
+ code ?? '?',
143
+ String(err?.body ?? '').slice(0, 200),
144
+ String(endpoint).slice(0, 48),
145
+ );
139
146
  }
140
147
  }
141
148
  }
package/package.json CHANGED
@@ -77,5 +77,5 @@
77
77
  "access": "public",
78
78
  "registry": "https://registry.npmjs.org/"
79
79
  },
80
- "version": "1.0.18"
80
+ "version": "1.0.19"
81
81
  }