dsh-deepseek-web-login 0.7.2 → 0.7.3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,41 @@
2
2
 
3
3
  本项目大致遵循语义化版本;日期为本地时间。
4
4
 
5
+ ## 0.7.3 — 2026-10-10
6
+
7
+ **修好 Linux/CI 上浏览器起不来的问题**(0.7.2 只在 ubuntu-latest 上挂,macOS / Windows 同 commit 通过)。
8
+
9
+ ### 根因:启动参数缺 `--no-sandbox`
10
+
11
+ `buildBrowserArgs`(`browser-login.ts:75`)没有 `--no-sandbox`。
12
+ 而**在 Linux 上跑浏览器的人只有两种**:root(容器 / CI runner)
13
+ 或没有 user namespace 权限的普通用户 —— **两种都起不来**。
14
+
15
+ 症状极具误导性:
16
+
17
+ ```
18
+ x 浏览器 fetch 可发送 POST 并读取响应: 浏览器调试端口未就绪
19
+ ```
20
+
21
+ 看起来像超时,实际是**启动失败** —— `waitForTransportDebugPort` 等满 25s 拿不到
22
+ `DevToolsActivePort`。⚠️ **调大那个超时只会掩盖真问题**(本次就没那样做)。
23
+
24
+ 该 flag 在 Windows / macOS 上无害(会被忽略),所以无条件带上。
25
+
26
+ ⚠️ 它降低的是**本机**进程隔离强度;本插件本来就用自己的 profile 跑 headless 浏览器、
27
+ 不加载用户日常 profile,攻击面不因此变大。
28
+
29
+ ### 顺带:那条用例加了重试(双保险)
30
+
31
+ `check-browser-transport.mjs` 的第 4 条是**第一个真拉浏览器**的用例(后面的 FormData 复用同一实例),
32
+ 冷启动开销全压在这里。按项目既有约定(`check-devtools.mjs:132`)加了「重试两次、两次都失败才算坏」,
33
+ 并在改造时**漏掉了 `finally` 收尾**(⇒ 端口与浏览器进程泄漏),已补回 try/finally。
34
+
35
+ ### 验证
36
+
37
+ `buildBrowserArgs` 新增行为断言(变异验证:拿掉 `--no-sandbox` 立刻红)。
38
+ `tsc` / build / 产物 / 隔离 / **67/67** 全过。
39
+
5
40
  ## 0.7.2 — 2026-10-10
6
41
 
7
42
  **修好外部审查报出的 8 条缺陷**(P1×3 / P2×4 / P3×1)。审查给了行号、复现脚本与置信度标注,
package/lib/index.js CHANGED
@@ -3991,6 +3991,7 @@ function buildBrowserArgs(profileDir, url) {
3991
3991
  "--disable-sync",
3992
3992
  "--no-service-autorun",
3993
3993
  "--disable-background-mode",
3994
+ "--no-sandbox",
3994
3995
  url
3995
3996
  ];
3996
3997
  }
@@ -10911,7 +10912,7 @@ async function checkForUpdate(current, fetchImpl) {
10911
10912
  * 兜底常量与 package.json 的一致性由 `tests/check-smoke.mjs` 守着,不会漂。
10912
10913
  */
10913
10914
  /** 与 package.json 保持一致的兜底版本(由测试保证不会漂)。 */
10914
- const FALLBACK_VERSION = "0.7.2";
10915
+ const FALLBACK_VERSION = "0.7.3";
10915
10916
  let cached;
10916
10917
  /** 本插件版本(如 `0.1.26`)。 */
10917
10918
  function pluginVersion() {