karin-plugin-kkk 2.6.2 → 2.6.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 +10 -0
- package/lib/apps/admin.js +2 -2
- package/lib/apps/help.js +2 -2
- package/lib/apps/push.js +2 -2
- package/lib/apps/tools.js +2 -2
- package/lib/apps/update.js +67 -62
- package/lib/core_chunk/{db-84RGQuQB.js → db-CnggXXYI.js} +1 -1
- package/lib/core_chunk/{main-Cdyg-K3_.js → main-DImp2mQm.js} +29 -23
- package/lib/core_chunk/template.js +17 -17
- package/lib/index.js +4 -4
- package/lib/karin-plugin-kkk.css +12 -4
- package/lib/web.config.js +1 -1
- package/lib/web_chunk/assets/Combination-C0CYtrP6.js +46 -0
- package/lib/web_chunk/assets/avatar-CJJW_K-_.js +9 -0
- package/lib/web_chunk/assets/{eye-DRPUvt0E.js → eye-Cr8oXyKf.js} +1 -1
- package/lib/web_chunk/assets/index-Bh1RG_9O.js +6 -0
- package/lib/web_chunk/assets/index-CYAHV60p.js +487 -0
- package/lib/web_chunk/assets/page-58nQeo5_.js +114 -0
- package/lib/web_chunk/assets/page-8pj_FW4u.js +45 -0
- package/lib/web_chunk/assets/page-BPTYguY-.js +31 -0
- package/lib/web_chunk/assets/page-CYGWUTnd.js +16 -0
- package/lib/web_chunk/assets/page-UwBE0I-3.js +11 -0
- package/lib/web_chunk/assets/request-Ci7afMst.js +19 -0
- package/lib/web_chunk/assets/select-d_9wY674.js +16 -0
- package/lib/web_chunk/assets/separator-BUN6dU3T.js +1 -0
- package/lib/web_chunk/index.html +1 -1
- package/lib/web_chunk/sw.js +1 -1
- package/package.json +1 -1
- package/lib/web_chunk/assets/Combination-DfK1f2MP.js +0 -46
- package/lib/web_chunk/assets/avatar-C4chGJDc.js +0 -9
- package/lib/web_chunk/assets/index-BUqxMma2.js +0 -487
- package/lib/web_chunk/assets/index-aXvLwwpg.js +0 -6
- package/lib/web_chunk/assets/page-BhWGHVfn.js +0 -11
- package/lib/web_chunk/assets/page-BiAPjle8.js +0 -45
- package/lib/web_chunk/assets/page-CTUYIzQT.js +0 -31
- package/lib/web_chunk/assets/page-DB3QWjNE.js +0 -115
- package/lib/web_chunk/assets/page-DgSls_os.js +0 -16
- package/lib/web_chunk/assets/request-BEXSdExu.js +0 -19
- package/lib/web_chunk/assets/select-DMbexxoE.js +0 -16
- package/lib/web_chunk/assets/separator-DpmlNAzt.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# 变更日志
|
|
2
2
|
|
|
3
|
+
## [2.6.3](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.6.2...v2.6.3) (2025-10-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 🐛 错误修复
|
|
7
|
+
|
|
8
|
+
* 更新检测开发环境不允许执行。 ([39b522d](https://github.com/ikenxuan/karin-plugin-kkk/commit/39b522d21c2d1bf09d25a45be6cd817070875386))
|
|
9
|
+
* 细节优化 ([ce2f9a5](https://github.com/ikenxuan/karin-plugin-kkk/commit/ce2f9a5f6c5d96ea6e10ebe39bda122e528f9ba7))
|
|
10
|
+
* 获取更新日志并发竞速请求 ([2d9f31d](https://github.com/ikenxuan/karin-plugin-kkk/commit/2d9f31d0a7f2a74369d9c69495006c0fcf958b88))
|
|
11
|
+
* 过万整除 ([93f8753](https://github.com/ikenxuan/karin-plugin-kkk/commit/93f8753d59701faee7dc28c60bca8b344efa564a))
|
|
12
|
+
|
|
3
13
|
## [2.6.2](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.6.1...v2.6.2) (2025-10-15)
|
|
4
14
|
|
|
5
15
|
|
package/lib/apps/admin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import karin, { logger } from "node-karin";
|
|
3
3
|
import require$$1 from "path";
|
|
4
|
-
import "../core_chunk/db-
|
|
4
|
+
import "../core_chunk/db-CnggXXYI.js";
|
|
5
5
|
import "../root.js";
|
|
6
6
|
import "../core_chunk/vendor-IyMLJerg.js";
|
|
7
|
-
import { C as Config, m as Common, n as bilibiliLogin } from "../core_chunk/main-
|
|
7
|
+
import { C as Config, m as Common, n as bilibiliLogin } from "../core_chunk/main-DImp2mQm.js";
|
|
8
8
|
import "node-karin/axios";
|
|
9
9
|
import "stream/promises";
|
|
10
10
|
import "node:path";
|
package/lib/apps/help.js
CHANGED
|
@@ -2,10 +2,10 @@ import fs from "node:fs";
|
|
|
2
2
|
import { markdown } from "@karinjs/md-html";
|
|
3
3
|
import karin, { logs, mkdirSync, render, segment } from "node-karin";
|
|
4
4
|
import { karinPathTemp } from "node-karin/root";
|
|
5
|
-
import "../core_chunk/db-
|
|
5
|
+
import "../core_chunk/db-CnggXXYI.js";
|
|
6
6
|
import { Root } from "../root.js";
|
|
7
7
|
import "../core_chunk/vendor-IyMLJerg.js";
|
|
8
|
-
import { R as Render, m as Common } from "../core_chunk/main-
|
|
8
|
+
import { R as Render, m as Common } from "../core_chunk/main-DImp2mQm.js";
|
|
9
9
|
import "node-karin/axios";
|
|
10
10
|
import "stream/promises";
|
|
11
11
|
const help = karin.command(/^#?kkk帮助$/, async (e) => {
|
package/lib/apps/push.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as getDouyinData, g as getBilibiliData, a5 as amagi } from "../core_chunk/vendor-IyMLJerg.js";
|
|
2
2
|
import karin, { logger } from "node-karin";
|
|
3
|
-
import { douyinDBInstance, bilibiliDBInstance } from "../core_chunk/db-
|
|
3
|
+
import { douyinDBInstance, bilibiliDBInstance } from "../core_chunk/db-CnggXXYI.js";
|
|
4
4
|
import "../root.js";
|
|
5
5
|
import "node:fs";
|
|
6
|
-
import { C as Config, o as wrapWithErrorHandler, B as Bilibilipush, D as DouYinpush, p as getDouyinID, N as Networks, R as Render, m as Common } from "../core_chunk/main-
|
|
6
|
+
import { C as Config, o as wrapWithErrorHandler, B as Bilibilipush, D as DouYinpush, p as getDouyinID, N as Networks, R as Render, m as Common } from "../core_chunk/main-DImp2mQm.js";
|
|
7
7
|
import "node-karin/axios";
|
|
8
8
|
const handleDouyinPush = wrapWithErrorHandler(async () => {
|
|
9
9
|
await new DouYinpush().action();
|
package/lib/apps/tools.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import karin, { logger } from "node-karin";
|
|
2
|
-
import "../core_chunk/db-
|
|
2
|
+
import "../core_chunk/db-CnggXXYI.js";
|
|
3
3
|
import "../root.js";
|
|
4
4
|
import "node:fs";
|
|
5
5
|
import "../core_chunk/vendor-IyMLJerg.js";
|
|
6
|
-
import { o as wrapWithErrorHandler, C as Config, p as getDouyinID, q as DouYin, r as getBilibiliID, t as Bilibili, u as getKuaishouID, x as fetchKuaishouData, K as Kuaishou, y as getXiaohongshuID, X as Xiaohongshu, m as Common } from "../core_chunk/main-
|
|
6
|
+
import { o as wrapWithErrorHandler, C as Config, p as getDouyinID, q as DouYin, r as getBilibiliID, t as Bilibili, u as getKuaishouID, x as fetchKuaishouData, K as Kuaishou, y as getXiaohongshuID, X as Xiaohongshu, m as Common } from "../core_chunk/main-DImp2mQm.js";
|
|
7
7
|
import "node-karin/axios";
|
|
8
8
|
import "stream/promises";
|
|
9
9
|
import "node:path";
|
package/lib/apps/update.js
CHANGED
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
import karin, { hooks, db, checkPkgUpdate, updatePkg, restart, segment, logger, config } from "node-karin";
|
|
2
|
-
import
|
|
3
|
-
import "../core_chunk/db-84RGQuQB.js";
|
|
2
|
+
import "../core_chunk/db-CnggXXYI.js";
|
|
4
3
|
import { Root } from "../root.js";
|
|
5
4
|
import "node:fs";
|
|
6
5
|
import "../core_chunk/vendor-IyMLJerg.js";
|
|
7
|
-
import { z as
|
|
6
|
+
import { z as getChangelogImage, A as isSemverGreater } from "../core_chunk/main-DImp2mQm.js";
|
|
7
|
+
import "node-karin/axios";
|
|
8
8
|
import "stream/promises";
|
|
9
9
|
import "node:path";
|
|
10
10
|
import "../core_chunk/template.js";
|
|
11
11
|
const UPDATE_LOCK_KEY = "kkk:update:lock";
|
|
12
12
|
const UPDATE_MSGID_KEY = "kkk:update:msgId";
|
|
13
13
|
const Handler = async (e) => {
|
|
14
|
-
|
|
15
|
-
const registryUrl = `https://registry.npmjs.org/${Root.pluginName}`;
|
|
16
|
-
let latestVersion = null;
|
|
17
|
-
try {
|
|
18
|
-
const res = await axios.get(registryUrl, { timeout: 1e4 });
|
|
19
|
-
latestVersion = res.data?.["dist-tags"]?.latest || res.data?.version || null;
|
|
20
|
-
} catch {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
if (!latestVersion) {
|
|
14
|
+
if (process.env.NODE_ENV === "development") {
|
|
24
15
|
return true;
|
|
25
16
|
}
|
|
17
|
+
logger.trace(e);
|
|
26
18
|
try {
|
|
27
19
|
const lockedVersion = await db.get(UPDATE_LOCK_KEY);
|
|
28
20
|
if (typeof lockedVersion === "string" && lockedVersion.length > 0) {
|
|
@@ -34,14 +26,20 @@ const Handler = async (e) => {
|
|
|
34
26
|
}
|
|
35
27
|
} catch {
|
|
36
28
|
}
|
|
37
|
-
|
|
29
|
+
let upd;
|
|
30
|
+
try {
|
|
31
|
+
upd = await checkPkgUpdate(Root.pluginName);
|
|
32
|
+
} catch {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
if (upd.status !== "yes") {
|
|
38
36
|
return true;
|
|
39
37
|
}
|
|
40
38
|
try {
|
|
41
|
-
await db.set(UPDATE_LOCK_KEY,
|
|
39
|
+
await db.set(UPDATE_LOCK_KEY, upd.remote);
|
|
42
40
|
} catch {
|
|
43
41
|
}
|
|
44
|
-
const ChangeLogImg = await getChangelogImage(Root.pluginVersion,
|
|
42
|
+
const ChangeLogImg = await getChangelogImage(Root.pluginVersion, upd.remote);
|
|
45
43
|
const list = config.master();
|
|
46
44
|
let master = list[0];
|
|
47
45
|
if (master === "console") {
|
|
@@ -53,7 +51,7 @@ const Handler = async (e) => {
|
|
|
53
51
|
botList[0].bot.account.name === "console" ? botList[1].bot.account.selfId : botList[0].bot.account.selfId,
|
|
54
52
|
master,
|
|
55
53
|
[
|
|
56
|
-
segment.text("karin-plugin-kkk
|
|
54
|
+
segment.text("karin-plugin-kkk 有新的更新!"),
|
|
57
55
|
...ChangeLogImg
|
|
58
56
|
]
|
|
59
57
|
);
|
|
@@ -68,80 +66,87 @@ const kkkUpdate = hooks.message.friend(async (e, next) => {
|
|
|
68
66
|
if (e.msg.includes("更新")) {
|
|
69
67
|
const msgId = await db.get(UPDATE_MSGID_KEY);
|
|
70
68
|
if (e.replyId === msgId) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
try {
|
|
70
|
+
const upd = await checkPkgUpdate(Root.pluginName);
|
|
71
|
+
if (upd.status === "yes") {
|
|
74
72
|
const result = await updatePkg(Root.pluginName);
|
|
75
73
|
if (result.status === "ok") {
|
|
76
|
-
const msgResult = await e.reply(
|
|
74
|
+
const msgResult = await e.reply(
|
|
75
|
+
`${Root.pluginName} 更新成功!
|
|
77
76
|
${result.local} -> ${result.remote}
|
|
78
|
-
开始执行重启......`
|
|
79
|
-
|
|
77
|
+
开始执行重启......`
|
|
78
|
+
);
|
|
79
|
+
if (msgResult.messageId) {
|
|
80
|
+
try {
|
|
81
|
+
await db.del(UPDATE_MSGID_KEY);
|
|
82
|
+
await db.del(UPDATE_LOCK_KEY);
|
|
83
|
+
} catch {
|
|
84
|
+
}
|
|
85
|
+
}
|
|
80
86
|
await restart(e.selfId, e.contact, e.messageId);
|
|
81
|
-
} else
|
|
82
|
-
await e.reply(`${Root.pluginName} 更新失败: ${result.data}`);
|
|
87
|
+
} else {
|
|
88
|
+
await e.reply(`${Root.pluginName} 更新失败: ${result.data ?? "更新执行失败"}`);
|
|
83
89
|
}
|
|
84
|
-
}
|
|
85
|
-
await e.reply(
|
|
90
|
+
} else if (upd.status === "no") {
|
|
91
|
+
await e.reply("未检测到可更新版本。");
|
|
92
|
+
} else {
|
|
93
|
+
await e.reply(`${Root.pluginName} 更新失败: ${upd.error?.message ?? String(upd.error)}`);
|
|
86
94
|
}
|
|
95
|
+
} catch (error) {
|
|
96
|
+
await e.reply(`${Root.pluginName} 更新失败: ${error.message}`);
|
|
87
97
|
}
|
|
88
98
|
}
|
|
89
99
|
}
|
|
90
100
|
next();
|
|
91
101
|
}, { priority: 100 });
|
|
92
102
|
const kkkUpdateCommand = karin.command(/^#?kkk更新$/, async (e) => {
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const res = await axios.get(registryUrl, { timeout: 1e4 });
|
|
97
|
-
latestVersion = res.data?.["dist-tags"]?.latest || res.data?.version || null;
|
|
98
|
-
} catch {
|
|
99
|
-
await e.reply("获取远程版本失败,请稍后再试。");
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
if (!latestVersion) {
|
|
103
|
-
await e.reply("未获取到最新版本信息。");
|
|
103
|
+
const upd = await checkPkgUpdate(Root.pluginName);
|
|
104
|
+
if (upd.status === "error") {
|
|
105
|
+
await e.reply(`获取远程版本失败:${upd.error?.message ?? String(upd.error)}`);
|
|
104
106
|
return;
|
|
105
107
|
}
|
|
106
|
-
if (
|
|
107
|
-
await e.reply(`当前已是最新版本:${
|
|
108
|
+
if (upd.status === "no") {
|
|
109
|
+
await e.reply(`当前已是最新版本:${upd.local}`, { reply: true });
|
|
108
110
|
return;
|
|
109
111
|
}
|
|
110
|
-
const ChangeLogImg = await getChangelogImage(Root.pluginVersion,
|
|
112
|
+
const ChangeLogImg = await getChangelogImage(Root.pluginVersion, upd.remote);
|
|
111
113
|
if (ChangeLogImg) {
|
|
112
114
|
await e.reply([segment.text(`${Root.pluginName} 的更新日志:`), ...ChangeLogImg], { reply: true });
|
|
113
115
|
} else {
|
|
114
116
|
await e.reply("获取更新日志失败,更新进程继续......", { reply: true });
|
|
115
117
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
const msgResult = await e.reply(`${Root.pluginName} 更新成功!
|
|
118
|
+
try {
|
|
119
|
+
const result = await updatePkg(Root.pluginName);
|
|
120
|
+
if (result.status === "ok") {
|
|
121
|
+
const msgResult = await e.reply(
|
|
122
|
+
`${Root.pluginName} 更新成功!
|
|
122
123
|
${result.local} -> ${result.remote}
|
|
123
|
-
开始执行重启......`
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
await
|
|
129
|
-
}
|
|
130
|
-
await e.reply(`重启失败: ${restartResult.data}`);
|
|
124
|
+
开始执行重启......`
|
|
125
|
+
);
|
|
126
|
+
if (msgResult.messageId) {
|
|
127
|
+
try {
|
|
128
|
+
await db.del(UPDATE_MSGID_KEY);
|
|
129
|
+
await db.del(UPDATE_LOCK_KEY);
|
|
130
|
+
} catch {
|
|
131
131
|
}
|
|
132
|
-
} else if (result.status === "failed") {
|
|
133
|
-
await e.reply(`${Root.pluginName} 更新失败: ${result.data}`);
|
|
134
132
|
}
|
|
135
|
-
|
|
136
|
-
await e.
|
|
133
|
+
const restartStartTime = Date.now();
|
|
134
|
+
const restartResult = await restart(e.selfId, e.contact, e.messageId);
|
|
135
|
+
if (restartResult.status === "success") {
|
|
136
|
+
await e.reply(`重启成功,耗时: ${((Date.now() - restartStartTime) / 1e3).toFixed(2)}s`);
|
|
137
|
+
} else {
|
|
138
|
+
await e.reply(`重启失败: ${restartResult.data}`);
|
|
139
|
+
}
|
|
140
|
+
} else {
|
|
141
|
+
await e.reply(`${Root.pluginName} 更新失败: ${result.data ?? "更新执行失败"}`);
|
|
137
142
|
}
|
|
138
|
-
}
|
|
139
|
-
await e.reply(
|
|
143
|
+
} catch (error) {
|
|
144
|
+
await e.reply(`${Root.pluginName} 更新失败: ${error.message}`);
|
|
140
145
|
}
|
|
141
146
|
}, { name: "kkk-更新" });
|
|
142
147
|
const update = karin.task("kkk-更新检测", "*/10 * * * *", Handler, {
|
|
143
148
|
name: "kkk-更新检测",
|
|
144
|
-
log:
|
|
149
|
+
log: false
|
|
145
150
|
});
|
|
146
151
|
export {
|
|
147
152
|
kkkUpdate,
|
|
@@ -5,7 +5,7 @@ import { karinPathBase } from "node-karin/root";
|
|
|
5
5
|
import sqlite3 from "node-karin/sqlite3";
|
|
6
6
|
import { Root } from "../root.js";
|
|
7
7
|
import { D as DynamicType } from "./vendor-IyMLJerg.js";
|
|
8
|
-
import { C as Config } from "./main-
|
|
8
|
+
import { C as Config } from "./main-DImp2mQm.js";
|
|
9
9
|
import "node-karin/axios";
|
|
10
10
|
import "stream/promises";
|
|
11
11
|
import "./template.js";
|
|
@@ -6,7 +6,7 @@ import axios, { AxiosError } from "node-karin/axios";
|
|
|
6
6
|
import { pipeline } from "stream/promises";
|
|
7
7
|
import path, { join } from "node:path";
|
|
8
8
|
import reactServerRender from "./template.js";
|
|
9
|
-
import { getDouyinDB, getBilibiliDB, cleanOldDynamicCache, bilibiliDBInstance, douyinDBInstance } from "./db-
|
|
9
|
+
import { getDouyinDB, getBilibiliDB, cleanOldDynamicCache, bilibiliDBInstance, douyinDBInstance } from "./db-CnggXXYI.js";
|
|
10
10
|
import template from "node-karin/template";
|
|
11
11
|
import crypto from "node:crypto";
|
|
12
12
|
import os from "node:os";
|
|
@@ -5223,7 +5223,10 @@ async function douyinComments(data, emojidata) {
|
|
|
5223
5223
|
nickname: replyComment.data.comments[0].user.nickname,
|
|
5224
5224
|
userimageurl: replyComment.data.comments[0].user.avatar_thumb.url_list[0],
|
|
5225
5225
|
text: processCommentEmojis$1(replyComment.data.comments[0].text, emojidata),
|
|
5226
|
-
digg_count:
|
|
5226
|
+
digg_count: (() => {
|
|
5227
|
+
const count = replyComment.data.comments[0].digg_count;
|
|
5228
|
+
return count > 1e4 ? Math.round(count / 1e4) + "w" : count;
|
|
5229
|
+
})(),
|
|
5227
5230
|
ip_label: replyComment.data.comments[0].ip_label,
|
|
5228
5231
|
text_extra: replyComment.data.comments[0].text_extra,
|
|
5229
5232
|
label_text: replyComment.data.comments[0].label_text
|
|
@@ -7243,19 +7246,32 @@ const versionCore = (v) => {
|
|
|
7243
7246
|
};
|
|
7244
7247
|
const getChangelogImage = async (localVersion, remoteVersion) => {
|
|
7245
7248
|
const urls = [
|
|
7249
|
+
// 国内镜像(优先)
|
|
7250
|
+
`https://jsd.onmicrosoft.cn/npm/${Root.pluginName}@${remoteVersion}/CHANGELOG.md`,
|
|
7251
|
+
`https://npm.onmicrosoft.cn/${Root.pluginName}@${remoteVersion}/CHANGELOG.md`,
|
|
7252
|
+
// 国内代理
|
|
7253
|
+
`https://jsd.onmicrosoft.cn/npm/${Root.pluginName}@${remoteVersion}/CHANGELOG.md`,
|
|
7254
|
+
`https://npm.onmicrosoft.cn/${Root.pluginName}@${remoteVersion}/CHANGELOG.md`,
|
|
7255
|
+
// 海外源
|
|
7246
7256
|
`https://cdn.jsdelivr.net/npm/${Root.pluginName}@${remoteVersion}/CHANGELOG.md`,
|
|
7247
|
-
`https://
|
|
7257
|
+
`https://fastly.jsdelivr.net/npm/${Root.pluginName}@${remoteVersion}/CHANGELOG.md`,
|
|
7258
|
+
`https://unpkg.com/${Root.pluginName}@${remoteVersion}/CHANGELOG.md`,
|
|
7259
|
+
// GitHub Raw 代理
|
|
7260
|
+
`https://jiashu.1win.eu.org/https://raw.githubusercontent.com/ikenxuan/karin-plugin-kkk/v${remoteVersion}/packages/core/CHANGELOG.md`
|
|
7248
7261
|
];
|
|
7249
7262
|
let changelog = "";
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
const res = await axios.get(url, { timeout: 1e4 });
|
|
7263
|
+
const requests = urls.map(
|
|
7264
|
+
(url) => axios.get(url, { timeout: 1e4, headers: baseHeaders }).then((res) => {
|
|
7253
7265
|
if (typeof res.data === "string" && res.data.length > 0) {
|
|
7254
|
-
|
|
7255
|
-
break;
|
|
7266
|
+
return res.data;
|
|
7256
7267
|
}
|
|
7257
|
-
|
|
7258
|
-
}
|
|
7268
|
+
throw new Error("Invalid changelog content");
|
|
7269
|
+
})
|
|
7270
|
+
);
|
|
7271
|
+
try {
|
|
7272
|
+
changelog = await Promise.any(requests);
|
|
7273
|
+
} catch {
|
|
7274
|
+
return null;
|
|
7259
7275
|
}
|
|
7260
7276
|
if (!changelog) return null;
|
|
7261
7277
|
const forwardLogs = range(changelog, versionCore(localVersion), versionCore(remoteVersion));
|
|
@@ -7268,17 +7284,7 @@ const getChangelogImage = async (localVersion, remoteVersion) => {
|
|
|
7268
7284
|
mkdirSync(`${karinPathTemp$1}/html/${Root.pluginName}/version`);
|
|
7269
7285
|
const htmlPath = `${karinPathTemp$1}/html/${Root.pluginName}/version/version.html`;
|
|
7270
7286
|
fs.writeFileSync(htmlPath, html);
|
|
7271
|
-
const base64 = await render.
|
|
7272
|
-
file: htmlPath,
|
|
7273
|
-
multiPage: Config.app.multiPageRender ? Config.app.multiPageHeight : false,
|
|
7274
|
-
selector: "#container",
|
|
7275
|
-
fullPage: false,
|
|
7276
|
-
type: "png",
|
|
7277
|
-
pageGotoParams: {
|
|
7278
|
-
waitUntil: "load",
|
|
7279
|
-
timeout: Config.app.RenderWaitTime * 1e3
|
|
7280
|
-
}
|
|
7281
|
-
});
|
|
7287
|
+
const base64 = await render.renderHtml(htmlPath);
|
|
7282
7288
|
const img2 = await Render("other/changelog", {
|
|
7283
7289
|
changeLogImg: `data:image/png;base64,${base64}`
|
|
7284
7290
|
});
|
|
@@ -7331,7 +7337,7 @@ const isSemverGreater = (remote, local) => {
|
|
|
7331
7337
|
return false;
|
|
7332
7338
|
};
|
|
7333
7339
|
export {
|
|
7334
|
-
|
|
7340
|
+
isSemverGreater as A,
|
|
7335
7341
|
Bilibilipush as B,
|
|
7336
7342
|
Config as C,
|
|
7337
7343
|
DouYinpush as D,
|
|
@@ -7364,5 +7370,5 @@ export {
|
|
|
7364
7370
|
webConfig as w,
|
|
7365
7371
|
fetchKuaishouData as x,
|
|
7366
7372
|
getXiaohongshuID as y,
|
|
7367
|
-
|
|
7373
|
+
getChangelogImage as z
|
|
7368
7374
|
};
|
|
@@ -1373,7 +1373,7 @@ const VideoInfoHeader$1 = ({
|
|
|
1373
1373
|
{
|
|
1374
1374
|
src: useDarkTheme ? "/image/douyin/dylogo-light.svg" : "/image/douyin/dylogo-dark.svg",
|
|
1375
1375
|
alt: "抖音Logo",
|
|
1376
|
-
className: "object-contain w-full h-full",
|
|
1376
|
+
className: "object-contain pb-10 w-full h-full",
|
|
1377
1377
|
onError: (e) => {
|
|
1378
1378
|
const target = e.target;
|
|
1379
1379
|
target.style.display = "none";
|
|
@@ -1437,8 +1437,8 @@ const CommentItemComponent$2 = ({ comment, isLast = false }) => {
|
|
|
1437
1437
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1", children: [
|
|
1438
1438
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-12.5 text-5xl text-foreground-600 relative flex items-center select-text", children: [
|
|
1439
1439
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: comment.nickname }),
|
|
1440
|
-
comment.label_type === 1 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "inline-block px-4 py-
|
|
1441
|
-
comment.status_label && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "inline-block px-4 py-
|
|
1440
|
+
comment.label_type === 1 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "inline-block px-4 py-3 rounded-xl ml-3 text-4xl bg-[#fe2c55] text-white", children: "作者" }),
|
|
1441
|
+
comment.status_label && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "inline-block px-4 py-3 ml-3 text-4xl rounded-xl bg-content3 text-foreground-700", children: comment.status_label })
|
|
1442
1442
|
] }),
|
|
1443
1443
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1444
1444
|
"div",
|
|
@@ -1461,36 +1461,36 @@ const CommentItemComponent$2 = ({ comment, isLast = false }) => {
|
|
|
1461
1461
|
) }),
|
|
1462
1462
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center mt-6 text-foreground-500", children: [
|
|
1463
1463
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-6 select-text", children: [
|
|
1464
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
|
1465
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
|
1466
|
-
comment.reply_comment_total > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-
|
|
1464
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-5xl", children: comment.create_time }),
|
|
1465
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-5xl", children: comment.ip_label }),
|
|
1466
|
+
comment.reply_comment_total > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-5xl text-foreground-600", children: [
|
|
1467
1467
|
"共",
|
|
1468
1468
|
comment.reply_comment_total,
|
|
1469
1469
|
"条回复"
|
|
1470
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
|
1470
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-5xl text-foreground-600", children: "回复" })
|
|
1471
1471
|
] }),
|
|
1472
1472
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-6", children: [
|
|
1473
1473
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2 transition-colors cursor-pointer", children: [
|
|
1474
1474
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Heart, { size: 60, className: "text-foreground-500" }),
|
|
1475
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
|
1475
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-5xl select-text", children: comment.digg_count })
|
|
1476
1476
|
] }),
|
|
1477
1477
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center transition-colors cursor-pointer", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCircle, { size: 60, className: "stroke-current text-foreground-500" }) })
|
|
1478
1478
|
] })
|
|
1479
1479
|
] }),
|
|
1480
|
-
comment.replyComment && Object.keys(comment.replyComment).length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pl-6 mt-
|
|
1480
|
+
comment.replyComment && Object.keys(comment.replyComment).length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pl-6 mt-20", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start space-x-4", children: [
|
|
1481
1481
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1482
1482
|
"img",
|
|
1483
1483
|
{
|
|
1484
1484
|
src: comment.replyComment.userimageurl,
|
|
1485
|
-
className: "object-cover mr-8 rounded-full w-
|
|
1485
|
+
className: "object-cover mr-8 rounded-full w-26 h-26",
|
|
1486
1486
|
alt: "用户头像"
|
|
1487
1487
|
}
|
|
1488
1488
|
),
|
|
1489
1489
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1", children: [
|
|
1490
1490
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center mb-2 space-x-2", children: [
|
|
1491
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
|
1491
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "mb-8 text-5xl font-medium text-foreground-600", children: comment.replyComment.nickname }),
|
|
1492
1492
|
comment.replyComment.label_text !== "" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(
|
|
1493
|
-
"inline-block px-
|
|
1493
|
+
"inline-block px-4 py-2 ml-2 text-3xl rounded-xl",
|
|
1494
1494
|
comment.replyComment.label_text === "作者" ? "bg-[#fe2c55] text-white" : "bg-default-100 text-default-500"
|
|
1495
1495
|
), children: comment.replyComment.label_text })
|
|
1496
1496
|
] }),
|
|
@@ -1505,14 +1505,14 @@ const CommentItemComponent$2 = ({ comment, isLast = false }) => {
|
|
|
1505
1505
|
}
|
|
1506
1506
|
}
|
|
1507
1507
|
),
|
|
1508
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center text-foreground-500", children: [
|
|
1508
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center mt-10 text-foreground-500", children: [
|
|
1509
1509
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-4", children: [
|
|
1510
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
|
1511
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
|
1510
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-5xl", children: comment.replyComment.create_time }),
|
|
1511
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-5xl", children: comment.replyComment.ip_label })
|
|
1512
1512
|
] }),
|
|
1513
1513
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1514
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Heart, { size:
|
|
1515
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
|
1514
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Heart, { size: 60, className: "text-foreground-500" }),
|
|
1515
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-5xl", children: comment.replyComment.digg_count })
|
|
1516
1516
|
] })
|
|
1517
1517
|
] })
|
|
1518
1518
|
] })
|
package/lib/index.js
CHANGED
|
@@ -3,15 +3,15 @@ import { _ as libExports, $ as distExports, a0 as logMiddleware, a1 as createBil
|
|
|
3
3
|
import { authMiddleware, app as app$1, mkdirSync, logger as logger$1 } from "node-karin";
|
|
4
4
|
import express from "node-karin/express";
|
|
5
5
|
import { karinPathBase } from "node-karin/root";
|
|
6
|
-
import "./core_chunk/db-
|
|
6
|
+
import "./core_chunk/db-CnggXXYI.js";
|
|
7
7
|
import { Root } from "./root.js";
|
|
8
8
|
import "node:fs";
|
|
9
|
-
import { C as Config, v as videoStreamRouter, g as getVideoRouter, s as signatureVerificationMiddleware, a as getLongLinkRouter, b as getDouyinDataRouter, c as getBilibiliDataRouter, d as getKuaishouDataRouter, e as getDouyinContentRouter, f as getBilibiliContentRouter, h as getGroupsRouter, i as getAuthorsRouter, j as addDouyinContentRouter, k as addBilibiliContentRouter, l as deleteContentRouter, m as Common } from "./core_chunk/main-
|
|
10
|
-
import { w } from "./core_chunk/main-
|
|
9
|
+
import { C as Config, v as videoStreamRouter, g as getVideoRouter, s as signatureVerificationMiddleware, a as getLongLinkRouter, b as getDouyinDataRouter, c as getBilibiliDataRouter, d as getKuaishouDataRouter, e as getDouyinContentRouter, f as getBilibiliContentRouter, h as getGroupsRouter, i as getAuthorsRouter, j as addDouyinContentRouter, k as addBilibiliContentRouter, l as deleteContentRouter, m as Common } from "./core_chunk/main-DImp2mQm.js";
|
|
10
|
+
import { w } from "./core_chunk/main-DImp2mQm.js";
|
|
11
11
|
import "node-karin/axios";
|
|
12
12
|
import "stream/promises";
|
|
13
13
|
import "./core_chunk/template.js";
|
|
14
|
-
const { initAllDatabases } = await import("./core_chunk/db-
|
|
14
|
+
const { initAllDatabases } = await import("./core_chunk/db-CnggXXYI.js");
|
|
15
15
|
await initAllDatabases();
|
|
16
16
|
const server = express();
|
|
17
17
|
const proxyOptions = {
|
package/lib/karin-plugin-kkk.css
CHANGED
|
@@ -4533,6 +4533,10 @@
|
|
|
4533
4533
|
margin-top: calc(var(--spacing) * 8);
|
|
4534
4534
|
}
|
|
4535
4535
|
|
|
4536
|
+
.mt-10 {
|
|
4537
|
+
margin-top: calc(var(--spacing) * 10);
|
|
4538
|
+
}
|
|
4539
|
+
|
|
4536
4540
|
.mt-15 {
|
|
4537
4541
|
margin-top: calc(var(--spacing) * 15);
|
|
4538
4542
|
}
|
|
@@ -4977,6 +4981,10 @@
|
|
|
4977
4981
|
height: calc(var(--spacing) * 25);
|
|
4978
4982
|
}
|
|
4979
4983
|
|
|
4984
|
+
.h-26 {
|
|
4985
|
+
height: calc(var(--spacing) * 26);
|
|
4986
|
+
}
|
|
4987
|
+
|
|
4980
4988
|
.h-28 {
|
|
4981
4989
|
height: calc(var(--spacing) * 28);
|
|
4982
4990
|
}
|
|
@@ -5337,10 +5345,6 @@
|
|
|
5337
5345
|
width: calc(var(--spacing) * 16);
|
|
5338
5346
|
}
|
|
5339
5347
|
|
|
5340
|
-
.w-18 {
|
|
5341
|
-
width: calc(var(--spacing) * 18);
|
|
5342
|
-
}
|
|
5343
|
-
|
|
5344
5348
|
.w-20 {
|
|
5345
5349
|
width: calc(var(--spacing) * 20);
|
|
5346
5350
|
}
|
|
@@ -5353,6 +5357,10 @@
|
|
|
5353
5357
|
width: calc(var(--spacing) * 24);
|
|
5354
5358
|
}
|
|
5355
5359
|
|
|
5360
|
+
.w-26 {
|
|
5361
|
+
width: calc(var(--spacing) * 26);
|
|
5362
|
+
}
|
|
5363
|
+
|
|
5356
5364
|
.w-28 {
|
|
5357
5365
|
width: calc(var(--spacing) * 28);
|
|
5358
5366
|
}
|
package/lib/web.config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { w as default } from './core_chunk/main-
|
|
1
|
+
export { w as default } from './core_chunk/main-DImp2mQm.js';
|