yz-yuki-plugin 1.0.2-rc.3 → 1.0.2-rc.4

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/README.md CHANGED
@@ -155,8 +155,8 @@ https://m.weibo.cn/u/7643376782 # 7643376782 为崩坏星穹铁道博主uid
155
155
  ||||
156
156
  | **其他指令** | | |
157
157
  | 查看版本信息 | 查看版本信息 | `#优纪版本` |
158
- | 更新yuki插件 | 系统指令更新yuki插件,v4需安装yz-system | `#更新yuki-plugin` |
159
- | 强制更新yuki插件 | 强制更新yuki插件,v4需安装yz-system| `#强制更新yuki-plugin` |
158
+ | 更新yuki插件 | 系统指令更新yuki插件,yunzai-next需安装yz-system | `#更新yuki-plugin` |
159
+ | 强制更新yuki插件 | 强制更新yuki插件,yunzai-next需安装yz-system| `#强制更新yuki-plugin` |
160
160
 
161
161
  </details>
162
162
 
@@ -80,7 +80,7 @@
80
80
  desc: 查看版本信息
81
81
  - icon: 钓鱼
82
82
  title: "#更新yuki-plugin"
83
- desc: "系统指令更新yuki插件,v4需安装yz-system"
83
+ desc: "系统指令更新yuki插件,yz-next需安装yz-system"
84
84
  - icon: pluie_lotus
85
85
  title: "#强制更新yuki-plugin"
86
- desc: "强制更新yuki插件,v4需安装yz-system"
86
+ desc: "强制更新yuki插件,yz-next需安装yz-system"
@@ -233,13 +233,13 @@ class BiliQuery {
233
233
  desc = data?.modules?.module_dynamic?.major?.opus || {};
234
234
  pics = desc?.pics;
235
235
  pics = pics.map((item) => { return item?.url; }) || [];
236
- content = this.parseRichTextNodes(desc?.summary?.text) || "";
236
+ content = desc?.summary?.text || "";
237
237
  }
238
238
  else {
239
239
  desc = data?.modules?.module_dynamic?.desc || {};
240
240
  pics = data?.modules?.module_dynamic?.major?.draw?.items;
241
241
  pics = [];
242
- content = this.parseRichTextNodes(desc?.text);
242
+ content = desc?.text;
243
243
  }
244
244
  if (!desc && !author)
245
245
  return;
@@ -261,13 +261,13 @@ class BiliQuery {
261
261
  pics = pics.map((item) => {
262
262
  return item.url;
263
263
  });
264
- content = this.parseRichTextNodes(desc?.summary?.text) || "";
264
+ content = desc?.summary?.text || "";
265
265
  }
266
266
  else {
267
267
  desc = data?.modules?.module_dynamic?.desc;
268
268
  pics = data?.modules?.module_dynamic?.major?.draw?.items;
269
269
  pics = pics.map((item) => { return item?.src; });
270
- content = this.parseRichTextNodes(desc?.text);
270
+ content = desc?.text;
271
271
  }
272
272
  if (!desc && !pics && !author)
273
273
  return;
@@ -296,7 +296,7 @@ class BiliQuery {
296
296
  pics = desc?.pics;
297
297
  pics = pics.map((item) => { return item.url; }) || [];
298
298
  dynamicTitle = desc?.title;
299
- content = this.parseRichTextNodes(desc?.summary?.rich_text_nodes || desc?.summary?.text) || "";
299
+ content = desc?.summary?.text || "";
300
300
  }
301
301
  else {
302
302
  desc = data?.modules?.module_dynamic?.major?.article || {};
@@ -325,7 +325,7 @@ class BiliQuery {
325
325
  case "DYNAMIC_TYPE_FORWARD":
326
326
  author = data?.modules?.module_author;
327
327
  desc = data?.modules?.module_dynamic?.desc || {};
328
- content = this.parseRichTextNodes(desc?.text);
328
+ content = desc?.text;
329
329
  if (!desc && !author)
330
330
  return;
331
331
  if (!data.orig)
@@ -88,19 +88,24 @@ class BiliTask {
88
88
  for (let [key, value] of uidMap) {
89
89
  const tempDynamicList = dynamicList[key] || [];
90
90
  const willPushDynamicList = [];
91
+ const printedList = new Set();
91
92
  for (let dynamicItem of tempDynamicList) {
92
93
  let author = dynamicItem?.modules?.module_author || {};
93
- logger.info(`正在检测B站动态 [ ${author?.name} : ${author?.mid} ]`);
94
+ if (!printedList.has(author?.mid)) {
95
+ logger.info(`正在检测B站动态 [ ${author?.name} : ${author?.mid} ]`);
96
+ printedList.add(author?.mid);
97
+ }
94
98
  if (!author?.pub_ts)
95
99
  continue;
96
100
  if (Number(now - author.pub_ts) > interval) {
97
- logger.info(`超过间隔,跳过 [ ${author?.name} : ${author?.mid} ] ${author?.pub_time} 的动态`);
101
+ logger.debug(`超过间隔,跳过 [ ${author?.name} : ${author?.mid} ] ${author?.pub_time} 的动态`);
98
102
  continue;
99
103
  }
100
104
  if (dynamicItem.type === "DYNAMIC_TYPE_FORWARD" && !biliConfigData.pushTransmit)
101
105
  continue;
102
106
  willPushDynamicList.push(dynamicItem);
103
107
  }
108
+ printedList.clear();
104
109
  const pushMapInfo = value || {};
105
110
  const { chatIds, bot_id, upName, type, chatType } = pushMapInfo;
106
111
  for (let pushDynamicData of willPushDynamicList) {
@@ -46,20 +46,25 @@ class WeiboTask {
46
46
  for (let [key, value] of uidMap) {
47
47
  const tempDynamicList = dynamicList[key] || [];
48
48
  const willPushDynamicList = [];
49
+ const printedList = new Set();
49
50
  for (let dynamicItem of tempDynamicList) {
50
51
  let raw_post = dynamicItem || {};
51
52
  let user = raw_post?.mblog?.user || {};
52
- logger.info(`正在检测微博动态 [ ${user?.screen_name} : ${user?.id} ]`);
53
+ if (!printedList.has(user?.id)) {
54
+ logger.info(`正在检测微博动态 [ ${user?.screen_name} : ${user?.id} ]`);
55
+ printedList.add(user?.id);
56
+ }
53
57
  if (!raw_post?.mblog?.created_at)
54
58
  continue;
55
59
  if (Number(now - (WeiboQuery.getDynamicCreatetDate(raw_post) / 1000)) > interval) {
56
- logger.info(`超过间隔,跳过 [ ${user?.screen_name} : ${user?.id} ] ${raw_post?.mblog?.created_at} 的动态`);
60
+ logger.debug(`超过间隔,跳过 [ ${user?.screen_name} : ${user?.id} ] ${raw_post?.mblog?.created_at} 的动态`);
57
61
  continue;
58
62
  }
59
63
  if (dynamicItem.type === "DYNAMIC_TYPE_FORWARD" && !weiboConfigData.pushTransmit)
60
64
  continue;
61
65
  willPushDynamicList.push(dynamicItem);
62
66
  }
67
+ printedList.clear();
63
68
  const pushMapInfo = value || {};
64
69
  const { chatIds, bot_id, upName, type, chatType } = pushMapInfo;
65
70
  for (let pushDynamicData of willPushDynamicList) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yz-yuki-plugin",
3
- "version": "1.0.2-rc.3",
3
+ "version": "1.0.2-rc.4",
4
4
  "description": "优纪插件,yunzaijs 关于 微博推送、B站推送 等功能的拓展插件",
5
5
  "author": "snowtafir",
6
6
  "type": "module",
@@ -23,16 +23,16 @@
23
23
  "dependencies": {
24
24
  "axios": "^1.7.3",
25
25
  "chokidar": "^3.6.0",
26
- "jsdom": "^24.1.0",
26
+ "jsdom": "^24.1.1",
27
27
  "json5": "^2.2.3",
28
28
  "md5": "^2.3.0",
29
29
  "moment": "^2.30.1",
30
30
  "node-fetch": "^3.3.2",
31
- "puppeteer": "^22.15.0",
31
+ "puppeteer": "^23.0.2",
32
32
  "qrcode": "^1.5.4",
33
33
  "react": "^18.3.1",
34
34
  "react-dom": "^18.3.1",
35
- "react-puppeteer": "1.0.1",
35
+ "react-puppeteer": "1.0.2",
36
36
  "redis": "^4.7.0",
37
37
  "yaml": "^2.5.0",
38
38
  "yarn": "^1.19.1"
@@ -44,12 +44,12 @@
44
44
  "@rollup/plugin-node-resolve": "^15.2.3",
45
45
  "@rollup/plugin-replace": "^5.0.7",
46
46
  "@rollup/plugin-terser": "^0.4.4",
47
- "@rollup/plugin-typescript": "^11.1.3",
47
+ "@rollup/plugin-typescript": "^11.1.6",
48
48
  "@types/rollup-plugin-auto-external": "^2.0.5",
49
49
  "@types/jsdom": "^21.1.7",
50
50
  "@types/lodash": "^4.17.7",
51
51
  "@types/md5": "^2.3.5",
52
- "@types/node": "^20.8.5",
52
+ "@types/node": "^22.2.0",
53
53
  "@types/node-fetch": "^2.6.11",
54
54
  "@types/qrcode": "^1.5.5",
55
55
  "@types/react": "^18.3.3",
@@ -57,28 +57,28 @@
57
57
  "@types/yaml": "1.9.7",
58
58
  "axios": "^1.7.3",
59
59
  "chokidar": "^3.6.0",
60
- "jsdom": "^24.1.0",
60
+ "jsdom": "^24.1.1",
61
61
  "json5": "^2.2.3",
62
62
  "md5": "^2.3.0",
63
63
  "node-fetch": "^3.3.2",
64
- "nodemon": "^3.0.1",
65
- "prettier": "^3.2.5",
66
- "puppeteer": "^22.15.0",
64
+ "nodemon": "^3.1.4",
65
+ "prettier": "^3.3.3",
66
+ "puppeteer": "^23.0.2",
67
67
  "qrcode": "^1.5.4",
68
68
  "react": "^18.3.1",
69
69
  "react-dom": "^18.3.1",
70
- "react-puppeteer": "1.0.1",
70
+ "react-puppeteer": "1.0.2",
71
71
  "redis": "^4.7.0",
72
72
  "rollup": "^4.20.0",
73
73
  "rollup-plugin-auto-external": "^2.0.0",
74
74
  "rollup-plugin-copy": "^3.5.0",
75
75
  "rollup-plugin-dts": "^6.1.1",
76
76
  "rollup-plugin-ignore": "^1.0.10",
77
- "tailwindcss": "^3.4.3",
77
+ "tailwindcss": "^3.4.9",
78
78
  "ts-node": "^10.9.2",
79
- "typescript": "^5.4.5",
80
- "yunzai": "^1.0.1-rc.2",
81
- "yunzai-mys": "^1.0.0-rc.0"
79
+ "typescript": "^5.5.4",
80
+ "yunzai": "^1.0.1-rc.5",
81
+ "yunzai-mys": "^1.0.0-rc.1"
82
82
  },
83
83
  "files": [
84
84
  "public",