dsh-shlr-bilitoolkit 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. package/dist/dsh.js +8 -1
  2. package/package.json +1 -1
package/dist/dsh.js CHANGED
@@ -28,7 +28,14 @@ async function getClient() {
28
28
  cached = new BiliClient({
29
29
  cookieFile: process.env.BILI_COOKIE_FILE ?? "bili_cookies.json",
30
30
  });
31
- await cached.loadCookies();
31
+ // 没有 Cookie 文件(或为空 / 损坏)= 未登录(匿名)。
32
+ // 不能因此让所有工具崩掉——公开接口、以及最关键的扫码登录入口都依赖这里。
33
+ try {
34
+ await cached.loadCookies();
35
+ }
36
+ catch {
37
+ // 按未登录处理:匿名可用公开接口;需要登录的操作会再由接口层报错
38
+ }
32
39
  }
33
40
  return cached;
34
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-shlr-bilitoolkit",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "深海猎人专用B站接口工具箱 dsh 插件。",
5
5
  "type": "module",
6
6
  "main": "dist/dsh.js",