yz-yuki-plugin 2.0.6-1 → 2.0.6-10

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/.puppeteerrc.cjs CHANGED
@@ -1,4 +1,44 @@
1
+ const os = require('os');
2
+ const { existsSync } = require('fs');
3
+ const { execSync } = require('child_process');
4
+ const arch = os.arch();
5
+
6
+ let skipDownload = false;
7
+ let executablePath;
8
+
9
+ if (['linux', 'android'].includes(process.platform))
10
+ for (const item of ['chromium', 'chromium-browser', 'chrome', 'google-chrome'])
11
+ try {
12
+ const chromiumPath = execSync(`command -v ${item}`).toString().trim();
13
+ if (chromiumPath && existsSync(chromiumPath)) {
14
+ executablePath = chromiumPath;
15
+ break;
16
+ }
17
+ } catch (err) {}
18
+
19
+ /**
20
+ * @type {string} 浏览器 "可执行文件路径" 列表,可根据需要自行修改或添加
21
+ */
22
+ if (!executablePath)
23
+ for (const item of [
24
+ // Windows
25
+ 'C:/Program Files/Google/Chrome/Application/chrome.exe',
26
+ 'C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe',
27
+ // macOS
28
+ '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
29
+ '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge'
30
+ ])
31
+ if (existsSync(item)) {
32
+ executablePath = item;
33
+ break;
34
+ }
35
+
36
+ if (executablePath || arch == 'arm64' || arch == 'aarch64') {
37
+ (typeof logger != 'undefined' ? logger : console).info(`[Chromium] ${executablePath}`);
38
+ skipDownload = true;
39
+ }
40
+
1
41
  /**
2
42
  * @type {import("puppeteer").Configuration}
3
43
  */
4
- module.exports = require('jsxp/.puppeteerrc');
44
+ module.exports = { skipDownload, executablePath };
package/CHANGELOG.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # 2.0.6
2
2
  * 优化文字动态图片资源的发送
3
3
  * 依赖升级
4
+ * 新增哔哩直播动态@全体成员功能,开启前请检查机器人管理员权限和所在聊天类型是否支持
4
5
 
5
6
  # 2.0.5
6
7
  * 优化ck
package/README.md CHANGED
@@ -8,6 +8,29 @@
8
8
 
9
9
  [![访问量](https://profile-counter.glitch.me/yuki-plugin/count.svg)](https://github.com/snowtafir/yuki-plugin)
10
10
 
11
+
12
+ # 🚩运行环境:
13
+ 1. 系统:
14
+ * windows 10/11+,
15
+ * Linux推荐:CentOS Stream 8 +, Debian 12+, Fedora 35+
16
+
17
+ 2. node v22+ 下载地址:https://nodejs.org/zh-cn/download/
18
+
19
+ 3. 推荐使用chrome或chromium浏览器,其他浏览器可能存在兼容性问题。
20
+ * chrome 浏览器 v131+ win_x64下载地址:https://www.google.cn/chrome/
21
+ * chromium 浏览器 v128+ Linux/win手动下载安装:https://download-chromium.appspot.com
22
+
23
+ > linux命令行安装chromiun浏览器:
24
+ ```sh
25
+ sudo apt-get install chromium-browser # Ubuntu/Debian
26
+ sudo dnf install chromium # Fedora
27
+ sudo yum install chromium # CentOS Stream 8
28
+
29
+ #查看版本
30
+ chromium-browser --version
31
+ ```
32
+ > 注意,如果windows下手动安装chromium浏览器,或安装了其他修改版chrome浏览器,出现找不到浏览器,需要手动将`可执行文件路径`添加到 [./.puppeteerrc.cjs](./.puppeteerrc.cjs) 的路径列表中。
33
+
11
34
  # 🌰一、安装插件
12
35
 
13
36
  ## 选择安装方式
@@ -1,7 +1,7 @@
1
1
  # b站推送,1 开启 0 关闭,保留添加的相关数据,但是不再推送
2
2
  pushStatus: 1
3
3
 
4
- # 检测b站动态的周期,Cron表达式,作用域共6位,具体方法浏览器搜索 “node-schedule cron表达式”,示例:
4
+ # 检测b站动态的冷却时间 CD,Cron表达式,作用域共6位,具体方法浏览器搜索 “node-schedule cron表达式”,示例:
5
5
  # "*/15 * * * *" #每15min检测一次
6
6
  # "*/31 * * * *" #每31min检测一次
7
7
  # "0 5,35 * * * *" #每小时固定第5分0秒、第35分0秒检测一次,共2次/h
@@ -58,3 +58,13 @@ noSplitHeight: 7500
58
58
 
59
59
  # 动态卡片分页截图高度,默认8000px(仅填数字,无需填入单位),请勿设置过大或过小。启用分片截图时生效。
60
60
  splitHeight: 8000
61
+
62
+ # 直播动态是否@全体成员,默认 0 关闭,1 开启。开启前请检查 <机器人> 是否有 [管理员权限] 或 [聊天平台是否支持],某些聊天平台或类型不支持@全体成员,如qq官方机器人等。
63
+ liveAtAll: 0
64
+
65
+ # 直播动态@全体成员的群组/聊天/私聊列表,默认为空即不在任何群于推送直播动态中执行@全体成员。开启liveAtAll后才会生效。
66
+ liveAtAllGroupList:
67
+ - 1234567890 # 示例群号
68
+
69
+ # 直播动态@全体成员的共享冷却时间CD,单位秒,默认 1800 秒(30分钟),即每个群聊30分钟内不论多少条直播动态,只会@一次。注意,qq群有 @全体成员 10次/日 的限制,所以请合理设置。
70
+ liveAtAllCD: 1800
@@ -1,7 +1,7 @@
1
1
  # 微博推送,1 开启 0 关闭,保留添加的相关数据,但是不再推送
2
2
  pushStatus: 1
3
3
 
4
- # 检测微博动态的周期,Cron表达式,作用域共6位,具体方法浏览器搜索 “node-schedule cron表达式”,示例:
4
+ # 检测微博动态的冷却时间 CD,Cron表达式,作用域共6位,具体方法浏览器搜索 “node-schedule cron表达式”,示例:
5
5
  # "*/15 * * * *" #每15min检测一次
6
6
  # "*/31 * * * *" #每31min检测一次
7
7
  # "0 5,35 * * * *" #每小时固定第5分0秒、第35分0秒检测一次,共2次/h
package/lib/apps/weibo.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Messages } from 'yunzaijs';
2
- import { WeiboQuery } from '../models/weibo/weibo.query.js';
3
- import { WeiboTask } from '../models/weibo/weibo.task.js';
2
+ import { WeiboQuery } from '../models/weibo/weibo.main.query.js';
3
+ import { WeiboTask } from '../models/weibo/weibo.main.task.js';
4
4
  import Config from '../utils/config.js';
5
- import { WeiboGetWebData } from '../models/weibo/weibo.get.web.data.js';
5
+ import { WeiboGetWebData } from '../models/weibo/weibo.main.get.web.data.js';
6
6
 
7
7
  const message = new Messages('message');
8
8
  let weiboPushData = Config.getConfigData('config', 'weibo', 'push');
@@ -58,7 +58,7 @@ message.use(async (e) => {
58
58
  }
59
59
  const userInfo = data.userInfo || {};
60
60
  let name = uid;
61
- if (userInfo && userInfo.length !== 0) {
61
+ if (userInfo.length !== 0) {
62
62
  name = userInfo.screen_name || uid;
63
63
  }
64
64
  // 添加新的推送数据
package/lib/index.js CHANGED
@@ -5,7 +5,7 @@ import path from 'path';
5
5
  import { _paths } from './utils/paths.js';
6
6
  import * as index$1 from './apps/index.js';
7
7
  import { BiliTask } from './models/bilibili/bilibili.main.task.js';
8
- import { WeiboTask } from './models/weibo/weibo.task.js';
8
+ import { WeiboTask } from './models/weibo/weibo.main.task.js';
9
9
 
10
10
  const yukiPluginVersion = Config.getPackageJsonKey('version', path.join(_paths.pluginPath, 'package.json'));
11
11
  let biliConfigData = Config.getConfigData('config', 'bilibili', 'config');
@@ -395,6 +395,7 @@ class BiliQuery {
395
395
  const BiliDrawDynamicLinkUrl = 'https://m.bilibili.com/dynamic/';
396
396
  let desc, msg = [], pics = [], author, majorType, content, dynamicTitle;
397
397
  let title = `B站【${upName}】动态推送:\n`;
398
+ let dynamicType = data.type;
398
399
  switch (data.type) {
399
400
  case 'DYNAMIC_TYPE_AV':
400
401
  // 处理视频动态
@@ -412,7 +413,7 @@ class BiliQuery {
412
413
  `时间:${author ? moment(author.pub_ts * 1000).format('YYYY年MM月DD日 HH:mm:ss') : ''}`
413
414
  ];
414
415
  pics = [Segment.image(desc?.cover)];
415
- return { msg, pics };
416
+ return { msg, pics, dynamicType };
416
417
  case 'DYNAMIC_TYPE_WORD':
417
418
  // 处理文字动态
418
419
  author = data?.modules?.module_author;
@@ -442,7 +443,7 @@ class BiliQuery {
442
443
  `链接:${BiliDrawDynamicLinkUrl}${data.id_str}\n`,
443
444
  `时间:${author ? moment(author.pub_ts * 1000).format('YYYY年MM月DD日 HH:mm:ss') : ''}`
444
445
  ];
445
- return { msg, pics };
446
+ return { msg, pics, dynamicType };
446
447
  case 'DYNAMIC_TYPE_DRAW':
447
448
  // 处理图文动态
448
449
  author = data?.modules?.module_author;
@@ -488,7 +489,7 @@ class BiliQuery {
488
489
  `链接:${BiliDrawDynamicLinkUrl}${data.id_str}\n`,
489
490
  `时间:${author ? moment(author.pub_ts * 1000).format('YYYY年MM月DD日 HH:mm:ss') : ''}`
490
491
  ];
491
- return { msg, pics };
492
+ return { msg, pics, dynamicType };
492
493
  case 'DYNAMIC_TYPE_ARTICLE':
493
494
  // 处理文章动态
494
495
  author = data?.modules?.module_author;
@@ -531,7 +532,7 @@ class BiliQuery {
531
532
  `链接:${this.formatUrl(desc.jump_url)}\n`,
532
533
  `时间:${author ? moment(author.pub_ts * 1000).format('YYYY年MM月DD日 HH:mm:ss') : ''}`
533
534
  ];
534
- return { msg, pics };
535
+ return { msg, pics, dynamicType };
535
536
  case 'DYNAMIC_TYPE_FORWARD':
536
537
  // 处理转发动态
537
538
  author = data?.modules?.module_author;
@@ -561,7 +562,7 @@ class BiliQuery {
561
562
  '\n---以下为转发内容---\n',
562
563
  ...origContent
563
564
  ];
564
- return { msg, pics };
565
+ return { msg, pics, dynamicType };
565
566
  case 'DYNAMIC_TYPE_LIVE_RCMD':
566
567
  // 处理直播动态
567
568
  desc = data?.modules?.module_dynamic?.major?.live_rcmd?.content;
@@ -574,7 +575,7 @@ class BiliQuery {
574
575
  title = `B站【${upName}】直播动态推送:\n`;
575
576
  msg = [title, `-----------------------------\n`, `标题:${desc.title}\n`, `链接:https:${desc.link}`];
576
577
  pics = [Segment.image(desc.cover)];
577
- return { msg, pics };
578
+ return { msg, pics, dynamicType };
578
579
  default:
579
580
  // 处理未定义的动态类型
580
581
  global?.logger?.mark(`未处理的B站推送【${upName}】:${data.type}`);
@@ -37,6 +37,7 @@ class BiliTask {
37
37
  let biliConfigData = await Config.getUserConfig('bilibili', 'config');
38
38
  let biliPushData = await Config.getUserConfig('bilibili', 'push');
39
39
  let interval = biliConfigData?.interval || 7200;
40
+ logger.debug(`当前B站功能配置:${JSON.stringify(biliConfigData)}`);
40
41
  const uidMap = new Map(); // 存放group 和 private 对应所属 uid 与推送信息的映射
41
42
  const dynamicList = {}; // 存放获取的所有动态,键为 uid,值为动态数组
42
43
  await this.processBiliData(biliPushData, biliConfigData, uidMap, dynamicList);
@@ -172,6 +173,11 @@ class BiliTask {
172
173
  }
173
174
  if (sended)
174
175
  return; // 如果已经发送过,则直接返回
176
+ let liveAtAll = !!biliConfigData.liveAtAll === true ? true : false; // 直播动态是否@全体成员,默认false
177
+ let liveAtAllCD = biliConfigData.liveAtAllCD || 1800; // 直播动态@全体成员 冷却时间CD,默认 30 分钟
178
+ let liveAtAllMark = await Redis.get(`${markKey}${chatId}:liveAtAllMark`); // 直播动态@全体成员标记,默认 0
179
+ // 直播动态@全体成员的群组列表,默认空数组,为空则不进行@全体成员操作
180
+ let liveAtAllGroupList = new Set(Array.isArray(biliConfigData?.liveAtAllGroupList) ? Array.from(biliConfigData.liveAtAllGroupList).map(item => String(item)) : []);
175
181
  if (!!biliConfigData.pushMsgMode) {
176
182
  const { data, uid } = await BiliQuery.formatDynamicData(pushDynamicData); // 处理动态数据
177
183
  const extentData = { ...data };
@@ -202,7 +208,17 @@ class BiliTask {
202
208
  if (!imgs)
203
209
  return;
204
210
  Redis.set(`${markKey}${chatId}:${id_str}`, '1', { EX: 3600 * 72 }); // 设置已发送标记
205
- logger?.mark('优纪插件:B站动态执行推送');
211
+ global?.logger?.mark('优纪插件:B站动态执行推送');
212
+ if (liveAtAll && !liveAtAllMark && extentData?.type === 'DYNAMIC_TYPE_LIVE_RCMD' && liveAtAllGroupList.has(String(chatId))) {
213
+ try {
214
+ await this.sendMessage(chatId, bot_id, chatType, Segment.at('all'));
215
+ await Redis.set(`${markKey}${chatId}:liveAtAllMark`, 1, { EX: liveAtAllCD }); // 设置直播动态@全体成员标记为 1
216
+ }
217
+ catch (error) {
218
+ logger.error(`直播动态发送@全体成员失败,请检查 <机器人> 是否有 [管理员权限] 或 [聊天平台是否支持] :${error}`);
219
+ await this.sendMessage(chatId, bot_id, chatType, ['直播动态发送@全体成员失败,请检查权限或平台是否支持']);
220
+ }
221
+ }
206
222
  for (let i = 0; i < imgs.length; i++) {
207
223
  const image = imgs[i];
208
224
  await this.sendMessage(chatId, bot_id, chatType, Segment.image(image));
@@ -216,18 +232,39 @@ class BiliTask {
216
232
  if (dynamicMsg === undefined || dynamicMsg === 'continue') {
217
233
  return 'return'; // 如果动态消息构建失败,则直接返回
218
234
  }
219
- if (biliConfigData.banWords.length > 0) {
220
- const banWords = new RegExp(biliConfigData.banWords.join('|'), 'g'); // 构建屏蔽关键字正则表达式
235
+ const getBanWords = biliConfigData?.banWords;
236
+ if (getBanWords && Array.isArray(getBanWords) && getBanWords.length > 0) {
237
+ const banWords = new RegExp(getBanWords.join('|'), 'g'); // 构建屏蔽关键字正则表达式
221
238
  if (banWords.test(dynamicMsg.msg.join(''))) {
222
239
  return 'return'; // 如果动态消息包含屏蔽关键字,则直接返回
223
240
  }
224
241
  }
225
242
  let mergeTextPic = !!biliConfigData.mergeTextPic === false ? false : true; // 是否合并文本和图片,默认为 true
226
- if (mergeTextPic) {
243
+ if (mergeTextPic === true) {
227
244
  const mergeMsg = [...dynamicMsg.msg, ...dynamicMsg.pics];
245
+ if (liveAtAll && !liveAtAllMark && dynamicMsg.dynamicType === 'DYNAMIC_TYPE_LIVE_RCMD' && liveAtAllGroupList.has(String(chatId))) {
246
+ try {
247
+ await this.sendMessage(chatId, bot_id, chatType, Segment.at('all'));
248
+ await Redis.set(`${markKey}${chatId}:liveAtAllMark`, 1, { EX: liveAtAllCD }); // 设置直播动态@全体成员标记为 1
249
+ }
250
+ catch (error) {
251
+ global?.logger.error(`直播动态发送@全体成员失败,请检查 <机器人> 是否有 [管理员权限] 或 [聊天平台是否支持] :${error}`);
252
+ await this.sendMessage(chatId, bot_id, chatType, ['直播动态发送@全体成员失败,请检查权限或平台是否支持']);
253
+ }
254
+ }
228
255
  await this.sendMessage(chatId, bot_id, chatType, mergeMsg);
229
256
  }
230
257
  else {
258
+ if (liveAtAll && !liveAtAllMark && dynamicMsg.dynamicType === 'DYNAMIC_TYPE_LIVE_RCMD' && liveAtAllGroupList.has(String(chatId))) {
259
+ try {
260
+ await this.sendMessage(chatId, bot_id, chatType, Segment.at('all'));
261
+ await Redis.set(`${markKey}${chatId}:liveAtAllMark`, 1, { EX: liveAtAllCD }); // 设置直播动态@全体成员标记为 1
262
+ }
263
+ catch (error) {
264
+ global?.logger.error(`直播动态发送@全体成员失败,请检查 <机器人> 是否有 [管理员权限] 或 [聊天平台是否支持] :${error}`);
265
+ await this.sendMessage(chatId, bot_id, chatType, ['直播动态发送@全体成员失败,请检查权限或平台是否支持']);
266
+ }
267
+ }
231
268
  await this.sendMessage(chatId, bot_id, chatType, dynamicMsg.msg);
232
269
  const pics = dynamicMsg.pics;
233
270
  if (pics && pics.length > 0) {
@@ -7,7 +7,8 @@ import { readSyncCookie, cookieWithBiliTicket } from './bilibili.main.models.js'
7
7
  async function getWebId(uid) {
8
8
  const w_webid_key = 'Yz:yuki:bili:w_webid';
9
9
  const w_webid = await Redis.get(w_webid_key);
10
- if (w_webid) {
10
+ const keyTTL = await Redis.ttl(w_webid_key);
11
+ if (w_webid && keyTTL < 259200) {
11
12
  return String(w_webid);
12
13
  }
13
14
  else {
@@ -28,8 +29,10 @@ async function getWebId(uid) {
28
29
  const decoded__RENDER_DATA__JsonString = decodeURIComponent(__RENDER_DATA__[1]);
29
30
  const accessIdRegex = /"access_id":"(.*?)"/;
30
31
  const access_id = decoded__RENDER_DATA__JsonString.match(accessIdRegex);
31
- if (access_id && access_id[1]) {
32
- await Redis.set(w_webid_key, access_id[1], { EX: 43197 * 1000 });
32
+ const ExpirationTimeRegex = /document.getElementById\("__RENDER_DATA__"\).*?setTimeout\(function\(\)\s*{window.location.reload\(true\);},\s*(\d+)\s*\*\s*(\d+)\);<\/script>/;
33
+ const ExpirationTime = htmlContent.match(ExpirationTimeRegex);
34
+ if (access_id && access_id[1] && ExpirationTime && ExpirationTime[1]) {
35
+ await Redis.set(w_webid_key, access_id[1], { EX: Number(ExpirationTime[1]) });
33
36
  return String(access_id[1]);
34
37
  }
35
38
  else {
@@ -1,6 +1,6 @@
1
1
  import axios from 'axios';
2
- import { WeiboApi } from './weibo.api.js';
3
- import { WeiboQuery } from './weibo.query.js';
2
+ import { WeiboApi } from './weibo.main.api.js';
3
+ import { WeiboQuery } from './weibo.main.query.js';
4
4
 
5
5
  class WeiboGetWebData {
6
6
  e;
@@ -1,6 +1,6 @@
1
1
  import moment from 'moment';
2
2
  import fetch from 'node-fetch';
3
- import { WeiboApi } from './weibo.api.js';
3
+ import { WeiboApi } from './weibo.main.api.js';
4
4
  import { Segment } from 'yunzaijs';
5
5
  import { JSDOM } from 'jsdom';
6
6
 
@@ -29,9 +29,12 @@ class WeiboQuery {
29
29
  else if (raw_post?.mblog?.pics) {
30
30
  return 'DYNAMIC_TYPE_DRAW';
31
31
  }
32
- else {
32
+ else if (!raw_post?.mblog?.pics && String(raw_post?.mblog?.text).trim().length > 0) {
33
33
  return 'DYNAMIC_TYPE_ARTICLE';
34
34
  }
35
+ else {
36
+ return 'DYNAMIC_TYPE_UNKNOWN';
37
+ }
35
38
  }
36
39
  /**筛选正文 */
37
40
  static filterText(raw_text) {
@@ -77,6 +80,7 @@ class WeiboQuery {
77
80
  formatData.data.name = nick_name;
78
81
  /**头像框 */
79
82
  formatData.data.pendant = '';
83
+ /**生成日期 */
80
84
  formatData.data.created = moment().format('YYYY年MM月DD日 HH:mm:ss');
81
85
  formatData.data.type = type;
82
86
  switch (type) {
@@ -2,8 +2,8 @@ import QRCode from 'qrcode';
2
2
  import { Redis, Segment, Bot } from 'yunzaijs';
3
3
  import Config from '../../utils/config.js';
4
4
  import { renderPage } from '../../utils/image.js';
5
- import { WeiboGetWebData } from './weibo.get.web.data.js';
6
- import { WeiboQuery } from './weibo.query.js';
5
+ import { WeiboGetWebData } from './weibo.main.get.web.data.js';
6
+ import { WeiboQuery } from './weibo.main.query.js';
7
7
 
8
8
  class WeiboTask {
9
9
  taskName;
@@ -19,6 +19,7 @@ class WeiboTask {
19
19
  let weiboConfigData = await Config.getUserConfig('weibo', 'config');
20
20
  let weiboPushData = await Config.getUserConfig('weibo', 'push');
21
21
  let interval = weiboConfigData.interval || 7200; // 推送间隔时间,单位为秒,默认2小时
22
+ logger.debug(`当前微博功能配置:${JSON.stringify(weiboConfigData)}`);
22
23
  const uidMap = new Map(); // 存放group 和 private 对应所属 uid 与推送信息的映射
23
24
  const dynamicList = {}; // 存放获取的所有动态,键为 uid,值为动态数组
24
25
  await this.processWeiboData(weiboPushData, uidMap, dynamicList);
@@ -183,8 +184,9 @@ class WeiboTask {
183
184
  if (dynamicMsg === undefined || dynamicMsg === 'continue') {
184
185
  return 'return'; // 如果动态消息构建失败或内部资源获取失败,则直接返回
185
186
  }
186
- if (weiboConfigData.banWords.length > 0) {
187
- const banWords = new RegExp(weiboConfigData.banWords.join('|'), 'g'); // 构建屏蔽关键字正则表达式
187
+ const getBanWords = weiboConfigData?.banWords;
188
+ if (getBanWords && Array.isArray(getBanWords) && getBanWords.length > 0) {
189
+ const banWords = new RegExp(getBanWords.join('|'), 'g'); // 构建屏蔽关键字正则表达式
188
190
  if (banWords.test(dynamicMsg.msg.join(''))) {
189
191
  return 'return'; // 如果动态消息包含屏蔽关键字,则直接返回
190
192
  }
@@ -15,11 +15,11 @@ class Image extends Picture {
15
15
  // 继承父类实例
16
16
  super();
17
17
  // 父类已经实例化组件渲染对象
18
- //this.Com;
18
+ //this.component;
19
19
  // 父类已经实例化启动 Puppeteer
20
- //this.Pup.start();
20
+ //this.puppeteer.start();
21
21
  // 初始化 YukiPuppeteerRender 实例
22
- this.yukiPuppeteerRender = new YukiPuppeteerRender(this.Pup);
22
+ this.yukiPuppeteerRender = new YukiPuppeteerRender(this.puppeteer);
23
23
  }
24
24
  /**
25
25
  * 实例方法,用于执行实际的渲染和截图操作
@@ -34,7 +34,7 @@ class Image extends Picture {
34
34
  // 根据组件名称获取对应的 React 组件
35
35
  const Page = index[page];
36
36
  // 调用 yukiPuppeteerRender 进行截图操作
37
- return this.yukiPuppeteerRender.yukiScreenshot(this.Com.compile({
37
+ return this.yukiPuppeteerRender.yukiScreenshot(this.component.compile({
38
38
  path: page,
39
39
  name: `${uid}.html`,
40
40
  component: React.createElement(Page, { ...props }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yz-yuki-plugin",
3
- "version": "2.0.6-1",
3
+ "version": "2.0.6-10",
4
4
  "description": "优纪插件,yunzaijs 关于 微博推送、B站推送 等功能的拓展插件",
5
5
  "author": "snowtafir",
6
6
  "type": "module",
@@ -31,12 +31,12 @@
31
31
  "debug": "^4.3.6",
32
32
  "jsdom": "^25.0.1",
33
33
  "json5": "^2.2.3",
34
- "jsxp": "^1.0.4",
34
+ "jsxp": "^1.1.2",
35
35
  "lodash": "^4.17.21",
36
36
  "md5": "^2.3.0",
37
37
  "moment": "^2.30.1",
38
38
  "node-fetch": "^3.3.2",
39
- "puppeteer": "^23.10.1",
39
+ "puppeteer": "^24.1.0",
40
40
  "qrcode": "^1.5.4",
41
41
  "react": "^18.3.1",
42
42
  "react-dom": "^18.3.1",
@@ -60,23 +60,24 @@
60
60
  "axios": "^1.7.9",
61
61
  "chokidar": "^4.0.1",
62
62
  "husky": "^9.1.6",
63
+ "icqq": "^0.6.10",
63
64
  "jsdom": "^24.1.1",
64
65
  "json5": "^2.2.3",
65
- "jsxp": "^1.0.4",
66
+ "jsxp": "^1.1.2",
66
67
  "lodash": "^4.17.21",
67
- "lvyjs": "^0.2.6",
68
+ "lvyjs": "^0.2.14",
68
69
  "md5": "^2.3.0",
69
70
  "node-fetch": "^3.3.2",
70
71
  "postcss": "^8.4.47",
71
72
  "prettier": "^3.4.2",
72
- "puppeteer": "^23.10.1",
73
+ "puppeteer": "^24.1.0",
73
74
  "qrcode": "^1.5.4",
74
75
  "react": "^18.3.1",
75
76
  "react-dom": "^18.3.1",
76
77
  "redis": "^4.7.0",
77
78
  "tailwindcss": "^3.4.14",
78
79
  "ts-node": "^10.9.2",
79
- "tsx": "^4.19.0",
80
+ "tsx": "^4.19.2",
80
81
  "typescript": "^5.5.4",
81
82
  "yaml": "^2.6.1",
82
83
  "yunzaijs": "^1.0.0-rc.5"
@@ -106,6 +107,6 @@
106
107
  "registry": "https://registry.npmjs.org"
107
108
  },
108
109
  "engines": {
109
- "node": ">=16.14.0"
110
+ "node": ">=20"
110
111
  }
111
112
  }