karin-plugin-kkk 2.15.1 → 2.15.2

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 (35) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +31 -74
  3. package/lib/apps/admin.js +3 -3
  4. package/lib/apps/help.js +3 -3
  5. package/lib/apps/push.js +3 -3
  6. package/lib/apps/tools.js +3 -3
  7. package/lib/apps/update.js +3 -3
  8. package/lib/build-metadata.json +5 -5
  9. package/lib/core_chunk/{main-B88vuAg3.js → main-14od0VyY.js} +68 -64
  10. package/lib/core_chunk/{rolldown-runtime-BMXAG3ag.js → rolldown-runtime-FWYmKKAj.js} +1 -2
  11. package/lib/core_chunk/{template-CuCBcPSZ.js → template-UGmQ7vUV.js} +2 -2
  12. package/lib/core_chunk/template.js +2 -2
  13. package/lib/core_chunk/{vendor-fLu5LGop.js → vendor-DoVeMvEg.js} +78927 -3531
  14. package/lib/index.js +3 -3
  15. package/lib/root.js +1 -1
  16. package/lib/web.config.js +3 -3
  17. package/lib/web_chunk/assets/{Combination-CElmvm1y.js → Combination-BHJal5hU.js} +1 -1
  18. package/lib/web_chunk/assets/{avatar-DdKKK8fN.js → avatar-Bk-l0vwp.js} +1 -1
  19. package/lib/web_chunk/assets/core-BktEBjVB.js +1 -0
  20. package/lib/web_chunk/assets/{eye-DscQBlfD.js → eye-DKV8219y.js} +1 -1
  21. package/lib/web_chunk/assets/{index-CVeWpiod.js → index-CrQKpnky.js} +2 -2
  22. package/lib/web_chunk/assets/{jszip.min-IdIeQO8w.js → jszip.min-CRbx4NQr.js} +1 -1
  23. package/lib/web_chunk/assets/{page-BZ-DxMJp.js → page-3eH1NE5B.js} +1 -1
  24. package/lib/web_chunk/assets/{page-jMAgww3l.js → page-CXeTxMT1.js} +2 -2
  25. package/lib/web_chunk/assets/{page-CvLBFVUj.js → page-Cd6drSuq.js} +1 -1
  26. package/lib/web_chunk/assets/{page-B3Z9ZoZE.js → page-D5DkJUyl.js} +1 -1
  27. package/lib/web_chunk/assets/{page-Ds7pyOc_.js → page-DVOFQ8PQ.js} +4 -4
  28. package/lib/web_chunk/assets/{parsers-DslAp9xq.js → parsers-DG8cIK4g.js} +1 -1
  29. package/lib/web_chunk/assets/{request-BrzrZK5Z.js → request-DTUmEUrr.js} +1 -1
  30. package/lib/web_chunk/assets/{select-B9ErW2-J.js → select-DLWN_-Ck.js} +1 -1
  31. package/lib/web_chunk/assets/{separator-BqVV7haD.js → separator-CJxDARm4.js} +1 -1
  32. package/lib/web_chunk/index.html +1 -1
  33. package/lib/web_chunk/sw.js +1 -1
  34. package/package.json +4 -1
  35. package/lib/web_chunk/assets/core-CdUvdXfI.js +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [2.15.2](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.15.1...v2.15.2) (2025-12-07)
6
+
7
+
8
+ ### 🐛 错误修复
9
+
10
+ * 更新小红书算法v4.86.0 ([d133a54](https://github.com/ikenxuan/karin-plugin-kkk/commit/d133a54b37b3cecb81ae6b92e72d48dc95629e12))
11
+ * 更新状态判断失误 ([0598334](https://github.com/ikenxuan/karin-plugin-kkk/commit/0598334cd281e040a7dba7d8349ccd6c0ce3f2d9))
12
+ * 迁移到@snapka/puppeteer ([#232](https://github.com/ikenxuan/karin-plugin-kkk/issues/232)) ([848926b](https://github.com/ikenxuan/karin-plugin-kkk/commit/848926bb4463149847d0f40e0bb0e5c4d2f0bc64))
13
+
14
+
15
+ ### 📝 文档更新
16
+
17
+ * readme ([bdb3468](https://github.com/ikenxuan/karin-plugin-kkk/commit/bdb3468d67bef7df4c81ebbbd400f00ae4b87a31))
18
+
5
19
  ## [2.15.1](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.15.0...v2.15.1) (2025-12-02)
6
20
 
7
21
 
package/README.md CHANGED
@@ -1,79 +1,53 @@
1
+ <div align="center">
2
+
1
3
  # karin-plugin-kkk
2
4
 
3
5
  [![pkg.pr.new](https://pkg.pr.new/badge/ikenxuan/karin-plugin-kkk)](https://pkg.pr.new/~/ikenxuan/karin-plugin-kkk)
4
6
 
5
- 🦄 **_Karin 的「抖音」「B 站」视频解析/动态推送插件。提供对 Bot 的视频解析和动态推送功能,通过接口获取数据并渲染图片返回_**
7
+ _Karin 的「抖音」「B 站」视频解析/动态推送插件_
6
8
 
7
- ## ⬇️ 安装
9
+ > 提供对 Bot 的视频解析和动态推送功能,通过接口获取数据并渲染图片返回
8
10
 
9
- - 插件市场安装(非常推荐)
11
+ </div>
10
12
 
11
- **通过 Karin WebUI 的插件市场直接安装和管理本插件。**
13
+ ---
12
14
 
13
- <br />
15
+ ## Feature
14
16
 
15
- - 使用 **`包管理器`** 安装(推荐)
16
- **Karin 项目根目录** 下运行<br />
17
- 手动更新时更新也可以使用该命令
18
- ```sh
19
- pnpm add karin-plugin-kkk@latest -w
20
- ```
17
+ - **视频解析** - 自动解析抖音、B站、快手、小红书链接
18
+ - **动态推送** - 订阅博主/UP主,自动推送最新动态
19
+ - **扫码登录** - 支持扫码获取平台 Cookies
20
+ - **WebUI 配置** - 通过 Karin WebUI 轻松管理插件
21
21
 
22
- <br />
22
+ ## Quick Start
23
23
 
24
- ## ⚙️ 配置
24
+ 推荐通过 **Karin WebUI 插件市场** 安装,或使用命令:
25
25
 
26
- 必须配置对应平台的 Cookies 才能使用。<br />
27
- 其他更多配置项请在 Karin WebUI 插件配置中查看并配置。
26
+ ```sh
27
+ pnpm add karin-plugin-kkk@latest -w
28
+ ```
28
29
 
29
- ## 📖 功能
30
+ > 首次使用请务必查看文档了解配置方法
30
31
 
31
- **更多信息可打开 [文档主页](https://karin-plugin-kkk-docs.vercel.app) 阅读。**<br>
32
- 反馈群:[795874649](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=S8y6baEcSkO6TEO5kEdfgmJhz79Oxdw5&authKey=ficWQytHGz3KIv5i0HpGbEeMBpABBXfjEMYRzo3ZwMV%2B0Y5mq8cC0Yxbczfa904H&noverify=0&group_code=795874649)
32
+ ## Link
33
33
 
34
- ## 🛠️ 开发
34
+ | 文档 | [![Vercel](https://img.shields.io/badge/docs%20on-Vercel-black)](https://karin-plugin-kkk-docs.vercel.app) | [![Netlify](https://img.shields.io/badge/docs%20on-Netlify-00C7B7)](https://karin-plugin-kkk-docs.netlify.app) |
35
+ |:-:|:-:|:-:|
36
+ | QQ 群 | [![QQ Group](https://img.shields.io/badge/QQ%20Group-795874649-blue)](https://qm.qq.com/q/DgLbCERYVG) | |
37
+ | DeepWiki | [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/ikenxuan/karin-plugin-kkk) | |
35
38
 
36
- <details>
37
- <summary>点击展开</summary>
39
+ ## Thanks
38
40
 
39
- 1. [fork](https://github.com/ikenxuan/karin-plugin-kkk/fork) 本项目到自己的仓库
40
- 2. 克隆到本地
41
- ```sh
42
- git clone https://github.com/你的GitHub用户名/karin-plugin-kkk.git
43
- ```
44
- 3. 安装依赖
45
- ```sh
46
- pnpm i
47
- ```
48
- 4. 启动开发环境
49
- ```sh
50
- # tsx 监听core子包文件变化并自动重启
51
- pnpm watch
52
- ```
53
- ```sh
54
- # 调试图片模板
55
- pnpm template
56
- ```
57
- ```sh
58
- # 调试自带的web
59
- pnpm web
60
- ```
61
- ```sh
62
- # 打包
63
- pnpm build
64
- ```
65
-
66
- </details>
41
+ - [Karin](https://github.com/Karinjs/Karin) - Bot 框架
42
+ - [amagi](https://github.com/ikenxuan/amagi) - 接口文档与加密参数算法
67
43
 
68
- ## 🌟 贡献者
69
-
70
- > 🌟 星光闪烁,你们的智慧如同璀璨的夜空。感谢所有为 **karin-plugin-kkk** 做出贡献的人!
44
+ ## Contributors
71
45
 
72
46
  <a href="https://github.com/ikenxuan/karin-plugin-kkk/graphs/contributors">
73
47
  <img src="https://contrib.rocks/image?repo=ikenxuan/karin-plugin-kkk" />
74
48
  </a>
75
49
 
76
- ![Alt](https://repobeats.axiom.co/api/embed/76efd64f02ce043df06e2cd21913a0981b87f069.svg 'Repobeats analytics image')
50
+ ![Repobeats](https://repobeats.axiom.co/api/embed/76efd64f02ce043df06e2cd21913a0981b87f069.svg 'Repobeats analytics image')
77
51
 
78
52
  ## Star History
79
53
 
@@ -85,27 +59,10 @@ pnpm build
85
59
  </picture>
86
60
  </a>
87
61
 
88
- ## 😊 鸣谢
89
-
90
- **业务站点**
91
-
92
- - [www.douyin.com](https://www.douyin.com) & [www.bilibili.com](https://www.bilibili.com) & [www.kuaishou.com](https://www.kuaishou.com)
93
-
94
- 本项目的开发参考了以下开源项目部分代码,排名不分先后
95
-
96
- **接口文档与加密参数算法**
97
-
98
- - [ikenxuan/amagi](https://github.com/ikenxuan/amagi)
99
- - 更多待补充...
100
-
101
- **友情链接**
102
-
103
- - Karin 框架 [**GitHub**](https://github.com/Karinjs/Karin) | [**文档**](https://karin.fun)
104
-
105
- ## 🧷 许可证
62
+ ---
106
63
 
107
- [**GPL-3.0**](./LICENSE)
64
+ ## License
108
65
 
109
- ## 声明
66
+ 本项目采用 [**GPL-3.0**](./LICENSE) 开源。
110
67
 
111
- 未经同意,禁止将本项目的开源代码用于任何商业目的。因使用本项目产生的一切问题与后果由使用者自行承担,项目开发者不承担任何责任。
68
+ **未经同意,禁止将本项目的开源代码用于任何商业目的。因使用本项目产生的一切问题与后果由使用者自行承担,项目开发者不承担任何责任。**
package/lib/apps/admin.js CHANGED
@@ -1,4 +1,4 @@
1
- import "../core_chunk/vendor-fLu5LGop.js";
2
- import { C as setbilick, S as removeAllFiles, T as task, b as biLogin, w as setdyck, x as dylogin } from "../core_chunk/main-B88vuAg3.js";
3
- import "../core_chunk/template-CuCBcPSZ.js";
1
+ import "../core_chunk/vendor-DoVeMvEg.js";
2
+ import { C as setbilick, S as removeAllFiles, T as task, b as biLogin, w as setdyck, x as dylogin } from "../core_chunk/main-14od0VyY.js";
3
+ import "../core_chunk/template-UGmQ7vUV.js";
4
4
  export { biLogin, dylogin, removeAllFiles, setbilick, setdyck, task };
package/lib/apps/help.js CHANGED
@@ -1,4 +1,4 @@
1
- import "../core_chunk/vendor-fLu5LGop.js";
2
- import { v as help, y as version } from "../core_chunk/main-B88vuAg3.js";
3
- import "../core_chunk/template-CuCBcPSZ.js";
1
+ import "../core_chunk/vendor-DoVeMvEg.js";
2
+ import { v as help, y as version } from "../core_chunk/main-14od0VyY.js";
3
+ import "../core_chunk/template-UGmQ7vUV.js";
4
4
  export { help, version };
package/lib/apps/push.js CHANGED
@@ -1,4 +1,4 @@
1
- import "../core_chunk/vendor-fLu5LGop.js";
2
- import { _ as testDouyinPush, d as changeBotID, f as douyinPush, g as setdyPush, h as setbiliPush, l as bilibiliPush, m as forcePush, p as douyinPushList, u as bilibiliPushList } from "../core_chunk/main-B88vuAg3.js";
3
- import "../core_chunk/template-CuCBcPSZ.js";
1
+ import "../core_chunk/vendor-DoVeMvEg.js";
2
+ import { _ as testDouyinPush, d as changeBotID, f as douyinPush, g as setdyPush, h as setbiliPush, l as bilibiliPush, m as forcePush, p as douyinPushList, u as bilibiliPushList } from "../core_chunk/main-14od0VyY.js";
3
+ import "../core_chunk/template-UGmQ7vUV.js";
4
4
  export { bilibiliPush, bilibiliPushList, changeBotID, douyinPush, douyinPushList, forcePush, setbiliPush, setdyPush, testDouyinPush };
package/lib/apps/tools.js CHANGED
@@ -1,4 +1,4 @@
1
- import "../core_chunk/vendor-fLu5LGop.js";
2
- import { a as douyinAPP, c as xiaohongshuAPP, i as bilibiliAPP, o as kuaishouAPP, s as prefix } from "../core_chunk/main-B88vuAg3.js";
3
- import "../core_chunk/template-CuCBcPSZ.js";
1
+ import "../core_chunk/vendor-DoVeMvEg.js";
2
+ import { a as douyinAPP, c as xiaohongshuAPP, i as bilibiliAPP, o as kuaishouAPP, s as prefix } from "../core_chunk/main-14od0VyY.js";
3
+ import "../core_chunk/template-UGmQ7vUV.js";
4
4
  export { bilibiliAPP, douyinAPP, kuaishouAPP, prefix, xiaohongshuAPP };
@@ -1,4 +1,4 @@
1
- import "../core_chunk/vendor-fLu5LGop.js";
2
- import { n as kkkUpdateCommand, r as update, t as kkkUpdate } from "../core_chunk/main-B88vuAg3.js";
3
- import "../core_chunk/template-CuCBcPSZ.js";
1
+ import "../core_chunk/vendor-DoVeMvEg.js";
2
+ import { n as kkkUpdateCommand, r as update, t as kkkUpdate } from "../core_chunk/main-14od0VyY.js";
3
+ import "../core_chunk/template-UGmQ7vUV.js";
4
4
  export { kkkUpdate, kkkUpdateCommand, update };
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "2.15.1",
3
- "buildTime": "2025-12-02T02:22:57.868Z",
4
- "buildTimestamp": 1764642177868,
2
+ "version": "2.15.2",
3
+ "buildTime": "2025-12-07T14:57:09.347Z",
4
+ "buildTimestamp": 1765119429348,
5
5
  "name": "karin-plugin-kkk",
6
6
  "description": "Karin 的「抖音」「B 站」视频解析/动态推送插件",
7
7
  "homepage": "https://github.com/ikenxuan/karin-plugin-kkk",
8
- "commitHash": "7324dd9b237e5b3748c90f283c3b31c6230affd5",
9
- "shortCommitHash": "7324dd9b"
8
+ "commitHash": "a6d00dd45e3affb9bbaef3980dff01e48c8ff492",
9
+ "shortCommitHash": "a6d00dd4"
10
10
  }
@@ -1,6 +1,6 @@
1
- import { n as __esmMin, o as __toESM, r as __export } from "./rolldown-runtime-BMXAG3ag.js";
2
- import { Bt as bilibiliApiUrls, D as formatDistanceToNow, E as fromUnixTime, Ft as require_lib$1, Gt as logMiddleware, Ht as createDouyinRoutes, It as require_lib, Jt as express, Kt as logger$1, Lt as Client, O as format$1, Pt as require_dist, Rt as DynamicType, S as zhCN, T as init_date_fns, Ut as createKuaishouRoutes, Vt as createBilibiliRoutes, Wt as init_default, Yt as init_dist, i as Window, k as differenceInSeconds, n as require_qr_code_styling, qt as wbi_sign, r as init_lib, t as require_heic_convert, x as init_locale, zt as MajorType } from "./vendor-fLu5LGop.js";
3
- import { n as init_client, r as reactServerRender } from "./template-CuCBcPSZ.js";
1
+ import { a as __toESM, n as __esmMin, r as __export } from "./rolldown-runtime-FWYmKKAj.js";
2
+ import { A as differenceInSeconds, Bt as MajorType, C as zhCN, D as fromUnixTime, E as init_date_fns, Ft as require_dist, Gt as init_default, Ht as createBilibiliRoutes, It as require_lib$1, Jt as wbi_sign, Kt as logMiddleware, Lt as require_lib, O as formatDistanceToNow, Rt as Client, S as init_locale, Ut as createDouyinRoutes, Vt as bilibiliApiUrls, Wt as createKuaishouRoutes, Xt as init_dist, Yt as express, a as Window, i as init_lib, k as format$1, n as require_heic_convert, qt as logger$1, r as require_qr_code_styling, t as snapka, zt as DynamicType } from "./vendor-DoVeMvEg.js";
3
+ import { n as init_client, r as reactServerRender } from "./template-UGmQ7vUV.js";
4
4
  import path, { resolve } from "node:path";
5
5
  import fs from "node:fs";
6
6
  import { fileURLToPath } from "node:url";
@@ -15,7 +15,6 @@ import { pipeline } from "node:stream/promises";
15
15
  import axios, { AxiosError } from "node-karin/axios";
16
16
  import template from "node-karin/template";
17
17
  import _ from "node-karin/lodash";
18
- import { launch } from "@karinjs/plugin-puppeteer";
19
18
  import { newInjectedPage } from "fingerprint-injector";
20
19
  var resolvePluginRoot, pluginPath, pkg, Root;
21
20
  var init_root = __esmMin(() => {
@@ -939,6 +938,57 @@ var init_plugins = __esmMin(() => {
939
938
  }
940
939
  });
941
940
  });
941
+ var semver_exports = __export({ isSemverGreater: () => isSemverGreater });
942
+ var isSemverGreater;
943
+ var init_semver = __esmMin(() => {
944
+ isSemverGreater = (remote, local) => {
945
+ const parse = (v) => {
946
+ v = v.trim();
947
+ if (v.startsWith("v") || v.startsWith("V")) v = v.slice(1);
948
+ const [preBuild] = v.split("+", 2);
949
+ const [core, pre] = preBuild.split("-", 2);
950
+ const parts = core.split(".");
951
+ return {
952
+ major: parseInt(parts[0] || "0", 10) || 0,
953
+ minor: parseInt(parts[1] || "0", 10) || 0,
954
+ patch: parseInt(parts[2] || "0", 10) || 0,
955
+ prerelease: pre ? pre.split(".") : []
956
+ };
957
+ };
958
+ const cmpId = (a, b) => {
959
+ const an = /^\d+$/.test(a);
960
+ const bn = /^\d+$/.test(b);
961
+ if (an && bn) {
962
+ const na = parseInt(a, 10);
963
+ const nb = parseInt(b, 10);
964
+ if (na === nb) return 0;
965
+ return na > nb ? 1 : -1;
966
+ }
967
+ if (an && !bn) return -1;
968
+ if (!an && bn) return 1;
969
+ if (a === b) return 0;
970
+ return a > b ? 1 : -1;
971
+ };
972
+ const r = parse(remote);
973
+ const l = parse(local);
974
+ if (r.major !== l.major) return r.major > l.major;
975
+ if (r.minor !== l.minor) return r.minor > l.minor;
976
+ if (r.patch !== l.patch) return r.patch > l.patch;
977
+ const ra = r.prerelease;
978
+ const la = l.prerelease;
979
+ if (ra.length === 0 && la.length === 0) return false;
980
+ if (ra.length === 0 && la.length > 0) return true;
981
+ if (ra.length > 0 && la.length === 0) return false;
982
+ const len = Math.min(ra.length, la.length);
983
+ for (const [i, raItem] of ra.entries()) {
984
+ if (i >= len) break;
985
+ const c = cmpId(raItem, la[i]);
986
+ if (c !== 0) return c > 0;
987
+ }
988
+ if (ra.length !== la.length) return ra.length > la.length;
989
+ return false;
990
+ };
991
+ });
942
992
  var Render;
943
993
  var init_Render = __esmMin(async () => {
944
994
  await init_client();
@@ -958,8 +1008,9 @@ var init_Render = __esmMin(async () => {
958
1008
  let hasUpdate = false;
959
1009
  if (!Config.app.RemoveWatermark) try {
960
1010
  const { db: db$1 } = await import("node-karin");
1011
+ const { isSemverGreater: isSemverGreater$1 } = await Promise.resolve().then(() => (init_semver(), semver_exports));
961
1012
  const lockedVersion = await db$1.get("kkk:update:lock");
962
- if (typeof lockedVersion === "string" && lockedVersion.length > 0) hasUpdate = true;
1013
+ if (typeof lockedVersion === "string" && lockedVersion.length > 0) hasUpdate = isSemverGreater$1(lockedVersion, Root.pluginVersion);
963
1014
  } catch {}
964
1015
  const result = await reactServerRender({
965
1016
  request: {
@@ -7644,9 +7695,8 @@ var safeScreenshot = async (page, screenshotPath) => {
7644
7695
  const douyinLogin = async (e) => {
7645
7696
  const msg_id = [];
7646
7697
  try {
7647
- const { browser } = await launch({
7648
- headless: true,
7649
- downloadBrowser: "chrome-headless-shell",
7698
+ const puppeteer = await snapka.launch({
7699
+ headless: "new",
7650
7700
  protocolTimeout: 6e4,
7651
7701
  args: [
7652
7702
  "--disable-blink-features=AutomationControlled",
@@ -7692,7 +7742,7 @@ const douyinLogin = async (e) => {
7692
7742
  if (os$1 === "darwin") return "macos";
7693
7743
  return "linux";
7694
7744
  };
7695
- const page = await newInjectedPage(browser, { fingerprintOptions: {
7745
+ const page = await newInjectedPage(puppeteer.browser, { fingerprintOptions: {
7696
7746
  devices: ["desktop"],
7697
7747
  operatingSystems: [getOperatingSystem()]
7698
7748
  } });
@@ -7735,7 +7785,7 @@ const douyinLogin = async (e) => {
7735
7785
  logger.error("获取二维码失败:", error);
7736
7786
  await e.reply("获取二维码失败,请查看控制台日志", { reply: true });
7737
7787
  }
7738
- await browser.close();
7788
+ await puppeteer.browser.close();
7739
7789
  return true;
7740
7790
  }
7741
7791
  let gcInterval;
@@ -7785,7 +7835,7 @@ const douyinLogin = async (e) => {
7785
7835
  clearTimeout(timer);
7786
7836
  logger.mark("检测到 sid_guard,登录成功");
7787
7837
  logger.debug("开始获取 cookies...");
7788
- const cookies = await browser.cookies();
7838
+ const cookies = await puppeteer.browser.cookies();
7789
7839
  logger.debug(`获取到 ${cookies.length} 个 cookies`);
7790
7840
  const cookieString = cookies.map((cookie) => `${cookie.name}=${cookie.value}`).join("; ");
7791
7841
  logger.debug("开始保存 cookies...");
@@ -7796,7 +7846,7 @@ const douyinLogin = async (e) => {
7796
7846
  await e.bot.recallMsg(e.contact, id);
7797
7847
  }));
7798
7848
  logger.mark("关闭浏览器...");
7799
- await browser.close();
7849
+ await puppeteer.browser.close();
7800
7850
  logger.mark("浏览器已关闭");
7801
7851
  resolve$1(true);
7802
7852
  return;
@@ -7845,7 +7895,7 @@ const douyinLogin = async (e) => {
7845
7895
  logger.warn("2FA验证码输入超时");
7846
7896
  clearTimeout(timer);
7847
7897
  if (gcInterval) clearInterval(gcInterval);
7848
- await browser.close();
7898
+ await puppeteer.browser.close();
7849
7899
  await Promise.all(msg_id.map(async (id) => {
7850
7900
  await e.bot.recallMsg(e.contact, id);
7851
7901
  }));
@@ -7898,7 +7948,7 @@ const douyinLogin = async (e) => {
7898
7948
  logger.warn("验证码错误次数过多,登录失败");
7899
7949
  clearTimeout(timer);
7900
7950
  if (gcInterval) clearInterval(gcInterval);
7901
- await browser.close();
7951
+ await puppeteer.browser.close();
7902
7952
  await Promise.all(msg_id.map(async (id) => {
7903
7953
  await e.bot.recallMsg(e.contact, id);
7904
7954
  }));
@@ -7912,7 +7962,7 @@ const douyinLogin = async (e) => {
7912
7962
  logger.error("二次验证处理失败:", err);
7913
7963
  clearTimeout(timer);
7914
7964
  if (gcInterval) clearInterval(gcInterval);
7915
- await browser.close();
7965
+ await puppeteer.browser.close();
7916
7966
  await Promise.all(msg_id.map(async (id) => {
7917
7967
  await e.bot.recallMsg(e.contact, id);
7918
7968
  }));
@@ -7930,14 +7980,14 @@ const douyinLogin = async (e) => {
7930
7980
  if (gcInterval) clearInterval(gcInterval);
7931
7981
  if (!loginResult) {
7932
7982
  logger.warn("登录超时或失败");
7933
- await browser.close();
7983
+ await puppeteer.browser.close();
7934
7984
  await e.reply("登录超时!二维码已失效!", { reply: true });
7935
7985
  return true;
7936
7986
  }
7937
7987
  } catch (err) {
7938
7988
  logger.error("登录流程出错:", err);
7939
7989
  if (gcInterval) clearInterval(gcInterval);
7940
- await browser.close();
7990
+ await puppeteer.browser.close();
7941
7991
  await e.reply("登录过程出错,请查看控制台日志", { reply: true });
7942
7992
  }
7943
7993
  } catch (error) {
@@ -8903,54 +8953,8 @@ const getChangelogImage = async (props) => {
8903
8953
  buildTime
8904
8954
  }) || null;
8905
8955
  };
8906
- const isSemverGreater = (remote, local) => {
8907
- const parse = (v) => {
8908
- v = v.trim();
8909
- if (v.startsWith("v") || v.startsWith("V")) v = v.slice(1);
8910
- const [preBuild] = v.split("+", 2);
8911
- const [core, pre] = preBuild.split("-", 2);
8912
- const parts = core.split(".");
8913
- return {
8914
- major: parseInt(parts[0] || "0", 10) || 0,
8915
- minor: parseInt(parts[1] || "0", 10) || 0,
8916
- patch: parseInt(parts[2] || "0", 10) || 0,
8917
- prerelease: pre ? pre.split(".") : []
8918
- };
8919
- };
8920
- const cmpId = (a, b) => {
8921
- const an = /^\d+$/.test(a);
8922
- const bn = /^\d+$/.test(b);
8923
- if (an && bn) {
8924
- const na = parseInt(a, 10);
8925
- const nb = parseInt(b, 10);
8926
- if (na === nb) return 0;
8927
- return na > nb ? 1 : -1;
8928
- }
8929
- if (an && !bn) return -1;
8930
- if (!an && bn) return 1;
8931
- if (a === b) return 0;
8932
- return a > b ? 1 : -1;
8933
- };
8934
- const r = parse(remote);
8935
- const l = parse(local);
8936
- if (r.major !== l.major) return r.major > l.major;
8937
- if (r.minor !== l.minor) return r.minor > l.minor;
8938
- if (r.patch !== l.patch) return r.patch > l.patch;
8939
- const ra = r.prerelease;
8940
- const la = l.prerelease;
8941
- if (ra.length === 0 && la.length === 0) return false;
8942
- if (ra.length === 0 && la.length > 0) return true;
8943
- if (ra.length > 0 && la.length === 0) return false;
8944
- const len = Math.min(ra.length, la.length);
8945
- for (const [i, raItem] of ra.entries()) {
8946
- if (i >= len) break;
8947
- const c = cmpId(raItem, la[i]);
8948
- if (c !== 0) return c > 0;
8949
- }
8950
- if (ra.length !== la.length) return ra.length > la.length;
8951
- return false;
8952
- };
8953
8956
  await init_module();
8957
+ await init_semver();
8954
8958
  var UPDATE_LOCK_KEY = "kkk:update:lock";
8955
8959
  var UPDATE_MSGID_KEY = "kkk:update:msgId";
8956
8960
  var Handler = async (e) => {
@@ -30,6 +30,5 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
  value: mod,
31
31
  enumerable: true
32
32
  }) : target, mod));
33
- var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
33
  var __require = createRequire(import.meta.url);
35
- export { __toCommonJS as a, __require as i, __esmMin as n, __toESM as o, __export as r, __commonJSMin as t };
34
+ export { __toESM as a, __require as i, __esmMin as n, __export as r, __commonJSMin as t };
@@ -1,5 +1,5 @@
1
- import { n as __esmMin, o as __toESM, r as __export } from "./rolldown-runtime-BMXAG3ag.js";
2
- import { $ as Radio, A as init_dist, At as clsx_default, B as Users, C as LuFullscreen, Ct as CircleCheckBig, D as formatDistanceToNow, Dt as Bookmark, Et as Bot, F as require_jsx_runtime, G as ThumbsUp, H as UserPlus, I as IoSearch, J as Sparkles, K as Terminal, L as init_io5, M as chip_default, Mt as require_server_node, N as button_default, Nt as require_react, O as format$1, Ot as BookOpen, P as HeroUIProvider, Q as RefreshCw, R as init_lucide_react, S as zhCN, St as CircleFadingArrowUp, T as init_date_fns, Tt as Calendar, U as TriangleAlert, V as User, W as TrendingUp, X as Share2, Xt as Chalk, Y as Shield, Z as Send, _ as init_fa6, _t as CornerDownLeft, a as init_chalk, at as MessageCircle, b as init_ai, bt as Clock, c as init_react_markdown, ct as List, d as init_md, dt as Heart, et as QrCode, f as RiShareForwardFill, ft as Hash, g as FaCommentDots, gt as Crown, h as FaCodeBranch, ht as ExternalLink, it as Music, j as code_default, jt as init_clsx, kt as Bell, l as Markdown, lt as Link, m as FaBug, mt as Eye, nt as Plug2, o as init_rehype_highlight, ot as MapPin, p as init_ri, pt as FileText, q as Star, rt as Play, s as rehypeHighlight, st as LogIn, tt as Power, u as MdAccessTime, ut as Info, v as AiFillHeart, vt as Coins, w as init_lu, wt as CircleAlert, x as init_locale, xt as CircleQuestionMark, y as AiFillStar, yt as Code, z as Zap } from "./vendor-fLu5LGop.js";
1
+ import { a as __toESM, n as __esmMin, r as __export } from "./rolldown-runtime-FWYmKKAj.js";
2
+ import { $ as RefreshCw, At as Bell, B as Zap, C as zhCN, Ct as CircleFadingArrowUp, Dt as Bot, E as init_date_fns, Et as Calendar, F as HeroUIProvider, G as TrendingUp, H as User, I as require_jsx_runtime, J as Star, K as ThumbsUp, L as IoSearch, M as code_default, Mt as init_clsx, N as chip_default, Nt as require_server_node, O as formatDistanceToNow, Ot as Bookmark, P as button_default, Pt as require_react, Q as Send, R as init_io5, S as init_locale, St as CircleQuestionMark, T as init_lu, Tt as CircleAlert, U as UserPlus, V as Users, W as TriangleAlert, X as Shield, Y as Sparkles, Z as Share2, Zt as Chalk, _ as FaCommentDots, _t as Crown, at as Music, b as AiFillStar, bt as Code, c as rehypeHighlight, ct as LogIn, d as MdAccessTime, dt as Info, et as Radio, f as init_md, ft as Heart, g as FaCodeBranch, gt as ExternalLink, h as FaBug, ht as Eye, it as Play, j as init_dist, jt as clsx_default, k as format$1, kt as BookOpen, l as init_react_markdown, lt as List, m as init_ri, mt as FileText, nt as Power, o as init_chalk, ot as MessageCircle, p as RiShareForwardFill, pt as Hash, q as Terminal, rt as Plug2, s as init_rehype_highlight, st as MapPin, tt as QrCode, u as Markdown, ut as Link, v as init_fa6, vt as CornerDownLeft, w as LuFullscreen, wt as CircleCheckBig, x as init_ai, xt as Clock, y as AiFillHeart, yt as Coins, z as init_lucide_react } from "./vendor-DoVeMvEg.js";
3
3
  import path from "node:path";
4
4
  import fs from "node:fs";
5
5
  import { fileURLToPath } from "node:url";
@@ -1,3 +1,3 @@
1
- import "./vendor-fLu5LGop.js";
2
- import { r as reactServerRender, t as template_default } from "./template-CuCBcPSZ.js";
1
+ import "./vendor-DoVeMvEg.js";
2
+ import { r as reactServerRender, t as template_default } from "./template-UGmQ7vUV.js";
3
3
  export { template_default as default, reactServerRender };