karin-plugin-kkk 2.12.0 → 2.13.0

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 (46) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/lib/apps/admin.js +3 -3
  3. package/lib/apps/help.js +3 -3
  4. package/lib/apps/push.js +3 -3
  5. package/lib/apps/tools.js +3 -3
  6. package/lib/apps/update.js +3 -3
  7. package/lib/build-metadata.json +5 -5
  8. package/lib/core_chunk/{main-y0kZzZ-w.js → main-DRYfWrrS.js} +61 -13
  9. package/lib/core_chunk/{rolldown-runtime-DWBZqjDW.js → rolldown-runtime-BMXAG3ag.js} +3 -2
  10. package/lib/core_chunk/{template-BlBiWQgJ.js → template-CX-rbzac.js} +733 -414
  11. package/lib/core_chunk/template.d.mts +331 -276
  12. package/lib/core_chunk/template.js +2 -2
  13. package/lib/core_chunk/{vendor-C5tfw7Lx.js → vendor-isZ7uH5-.js} +6410 -15894
  14. package/lib/index.js +3 -3
  15. package/lib/karin-plugin-kkk.css +183 -153
  16. package/lib/root.js +1 -1
  17. package/lib/web.config.js +3 -3
  18. package/lib/web_chunk/assets/{Combination-h-kR2WOn.js → Combination-DMzx_9cT.js} +1 -1
  19. package/lib/web_chunk/assets/avatar-Bip_BI0s.js +1 -0
  20. package/lib/web_chunk/assets/core-CTw2lFSY.js +1 -0
  21. package/lib/web_chunk/assets/{eye-BLjPVWsG.js → eye-C-AhGEzb.js} +1 -1
  22. package/lib/web_chunk/assets/{index-DICd1U-F.css → index-C0bBdQXX.css} +1 -1
  23. package/lib/web_chunk/assets/{index-CGMLI-gk.js → index-DhneSh9r.js} +12 -29
  24. package/lib/web_chunk/assets/jszip.min-CR0h2xSP.js +2 -0
  25. package/lib/web_chunk/assets/page-BYSe_GXu.js +1 -0
  26. package/lib/web_chunk/assets/page-BzSlnkjf.js +2 -0
  27. package/lib/web_chunk/assets/page-CI0llvq0.js +1 -0
  28. package/lib/web_chunk/assets/{page-Dh8oHokz.js → page-DJMjBq1H.js} +1 -1
  29. package/lib/web_chunk/assets/{page-D5i24VYE.js → page-P54holFV.js} +7 -7
  30. package/lib/web_chunk/assets/parsers-BfOCrHLm.js +1 -0
  31. package/lib/web_chunk/assets/request-Bb4dJH8H.js +6 -0
  32. package/lib/web_chunk/assets/select-CljyMsQZ.js +1 -0
  33. package/lib/web_chunk/assets/{separator-DxvRfn9R.js → separator-CmfAP0-Y.js} +1 -1
  34. package/lib/web_chunk/index.html +2 -2
  35. package/lib/web_chunk/sw.js +1 -1
  36. package/lib/web_chunk/{workbox-e7e05771.js → workbox-7d7f45e3.js} +1 -1
  37. package/package.json +2 -2
  38. package/lib/web_chunk/assets/avatar-Ckwcl84Q.js +0 -1
  39. package/lib/web_chunk/assets/core-B9ZOfL_T.js +0 -1
  40. package/lib/web_chunk/assets/jszip.min-BVTyyH9E.js +0 -12
  41. package/lib/web_chunk/assets/page-BUOC6m_D.js +0 -1
  42. package/lib/web_chunk/assets/page-DHuYgEdh.js +0 -2
  43. package/lib/web_chunk/assets/page-oHsT_O4Z.js +0 -1
  44. package/lib/web_chunk/assets/parsers-BbZnEAL7.js +0 -1
  45. package/lib/web_chunk/assets/request-BN3tZDmD.js +0 -19
  46. package/lib/web_chunk/assets/select-hqR7LkkM.js +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,33 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [2.13.0](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.12.0...v2.13.0) (2025-11-26)
6
+
7
+
8
+ ### ✨ 新功能
9
+
10
+ * **douyin:** Refactor user video list data structure and UI components ([5a891db](https://github.com/ikenxuan/karin-plugin-kkk/commit/5a891db84510c84a42bb377d51c42b530809fedf))
11
+ * 抖音用户主页视频列表图片。 ([30a8cfb](https://github.com/ikenxuan/karin-plugin-kkk/commit/30a8cfb749ba2e761b4d2f48a47920814126acb1))
12
+
13
+
14
+ ### 🐛 错误修复
15
+
16
+ * 。 ([d13dd5f](https://github.com/ikenxuan/karin-plugin-kkk/commit/d13dd5face0e21e3f2b186ded25a15634c8c4023))
17
+ * 1 ([807bf47](https://github.com/ikenxuan/karin-plugin-kkk/commit/807bf47a6b8fc9fd0797d0c6edf3819e6bac4b98))
18
+ * boom ([88d7878](https://github.com/ikenxuan/karin-plugin-kkk/commit/88d7878eb791efd6c4278d51e5a074f7f66c61c3))
19
+ * Contact ([ff1a3e8](https://github.com/ikenxuan/karin-plugin-kkk/commit/ff1a3e8417a51bbd1a4dc99c81df26cb04a91ce7))
20
+ * Refactor code structure for improved readability and maintainability ([0924b29](https://github.com/ikenxuan/karin-plugin-kkk/commit/0924b291a30a559332d7baa4f73ef56bbc0ca3ad))
21
+ * template,提升开发体验 ([a0a3429](https://github.com/ikenxuan/karin-plugin-kkk/commit/a0a342950dd154d8990fd17501f23863cb392a99))
22
+ * template,提升开发体验 ([cb099eb](https://github.com/ikenxuan/karin-plugin-kkk/commit/cb099eb1c391fd81c33bfa94ede42c0ed0a87a59))
23
+ * template,提升开发体验 ([8b776e3](https://github.com/ikenxuan/karin-plugin-kkk/commit/8b776e3a9c0960348433bc94494c203ece23ef64))
24
+ * 提升开发体验 ([379e6ad](https://github.com/ikenxuan/karin-plugin-kkk/commit/379e6ad4c1d38f5c92cd22072ebc555c58bb6a5e))
25
+ * 还是让tsc来生成types吧。。。 ([26bef73](https://github.com/ikenxuan/karin-plugin-kkk/commit/26bef73042bdfbd5892ad3fc2457930d45d16dad))
26
+
27
+
28
+ ### ♻️ 代码重构
29
+
30
+ * **template:** 重构模板开发面板 ([de40f5f](https://github.com/ikenxuan/karin-plugin-kkk/commit/de40f5f78a992fd8c022220d81959db87c24d9d9))
31
+
5
32
  ## [2.12.0](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.11.6...v2.12.0) (2025-11-22)
6
33
 
7
34
 
package/lib/apps/admin.js CHANGED
@@ -1,4 +1,4 @@
1
- import "../core_chunk/vendor-C5tfw7Lx.js";
2
- import { C as removeAllFiles, E as task, S as dylogin, T as setdyck, w as setbilick, x as biLogin } from "../core_chunk/main-y0kZzZ-w.js";
3
- import "../core_chunk/template-BlBiWQgJ.js";
1
+ import "../core_chunk/vendor-isZ7uH5-.js";
2
+ import { C as removeAllFiles, E as task, S as dylogin, T as setdyck, w as setbilick, x as biLogin } from "../core_chunk/main-DRYfWrrS.js";
3
+ import "../core_chunk/template-CX-rbzac.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-C5tfw7Lx.js";
2
- import { b as version, y as help } from "../core_chunk/main-y0kZzZ-w.js";
3
- import "../core_chunk/template-BlBiWQgJ.js";
1
+ import "../core_chunk/vendor-isZ7uH5-.js";
2
+ import { b as version, y as help } from "../core_chunk/main-DRYfWrrS.js";
3
+ import "../core_chunk/template-CX-rbzac.js";
4
4
  export { help, version };
package/lib/apps/push.js CHANGED
@@ -1,4 +1,4 @@
1
- import "../core_chunk/vendor-C5tfw7Lx.js";
2
- import { _ as setdyPush, d as bilibiliPushList, f as changeBotID, g as setbiliPush, h as forcePush, m as douyinPushList, p as douyinPush, u as bilibiliPush, v as testDouyinPush } from "../core_chunk/main-y0kZzZ-w.js";
3
- import "../core_chunk/template-BlBiWQgJ.js";
1
+ import "../core_chunk/vendor-isZ7uH5-.js";
2
+ import { _ as setdyPush, d as bilibiliPushList, f as changeBotID, g as setbiliPush, h as forcePush, m as douyinPushList, p as douyinPush, u as bilibiliPush, v as testDouyinPush } from "../core_chunk/main-DRYfWrrS.js";
3
+ import "../core_chunk/template-CX-rbzac.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-C5tfw7Lx.js";
2
- import { a as bilibiliAPP, c as prefix, l as xiaohongshuAPP, o as douyinAPP, s as kuaishouAPP } from "../core_chunk/main-y0kZzZ-w.js";
3
- import "../core_chunk/template-BlBiWQgJ.js";
1
+ import "../core_chunk/vendor-isZ7uH5-.js";
2
+ import { a as bilibiliAPP, c as prefix, l as xiaohongshuAPP, o as douyinAPP, s as kuaishouAPP } from "../core_chunk/main-DRYfWrrS.js";
3
+ import "../core_chunk/template-CX-rbzac.js";
4
4
  export { bilibiliAPP, douyinAPP, kuaishouAPP, prefix, xiaohongshuAPP };
@@ -1,4 +1,4 @@
1
- import "../core_chunk/vendor-C5tfw7Lx.js";
2
- import { i as update, n as kkkUpdateCommand, r as kkkUpdateTest, t as kkkUpdate } from "../core_chunk/main-y0kZzZ-w.js";
3
- import "../core_chunk/template-BlBiWQgJ.js";
1
+ import "../core_chunk/vendor-isZ7uH5-.js";
2
+ import { i as update, n as kkkUpdateCommand, r as kkkUpdateTest, t as kkkUpdate } from "../core_chunk/main-DRYfWrrS.js";
3
+ import "../core_chunk/template-CX-rbzac.js";
4
4
  export { kkkUpdate, kkkUpdateCommand, kkkUpdateTest, update };
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "2.12.0",
3
- "buildTime": "2025-11-22T12:23:32.435Z",
4
- "buildTimestamp": 1763814212435,
2
+ "version": "2.13.0",
3
+ "buildTime": "2025-11-26T09:16:44.142Z",
4
+ "buildTimestamp": 1764148604142,
5
5
  "name": "karin-plugin-kkk",
6
6
  "description": "Karin 的「抖音」「B 站」视频解析/动态推送插件",
7
7
  "homepage": "https://github.com/ikenxuan/karin-plugin-kkk",
8
- "commitHash": "0429a947bedd0cc041f7e67176ea3ffb0049469e",
9
- "shortCommitHash": "0429a947"
8
+ "commitHash": "8e3986f42baea23cbf4de4c573603197c557ddbf",
9
+ "shortCommitHash": "8e3986f4"
10
10
  }
@@ -1,6 +1,6 @@
1
- import { n as __esmMin, o as __toESM, r as __export } from "./rolldown-runtime-DWBZqjDW.js";
2
- import { At as createBilibiliRoutes, Ct as require_dist, Dt as DynamicType, Et as Client, Ft as logger$1, It as wbi_sign, Lt as app$1, Mt as createKuaishouRoutes, Nt as init_default, Ot as MajorType, Pt as logMiddleware, Rt as init_dist, Tt as require_lib, jt as createDouyinRoutes, kt as bilibiliApiUrls, n as require_browser, t as require_heic_convert, wt as require_lib$1 } from "./vendor-C5tfw7Lx.js";
3
- import { n as init_client, r as reactServerRender } from "./template-BlBiWQgJ.js";
1
+ import { n as __esmMin, o as __toESM, r as __export } from "./rolldown-runtime-BMXAG3ag.js";
2
+ import { At as Client, Bt as wbi_sign, Dt as require_dist, Ft as createDouyinRoutes, Ht as init_dist, It as createKuaishouRoutes, Lt as init_default, Mt as MajorType, Nt as bilibiliApiUrls, Ot as require_lib$1, Pt as createBilibiliRoutes, Rt as logMiddleware, Vt as app$1, jt as DynamicType, kt as require_lib, n as require_browser, t as require_heic_convert, zt as logger$1 } from "./vendor-isZ7uH5-.js";
3
+ import { n as init_client, r as reactServerRender } from "./template-CX-rbzac.js";
4
4
  import path, { resolve } from "node:path";
5
5
  import fs from "node:fs";
6
6
  import { fileURLToPath } from "node:url";
@@ -868,7 +868,7 @@ var init_Networks = __esmMin(() => {
868
868
  });
869
869
  var import_browser, createQrCodePlugin;
870
870
  var init_plugins = __esmMin(() => {
871
- import_browser = __toESM(require_browser());
871
+ import_browser = __toESM(require_browser(), 1);
872
872
  createQrCodePlugin = () => ({
873
873
  name: "qr-code",
874
874
  enforce: "pre",
@@ -2118,11 +2118,11 @@ var init_Config = __esmMin(() => {
2118
2118
  if (name === "pushlist" && ("douyin" in config$1 || "bilibili" in config$1)) {
2119
2119
  const cleanedConfig = { ...config$1 };
2120
2120
  if ("douyin" in cleanedConfig) cleanedConfig.douyin = cleanedConfig.douyin.map((item) => {
2121
- const { Keywords, Tags, filterMode,...rest } = item;
2121
+ const { Keywords, Tags, filterMode, ...rest } = item;
2122
2122
  return rest;
2123
2123
  });
2124
2124
  if ("bilibili" in cleanedConfig) cleanedConfig.bilibili = cleanedConfig.bilibili.map((item) => {
2125
- const { Keywords, Tags, filterMode,...rest } = item;
2125
+ const { Keywords, Tags, filterMode, ...rest } = item;
2126
2126
  return rest;
2127
2127
  });
2128
2128
  filterCfg = cleanedConfig;
@@ -2694,10 +2694,10 @@ const getKuaishouDataRouter = async (req, res) => {
2694
2694
  }
2695
2695
  };
2696
2696
  await init_default();
2697
- var import_lib = __toESM(require_lib());
2698
- var import_lib$1 = __toESM(require_lib$1());
2697
+ var import_lib = __toESM(require_lib(), 1);
2698
+ var import_lib$1 = __toESM(require_lib$1(), 1);
2699
2699
  await init_dist();
2700
- var import_dist = __toESM(require_dist());
2700
+ var import_dist = __toESM(require_dist(), 1);
2701
2701
  await init_root();
2702
2702
  await init_Config();
2703
2703
  var server = app$1();
@@ -6087,7 +6087,7 @@ var skipDynamic$1 = async (PushItem) => {
6087
6087
  logger.debug(`检查动态是否需要过滤:https://t.bilibili.com/${PushItem.Dynamic_Data.id_str}`);
6088
6088
  return await bilibiliDBInstance.shouldFilter(PushItem, tags);
6089
6089
  };
6090
- var import_heic_convert = __toESM(require_heic_convert());
6090
+ var import_heic_convert = __toESM(require_heic_convert(), 1);
6091
6091
  await init_utils();
6092
6092
  await init_amagiClient();
6093
6093
  var processCommentEmojis$1 = (text, emojiData) => {
@@ -6494,7 +6494,55 @@ var DouYin = class extends Base {
6494
6494
  }, { message_id: this.e.messageId });
6495
6495
  return true;
6496
6496
  }
6497
- case "user_dynamic": return true;
6497
+ case "user_dynamic": {
6498
+ const rawData = await this.amagi.getDouyinData("用户主页视频列表数据", {
6499
+ sec_uid: data.sec_uid,
6500
+ typeMode: "strict"
6501
+ });
6502
+ const user = (await this.amagi.getDouyinData("用户主页数据", {
6503
+ sec_uid: data.sec_uid,
6504
+ typeMode: "strict"
6505
+ })).data.user;
6506
+ const videos = rawData.data.aweme_list.map((aweme) => {
6507
+ const isVideo = aweme.aweme_type === 0 || aweme.media_type === 0;
6508
+ return {
6509
+ aweme_id: aweme.aweme_id,
6510
+ is_top: aweme.is_top === 1,
6511
+ title: aweme.desc || aweme.item_title || "无标题",
6512
+ cover: aweme.video.cover.url_list[0],
6513
+ duration: aweme.video?.duration || 0,
6514
+ create_time: aweme.create_time,
6515
+ statistics: {
6516
+ like_count: aweme.statistics.digg_count,
6517
+ comment_count: aweme.statistics.comment_count,
6518
+ share_count: aweme.statistics.share_count,
6519
+ collect_count: aweme.statistics.collect_count
6520
+ },
6521
+ is_video: isVideo,
6522
+ music: aweme.music ? {
6523
+ title: aweme.music.title || "",
6524
+ author: aweme.music.author || ""
6525
+ } : void 0
6526
+ };
6527
+ });
6528
+ const img$2 = await Render("douyin/user_profile", {
6529
+ user: {
6530
+ head_image: user.cover_and_head_image_info.profile_cover_list.length > 0 ? user.cover_and_head_image_info.profile_cover_list[0].cover_url?.url_list[0] || null : null,
6531
+ nickname: user.nickname,
6532
+ short_id: user.unique_id === "" ? user.short_id : user.unique_id,
6533
+ avatar: user.avatar_larger?.url_list?.[0] || user.avatar_thumb?.url_list?.[0] || "",
6534
+ signature: user.signature,
6535
+ follower_count: user.follower_count,
6536
+ following_count: user.following_count,
6537
+ total_favorited: user.total_favorited,
6538
+ verified: !!user.custom_verify || !!user.enterprise_verify_reason,
6539
+ ip_location: user.ip_location
6540
+ },
6541
+ videos: videos.slice(0, 16)
6542
+ });
6543
+ this.e.reply(img$2);
6544
+ return true;
6545
+ }
6498
6546
  case "music_work": {
6499
6547
  const MusicData = await this.amagi.getDouyinData("音乐数据", {
6500
6548
  music_id: data.music_id,
@@ -6726,7 +6774,7 @@ const getDouyinID = async (event, url$1, log = true) => {
6726
6774
  break;
6727
6775
  }
6728
6776
  case /https:\/\/(?:www\.douyin\.com|www\.iesdouyin\.com)\/share\/user\/(\S+)/.test(longLink): {
6729
- const userMatch = /user\/([a-zA-Z0-9_-]+)\b/.exec(longLink);
6777
+ const userMatch = /user\/([a-zA-Z0-9_-]+)/.exec(longLink);
6730
6778
  result = {
6731
6779
  type: "user_dynamic",
6732
6780
  sec_uid: userMatch ? userMatch[1] : void 0
@@ -6896,7 +6944,7 @@ var DouYinpush = class extends Base {
6896
6944
  }
6897
6945
  const bot = karin.getBot(botId);
6898
6946
  const forwardMsg = common.makeForward(imageres, botId, bot.account.name);
6899
- await bot.sendForwardMsg(karin.contactFriend(botId), forwardMsg);
6947
+ await bot.sendForwardMsg(Contact, forwardMsg);
6900
6948
  }
6901
6949
  }
6902
6950
  }
@@ -7,12 +7,13 @@ var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
9
9
  var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
10
- var __export = (all) => {
10
+ var __export = (all, symbols) => {
11
11
  let target = {};
12
12
  for (var name in all) __defProp(target, name, {
13
13
  get: all[name],
14
14
  enumerable: true
15
15
  });
16
+ if (symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
16
17
  return target;
17
18
  };
18
19
  var __copyProps = (to, from, except, desc) => {
@@ -29,6 +30,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
30
  value: mod,
30
31
  enumerable: true
31
32
  }) : target, mod));
32
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
+ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
34
  var __require = createRequire(import.meta.url);
34
35
  export { __toCommonJS as a, __require as i, __esmMin as n, __toESM as o, __export as r, __commonJSMin as t };