karin-plugin-kkk 2.45.0-beta.4 → 2.45.0-beta.6

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,26 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [2.45.0-beta.6](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.45.0-beta.5...v2.45.0-beta.6) (2026-10-06)
6
+
7
+
8
+ ### ✨ 新功能
9
+
10
+ * 发版脚本变更日志改为增量小节,转正发布空增量时写入占位小节 ([f4f67a7](https://github.com/ikenxuan/karin-plugin-kkk/commit/f4f67a780434b73f5ddc3227bfe6a3611aa4463e))
11
+ * 金丝雀用户多渠道待推送收敛为单图,避免同一批变更重复推送 ([40d4ff9](https://github.com/ikenxuan/karin-plugin-kkk/commit/40d4ff9a527d7715ebc3531d0b59439afb8335ef))
12
+
13
+
14
+ ### 🐛 错误修复
15
+
16
+ * 更新日志模板版式适配长版本号,更新频道标签改由渠道数据传入 ([fc27e29](https://github.com/ikenxuan/karin-plugin-kkk/commit/fc27e29c1be1d0e623b76f4a108baecee402e5a1))
17
+
18
+ ## [2.45.0-beta.5](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.45.0-beta.4...v2.45.0-beta.5) (2026-10-06)
19
+
20
+
21
+ ### 🐛 错误修复
22
+
23
+ * 更新 node-karin 依赖版本至 1.18.0 ([42ef2e2](https://github.com/ikenxuan/karin-plugin-kkk/commit/42ef2e2729556b7a4c75c68f7ee1714b6581ced2))
24
+
5
25
  ## [2.45.0-beta.4](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.45.0-beta.3...v2.45.0-beta.4) (2026-10-06)
6
26
 
7
27
 
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "2.45.0-beta.4",
3
- "buildTime": "2026-10-06T07:34:14.563Z",
4
- "buildTimestamp": 1791272054563,
2
+ "version": "2.45.0-beta.6",
3
+ "buildTime": "2026-10-06T10:06:05.985Z",
4
+ "buildTimestamp": 1791281165985,
5
5
  "name": "karin-plugin-kkk",
6
6
  "description": "Karin 的「抖音」「B 站」视频解析/动态推送插件",
7
7
  "homepage": "https://github.com/ikenxuan/karin-plugin-kkk",
8
- "commitHash": "e6ff6df77f6305256a35f531a2f0c26f95fa3341",
9
- "shortCommitHash": "e6ff6df7"
8
+ "commitHash": "bd1cf9b157e3b6404e90ac5de82c266740f97798",
9
+ "shortCommitHash": "bd1cf9b1"
10
10
  }
@@ -20735,17 +20735,31 @@ var Changelog = import_react.memo((props) => {
20735
20735
  children: "以下任意方式均可更新"
20736
20736
  }),
20737
20737
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
20738
- className: "mb-10 px-8 py-5 rounded-2xl border border-border/70 bg-surface/50 text-foreground/80 text-[2.2em] flex items-center justify-center gap-6",
20739
- children: [
20740
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: ["当前版本: v", props.data.localVersion] }),
20741
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "→" }),
20742
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: ["最新版本: v", props.data.remoteVersion] }),
20743
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
20744
- ",共落后 ",
20738
+ className: "mb-10 px-8 py-5 rounded-2xl border border-border/70 bg-surface/50 text-foreground/80 text-[2.2em] flex flex-col items-center gap-3",
20739
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
20740
+ className: "flex items-center justify-center gap-6 flex-wrap",
20741
+ children: [
20742
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
20743
+ className: "whitespace-nowrap",
20744
+ children: ["当前版本: v", props.data.localVersion]
20745
+ }),
20746
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
20747
+ className: "text-muted",
20748
+ children: "→"
20749
+ }),
20750
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
20751
+ className: "whitespace-nowrap font-semibold text-foreground",
20752
+ children: ["最新版本: v", props.data.remoteVersion]
20753
+ })
20754
+ ]
20755
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
20756
+ className: "whitespace-nowrap text-[0.8em] leading-none text-foreground/60",
20757
+ children: [
20758
+ "共落后 ",
20745
20759
  props.data.lagVersionCount ?? 0,
20746
20760
  " 个版本"
20747
- ] })
20748
- ]
20761
+ ]
20762
+ })]
20749
20763
  }),
20750
20764
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
20751
20765
  className: "flex flex-col gap-6 text-[2.8em] leading-relaxed text-foreground/80",
@@ -20766,13 +20780,16 @@ var Changelog = import_react.memo((props) => {
20766
20780
  ]
20767
20781
  }),
20768
20782
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
20769
- className: "flex items-center gap-5",
20783
+ className: "flex flex-wrap items-center gap-x-5 gap-y-4",
20770
20784
  children: [
20771
20785
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
20772
20786
  className: "text-muted text-[1.2em]",
20773
20787
  children: "•"
20774
20788
  }),
20775
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "进入" }),
20789
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
20790
+ className: "whitespace-nowrap",
20791
+ children: "进入"
20792
+ }),
20776
20793
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InlineCalloutCode, {
20777
20794
  className: "text-[0.9em] font-mono",
20778
20795
  children: "Karin WebUI"
@@ -20792,13 +20809,16 @@ var Changelog = import_react.memo((props) => {
20792
20809
  ]
20793
20810
  }),
20794
20811
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
20795
- className: "flex items-center gap-5",
20812
+ className: "flex flex-wrap items-center gap-x-5 gap-y-4",
20796
20813
  children: [
20797
20814
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
20798
20815
  className: "text-muted text-[1.2em]",
20799
20816
  children: "•"
20800
20817
  }),
20801
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Karin 根目录运行" }),
20818
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
20819
+ className: "whitespace-nowrap",
20820
+ children: "Karin 根目录运行"
20821
+ }),
20802
20822
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(InlineCalloutCode, {
20803
20823
  className: "text-[0.85em] whitespace-nowrap font-mono",
20804
20824
  children: [
@@ -20978,19 +20998,20 @@ var Changelog = import_react.memo((props) => {
20978
20998
  }),
20979
20999
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
20980
21000
  className: "text-4xl leading-relaxed text-foreground/60",
20981
- children: [
20982
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "扫码查看实际运行代码从" }),
20983
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
20984
- className: "font-bold text-foreground/80",
20985
- children: [" v", props.data.localVersion]
20986
- }),
20987
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: " 到 " }),
20988
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
20989
- className: "font-bold text-foreground/80",
20990
- children: [" v", props.data.remoteVersion]
20991
- }),
20992
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: " 的差异" })
20993
- ]
21001
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "扫码查看实际运行代码差异" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
21002
+ className: "flex flex-wrap items-center gap-x-3 whitespace-nowrap text-foreground/80",
21003
+ children: [
21004
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
21005
+ className: "font-bold",
21006
+ children: ["v", props.data.localVersion]
21007
+ }),
21008
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "→" }),
21009
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
21010
+ className: "font-bold",
21011
+ children: ["v", props.data.remoteVersion]
21012
+ })
21013
+ ]
21014
+ })]
20994
21015
  })
20995
21016
  ]
20996
21017
  })
@@ -21004,29 +21025,30 @@ var Changelog = import_react.memo((props) => {
21004
21025
  className: "w-full h-full object-contain"
21005
21026
  })
21006
21027
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
21007
- className: "text-4xl text-foreground/60",
21008
- children: [
21009
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "扫码查看实际运行代码从" }),
21010
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
21011
- className: "font-bold text-foreground/80",
21012
- children: [" v", props.data.localVersion]
21013
- }),
21014
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: " 到 " }),
21015
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
21016
- className: "font-bold text-foreground/80",
21017
- children: [" v", props.data.remoteVersion]
21018
- }),
21019
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: " 的差异" })
21020
- ]
21028
+ className: "text-4xl leading-relaxed text-foreground/60",
21029
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "扫码查看实际运行代码差异" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
21030
+ className: "flex flex-wrap items-center gap-x-3 whitespace-nowrap text-foreground/80",
21031
+ children: [
21032
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
21033
+ className: "font-bold",
21034
+ children: ["v", props.data.localVersion]
21035
+ }),
21036
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "→" }),
21037
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
21038
+ className: "font-bold",
21039
+ children: ["v", props.data.remoteVersion]
21040
+ })
21041
+ ]
21042
+ })]
21021
21043
  })]
21022
21044
  }) }),
21023
21045
  isUpdateTip && props.data.buildTime && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
21024
21046
  className: "flex gap-8 justify-center text-foreground/60",
21025
21047
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
21026
21048
  className: "text-4xl",
21027
- children: ["更新频道:", /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
21049
+ children: ["更新频道:", /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
21028
21050
  className: "font-bold text-foreground/80",
21029
- children: " 正式版"
21051
+ children: [" ", props.data.channelLabel ?? "正式版"]
21030
21052
  })]
21031
21053
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
21032
21054
  className: "text-4xl",
@@ -40458,6 +40480,7 @@ var getChangelogImage = async (ctx, props) => {
40458
40480
  Tip: props.Tip,
40459
40481
  localVersion: props.localVersion,
40460
40482
  remoteVersion: props.remoteVersion,
40483
+ channelLabel: RELEASE_CHANNEL_LABEL[parseReleaseChannel(props.remoteVersion)],
40461
40484
  lagVersionCount,
40462
40485
  buildTime,
40463
40486
  share_url: `https://karin-plugin-kkk-docs.vercel.app/diff?old=${props.localVersion}&new=latest`
@@ -40474,6 +40497,8 @@ var UPDATE_CHANNELS = [
40474
40497
  /** 各渠道更新提醒锁:记录该渠道上次已推送的版本,检测到新版本推送一次后上锁 */
40475
40498
  var updateLockKey = (channel) => `kkk:update:lock:${channel}`;
40476
40499
  var UPDATE_MSGID_KEY = "kkk:update:msgid";
40500
+ /** 推送图对应的安装目标版本(引用回复推送图「更新」时安装它) */
40501
+ var UPDATE_PUSHED_KEY = "kkk:update:pushed";
40477
40502
  /**
40478
40503
  * 定时更新检测处理器
40479
40504
  * 逐渠道检查远程 dist-tag 版本:检测到该渠道有新版本就推送一次然后上锁,
@@ -40489,7 +40514,13 @@ var Handler = async () => {
40489
40514
  const tagVersions = /* @__PURE__ */ new Map();
40490
40515
  await Promise.all([...new Set(channels.map(tagOf))].map(async (tag) => {
40491
40516
  try {
40492
- tagVersions.set(tag, await getRemotePkgVersion(Root.pluginName, tag) || null);
40517
+ if (!installedIsCanary) {
40518
+ const upd = await checkPkgUpdate(Root.pluginName, {
40519
+ tag,
40520
+ compare: "semver"
40521
+ });
40522
+ tagVersions.set(tag, upd.status === "yes" ? upd.remote : null);
40523
+ } else tagVersions.set(tag, await getRemotePkgVersion(Root.pluginName, tag) || null);
40493
40524
  } catch {
40494
40525
  tagVersions.set(tag, null);
40495
40526
  }
@@ -40514,6 +40545,8 @@ var Handler = async () => {
40514
40545
  pending.add(version);
40515
40546
  }
40516
40547
  if (pending.size === 0) return true;
40548
+ const installTarget = [...pending].sort((a, b) => isSemverGreater(b, a) ? 1 : -1)[0];
40549
+ const rendered = installedIsCanary && pending.size > 1 ? /* @__PURE__ */ new Set([installTarget]) : pending;
40517
40550
  const masters = config.master().filter((id) => id !== "console");
40518
40551
  if (masters.length === 0) return true;
40519
40552
  const botItems = karin.getAllBotList().filter((b) => b.bot.account.name !== "console");
@@ -40534,7 +40567,7 @@ var Handler = async () => {
40534
40567
  for (const item of botItems) {
40535
40568
  if (!Array.from(masterToBot.entries()).some(([, b]) => b.account.selfId === item.bot.account.selfId)) continue;
40536
40569
  const elements = [segment.text("karin-plugin-kkk 有新的更新!")];
40537
- for (const version of pending) {
40570
+ for (const version of rendered) {
40538
40571
  const img = await getChangelogImage({ bot: item.bot }, {
40539
40572
  localVersion: Root.pluginVersion,
40540
40573
  remoteVersion: version,
@@ -40555,10 +40588,16 @@ var Handler = async () => {
40555
40588
  }
40556
40589
  if (storedMsgId) try {
40557
40590
  await db.set(UPDATE_MSGID_KEY, storedMsgId);
40591
+ await db.set(UPDATE_PUSHED_KEY, installTarget);
40558
40592
  } catch {}
40559
40593
  return true;
40560
40594
  };
40561
40595
  var handleUpdateHook = wrapWithErrorHandler(async (e) => {
40596
+ const pushedVersion = await db.get(UPDATE_PUSHED_KEY);
40597
+ if (typeof pushedVersion === "string" && pushedVersion) {
40598
+ await installAndRestart(e, pushedVersion);
40599
+ return;
40600
+ }
40562
40601
  e.reply("开始更新 karin-plugin-kkk ...", { reply: true });
40563
40602
  const upd = await checkPkgUpdate(Root.pluginName, { compare: "semver" });
40564
40603
  if (upd.status === "yes") {
@@ -40567,6 +40606,7 @@ var handleUpdateHook = wrapWithErrorHandler(async (e) => {
40567
40606
  const msgResult = await e.reply(`${Root.pluginName} 更新成功!\n${result.local} -> ${result.remote}\n开始执行重启......`);
40568
40607
  if (msgResult.messageId) try {
40569
40608
  await db.del(UPDATE_MSGID_KEY);
40609
+ await db.del(UPDATE_PUSHED_KEY);
40570
40610
  for (const ch of UPDATE_CHANNELS) await db.del(updateLockKey(ch));
40571
40611
  } catch {}
40572
40612
  await restart(e.selfId, e.contact, msgResult.messageId);
@@ -40637,6 +40677,7 @@ var installAndRestart = async (e, version) => {
40637
40677
  const msgResult = await e.reply(`${Root.pluginName} 更新成功!→ ${version}\n开始执行重启......`);
40638
40678
  if (msgResult.messageId) try {
40639
40679
  await db.del(UPDATE_MSGID_KEY);
40680
+ await db.del(UPDATE_PUSHED_KEY);
40640
40681
  for (const ch of UPDATE_CHANNELS) await db.del(updateLockKey(ch));
40641
40682
  } catch {}
40642
40683
  await restart(e.selfId, e.contact, msgResult.messageId);
@@ -40794,6 +40835,7 @@ var kkkUpdateCommand = karin.command(/^#?kkk更新(?:\s*(\S+))?$/, handleKkkUpda
40794
40835
  });
40795
40836
  var kkkUpdateTest = process.env.NODE_ENV === "development" && karin.command("test", async (_e, next) => {
40796
40837
  await db.del(UPDATE_MSGID_KEY);
40838
+ await db.del(UPDATE_PUSHED_KEY);
40797
40839
  for (const ch of UPDATE_CHANNELS) await db.del(updateLockKey(ch));
40798
40840
  await Handler();
40799
40841
  next();
@@ -41767,7 +41809,7 @@ app$1.use(ASSETS_PREFIX, staticRouter);
41767
41809
  app.use(KKK_PREFIX, app$1);
41768
41810
  //#endregion
41769
41811
  //#region src/setup.ts
41770
- var requireVersion = "1.16.3";
41812
+ var requireVersion = "1.18.0";
41771
41813
  if (process.env.NODE_ENV !== "development" && isSemverGreater(requireVersion, Root.karinVersion)) {
41772
41814
  const msg = `插件构建时的 karin 版本 (${requireVersion}) 高于当前运行版本 (${Root.karinVersion}),可能会出现兼容性问题!`;
41773
41815
  logger$1.warn(msg);
package/lib/style.css CHANGED
@@ -15495,6 +15495,10 @@
15495
15495
  margin-block-end: calc(calc(var(--spacing) * 32) * calc(1 - var(--tw-space-y-reverse)));
15496
15496
  }
15497
15497
 
15498
+ .gap-x-3 {
15499
+ column-gap: calc(var(--spacing) * 3);
15500
+ }
15501
+
15498
15502
  .gap-x-5 {
15499
15503
  column-gap: calc(var(--spacing) * 5);
15500
15504
  }
@@ -15583,6 +15587,10 @@
15583
15587
  row-gap: calc(var(--spacing) * 2);
15584
15588
  }
15585
15589
 
15590
+ .gap-y-4 {
15591
+ row-gap: calc(var(--spacing) * 4);
15592
+ }
15593
+
15586
15594
  .gap-y-6 {
15587
15595
  row-gap: calc(var(--spacing) * 6);
15588
15596
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karin-plugin-kkk",
3
- "version": "2.45.0-beta.4",
3
+ "version": "2.45.0-beta.6",
4
4
  "description": "Karin 的「抖音」「B 站」视频解析/动态推送插件",
5
5
  "keywords": [
6
6
  "karin",
@@ -83,7 +83,7 @@
83
83
  "@lobehub/webfont-harmony-sans-sc": "^1.0.0",
84
84
  "emoji-datasource-apple": "16.0.0"
85
85
  },
86
- "timestamp": "2026-10-06T07:32:55.907Z",
86
+ "timestamp": "2026-10-06T10:04:25.731Z",
87
87
  "engines": {
88
88
  "node": ">=18.0.0"
89
89
  }