koishi-plugin-bilibili-notify 3.2.7-alpha.1 → 3.2.8-alpha.1
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/lib/index.d.mts +23 -20
- package/lib/index.d.ts +23 -20
- package/lib/index.js +265 -225
- package/lib/index.mjs +265 -225
- package/package.json +1 -1
- package/readme.md +2 -0
package/lib/index.mjs
CHANGED
|
@@ -52,6 +52,94 @@ var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(
|
|
|
52
52
|
var __toCommonJS$5 = (mod) => __copyProps$5(__defProp$6({}, "__esModule", { value: true }), mod);
|
|
53
53
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
54
54
|
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/config.ts
|
|
57
|
+
const BAConfigSchema = Schema.object({
|
|
58
|
+
require: Schema.object({}).description("必填设置"),
|
|
59
|
+
key: Schema.string().pattern(/^[0-9a-f]{32}$/).role("secret").required().description("请输入一个32位小写字母的十六进制密钥(例如:9b8db7ae562b9864efefe06289cc5530),使用此密钥将你的B站登录信息存储在数据库中,请一定保存好此密钥。如果你忘记了此密钥,必须重新登录。你可以自行生成,或到这个网站生成:https://www.sexauth.com/"),
|
|
60
|
+
master: Schema.intersect([Schema.object({ enable: Schema.boolean().default(false).description("是否开启主人账号功能,如果您的机器人没有私聊权限请不要开启此功能。开启后如果机器人运行错误会向您进行报告") }).description("主人账号"), Schema.union([Schema.object({
|
|
61
|
+
enable: Schema.const(true).required(),
|
|
62
|
+
platform: Schema.union([
|
|
63
|
+
"qq",
|
|
64
|
+
"qqguild",
|
|
65
|
+
"onebot",
|
|
66
|
+
"discord",
|
|
67
|
+
"red",
|
|
68
|
+
"telegram",
|
|
69
|
+
"satori",
|
|
70
|
+
"chronocat",
|
|
71
|
+
"lark"
|
|
72
|
+
]).description("请选择您的私人机器人平台,目前支持QQ、QQ群、OneBot、Discord、RedBot、Telegram、Satori、ChronoCat、Lark。从2.0版本开始,只能在一个平台下使用本插件"),
|
|
73
|
+
masterAccount: Schema.string().role("secret").required().description("主人账号,在Q群使用可直接使用QQ号,若在其他平台使用,请使用inspect插件获取自身ID"),
|
|
74
|
+
masterAccountGuildId: Schema.string().role("secret").description("主人账号所在的群组ID,只有在QQ频道、Discord这样的环境才需要填写,请使用inspect插件获取群组ID")
|
|
75
|
+
}), Schema.object({})])]),
|
|
76
|
+
basicSettings: Schema.object({}).description("基本设置"),
|
|
77
|
+
userAgent: Schema.string().description("设置请求头User-Agen,请求出现-352时可以尝试修改,UA获取方法可参考:https://blog.csdn.net/qq_44503987/article/details/104929111"),
|
|
78
|
+
subTitle: Schema.object({}).description("订阅配置"),
|
|
79
|
+
sub: Schema.array(Schema.object({
|
|
80
|
+
name: Schema.string().description("订阅用户昵称,只是给你自己看的(相当于备注),可填可不填"),
|
|
81
|
+
uid: Schema.string().required().description("订阅用户UID"),
|
|
82
|
+
dynamic: Schema.boolean().default(false).description("是否订阅用户动态"),
|
|
83
|
+
live: Schema.boolean().default(false).description("是否订阅用户直播"),
|
|
84
|
+
target: Schema.array(Schema.object({
|
|
85
|
+
platform: Schema.string().required().description("推送平台,例如onebot、qq、discord"),
|
|
86
|
+
channelArr: Schema.array(Schema.object({
|
|
87
|
+
channelId: Schema.string().required().description("频道/群组号"),
|
|
88
|
+
dynamic: Schema.boolean().default(false).description("该频道/群组是否推送动态信息"),
|
|
89
|
+
live: Schema.boolean().default(false).description("该频道/群组是否推送直播通知"),
|
|
90
|
+
liveGuardBuy: Schema.boolean().default(false).description("该频道/群组是否推送上舰消息"),
|
|
91
|
+
atAll: Schema.boolean().default(false).description("推送开播通知时是否艾特全体成员"),
|
|
92
|
+
bot: Schema.string().description("若您有多个相同平台机器人,可在此填写当前群聊执行推送的机器人账号。不填则默认第一个")
|
|
93
|
+
})).role("table").required().description("需推送的频道/群组详细设置")
|
|
94
|
+
})).description("订阅用户需要发送的平台和频道/群组信息(一个平台下可以推送多个频道/群组)"),
|
|
95
|
+
liveMsg: Schema.intersect([Schema.object({ enable: Schema.boolean().default(false).description("是否开启个性化直播消息设置") }), Schema.union([Schema.object({
|
|
96
|
+
enable: Schema.const(true).required(),
|
|
97
|
+
customLiveStart: Schema.string().description("自定义开播提示语,-name代表UP昵称,-follower代表当前粉丝数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name开播啦,会发送为xxxUP开播啦"),
|
|
98
|
+
customLive: Schema.string().description("自定义直播中提示语,-name代表UP昵称,-time代表开播时长,-watched代表累计观看人数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name正在直播,会发送为xxxUP正在直播xxx"),
|
|
99
|
+
customLiveEnd: Schema.string().description("自定义下播提示语,-name代表UP昵称,-follower_change代表本场直播粉丝数变,-time代表开播时长,\\n为换行。例如-name下播啦,本次直播了-time,会发送为xxxUP下播啦,直播时长为xx小时xx分钟xx秒")
|
|
100
|
+
}), Schema.object({})])]),
|
|
101
|
+
card: Schema.intersect([Schema.object({ enable: Schema.boolean().default(false).description("是否开启自定义卡片颜色") }), Schema.union([Schema.object({
|
|
102
|
+
enable: Schema.const(true).required(),
|
|
103
|
+
cardColorStart: Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片的开始渐变背景色,请填入16进制颜色代码,参考网站:https://webkul.github.io/coolhue/"),
|
|
104
|
+
cardColorEnd: Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/"),
|
|
105
|
+
cardBasePlateColor: Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片底板颜色,请填入16进制颜色代码"),
|
|
106
|
+
cardBasePlateBorder: Schema.string().pattern(/\d*\.?\d+(?:px|em|rem|%|vh|vw|vmin|vmax)/).description("推送卡片底板边框宽度,请填入css单位,例如1px,12.5rem,100%")
|
|
107
|
+
}), Schema.object({})])])
|
|
108
|
+
}).collapse()).collapse().description("输入订阅信息,自定义订阅内容; uid: 订阅用户UID,dynamic: 是否需要订阅动态,live: 是否需要订阅直播"),
|
|
109
|
+
dynamic: Schema.object({}).description("动态推送设置"),
|
|
110
|
+
dynamicUrl: Schema.boolean().default(false).description("发送动态时是否同时发送链接。注意:如果使用的是QQ官方机器人不能开启此项!"),
|
|
111
|
+
dynamicCron: Schema.string().default("*/2 * * * *").description("动态监测时间,请填入cron表达式,请勿填入过短时间"),
|
|
112
|
+
dynamicVideoUrlToBV: Schema.boolean().default(false).description("如果推送的动态是视频动态,且开启了发送链接选项,开启此选项则会将链接转换为BV号以便其他用途"),
|
|
113
|
+
pushImgsInDynamic: Schema.boolean().default(false).description("是否推送动态中的图片,默认不开启。开启后会单独推送动态中的图片,该功能容易导致QQ风控"),
|
|
114
|
+
live: Schema.object({}).description("直播推送设置"),
|
|
115
|
+
liveDetectType: Schema.union([Schema.const("WS").description("使用WebSocket连接到B站消息服务器进行直播检测,推荐使用"), Schema.const("API").description("通过轮询API发送请求监测直播状态,此模式理论可无限订阅,但容易产生其他问题,功能没有WS模式全面").experimental()]).role("radio").default("WS").description("直播检测方式,WS为连接到B站消息服务器,API为通过轮询发送请求监测,默认使用WS检测"),
|
|
116
|
+
restartPush: Schema.boolean().default(true).description("插件重启后,如果订阅的主播正在直播,是否进行一次推送,默认开启"),
|
|
117
|
+
pushTime: Schema.number().min(0).max(12).step(.5).default(1).description("设定间隔多长时间推送一次直播状态,单位为小时,默认为一小时"),
|
|
118
|
+
customLiveStart: Schema.string().default("-name开播啦,当前粉丝数:-follower\\n-link").description("自定义开播提示语,-name代表UP昵称,-follower代表当前粉丝数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name开播啦,会发送为xxxUP开播啦"),
|
|
119
|
+
customLive: Schema.string().default("-name正在直播,目前已播-time,累计观看人数:-watched\\n-link").description("自定义直播中提示语,-name代表UP昵称,-time代表开播时长,-watched代表累计观看人数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name正在直播,会发送为xxxUP正在直播xxx"),
|
|
120
|
+
customLiveEnd: Schema.string().default("-name下播啦,本次直播了-time,粉丝数变化-follower_change").description("自定义下播提示语,-name代表UP昵称,-follower_change代表本场直播粉丝数变,-time代表开播时长,\\n为换行。例如-name下播啦,本次直播了-time,会发送为xxxUP下播啦,直播时长为xx小时xx分钟xx秒"),
|
|
121
|
+
followerDisplay: Schema.boolean().default(true).description("粉丝数变化和累积观看本场直播的人数是否显示在推送卡片中"),
|
|
122
|
+
hideDesc: Schema.boolean().default(false).description("是否隐藏UP主直播间简介,开启后推送的直播卡片将不再展示简介"),
|
|
123
|
+
style: Schema.object({}).description("美化设置"),
|
|
124
|
+
removeBorder: Schema.boolean().default(false).description("移除推送卡片边框"),
|
|
125
|
+
cardColorStart: Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#F38AB5").description("推送卡片的开始渐变背景色,请填入16进制颜色代码,参考网站:https://webkul.github.io/coolhue/"),
|
|
126
|
+
cardColorEnd: Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#F9CCDF").description("推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/"),
|
|
127
|
+
cardBasePlateColor: Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#FFF5EE").description("推送卡片底板颜色,请填入16进制颜色代码"),
|
|
128
|
+
cardBasePlateBorder: Schema.string().pattern(/\d*\.?\d+(?:px|em|rem|%|vh|vw|vmin|vmax)/).default("15px").description("推送卡片底板边框宽度,请填入css单位,例如1px,12.5rem,100%"),
|
|
129
|
+
enableLargeFont: Schema.boolean().default(false).description("是否开启动态推送卡片大字体模式,默认为小字体。小字体更漂亮,但阅读比较吃力,大字体更易阅读,但相对没这么好看"),
|
|
130
|
+
font: Schema.string().description("推送卡片的字体样式,如果你想用你自己的字体可以在此填写,例如:Microsoft YaHei"),
|
|
131
|
+
filter: Schema.intersect([Schema.object({ enable: Schema.boolean().default(false).description("是否开启动态屏蔽功能") }).description("屏蔽设置"), Schema.union([Schema.object({
|
|
132
|
+
enable: Schema.const(true).required().experimental(),
|
|
133
|
+
notify: Schema.boolean().default(false).description("动态被屏蔽是否发送提示"),
|
|
134
|
+
regex: Schema.string().description("正则表达式屏蔽"),
|
|
135
|
+
keywords: Schema.array(String).description("关键字屏蔽,一个关键字为一项"),
|
|
136
|
+
forward: Schema.boolean().default(false).description("是否屏蔽转发动态"),
|
|
137
|
+
article: Schema.boolean().default(false).description("是否屏蔽专栏")
|
|
138
|
+
}), Schema.object({})])]),
|
|
139
|
+
debug: Schema.object({}).description("调试设置"),
|
|
140
|
+
dynamicDebugMode: Schema.boolean().default(false).description("动态调试模式,开启后会在控制台输出动态推送的详细信息,用于调试")
|
|
141
|
+
});
|
|
142
|
+
|
|
55
143
|
//#endregion
|
|
56
144
|
//#region node_modules/@koishijs/plugin-notifier/lib/index.mjs
|
|
57
145
|
var __defProp$5 = Object.defineProperty;
|
|
@@ -554,6 +642,7 @@ var ComRegister = class {
|
|
|
554
642
|
subManager = [];
|
|
555
643
|
dynamicTimelineManager = /* @__PURE__ */ new Map();
|
|
556
644
|
liveStatusManager = /* @__PURE__ */ new Map();
|
|
645
|
+
liveMsgManager = /* @__PURE__ */ new Map();
|
|
557
646
|
pushArrMap = /* @__PURE__ */ new Map();
|
|
558
647
|
loginDBData;
|
|
559
648
|
privateBot;
|
|
@@ -798,8 +887,19 @@ var ComRegister = class {
|
|
|
798
887
|
await this.sendPrivateMsg(`发送群组ID:${channelId}消息失败,请查看日志`);
|
|
799
888
|
});
|
|
800
889
|
}
|
|
801
|
-
|
|
890
|
+
preInitConfig(subs) {
|
|
802
891
|
for (const sub of subs) {
|
|
892
|
+
const liveMsg = {
|
|
893
|
+
customLiveStart: this.config.customLiveStart || "",
|
|
894
|
+
customLive: this.config.customLive || "",
|
|
895
|
+
customLiveEnd: this.config.customLiveEnd || ""
|
|
896
|
+
};
|
|
897
|
+
if (sub.liveMsg.enable) {
|
|
898
|
+
liveMsg.customLiveStart = sub.liveMsg.customLiveStart || this.config.customLiveStart;
|
|
899
|
+
liveMsg.customLive = sub.liveMsg.customLive || this.config.customLive;
|
|
900
|
+
liveMsg.customLiveEnd = sub.liveMsg.customLiveEnd || this.config.customLiveEnd;
|
|
901
|
+
}
|
|
902
|
+
this.liveMsgManager.set(sub.uid, liveMsg);
|
|
803
903
|
const atAllArr = [];
|
|
804
904
|
const dynamicArr = [];
|
|
805
905
|
const liveArr = [];
|
|
@@ -1131,6 +1231,7 @@ var ComRegister = class {
|
|
|
1131
1231
|
let liveRoomInfo;
|
|
1132
1232
|
let masterInfo;
|
|
1133
1233
|
let watchedNum;
|
|
1234
|
+
const liveMsgObj = this.liveMsgManager.get(uid);
|
|
1134
1235
|
const pushAtTimeFunc = async () => {
|
|
1135
1236
|
if (!await useMasterAndLiveRoomInfo(LiveType.LiveBroadcast)) {
|
|
1136
1237
|
await this.sendPrivateMsg("获取直播间信息失败,推送直播卡片失败!");
|
|
@@ -1144,7 +1245,7 @@ var ComRegister = class {
|
|
|
1144
1245
|
}
|
|
1145
1246
|
liveTime = liveRoomInfo.live_time;
|
|
1146
1247
|
const watched = watchedNum || "暂未获取到";
|
|
1147
|
-
const liveMsg =
|
|
1248
|
+
const liveMsg = liveMsgObj?.customLive.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-watched", watched).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
|
|
1148
1249
|
await this.sendLiveNotifyCard(LiveType.LiveBroadcast, watched, {
|
|
1149
1250
|
liveRoomInfo,
|
|
1150
1251
|
masterInfo,
|
|
@@ -1206,7 +1307,7 @@ var ComRegister = class {
|
|
|
1206
1307
|
}
|
|
1207
1308
|
liveTime = liveRoomInfo.live_time;
|
|
1208
1309
|
const follower = masterInfo.liveOpenFollowerNum >= 1e4 ? `${(masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : masterInfo.liveOpenFollowerNum.toString();
|
|
1209
|
-
const liveStartMsg =
|
|
1310
|
+
const liveStartMsg = liveMsgObj?.customLiveStart.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower", follower).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
|
|
1210
1311
|
await this.sendLiveNotifyCard(LiveType.StartBroadcasting, follower, {
|
|
1211
1312
|
liveRoomInfo,
|
|
1212
1313
|
masterInfo,
|
|
@@ -1226,7 +1327,7 @@ var ComRegister = class {
|
|
|
1226
1327
|
if (liveFollowerChangeNum > 0) return liveFollowerChangeNum >= 1e4 ? `+${liveFollowerChangeNum.toFixed(1)}万` : `+${liveFollowerChangeNum}`;
|
|
1227
1328
|
return liveFollowerChangeNum <= -1e4 ? `${liveFollowerChangeNum.toFixed(1)}万` : liveFollowerChangeNum.toString();
|
|
1228
1329
|
})();
|
|
1229
|
-
const liveEndMsg =
|
|
1330
|
+
const liveEndMsg = liveMsgObj?.customLiveEnd.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower_change", followerChange).replace("\\n", "\n");
|
|
1230
1331
|
await this.sendLiveNotifyCard(LiveType.StopBroadcast, followerChange, {
|
|
1231
1332
|
liveRoomInfo,
|
|
1232
1333
|
masterInfo,
|
|
@@ -1241,7 +1342,7 @@ var ComRegister = class {
|
|
|
1241
1342
|
if (liveRoomInfo.live_status === 1) {
|
|
1242
1343
|
liveTime = liveRoomInfo.live_time;
|
|
1243
1344
|
const watched = watchedNum || "暂未获取到";
|
|
1244
|
-
const liveMsg =
|
|
1345
|
+
const liveMsg = liveMsgObj?.customLive.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-watched", watched).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
|
|
1245
1346
|
if (this.config.restartPush) await this.sendLiveNotifyCard(LiveType.LiveBroadcast, watched, {
|
|
1246
1347
|
liveRoomInfo,
|
|
1247
1348
|
masterInfo,
|
|
@@ -1284,6 +1385,7 @@ var ComRegister = class {
|
|
|
1284
1385
|
for (const item of Object.values(data$1)) {
|
|
1285
1386
|
const uid = item.uid.toString();
|
|
1286
1387
|
const liveStatus = this.liveStatusManager.get(uid);
|
|
1388
|
+
const liveMsgObj = this.liveMsgManager.get(uid);
|
|
1287
1389
|
const sub = this.subManager.find((sub$1) => sub$1.uid === uid);
|
|
1288
1390
|
if (item.live_status === 1) {
|
|
1289
1391
|
liveStatus.live = true;
|
|
@@ -1292,7 +1394,7 @@ var ComRegister = class {
|
|
|
1292
1394
|
liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
|
|
1293
1395
|
liveStatus.liveStartTimeInit = true;
|
|
1294
1396
|
}
|
|
1295
|
-
const liveMsg =
|
|
1397
|
+
const liveMsg = liveMsgObj?.customLive.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-watched", "API模式无法获取").replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
|
|
1296
1398
|
await this.sendLiveNotifyCard(LiveType.LiveBroadcast, "API", {
|
|
1297
1399
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1298
1400
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1305,6 +1407,7 @@ var ComRegister = class {
|
|
|
1305
1407
|
for (const item of Object.values(data$2)) {
|
|
1306
1408
|
const uid = item.uid.toString();
|
|
1307
1409
|
const liveStatus = this.liveStatusManager.get(uid);
|
|
1410
|
+
const liveMsgObj = this.liveMsgManager.get(uid);
|
|
1308
1411
|
const sub = this.subManager.find((sub$1) => sub$1.uid === uid);
|
|
1309
1412
|
if (!sub) return;
|
|
1310
1413
|
switch (item.live_status) {
|
|
@@ -1324,7 +1427,7 @@ var ComRegister = class {
|
|
|
1324
1427
|
if (liveFollowerChangeNum > 0) return liveFollowerChangeNum >= 1e4 ? `+${liveFollowerChangeNum.toFixed(1)}万` : `+${liveFollowerChangeNum}`;
|
|
1325
1428
|
return liveFollowerChangeNum <= -1e4 ? `${liveFollowerChangeNum.toFixed(1)}万` : liveFollowerChangeNum.toString();
|
|
1326
1429
|
})();
|
|
1327
|
-
const liveEndMsg =
|
|
1430
|
+
const liveEndMsg = liveMsgObj?.customLiveEnd.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-follower_change", followerChange).replace("\\n", "\n");
|
|
1328
1431
|
await this.sendLiveNotifyCard(LiveType.StopBroadcast, followerChange, {
|
|
1329
1432
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1330
1433
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1343,7 +1446,7 @@ var ComRegister = class {
|
|
|
1343
1446
|
liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
|
|
1344
1447
|
liveStatus.liveStartTimeInit = true;
|
|
1345
1448
|
const follower = liveStatus.masterInfo.liveOpenFollowerNum >= 1e4 ? `${(liveStatus.masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : liveStatus.masterInfo.liveOpenFollowerNum.toString();
|
|
1346
|
-
const liveStartMsg =
|
|
1449
|
+
const liveStartMsg = liveMsgObj?.customLiveStart.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-follower", follower).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
|
|
1347
1450
|
await this.sendLiveNotifyCard(LiveType.StartBroadcasting, follower, {
|
|
1348
1451
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1349
1452
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1364,7 +1467,7 @@ var ComRegister = class {
|
|
|
1364
1467
|
liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
|
|
1365
1468
|
liveStatus.liveStartTimeInit = true;
|
|
1366
1469
|
}
|
|
1367
|
-
const liveMsg =
|
|
1470
|
+
const liveMsg = liveMsgObj?.customLive.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-watched", "API模式无法获取").replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
|
|
1368
1471
|
await this.sendLiveNotifyCard(LiveType.LiveBroadcast, "API", {
|
|
1369
1472
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1370
1473
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1537,7 +1640,7 @@ var ComRegister = class {
|
|
|
1537
1640
|
return await subUserMatchPattern[subUserData.code]();
|
|
1538
1641
|
}
|
|
1539
1642
|
async loadSubFromConfig(subs) {
|
|
1540
|
-
this.
|
|
1643
|
+
this.preInitConfig(subs);
|
|
1541
1644
|
for (const sub of subs) {
|
|
1542
1645
|
this.logger.info(`加载订阅UID:${sub.uid}中...`);
|
|
1543
1646
|
const { code: userInfoCode, msg: userInfoMsg, data: userInfoData } = await withRetry(async () => {
|
|
@@ -1575,7 +1678,8 @@ var ComRegister = class {
|
|
|
1575
1678
|
platform: "",
|
|
1576
1679
|
live: sub.live,
|
|
1577
1680
|
dynamic: sub.dynamic,
|
|
1578
|
-
card: sub.card
|
|
1681
|
+
card: sub.card,
|
|
1682
|
+
liveMsg: sub.liveMsg
|
|
1579
1683
|
});
|
|
1580
1684
|
this.logger.info(`UID:${sub.uid}订阅加载完毕!`);
|
|
1581
1685
|
const randomDelay = Math.floor(Math.random() * 3) + 1;
|
|
@@ -1635,7 +1739,13 @@ var ComRegister = class {
|
|
|
1635
1739
|
cardColorEnd: Schema.string(),
|
|
1636
1740
|
cardBasePlateColor: Schema.string(),
|
|
1637
1741
|
cardBasePlateBorder: Schema.string()
|
|
1638
|
-
}).description("自定义推送卡片颜色,默认使用插件内置的颜色,设置后会覆盖插件内置的颜色")
|
|
1742
|
+
}).description("自定义推送卡片颜色,默认使用插件内置的颜色,设置后会覆盖插件内置的颜色"),
|
|
1743
|
+
liveMsg: Schema.object({
|
|
1744
|
+
enable: Schema.boolean(),
|
|
1745
|
+
customLiveStart: Schema.string(),
|
|
1746
|
+
customLive: Schema.string(),
|
|
1747
|
+
customLiveEnd: Schema.string()
|
|
1748
|
+
})
|
|
1639
1749
|
})).role("table").description("手动输入订阅信息,方便自定义订阅内容,这里的订阅内容不会存入数据库。uid: 订阅用户UID,dynamic: 是否需要订阅动态,live: 是否需要订阅直播"),
|
|
1640
1750
|
master: Schema.object({
|
|
1641
1751
|
enable: Schema.boolean(),
|
|
@@ -1705,7 +1815,7 @@ var require_rxjs = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/third_par
|
|
|
1705
1815
|
function createErrorClass(createImpl) {
|
|
1706
1816
|
var _super = function(instance) {
|
|
1707
1817
|
Error.call(instance);
|
|
1708
|
-
instance.stack = new Error().stack;
|
|
1818
|
+
instance.stack = (/* @__PURE__ */ new Error()).stack;
|
|
1709
1819
|
};
|
|
1710
1820
|
var ctorFunc = createImpl(_super);
|
|
1711
1821
|
ctorFunc.prototype = Object.create(Error.prototype);
|
|
@@ -3169,7 +3279,7 @@ var require_rxjs = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/third_par
|
|
|
3169
3279
|
return void 0;
|
|
3170
3280
|
};
|
|
3171
3281
|
AsyncAction2.prototype.execute = function(state, delay) {
|
|
3172
|
-
if (this.closed) return new Error("executing a cancelled action");
|
|
3282
|
+
if (this.closed) return /* @__PURE__ */ new Error("executing a cancelled action");
|
|
3173
3283
|
this.pending = false;
|
|
3174
3284
|
var error = this._execute(state, delay);
|
|
3175
3285
|
if (error) return error;
|
|
@@ -3182,7 +3292,7 @@ var require_rxjs = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/third_par
|
|
|
3182
3292
|
this.work(state);
|
|
3183
3293
|
} catch (e$1) {
|
|
3184
3294
|
errored = true;
|
|
3185
|
-
errorValue = e$1 ? e$1 : new Error("Scheduled action threw falsy error");
|
|
3295
|
+
errorValue = e$1 ? e$1 : /* @__PURE__ */ new Error("Scheduled action threw falsy error");
|
|
3186
3296
|
}
|
|
3187
3297
|
if (errored) {
|
|
3188
3298
|
this.unsubscribe();
|
|
@@ -3876,7 +3986,7 @@ var require_rxjs = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/third_par
|
|
|
3876
3986
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
3877
3987
|
exports2.createInvalidObservableTypeError = void 0;
|
|
3878
3988
|
function createInvalidObservableTypeError(input) {
|
|
3879
|
-
return new TypeError("You provided " + (input !== null && typeof input === "object" ? "an invalid object" : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
|
3989
|
+
return /* @__PURE__ */ new TypeError("You provided " + (input !== null && typeof input === "object" ? "an invalid object" : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
|
3880
3990
|
}
|
|
3881
3991
|
exports2.createInvalidObservableTypeError = createInvalidObservableTypeError;
|
|
3882
3992
|
} });
|
|
@@ -12075,7 +12185,7 @@ var require_util$5 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppete
|
|
|
12075
12185
|
Error.prepareStackTrace = (_$2, stack) => {
|
|
12076
12186
|
return stack[2];
|
|
12077
12187
|
};
|
|
12078
|
-
const site = new Error().stack;
|
|
12188
|
+
const site = (/* @__PURE__ */ new Error()).stack;
|
|
12079
12189
|
Error.prepareStackTrace = original;
|
|
12080
12190
|
return Object.assign(object, { [SOURCE_URL]: PuppeteerURL.fromCallSite(functionName, site) });
|
|
12081
12191
|
};
|
|
@@ -12549,7 +12659,7 @@ var require_Deferred$1 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/pup
|
|
|
12549
12659
|
});
|
|
12550
12660
|
return await Promise.race(promises);
|
|
12551
12661
|
} finally {
|
|
12552
|
-
for (const deferred of deferredWithTimeout) deferred.reject(new Error("Timeout cleared"));
|
|
12662
|
+
for (const deferred of deferredWithTimeout) deferred.reject(/* @__PURE__ */ new Error("Timeout cleared"));
|
|
12553
12663
|
}
|
|
12554
12664
|
}
|
|
12555
12665
|
#isResolved = false;
|
|
@@ -16541,7 +16651,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
|
|
|
16541
16651
|
};
|
|
16542
16652
|
#click(options) {
|
|
16543
16653
|
const signal = options?.signal;
|
|
16544
|
-
const cause = new Error("Locator.click");
|
|
16654
|
+
const cause = /* @__PURE__ */ new Error("Locator.click");
|
|
16545
16655
|
return this._wait(options).pipe(this.operators.conditions([
|
|
16546
16656
|
this.#ensureElementIsInTheViewportIfNeeded,
|
|
16547
16657
|
this.#waitForStableBoundingBoxIfNeeded,
|
|
@@ -16557,7 +16667,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
|
|
|
16557
16667
|
}
|
|
16558
16668
|
#fill(value, options) {
|
|
16559
16669
|
const signal = options?.signal;
|
|
16560
|
-
const cause = new Error("Locator.fill");
|
|
16670
|
+
const cause = /* @__PURE__ */ new Error("Locator.fill");
|
|
16561
16671
|
return this._wait(options).pipe(this.operators.conditions([
|
|
16562
16672
|
this.#ensureElementIsInTheViewportIfNeeded,
|
|
16563
16673
|
this.#waitForStableBoundingBoxIfNeeded,
|
|
@@ -16621,7 +16731,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
|
|
|
16621
16731
|
}
|
|
16622
16732
|
#hover(options) {
|
|
16623
16733
|
const signal = options?.signal;
|
|
16624
|
-
const cause = new Error("Locator.hover");
|
|
16734
|
+
const cause = /* @__PURE__ */ new Error("Locator.hover");
|
|
16625
16735
|
return this._wait(options).pipe(this.operators.conditions([this.#ensureElementIsInTheViewportIfNeeded, this.#waitForStableBoundingBoxIfNeeded], signal), (0, rxjs_js_1$7.tap)(() => {
|
|
16626
16736
|
return this.emit(LocatorEvent.Action, void 0);
|
|
16627
16737
|
}), (0, rxjs_js_1$7.mergeMap)((handle) => {
|
|
@@ -16633,7 +16743,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
|
|
|
16633
16743
|
}
|
|
16634
16744
|
#scroll(options) {
|
|
16635
16745
|
const signal = options?.signal;
|
|
16636
|
-
const cause = new Error("Locator.scroll");
|
|
16746
|
+
const cause = /* @__PURE__ */ new Error("Locator.scroll");
|
|
16637
16747
|
return this._wait(options).pipe(this.operators.conditions([this.#ensureElementIsInTheViewportIfNeeded, this.#waitForStableBoundingBoxIfNeeded], signal), (0, rxjs_js_1$7.tap)(() => {
|
|
16638
16748
|
return this.emit(LocatorEvent.Action, void 0);
|
|
16639
16749
|
}), (0, rxjs_js_1$7.mergeMap)((handle) => {
|
|
@@ -16658,7 +16768,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
|
|
|
16658
16768
|
* @public
|
|
16659
16769
|
*/
|
|
16660
16770
|
async waitHandle(options) {
|
|
16661
|
-
const cause = new Error("Locator.waitHandle");
|
|
16771
|
+
const cause = /* @__PURE__ */ new Error("Locator.waitHandle");
|
|
16662
16772
|
return await (0, rxjs_js_1$7.firstValueFrom)(this._wait(options).pipe(this.operators.retryAndRaceWithSignalAndTimer(options?.signal, cause)));
|
|
16663
16773
|
}
|
|
16664
16774
|
/**
|
|
@@ -20496,7 +20606,7 @@ var require_WaitTask = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
|
|
|
20496
20606
|
*/
|
|
20497
20607
|
getBadError(error) {
|
|
20498
20608
|
if ((0, ErrorLike_js_1$12.isErrorLike)(error)) {
|
|
20499
|
-
if (error.message.includes("Execution context is not available in detached frame")) return new Error("Waiting failed: Frame detached");
|
|
20609
|
+
if (error.message.includes("Execution context is not available in detached frame")) return /* @__PURE__ */ new Error("Waiting failed: Frame detached");
|
|
20500
20610
|
if (error.message.includes("Execution context was destroyed")) return;
|
|
20501
20611
|
if (error.message.includes("Cannot find context with specified id")) return;
|
|
20502
20612
|
if (error.message.includes("AbortError: Actor 'MessageHandlerFrame' destroyed")) return;
|
|
@@ -20569,7 +20679,7 @@ var require_Realm$3 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppet
|
|
|
20569
20679
|
/** @internal */
|
|
20570
20680
|
dispose() {
|
|
20571
20681
|
this.#disposed = true;
|
|
20572
|
-
this.taskManager.terminateAll(new Error("waitForFunction failed: frame got detached."));
|
|
20682
|
+
this.taskManager.terminateAll(/* @__PURE__ */ new Error("waitForFunction failed: frame got detached."));
|
|
20573
20683
|
}
|
|
20574
20684
|
/** @internal */
|
|
20575
20685
|
[disposable_js_1$19.disposeSymbol]() {
|
|
@@ -21458,7 +21568,7 @@ var require_CallbackRegistry = __commonJS$1({ "node_modules/puppeteer-core/lib/c
|
|
|
21458
21568
|
*/
|
|
21459
21569
|
getPendingProtocolErrors() {
|
|
21460
21570
|
const result = [];
|
|
21461
|
-
for (const callback of this.#callbacks.values()) result.push(new Error(`${callback.label} timed out. Trace: ${callback.error.stack}`));
|
|
21571
|
+
for (const callback of this.#callbacks.values()) result.push(/* @__PURE__ */ new Error(`${callback.label} timed out. Trace: ${callback.error.stack}`));
|
|
21462
21572
|
return result;
|
|
21463
21573
|
}
|
|
21464
21574
|
};
|
|
@@ -21869,7 +21979,7 @@ var require_Connection$1 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/p
|
|
|
21869
21979
|
* @internal
|
|
21870
21980
|
*/
|
|
21871
21981
|
_rawSend(callbacks, method, params, sessionId, options) {
|
|
21872
|
-
if (this.#closed) return Promise.reject(new Error("Protocol error: Connection closed."));
|
|
21982
|
+
if (this.#closed) return Promise.reject(/* @__PURE__ */ new Error("Protocol error: Connection closed."));
|
|
21873
21983
|
return callbacks.create(method, options?.timeout ?? this.#timeout, (id) => {
|
|
21874
21984
|
const stringifiedMessage = JSON.stringify({
|
|
21875
21985
|
method,
|
|
@@ -24391,7 +24501,7 @@ var require_LifecycleWatcher = __commonJS$1({ "node_modules/puppeteer-core/lib/c
|
|
|
24391
24501
|
}
|
|
24392
24502
|
#onFrameDetached(frame) {
|
|
24393
24503
|
if (this.#frame === frame) {
|
|
24394
|
-
this.#terminationDeferred.resolve(new Error("Navigating frame was detached"));
|
|
24504
|
+
this.#terminationDeferred.resolve(/* @__PURE__ */ new Error("Navigating frame was detached"));
|
|
24395
24505
|
return;
|
|
24396
24506
|
}
|
|
24397
24507
|
this.#checkLifecycleComplete();
|
|
@@ -24437,7 +24547,7 @@ var require_LifecycleWatcher = __commonJS$1({ "node_modules/puppeteer-core/lib/c
|
|
|
24437
24547
|
}
|
|
24438
24548
|
dispose() {
|
|
24439
24549
|
this.#subscriptions.dispose();
|
|
24440
|
-
this.#terminationDeferred.resolve(new Error("LifecycleWatcher disposed"));
|
|
24550
|
+
this.#terminationDeferred.resolve(/* @__PURE__ */ new Error("LifecycleWatcher disposed"));
|
|
24441
24551
|
}
|
|
24442
24552
|
};
|
|
24443
24553
|
exports.LifecycleWatcher = LifecycleWatcher;
|
|
@@ -24686,7 +24796,7 @@ var require_Frame$1 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppet
|
|
|
24686
24796
|
});
|
|
24687
24797
|
ensureNewDocumentNavigation = !!response.loaderId;
|
|
24688
24798
|
if (response.errorText === "net::ERR_HTTP_RESPONSE_CODE_FAILURE") return null;
|
|
24689
|
-
return response.errorText ? new Error(`${response.errorText} at ${url$1}`) : null;
|
|
24799
|
+
return response.errorText ? /* @__PURE__ */ new Error(`${response.errorText} at ${url$1}`) : null;
|
|
24690
24800
|
} catch (error$1) {
|
|
24691
24801
|
if ((0, ErrorLike_js_1$6.isErrorLike)(error$1)) return error$1;
|
|
24692
24802
|
throw error$1;
|
|
@@ -25609,7 +25719,7 @@ var require_NetworkManager = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs
|
|
|
25609
25719
|
const response = new HTTPResponse_js_1$2.CdpHTTPResponse(client, request, responsePayload, extraInfo);
|
|
25610
25720
|
request._response = response;
|
|
25611
25721
|
request._redirectChain.push(request);
|
|
25612
|
-
response._resolveBody(new Error("Response body is unavailable for redirect responses"));
|
|
25722
|
+
response._resolveBody(/* @__PURE__ */ new Error("Response body is unavailable for redirect responses"));
|
|
25613
25723
|
this.#forgetRequest(request, false);
|
|
25614
25724
|
this.emit(NetworkManagerEvents_js_1$1.NetworkManagerEvent.Response, response);
|
|
25615
25725
|
this.emit(NetworkManagerEvents_js_1$1.NetworkManagerEvent.RequestFinished, request);
|
|
@@ -25618,7 +25728,7 @@ var require_NetworkManager = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs
|
|
|
25618
25728
|
const request = this.#networkEventManager.getRequest(responseReceived.requestId);
|
|
25619
25729
|
if (!request) return;
|
|
25620
25730
|
const extraInfos = this.#networkEventManager.responseExtraInfo(responseReceived.requestId);
|
|
25621
|
-
if (extraInfos.length) (0, util_js_1$22.debugError)(new Error("Unexpected extraInfo events for request " + responseReceived.requestId));
|
|
25731
|
+
if (extraInfos.length) (0, util_js_1$22.debugError)(/* @__PURE__ */ new Error("Unexpected extraInfo events for request " + responseReceived.requestId));
|
|
25622
25732
|
if (responseReceived.response.fromDiskCache) extraInfo = null;
|
|
25623
25733
|
const response = new HTTPResponse_js_1$2.CdpHTTPResponse(client, request, responseReceived.response, extraInfo);
|
|
25624
25734
|
request._response = response;
|
|
@@ -27954,7 +28064,7 @@ var require_Tracing = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppet
|
|
|
27954
28064
|
contentDeferred.resolve(buffer ?? void 0);
|
|
27955
28065
|
} catch (error) {
|
|
27956
28066
|
if ((0, ErrorLike_js_1$4.isErrorLike)(error)) contentDeferred.reject(error);
|
|
27957
|
-
else contentDeferred.reject(new Error(`Unknown error: ${error}`));
|
|
28067
|
+
else contentDeferred.reject(/* @__PURE__ */ new Error(`Unknown error: ${error}`));
|
|
27958
28068
|
}
|
|
27959
28069
|
});
|
|
27960
28070
|
await this.#client.send("Tracing.end");
|
|
@@ -28369,7 +28479,7 @@ var require_Page$1 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppete
|
|
|
28369
28479
|
return this.#primaryTarget.browserContext();
|
|
28370
28480
|
}
|
|
28371
28481
|
#onTargetCrashed() {
|
|
28372
|
-
this.emit("error", new Error("Page crashed!"));
|
|
28482
|
+
this.emit("error", /* @__PURE__ */ new Error("Page crashed!"));
|
|
28373
28483
|
}
|
|
28374
28484
|
#onLogEntryAdded(event) {
|
|
28375
28485
|
const { level, text, args, source, url, lineNumber } = event.entry;
|
|
@@ -31929,7 +32039,7 @@ var require_ErrorResponse = __commonJS$1({ "node_modules/chromium-bidi/lib/cjs/p
|
|
|
31929
32039
|
};
|
|
31930
32040
|
exports.UnknownCommandException = UnknownCommandException;
|
|
31931
32041
|
var UnknownErrorException = class extends Exception {
|
|
31932
|
-
constructor(message$1, stacktrace = new Error().stack) {
|
|
32042
|
+
constructor(message$1, stacktrace = (/* @__PURE__ */ new Error()).stack) {
|
|
31933
32043
|
super("unknown error", message$1, stacktrace);
|
|
31934
32044
|
}
|
|
31935
32045
|
};
|
|
@@ -36775,7 +36885,7 @@ var require_SharedId = __commonJS$1({ "node_modules/chromium-bidi/lib/cjs/bidiMa
|
|
|
36775
36885
|
return `f.${frameId}.d.${documentId}.e.${backendNodeId}`;
|
|
36776
36886
|
}
|
|
36777
36887
|
function parseLegacySharedId(sharedId) {
|
|
36778
|
-
const match = sharedId.match(new RegExp(`(.*)${SHARED_ID_DIVIDER}(.*)`));
|
|
36888
|
+
const match = sharedId.match(/* @__PURE__ */ new RegExp(`(.*)${SHARED_ID_DIVIDER}(.*)`));
|
|
36779
36889
|
if (!match) return null;
|
|
36780
36890
|
const documentId = match[1];
|
|
36781
36891
|
const elementId = match[2];
|
|
@@ -47039,7 +47149,7 @@ var require_permessage_deflate = __commonJS$1({ "node_modules/ws/lib/permessage-
|
|
|
47039
47149
|
const callback = this._deflate[kCallback];
|
|
47040
47150
|
this._deflate.close();
|
|
47041
47151
|
this._deflate = null;
|
|
47042
|
-
if (callback) callback(new Error("The deflate stream was closed while data was being processed"));
|
|
47152
|
+
if (callback) callback(/* @__PURE__ */ new Error("The deflate stream was closed while data was being processed"));
|
|
47043
47153
|
}
|
|
47044
47154
|
}
|
|
47045
47155
|
/**
|
|
@@ -47245,7 +47355,7 @@ var require_permessage_deflate = __commonJS$1({ "node_modules/ws/lib/permessage-
|
|
|
47245
47355
|
this[kBuffers].push(chunk);
|
|
47246
47356
|
return;
|
|
47247
47357
|
}
|
|
47248
|
-
this[kError$1] = new RangeError("Max payload size exceeded");
|
|
47358
|
+
this[kError$1] = /* @__PURE__ */ new RangeError("Max payload size exceeded");
|
|
47249
47359
|
this[kError$1].code = "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH";
|
|
47250
47360
|
this[kError$1][kStatusCode$2] = 1009;
|
|
47251
47361
|
this.removeListener("data", inflateOnData);
|
|
@@ -48300,7 +48410,7 @@ var require_sender = __commonJS$1({ "node_modules/ws/lib/sender.js"(exports, mod
|
|
|
48300
48410
|
this._state = GET_BLOB_DATA;
|
|
48301
48411
|
blob.arrayBuffer().then((arrayBuffer) => {
|
|
48302
48412
|
if (this._socket.destroyed) {
|
|
48303
|
-
const err = new Error("The socket was closed while the blob was being read");
|
|
48413
|
+
const err = /* @__PURE__ */ new Error("The socket was closed while the blob was being read");
|
|
48304
48414
|
process.nextTick(callCallbacks, this, err, cb);
|
|
48305
48415
|
return;
|
|
48306
48416
|
}
|
|
@@ -48348,7 +48458,7 @@ var require_sender = __commonJS$1({ "node_modules/ws/lib/sender.js"(exports, mod
|
|
|
48348
48458
|
this._state = DEFLATING;
|
|
48349
48459
|
perMessageDeflate.compress(data$1, options.fin, (_$2, buf) => {
|
|
48350
48460
|
if (this._socket.destroyed) {
|
|
48351
|
-
const err = new Error("The socket was closed while data was being compressed");
|
|
48461
|
+
const err = /* @__PURE__ */ new Error("The socket was closed while data was being compressed");
|
|
48352
48462
|
callCallbacks(this, err, cb);
|
|
48353
48463
|
return;
|
|
48354
48464
|
}
|
|
@@ -49435,7 +49545,7 @@ var require_websocket = __commonJS$1({ "node_modules/ws/lib/websocket.js"(export
|
|
|
49435
49545
|
try {
|
|
49436
49546
|
addr = new URL$1(location, address);
|
|
49437
49547
|
} catch (e$1) {
|
|
49438
|
-
const err = new SyntaxError(`Invalid URL: ${location}`);
|
|
49548
|
+
const err = /* @__PURE__ */ new SyntaxError(`Invalid URL: ${location}`);
|
|
49439
49549
|
emitErrorAndClose(websocket, err);
|
|
49440
49550
|
return;
|
|
49441
49551
|
}
|
|
@@ -49583,7 +49693,7 @@ var require_websocket = __commonJS$1({ "node_modules/ws/lib/websocket.js"(export
|
|
|
49583
49693
|
else websocket._bufferedAmount += length;
|
|
49584
49694
|
}
|
|
49585
49695
|
if (cb) {
|
|
49586
|
-
const err = new Error(`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`);
|
|
49696
|
+
const err = /* @__PURE__ */ new Error(`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`);
|
|
49587
49697
|
process.nextTick(cb, err);
|
|
49588
49698
|
}
|
|
49589
49699
|
}
|
|
@@ -50049,7 +50159,7 @@ var require_websocket_server = __commonJS$1({ "node_modules/ws/lib/websocket-ser
|
|
|
50049
50159
|
close(cb) {
|
|
50050
50160
|
if (this._state === CLOSED) {
|
|
50051
50161
|
if (cb) this.once("close", () => {
|
|
50052
|
-
cb(new Error("The server is not running"));
|
|
50162
|
+
cb(/* @__PURE__ */ new Error("The server is not running"));
|
|
50053
50163
|
});
|
|
50054
50164
|
process.nextTick(emitClose, this);
|
|
50055
50165
|
return;
|
|
@@ -52292,7 +52402,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
|
|
|
52292
52402
|
constructor() {
|
|
52293
52403
|
this.signal = new AS();
|
|
52294
52404
|
}
|
|
52295
|
-
abort(reason = new Error("This operation was aborted")) {
|
|
52405
|
+
abort(reason = /* @__PURE__ */ new Error("This operation was aborted")) {
|
|
52296
52406
|
this.signal.reason = this.signal.reason || reason;
|
|
52297
52407
|
this.signal.aborted = true;
|
|
52298
52408
|
this.signal.dispatchEvent({
|
|
@@ -52678,7 +52788,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
|
|
|
52678
52788
|
this.moveToTail(index);
|
|
52679
52789
|
const oldVal = this.valList[index];
|
|
52680
52790
|
if (v$2 !== oldVal) {
|
|
52681
|
-
if (this.isBackgroundFetch(oldVal)) oldVal.__abortController.abort(new Error("replaced"));
|
|
52791
|
+
if (this.isBackgroundFetch(oldVal)) oldVal.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
|
|
52682
52792
|
else if (!noDisposeOnSet) {
|
|
52683
52793
|
this.dispose(oldVal, k$2, "set");
|
|
52684
52794
|
if (this.disposeAfter) this.disposed.push([
|
|
@@ -52720,7 +52830,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
|
|
|
52720
52830
|
const head$1 = this.head;
|
|
52721
52831
|
const k$2 = this.keyList[head$1];
|
|
52722
52832
|
const v$2 = this.valList[head$1];
|
|
52723
|
-
if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(new Error("evicted"));
|
|
52833
|
+
if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(/* @__PURE__ */ new Error("evicted"));
|
|
52724
52834
|
else {
|
|
52725
52835
|
this.dispose(v$2, k$2, "evict");
|
|
52726
52836
|
if (this.disposeAfter) this.disposed.push([
|
|
@@ -52947,7 +53057,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
|
|
|
52947
53057
|
else {
|
|
52948
53058
|
this.removeItemSize(index);
|
|
52949
53059
|
const v$2 = this.valList[index];
|
|
52950
|
-
if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(new Error("deleted"));
|
|
53060
|
+
if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
|
|
52951
53061
|
else {
|
|
52952
53062
|
this.dispose(v$2, k$2, "delete");
|
|
52953
53063
|
if (this.disposeAfter) this.disposed.push([
|
|
@@ -52976,7 +53086,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
|
|
|
52976
53086
|
clear() {
|
|
52977
53087
|
for (const index of this.rindexes({ allowStale: true })) {
|
|
52978
53088
|
const v$2 = this.valList[index];
|
|
52979
|
-
if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(new Error("deleted"));
|
|
53089
|
+
if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
|
|
52980
53090
|
else {
|
|
52981
53091
|
const k$2 = this.keyList[index];
|
|
52982
53092
|
this.dispose(v$2, k$2, "delete");
|
|
@@ -53150,7 +53260,7 @@ var require_dist$10 = __commonJS$1({ "node_modules/agent-base/dist/index.js"(exp
|
|
|
53150
53260
|
if (typeof options.secureEndpoint === "boolean") return options.secureEndpoint;
|
|
53151
53261
|
if (typeof options.protocol === "string") return options.protocol === "https:";
|
|
53152
53262
|
}
|
|
53153
|
-
const { stack } = new Error();
|
|
53263
|
+
const { stack } = /* @__PURE__ */ new Error();
|
|
53154
53264
|
if (typeof stack !== "string") return false;
|
|
53155
53265
|
return stack.split("\n").some((l$1) => l$1.indexOf("(https.js:") !== -1 || l$1.indexOf("node:https:") !== -1);
|
|
53156
53266
|
}
|
|
@@ -53441,7 +53551,7 @@ var require_parse_proxy_response = __commonJS$1({ "node_modules/https-proxy-agen
|
|
|
53441
53551
|
function onend() {
|
|
53442
53552
|
cleanup();
|
|
53443
53553
|
debug$10("onend");
|
|
53444
|
-
reject(new Error("Proxy connection ended before receiving CONNECT response"));
|
|
53554
|
+
reject(/* @__PURE__ */ new Error("Proxy connection ended before receiving CONNECT response"));
|
|
53445
53555
|
}
|
|
53446
53556
|
function onerror(err) {
|
|
53447
53557
|
cleanup();
|
|
@@ -53462,7 +53572,7 @@ var require_parse_proxy_response = __commonJS$1({ "node_modules/https-proxy-agen
|
|
|
53462
53572
|
const firstLine = headerParts.shift();
|
|
53463
53573
|
if (!firstLine) {
|
|
53464
53574
|
socket.destroy();
|
|
53465
|
-
return reject(new Error("No header received from proxy CONNECT response"));
|
|
53575
|
+
return reject(/* @__PURE__ */ new Error("No header received from proxy CONNECT response"));
|
|
53466
53576
|
}
|
|
53467
53577
|
const firstLineParts = firstLine.split(" ");
|
|
53468
53578
|
const statusCode = +firstLineParts[1];
|
|
@@ -53473,7 +53583,7 @@ var require_parse_proxy_response = __commonJS$1({ "node_modules/https-proxy-agen
|
|
|
53473
53583
|
const firstColon = header.indexOf(":");
|
|
53474
53584
|
if (firstColon === -1) {
|
|
53475
53585
|
socket.destroy();
|
|
53476
|
-
return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`));
|
|
53586
|
+
return reject(/* @__PURE__ */ new Error(`Invalid header from proxy CONNECT response: "${header}"`));
|
|
53477
53587
|
}
|
|
53478
53588
|
const key = header.slice(0, firstColon).toLowerCase();
|
|
53479
53589
|
const value = header.slice(firstColon + 1).trimStart();
|
|
@@ -56996,8 +57106,8 @@ var require_constants$1 = __commonJS$1({ "node_modules/ip-address/dist/v6/consta
|
|
|
56996
57106
|
* @static
|
|
56997
57107
|
*/
|
|
56998
57108
|
exports.RE_ZONE_STRING = /%.*$/;
|
|
56999
|
-
exports.RE_URL = new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);
|
|
57000
|
-
exports.RE_URL_WITH_PORT = new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/);
|
|
57109
|
+
exports.RE_URL = /* @__PURE__ */ new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);
|
|
57110
|
+
exports.RE_URL_WITH_PORT = /* @__PURE__ */ new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/);
|
|
57001
57111
|
} });
|
|
57002
57112
|
|
|
57003
57113
|
//#endregion
|
|
@@ -59176,7 +59286,7 @@ var require_parseControlResponse = __commonJS$1({ "node_modules/basic-ftp/dist/p
|
|
|
59176
59286
|
if (!tokenRegex) {
|
|
59177
59287
|
if (isMultiline(line)) {
|
|
59178
59288
|
const token = line.substr(0, 3);
|
|
59179
|
-
tokenRegex = new RegExp(`^${token}(?:$| )`);
|
|
59289
|
+
tokenRegex = /* @__PURE__ */ new RegExp(`^${token}(?:$| )`);
|
|
59180
59290
|
startAt = i$1;
|
|
59181
59291
|
} else if (isSingleLine(line)) messages.push(line);
|
|
59182
59292
|
} else if (tokenRegex.test(line)) {
|
|
@@ -59323,9 +59433,9 @@ var require_FtpContext = __commonJS$1({ "node_modules/basic-ftp/dist/FtpContext.
|
|
|
59323
59433
|
socket.setEncoding(this._encoding);
|
|
59324
59434
|
socket.setKeepAlive(true);
|
|
59325
59435
|
socket.on("data", (data$1) => this._onControlSocketData(data$1));
|
|
59326
|
-
socket.on("end", () => this.closeWithError(new Error("Server sent FIN packet unexpectedly, closing connection.")));
|
|
59436
|
+
socket.on("end", () => this.closeWithError(/* @__PURE__ */ new Error("Server sent FIN packet unexpectedly, closing connection.")));
|
|
59327
59437
|
socket.on("close", (hadError) => {
|
|
59328
|
-
if (!hadError) this.closeWithError(new Error("Server closed connection unexpectedly."));
|
|
59438
|
+
if (!hadError) this.closeWithError(/* @__PURE__ */ new Error("Server closed connection unexpectedly."));
|
|
59329
59439
|
});
|
|
59330
59440
|
this._setupDefaultErrorHandlers(socket, "control socket");
|
|
59331
59441
|
}
|
|
@@ -59389,13 +59499,13 @@ var require_FtpContext = __commonJS$1({ "node_modules/basic-ftp/dist/FtpContext.
|
|
|
59389
59499
|
*/
|
|
59390
59500
|
handle(command, responseHandler) {
|
|
59391
59501
|
if (this._task) {
|
|
59392
|
-
const err = new Error("User launched a task while another one is still running. Forgot to use 'await' or '.then()'?");
|
|
59502
|
+
const err = /* @__PURE__ */ new Error("User launched a task while another one is still running. Forgot to use 'await' or '.then()'?");
|
|
59393
59503
|
err.stack += `\nRunning task launched at: ${this._task.stack}`;
|
|
59394
59504
|
this.closeWithError(err);
|
|
59395
59505
|
}
|
|
59396
59506
|
return new Promise((resolveTask, rejectTask) => {
|
|
59397
59507
|
this._task = {
|
|
59398
|
-
stack: new Error().stack || "Unknown call stack",
|
|
59508
|
+
stack: (/* @__PURE__ */ new Error()).stack || "Unknown call stack",
|
|
59399
59509
|
responseHandler,
|
|
59400
59510
|
resolver: {
|
|
59401
59511
|
resolve: (arg) => {
|
|
@@ -59409,7 +59519,7 @@ var require_FtpContext = __commonJS$1({ "node_modules/basic-ftp/dist/FtpContext.
|
|
|
59409
59519
|
}
|
|
59410
59520
|
};
|
|
59411
59521
|
if (this._closingError) {
|
|
59412
|
-
const err = new Error(`Client is closed because ${this._closingError.message}`);
|
|
59522
|
+
const err = /* @__PURE__ */ new Error(`Client is closed because ${this._closingError.message}`);
|
|
59413
59523
|
err.stack += `\nClosing reason: ${this._closingError.stack}`;
|
|
59414
59524
|
err.code = this._closingError.code !== void 0 ? this._closingError.code : "0";
|
|
59415
59525
|
this._passToHandler(err);
|
|
@@ -59478,11 +59588,11 @@ var require_FtpContext = __commonJS$1({ "node_modules/basic-ftp/dist/FtpContext.
|
|
|
59478
59588
|
this.closeWithError(error);
|
|
59479
59589
|
});
|
|
59480
59590
|
socket.once("close", (hadError) => {
|
|
59481
|
-
if (hadError) this.closeWithError(new Error(`Socket closed due to transmission error (${identifier})`));
|
|
59591
|
+
if (hadError) this.closeWithError(/* @__PURE__ */ new Error(`Socket closed due to transmission error (${identifier})`));
|
|
59482
59592
|
});
|
|
59483
59593
|
socket.once("timeout", () => {
|
|
59484
59594
|
socket.destroy();
|
|
59485
|
-
this.closeWithError(new Error(`Timeout (${identifier})`));
|
|
59595
|
+
this.closeWithError(/* @__PURE__ */ new Error(`Timeout (${identifier})`));
|
|
59486
59596
|
});
|
|
59487
59597
|
}
|
|
59488
59598
|
/**
|
|
@@ -59638,7 +59748,7 @@ var require_parseListDOS = __commonJS$1({ "node_modules/basic-ftp/dist/parseList
|
|
|
59638
59748
|
*
|
|
59639
59749
|
* https://github.com/apache/commons-net/blob/master/src/main/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java
|
|
59640
59750
|
*/
|
|
59641
|
-
const RE_LINE$1 = new RegExp("(\\S+)\\s+(\\S+)\\s+(?:(<DIR>)|([0-9]+))\\s+(\\S.*)");
|
|
59751
|
+
const RE_LINE$1 = /* @__PURE__ */ new RegExp("(\\S+)\\s+(\\S+)\\s+(?:(<DIR>)|([0-9]+))\\s+(\\S.*)");
|
|
59642
59752
|
/**
|
|
59643
59753
|
* Returns true if a given line might be a DOS-style listing.
|
|
59644
59754
|
*
|
|
@@ -59714,7 +59824,7 @@ var require_parseListUnix = __commonJS$1({ "node_modules/basic-ftp/dist/parseLis
|
|
|
59714
59824
|
* this is not allowed for here as does not appear to be shown by FTP servers
|
|
59715
59825
|
* {@code @} file has extended attributes
|
|
59716
59826
|
*/
|
|
59717
|
-
const RE_LINE = new RegExp("([bcdelfmpSs-])(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]?)))\\+?\\s*(\\d+)\\s+(?:(\\S+(?:\\s\\S+)*?)\\s+)?(?:(\\S+(?:\\s\\S+)*)\\s+)?(\\d+(?:,\\s*\\d+)?)\\s+((?:\\d+[-/]\\d+[-/]\\d+)|(?:\\S{3}\\s+\\d{1,2})|(?:\\d{1,2}\\s+\\S{3})|(?:\\d{1,2}" + JA_MONTH + "\\s+\\d{1,2}" + JA_DAY + "))\\s+((?:\\d+(?::\\d+)?)|(?:\\d{4}" + JA_YEAR + "))\\s(.*)");
|
|
59827
|
+
const RE_LINE = /* @__PURE__ */ new RegExp("([bcdelfmpSs-])(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]?)))\\+?\\s*(\\d+)\\s+(?:(\\S+(?:\\s\\S+)*?)\\s+)?(?:(\\S+(?:\\s\\S+)*)\\s+)?(\\d+(?:,\\s*\\d+)?)\\s+((?:\\d+[-/]\\d+[-/]\\d+)|(?:\\S{3}\\s+\\d{1,2})|(?:\\d{1,2}\\s+\\S{3})|(?:\\d{1,2}" + JA_MONTH + "\\s+\\d{1,2}" + JA_DAY + "))\\s+((?:\\d+(?::\\d+)?)|(?:\\d{4}" + JA_YEAR + "))\\s(.*)");
|
|
59718
59828
|
/**
|
|
59719
59829
|
* Returns true if a given line might be a Unix-style listing.
|
|
59720
59830
|
*
|
|
@@ -60085,7 +60195,7 @@ var require_StringWriter = __commonJS$1({ "node_modules/basic-ftp/dist/StringWri
|
|
|
60085
60195
|
if (chunk instanceof Buffer) {
|
|
60086
60196
|
this.buf = Buffer.concat([this.buf, chunk]);
|
|
60087
60197
|
callback(null);
|
|
60088
|
-
} else callback(new Error("StringWriter expects chunks of type 'Buffer'."));
|
|
60198
|
+
} else callback(/* @__PURE__ */ new Error("StringWriter expects chunks of type 'Buffer'."));
|
|
60089
60199
|
}
|
|
60090
60200
|
getText(encoding) {
|
|
60091
60201
|
return this.buf.toString(encoding);
|
|
@@ -60219,7 +60329,7 @@ var require_transfer = __commonJS$1({ "node_modules/basic-ftp/dist/transfer.js"(
|
|
|
60219
60329
|
};
|
|
60220
60330
|
const handleTimeout = function() {
|
|
60221
60331
|
socket.destroy();
|
|
60222
|
-
reject(new Error(`Timeout when trying to open data connection to ${host}:${port}`));
|
|
60332
|
+
reject(/* @__PURE__ */ new Error(`Timeout when trying to open data connection to ${host}:${port}`));
|
|
60223
60333
|
};
|
|
60224
60334
|
socket.setTimeout(ftp$1.timeout);
|
|
60225
60335
|
socket.on("error", handleConnErr);
|
|
@@ -60303,7 +60413,7 @@ var require_transfer = __commonJS$1({ "node_modules/basic-ftp/dist/transfer.js"(
|
|
|
60303
60413
|
* the FTP server is now caught up in a state we can't resolve.
|
|
60304
60414
|
*/
|
|
60305
60415
|
onUnexpectedRequest(response) {
|
|
60306
|
-
const err = new Error(`Unexpected FTP response is requesting an answer: ${response.message}`);
|
|
60416
|
+
const err = /* @__PURE__ */ new Error(`Unexpected FTP response is requesting an answer: ${response.message}`);
|
|
60307
60417
|
this.ftp.closeWithError(err);
|
|
60308
60418
|
}
|
|
60309
60419
|
tryResolve(task) {
|
|
@@ -60322,7 +60432,7 @@ var require_transfer = __commonJS$1({ "node_modules/basic-ftp/dist/transfer.js"(
|
|
|
60322
60432
|
else if (res.code === 150 || res.code === 125) {
|
|
60323
60433
|
const dataSocket = config.ftp.dataSocket;
|
|
60324
60434
|
if (!dataSocket) {
|
|
60325
|
-
resolver.onError(task, new Error("Upload should begin but no data connection is available."));
|
|
60435
|
+
resolver.onError(task, /* @__PURE__ */ new Error("Upload should begin but no data connection is available."));
|
|
60326
60436
|
return;
|
|
60327
60437
|
}
|
|
60328
60438
|
const canUpload = "getCipher" in dataSocket ? dataSocket.getCipher() !== void 0 : true;
|
|
@@ -60347,7 +60457,7 @@ var require_transfer = __commonJS$1({ "node_modules/basic-ftp/dist/transfer.js"(
|
|
|
60347
60457
|
else if (res.code === 150 || res.code === 125) {
|
|
60348
60458
|
const dataSocket = config.ftp.dataSocket;
|
|
60349
60459
|
if (!dataSocket) {
|
|
60350
|
-
resolver.onError(task, new Error("Download should begin but no data connection is available."));
|
|
60460
|
+
resolver.onError(task, /* @__PURE__ */ new Error("Download should begin but no data connection is available."));
|
|
60351
60461
|
return;
|
|
60352
60462
|
}
|
|
60353
60463
|
config.ftp.log(`Downloading from ${(0, netUtils_1$1.describeAddress)(dataSocket)} (${(0, netUtils_1$1.describeTLS)(dataSocket)})`);
|
|
@@ -75015,7 +75125,7 @@ var require_myIpAddress = __commonJS$1({ "node_modules/pac-resolver/dist/myIpAdd
|
|
|
75015
75125
|
socket.destroy();
|
|
75016
75126
|
if (typeof addr === "string") resolve$4(addr);
|
|
75017
75127
|
else if (addr.address) resolve$4(addr.address);
|
|
75018
|
-
else reject(new Error("Expected a `string`"));
|
|
75128
|
+
else reject(/* @__PURE__ */ new Error("Expected a `string`"));
|
|
75019
75129
|
});
|
|
75020
75130
|
});
|
|
75021
75131
|
}
|
|
@@ -75059,7 +75169,7 @@ var require_shExpMatch = __commonJS$1({ "node_modules/pac-resolver/dist/shExpMat
|
|
|
75059
75169
|
*/
|
|
75060
75170
|
function toRegExp(str) {
|
|
75061
75171
|
str = String(str).replace(/\./g, "\\.").replace(/\?/g, ".").replace(/\*/g, ".*");
|
|
75062
|
-
return new RegExp(`^${str}$`);
|
|
75172
|
+
return /* @__PURE__ */ new RegExp(`^${str}$`);
|
|
75063
75173
|
}
|
|
75064
75174
|
} });
|
|
75065
75175
|
|
|
@@ -75470,7 +75580,7 @@ var require_lifetime = __commonJS$1({ "node_modules/@tootallnate/quickjs-emscrip
|
|
|
75470
75580
|
this.disposer = disposer;
|
|
75471
75581
|
this._owner = _owner;
|
|
75472
75582
|
this._alive = true;
|
|
75473
|
-
this._constructorStack = debug_1$8.QTS_DEBUG ? new Error("Lifetime constructed").stack : void 0;
|
|
75583
|
+
this._constructorStack = debug_1$8.QTS_DEBUG ? (/* @__PURE__ */ new Error("Lifetime constructed")).stack : void 0;
|
|
75474
75584
|
}
|
|
75475
75585
|
get alive() {
|
|
75476
75586
|
return this._alive;
|
|
@@ -77637,7 +77747,7 @@ var require_emscripten_module_WASM_RELEASE_SYNC = __commonJS$1({ "node_modules/@
|
|
|
77637
77747
|
]);
|
|
77638
77748
|
},
|
|
77639
77749
|
l: function(b$2, c$1) {
|
|
77640
|
-
b$2 = new Date(1e3 * (L$1[b$2 >> 2] + 4294967296 * K$2[b$2 + 4 >> 2]));
|
|
77750
|
+
b$2 = /* @__PURE__ */ new Date(1e3 * (L$1[b$2 >> 2] + 4294967296 * K$2[b$2 + 4 >> 2]));
|
|
77641
77751
|
K$2[c$1 >> 2] = b$2.getSeconds();
|
|
77642
77752
|
K$2[c$1 + 4 >> 2] = b$2.getMinutes();
|
|
77643
77753
|
K$2[c$1 + 8 >> 2] = b$2.getHours();
|
|
@@ -78850,7 +78960,7 @@ var require_httpUtil = __commonJS$1({ "node_modules/@puppeteer/browsers/lib/cjs/
|
|
|
78850
78960
|
}
|
|
78851
78961
|
const request = httpRequest(url, "GET", (response) => {
|
|
78852
78962
|
if (response.statusCode !== 200) {
|
|
78853
|
-
const error = new Error(`Download failed: server returned code ${response.statusCode}. URL: ${url}`);
|
|
78963
|
+
const error = /* @__PURE__ */ new Error(`Download failed: server returned code ${response.statusCode}. URL: ${url}`);
|
|
78854
78964
|
response.resume();
|
|
78855
78965
|
reject(error);
|
|
78856
78966
|
return;
|
|
@@ -78885,7 +78995,7 @@ var require_httpUtil = __commonJS$1({ "node_modules/@puppeteer/browsers/lib/cjs/
|
|
|
78885
78995
|
return new Promise((resolve$4, reject) => {
|
|
78886
78996
|
const request = httpRequest(url, "GET", (response) => {
|
|
78887
78997
|
let data$1 = "";
|
|
78888
|
-
if (response.statusCode && response.statusCode >= 400) return reject(new Error(`Got status code ${response.statusCode}`));
|
|
78998
|
+
if (response.statusCode && response.statusCode >= 400) return reject(/* @__PURE__ */ new Error(`Got status code ${response.statusCode}`));
|
|
78889
78999
|
response.on("data", (chunk) => {
|
|
78890
79000
|
data$1 += chunk;
|
|
78891
79001
|
});
|
|
@@ -78893,7 +79003,7 @@ var require_httpUtil = __commonJS$1({ "node_modules/@puppeteer/browsers/lib/cjs/
|
|
|
78893
79003
|
try {
|
|
78894
79004
|
return resolve$4(String(data$1));
|
|
78895
79005
|
} catch {
|
|
78896
|
-
return reject(new Error("Chrome version not found"));
|
|
79006
|
+
return reject(/* @__PURE__ */ new Error("Chrome version not found"));
|
|
78897
79007
|
}
|
|
78898
79008
|
});
|
|
78899
79009
|
}, false);
|
|
@@ -80317,7 +80427,7 @@ var require_end_of_stream = __commonJS$1({ "node_modules/end-of-stream/index.js"
|
|
|
80317
80427
|
if (!writable) callback.call(stream$3);
|
|
80318
80428
|
};
|
|
80319
80429
|
var onexit = function(exitCode) {
|
|
80320
|
-
callback.call(stream$3, exitCode ? new Error("exited with error code: " + exitCode) : null);
|
|
80430
|
+
callback.call(stream$3, exitCode ? /* @__PURE__ */ new Error("exited with error code: " + exitCode) : null);
|
|
80321
80431
|
};
|
|
80322
80432
|
var onerror = function(err) {
|
|
80323
80433
|
callback.call(stream$3, err);
|
|
@@ -80327,8 +80437,8 @@ var require_end_of_stream = __commonJS$1({ "node_modules/end-of-stream/index.js"
|
|
|
80327
80437
|
};
|
|
80328
80438
|
var onclosenexttick = function() {
|
|
80329
80439
|
if (cancelled) return;
|
|
80330
|
-
if (readable && !(rs && rs.ended && !rs.destroyed)) return callback.call(stream$3, new Error("premature close"));
|
|
80331
|
-
if (writable && !(ws && ws.ended && !ws.destroyed)) return callback.call(stream$3, new Error("premature close"));
|
|
80440
|
+
if (readable && !(rs && rs.ended && !rs.destroyed)) return callback.call(stream$3, /* @__PURE__ */ new Error("premature close"));
|
|
80441
|
+
if (writable && !(ws && ws.ended && !ws.destroyed)) return callback.call(stream$3, /* @__PURE__ */ new Error("premature close"));
|
|
80332
80442
|
};
|
|
80333
80443
|
var onrequest = function() {
|
|
80334
80444
|
stream$3.req.on("finish", onfinish);
|
|
@@ -80409,7 +80519,7 @@ var require_pump = __commonJS$1({ "node_modules/pump/index.js"(exports, module)
|
|
|
80409
80519
|
if (isFS(stream$3)) return stream$3.close(noop$4);
|
|
80410
80520
|
if (isRequest(stream$3)) return stream$3.abort();
|
|
80411
80521
|
if (isFn(stream$3.destroy)) return stream$3.destroy();
|
|
80412
|
-
callback(err || new Error("stream was destroyed"));
|
|
80522
|
+
callback(err || /* @__PURE__ */ new Error("stream was destroyed"));
|
|
80413
80523
|
};
|
|
80414
80524
|
};
|
|
80415
80525
|
var call = function(fn) {
|
|
@@ -80484,7 +80594,7 @@ var require_get_stream = __commonJS$1({ "node_modules/get-stream/index.js"(expor
|
|
|
80484
80594
|
}
|
|
80485
80595
|
};
|
|
80486
80596
|
async function getStream$1(inputStream, options) {
|
|
80487
|
-
if (!inputStream) return Promise.reject(new Error("Expected a stream"));
|
|
80597
|
+
if (!inputStream) return Promise.reject(/* @__PURE__ */ new Error("Expected a stream"));
|
|
80488
80598
|
options = {
|
|
80489
80599
|
maxBuffer: Infinity,
|
|
80490
80600
|
...options
|
|
@@ -80673,7 +80783,7 @@ var require_fd_slicer = __commonJS$1({ "node_modules/fd-slicer/index.js"(exports
|
|
|
80673
80783
|
};
|
|
80674
80784
|
ReadStream.prototype.destroy = function(err) {
|
|
80675
80785
|
if (this.destroyed) return;
|
|
80676
|
-
err = err || new Error("stream destroyed");
|
|
80786
|
+
err = err || /* @__PURE__ */ new Error("stream destroyed");
|
|
80677
80787
|
this.destroyed = true;
|
|
80678
80788
|
this.emit("error", err);
|
|
80679
80789
|
this.context.unref();
|
|
@@ -80695,7 +80805,7 @@ var require_fd_slicer = __commonJS$1({ "node_modules/fd-slicer/index.js"(exports
|
|
|
80695
80805
|
var self$1 = this;
|
|
80696
80806
|
if (self$1.destroyed) return;
|
|
80697
80807
|
if (self$1.pos + buffer.length > self$1.endOffset) {
|
|
80698
|
-
var err = new Error("maximum file length exceeded");
|
|
80808
|
+
var err = /* @__PURE__ */ new Error("maximum file length exceeded");
|
|
80699
80809
|
err.code = "ETOOBIG";
|
|
80700
80810
|
self$1.destroy();
|
|
80701
80811
|
callback(err);
|
|
@@ -80783,7 +80893,7 @@ var require_fd_slicer = __commonJS$1({ "node_modules/fd-slicer/index.js"(exports
|
|
|
80783
80893
|
if (writeStream.destroyed) return;
|
|
80784
80894
|
var end = writeStream.pos + buffer.length;
|
|
80785
80895
|
if (end > writeStream.endOffset) {
|
|
80786
|
-
var err = new Error("maximum file length exceeded");
|
|
80896
|
+
var err = /* @__PURE__ */ new Error("maximum file length exceeded");
|
|
80787
80897
|
err.code = "ETOOBIG";
|
|
80788
80898
|
writeStream.destroyed = true;
|
|
80789
80899
|
callback(err);
|
|
@@ -81209,24 +81319,24 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81209
81319
|
if (buffer.readUInt32LE(i$1) !== 101010256) continue;
|
|
81210
81320
|
var eocdrBuffer = buffer.slice(i$1);
|
|
81211
81321
|
var diskNumber = eocdrBuffer.readUInt16LE(4);
|
|
81212
|
-
if (diskNumber !== 0) return callback(new Error("multi-disk zip files are not supported: found disk number: " + diskNumber));
|
|
81322
|
+
if (diskNumber !== 0) return callback(/* @__PURE__ */ new Error("multi-disk zip files are not supported: found disk number: " + diskNumber));
|
|
81213
81323
|
var entryCount = eocdrBuffer.readUInt16LE(10);
|
|
81214
81324
|
var centralDirectoryOffset = eocdrBuffer.readUInt32LE(16);
|
|
81215
81325
|
var commentLength = eocdrBuffer.readUInt16LE(20);
|
|
81216
81326
|
var expectedCommentLength = eocdrBuffer.length - eocdrWithoutCommentSize;
|
|
81217
|
-
if (commentLength !== expectedCommentLength) return callback(new Error("invalid comment length. expected: " + expectedCommentLength + ". found: " + commentLength));
|
|
81327
|
+
if (commentLength !== expectedCommentLength) return callback(/* @__PURE__ */ new Error("invalid comment length. expected: " + expectedCommentLength + ". found: " + commentLength));
|
|
81218
81328
|
var comment = decodeStrings ? decodeBuffer(eocdrBuffer, 22, eocdrBuffer.length, false) : eocdrBuffer.slice(22);
|
|
81219
81329
|
if (!(entryCount === 65535 || centralDirectoryOffset === 4294967295)) return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options.autoClose, options.lazyEntries, decodeStrings, options.validateEntrySizes, options.strictFileNames));
|
|
81220
81330
|
var zip64EocdlBuffer = newBuffer(20);
|
|
81221
81331
|
var zip64EocdlOffset = bufferReadStart + i$1 - zip64EocdlBuffer.length;
|
|
81222
81332
|
readAndAssertNoEof(reader, zip64EocdlBuffer, 0, zip64EocdlBuffer.length, zip64EocdlOffset, function(err$1) {
|
|
81223
81333
|
if (err$1) return callback(err$1);
|
|
81224
|
-
if (zip64EocdlBuffer.readUInt32LE(0) !== 117853008) return callback(new Error("invalid zip64 end of central directory locator signature"));
|
|
81334
|
+
if (zip64EocdlBuffer.readUInt32LE(0) !== 117853008) return callback(/* @__PURE__ */ new Error("invalid zip64 end of central directory locator signature"));
|
|
81225
81335
|
var zip64EocdrOffset = readUInt64LE(zip64EocdlBuffer, 8);
|
|
81226
81336
|
var zip64EocdrBuffer = newBuffer(56);
|
|
81227
81337
|
readAndAssertNoEof(reader, zip64EocdrBuffer, 0, zip64EocdrBuffer.length, zip64EocdrOffset, function(err$2) {
|
|
81228
81338
|
if (err$2) return callback(err$2);
|
|
81229
|
-
if (zip64EocdrBuffer.readUInt32LE(0) !== 101075792) return callback(new Error("invalid zip64 end of central directory record signature"));
|
|
81339
|
+
if (zip64EocdrBuffer.readUInt32LE(0) !== 101075792) return callback(/* @__PURE__ */ new Error("invalid zip64 end of central directory record signature"));
|
|
81230
81340
|
entryCount = readUInt64LE(zip64EocdrBuffer, 32);
|
|
81231
81341
|
centralDirectoryOffset = readUInt64LE(zip64EocdrBuffer, 48);
|
|
81232
81342
|
return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options.autoClose, options.lazyEntries, decodeStrings, options.validateEntrySizes, options.strictFileNames));
|
|
@@ -81234,7 +81344,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81234
81344
|
});
|
|
81235
81345
|
return;
|
|
81236
81346
|
}
|
|
81237
|
-
callback(new Error("end of central directory record signature not found"));
|
|
81347
|
+
callback(/* @__PURE__ */ new Error("end of central directory record signature not found"));
|
|
81238
81348
|
});
|
|
81239
81349
|
}
|
|
81240
81350
|
util$2.inherits(ZipFile, EventEmitter$1);
|
|
@@ -81297,7 +81407,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81297
81407
|
if (self$1.emittedError) return;
|
|
81298
81408
|
var entry = new Entry();
|
|
81299
81409
|
var signature = buffer.readUInt32LE(0);
|
|
81300
|
-
if (signature !== 33639248) return emitErrorAndAutoClose(self$1, new Error("invalid central directory file header signature: 0x" + signature.toString(16)));
|
|
81410
|
+
if (signature !== 33639248) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("invalid central directory file header signature: 0x" + signature.toString(16)));
|
|
81301
81411
|
entry.versionMadeBy = buffer.readUInt16LE(4);
|
|
81302
81412
|
entry.versionNeededToExtract = buffer.readUInt16LE(6);
|
|
81303
81413
|
entry.generalPurposeBitFlag = buffer.readUInt16LE(8);
|
|
@@ -81313,7 +81423,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81313
81423
|
entry.internalFileAttributes = buffer.readUInt16LE(36);
|
|
81314
81424
|
entry.externalFileAttributes = buffer.readUInt32LE(38);
|
|
81315
81425
|
entry.relativeOffsetOfLocalHeader = buffer.readUInt32LE(42);
|
|
81316
|
-
if (entry.generalPurposeBitFlag & 64) return emitErrorAndAutoClose(self$1, new Error("strong encryption is not supported"));
|
|
81426
|
+
if (entry.generalPurposeBitFlag & 64) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("strong encryption is not supported"));
|
|
81317
81427
|
self$1.readEntryCursor += 46;
|
|
81318
81428
|
buffer = newBuffer(entry.fileNameLength + entry.extraFieldLength + entry.fileCommentLength);
|
|
81319
81429
|
readAndAssertNoEof(self$1.reader, buffer, 0, buffer.length, self$1.readEntryCursor, function(err$1) {
|
|
@@ -81330,7 +81440,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81330
81440
|
var dataSize = extraFieldBuffer.readUInt16LE(i$1 + 2);
|
|
81331
81441
|
var dataStart = i$1 + 4;
|
|
81332
81442
|
var dataEnd = dataStart + dataSize;
|
|
81333
|
-
if (dataEnd > extraFieldBuffer.length) return emitErrorAndAutoClose(self$1, new Error("extra field length exceeds extra field buffer size"));
|
|
81443
|
+
if (dataEnd > extraFieldBuffer.length) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("extra field length exceeds extra field buffer size"));
|
|
81334
81444
|
var dataBuffer = newBuffer(dataSize);
|
|
81335
81445
|
extraFieldBuffer.copy(dataBuffer, 0, dataStart, dataEnd);
|
|
81336
81446
|
entry.extraFields.push({
|
|
@@ -81352,20 +81462,20 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81352
81462
|
break;
|
|
81353
81463
|
}
|
|
81354
81464
|
}
|
|
81355
|
-
if (zip64EiefBuffer == null) return emitErrorAndAutoClose(self$1, new Error("expected zip64 extended information extra field"));
|
|
81465
|
+
if (zip64EiefBuffer == null) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("expected zip64 extended information extra field"));
|
|
81356
81466
|
var index = 0;
|
|
81357
81467
|
if (entry.uncompressedSize === 4294967295) {
|
|
81358
|
-
if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, new Error("zip64 extended information extra field does not include uncompressed size"));
|
|
81468
|
+
if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("zip64 extended information extra field does not include uncompressed size"));
|
|
81359
81469
|
entry.uncompressedSize = readUInt64LE(zip64EiefBuffer, index);
|
|
81360
81470
|
index += 8;
|
|
81361
81471
|
}
|
|
81362
81472
|
if (entry.compressedSize === 4294967295) {
|
|
81363
|
-
if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, new Error("zip64 extended information extra field does not include compressed size"));
|
|
81473
|
+
if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("zip64 extended information extra field does not include compressed size"));
|
|
81364
81474
|
entry.compressedSize = readUInt64LE(zip64EiefBuffer, index);
|
|
81365
81475
|
index += 8;
|
|
81366
81476
|
}
|
|
81367
81477
|
if (entry.relativeOffsetOfLocalHeader === 4294967295) {
|
|
81368
|
-
if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, new Error("zip64 extended information extra field does not include relative header offset"));
|
|
81478
|
+
if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("zip64 extended information extra field does not include relative header offset"));
|
|
81369
81479
|
entry.relativeOffsetOfLocalHeader = readUInt64LE(zip64EiefBuffer, index);
|
|
81370
81480
|
index += 8;
|
|
81371
81481
|
}
|
|
@@ -81434,9 +81544,9 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81434
81544
|
if (relativeEnd < relativeStart) throw new Error("options.end < options.start");
|
|
81435
81545
|
}
|
|
81436
81546
|
}
|
|
81437
|
-
if (!self$1.isOpen) return callback(new Error("closed"));
|
|
81547
|
+
if (!self$1.isOpen) return callback(/* @__PURE__ */ new Error("closed"));
|
|
81438
81548
|
if (entry.isEncrypted()) {
|
|
81439
|
-
if (options.decrypt !== false) return callback(new Error("entry is encrypted, and options.decrypt !== false"));
|
|
81549
|
+
if (options.decrypt !== false) return callback(/* @__PURE__ */ new Error("entry is encrypted, and options.decrypt !== false"));
|
|
81440
81550
|
}
|
|
81441
81551
|
self$1.reader.ref();
|
|
81442
81552
|
var buffer = newBuffer(30);
|
|
@@ -81444,18 +81554,18 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81444
81554
|
try {
|
|
81445
81555
|
if (err) return callback(err);
|
|
81446
81556
|
var signature = buffer.readUInt32LE(0);
|
|
81447
|
-
if (signature !== 67324752) return callback(new Error("invalid local file header signature: 0x" + signature.toString(16)));
|
|
81557
|
+
if (signature !== 67324752) return callback(/* @__PURE__ */ new Error("invalid local file header signature: 0x" + signature.toString(16)));
|
|
81448
81558
|
var fileNameLength = buffer.readUInt16LE(26);
|
|
81449
81559
|
var extraFieldLength = buffer.readUInt16LE(28);
|
|
81450
81560
|
var localFileHeaderEnd = entry.relativeOffsetOfLocalHeader + buffer.length + fileNameLength + extraFieldLength;
|
|
81451
81561
|
var decompress;
|
|
81452
81562
|
if (entry.compressionMethod === 0) decompress = false;
|
|
81453
81563
|
else if (entry.compressionMethod === 8) decompress = options.decompress != null ? options.decompress : true;
|
|
81454
|
-
else return callback(new Error("unsupported compression method: " + entry.compressionMethod));
|
|
81564
|
+
else return callback(/* @__PURE__ */ new Error("unsupported compression method: " + entry.compressionMethod));
|
|
81455
81565
|
var fileDataStart = localFileHeaderEnd;
|
|
81456
81566
|
var fileDataEnd = fileDataStart + entry.compressedSize;
|
|
81457
81567
|
if (entry.compressedSize !== 0) {
|
|
81458
|
-
if (fileDataEnd > self$1.fileSize) return callback(new Error("file data overflows file bounds: " + fileDataStart + " + " + entry.compressedSize + " > " + self$1.fileSize));
|
|
81568
|
+
if (fileDataEnd > self$1.fileSize) return callback(/* @__PURE__ */ new Error("file data overflows file bounds: " + fileDataStart + " + " + entry.compressedSize + " > " + self$1.fileSize));
|
|
81459
81569
|
}
|
|
81460
81570
|
var readStream = self$1.reader.createReadStream({
|
|
81461
81571
|
start: fileDataStart + relativeStart,
|
|
@@ -81525,7 +81635,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81525
81635
|
});
|
|
81526
81636
|
reader.read(buffer, offset, length, position, function(err, bytesRead) {
|
|
81527
81637
|
if (err) return callback(err);
|
|
81528
|
-
if (bytesRead < length) return callback(new Error("unexpected EOF"));
|
|
81638
|
+
if (bytesRead < length) return callback(/* @__PURE__ */ new Error("unexpected EOF"));
|
|
81529
81639
|
callback();
|
|
81530
81640
|
});
|
|
81531
81641
|
}
|
|
@@ -82192,8 +82302,8 @@ var require_text_decoder = __commonJS$1({ "node_modules/text-decoder/index.js"(e
|
|
|
82192
82302
|
//#region node_modules/streamx/index.js
|
|
82193
82303
|
var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, module) {
|
|
82194
82304
|
const { EventEmitter } = __require("events");
|
|
82195
|
-
const STREAM_DESTROYED = new Error("Stream was destroyed");
|
|
82196
|
-
const PREMATURE_CLOSE = new Error("Premature close");
|
|
82305
|
+
const STREAM_DESTROYED = /* @__PURE__ */ new Error("Stream was destroyed");
|
|
82306
|
+
const PREMATURE_CLOSE = /* @__PURE__ */ new Error("Premature close");
|
|
82197
82307
|
const FIFO$1 = require_fast_fifo();
|
|
82198
82308
|
const TextDecoder$1 = require_text_decoder();
|
|
82199
82309
|
const qmt = typeof queueMicrotask === "undefined" ? (fn) => global.process.nextTick(fn) : queueMicrotask;
|
|
@@ -82557,14 +82667,14 @@ var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, mo
|
|
|
82557
82667
|
if (stream$3 === this.to) {
|
|
82558
82668
|
this.to = null;
|
|
82559
82669
|
if (this.from !== null) {
|
|
82560
|
-
if ((this.from._duplexState & READ_DONE) === 0 || !this.pipeToFinished) this.from.destroy(this.error || new Error("Writable stream closed prematurely"));
|
|
82670
|
+
if ((this.from._duplexState & READ_DONE) === 0 || !this.pipeToFinished) this.from.destroy(this.error || /* @__PURE__ */ new Error("Writable stream closed prematurely"));
|
|
82561
82671
|
return;
|
|
82562
82672
|
}
|
|
82563
82673
|
}
|
|
82564
82674
|
if (stream$3 === this.from) {
|
|
82565
82675
|
this.from = null;
|
|
82566
82676
|
if (this.to !== null) {
|
|
82567
|
-
if ((stream$3._duplexState & READ_DONE) === 0) this.to.destroy(this.error || new Error("Readable stream closed before ending"));
|
|
82677
|
+
if ((stream$3._duplexState & READ_DONE) === 0) this.to.destroy(this.error || /* @__PURE__ */ new Error("Readable stream closed before ending"));
|
|
82568
82678
|
return;
|
|
82569
82679
|
}
|
|
82570
82680
|
}
|
|
@@ -83102,7 +83212,7 @@ var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, mo
|
|
|
83102
83212
|
}
|
|
83103
83213
|
function noop$3() {}
|
|
83104
83214
|
function abort() {
|
|
83105
|
-
this.destroy(new Error("Stream aborted."));
|
|
83215
|
+
this.destroy(/* @__PURE__ */ new Error("Stream aborted."));
|
|
83106
83216
|
}
|
|
83107
83217
|
function isWritev(s$2) {
|
|
83108
83218
|
return s$2._writev !== Writable$2.prototype._writev && s$2._writev !== Duplex.prototype._writev;
|
|
@@ -83238,7 +83348,7 @@ var require_headers = __commonJS$1({ "node_modules/tar-stream/headers.js"(export
|
|
|
83238
83348
|
uid,
|
|
83239
83349
|
gid,
|
|
83240
83350
|
size,
|
|
83241
|
-
mtime: new Date(1e3 * mtime),
|
|
83351
|
+
mtime: /* @__PURE__ */ new Date(1e3 * mtime),
|
|
83242
83352
|
type,
|
|
83243
83353
|
linkname,
|
|
83244
83354
|
uname,
|
|
@@ -83591,7 +83701,7 @@ var require_extract = __commonJS$1({ "node_modules/tar-stream/extract.js"(export
|
|
|
83591
83701
|
}
|
|
83592
83702
|
_final(cb) {
|
|
83593
83703
|
this._finished = this._missing === 0 && this._buffer.buffered === 0;
|
|
83594
|
-
cb(this._finished ? null : new Error("Unexpected end of data"));
|
|
83704
|
+
cb(this._finished ? null : /* @__PURE__ */ new Error("Unexpected end of data"));
|
|
83595
83705
|
}
|
|
83596
83706
|
_predestroy() {
|
|
83597
83707
|
this._continueWrite(null);
|
|
@@ -83764,8 +83874,8 @@ var require_pack = __commonJS$1({ "node_modules/tar-stream/pack.js"(exports, mod
|
|
|
83764
83874
|
const cb = this._openCallback;
|
|
83765
83875
|
this._openCallback = null;
|
|
83766
83876
|
if (cb === null) return;
|
|
83767
|
-
if (this._pack.destroying) return cb(new Error("pack stream destroyed"));
|
|
83768
|
-
if (this._pack._finalized) return cb(new Error("pack stream is already finalized"));
|
|
83877
|
+
if (this._pack.destroying) return cb(/* @__PURE__ */ new Error("pack stream destroyed"));
|
|
83878
|
+
if (this._pack._finalized) return cb(/* @__PURE__ */ new Error("pack stream is already finalized"));
|
|
83769
83879
|
this._pack._stream = this;
|
|
83770
83880
|
if (!this._isLinkname) this._pack._encode(this.header);
|
|
83771
83881
|
if (this._isVoid) {
|
|
@@ -83780,7 +83890,7 @@ var require_pack = __commonJS$1({ "node_modules/tar-stream/pack.js"(exports, mod
|
|
|
83780
83890
|
return cb(null);
|
|
83781
83891
|
}
|
|
83782
83892
|
if (this._isVoid) {
|
|
83783
|
-
if (data$1.byteLength > 0) return cb(new Error("No body allowed for this entry"));
|
|
83893
|
+
if (data$1.byteLength > 0) return cb(/* @__PURE__ */ new Error("No body allowed for this entry"));
|
|
83784
83894
|
return cb();
|
|
83785
83895
|
}
|
|
83786
83896
|
this.written += data$1.byteLength;
|
|
@@ -83798,12 +83908,12 @@ var require_pack = __commonJS$1({ "node_modules/tar-stream/pack.js"(exports, mod
|
|
|
83798
83908
|
this._pack._done(this);
|
|
83799
83909
|
}
|
|
83800
83910
|
_final(cb) {
|
|
83801
|
-
if (this.written !== this.header.size) return cb(new Error("Size mismatch"));
|
|
83911
|
+
if (this.written !== this.header.size) return cb(/* @__PURE__ */ new Error("Size mismatch"));
|
|
83802
83912
|
this._finish();
|
|
83803
83913
|
cb(null);
|
|
83804
83914
|
}
|
|
83805
83915
|
_getError() {
|
|
83806
|
-
return getStreamError(this) || new Error("tar entry destroyed");
|
|
83916
|
+
return getStreamError(this) || /* @__PURE__ */ new Error("tar entry destroyed");
|
|
83807
83917
|
}
|
|
83808
83918
|
_predestroy() {
|
|
83809
83919
|
this._pack.destroy(this._getError());
|
|
@@ -84020,7 +84130,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
|
|
|
84020
84130
|
}
|
|
84021
84131
|
header = map(header) || header;
|
|
84022
84132
|
if (!stat.isFile()) {
|
|
84023
|
-
if (strict) return pack$1.destroy(new Error("unsupported type for " + filename));
|
|
84133
|
+
if (strict) return pack$1.destroy(/* @__PURE__ */ new Error("unsupported type for " + filename));
|
|
84024
84134
|
return onnextentry();
|
|
84025
84135
|
}
|
|
84026
84136
|
const entry = pack$1.entry(header, onnextentry);
|
|
@@ -84087,7 +84197,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
|
|
|
84087
84197
|
const dir = path$3.join(name$3, ".") === path$3.join(cwd, ".") ? cwd : path$3.dirname(name$3);
|
|
84088
84198
|
validate(xfs, dir, path$3.join(cwd, "."), function(err, valid$2) {
|
|
84089
84199
|
if (err) return next(err);
|
|
84090
|
-
if (!valid$2) return next(new Error(dir + " is not a valid path"));
|
|
84200
|
+
if (!valid$2) return next(/* @__PURE__ */ new Error(dir + " is not a valid path"));
|
|
84091
84201
|
if (header.type === "directory") {
|
|
84092
84202
|
stack.push([name$3, header.mtime]);
|
|
84093
84203
|
return mkdirfix(name$3, {
|
|
@@ -84111,7 +84221,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
|
|
|
84111
84221
|
case "link": return onlink();
|
|
84112
84222
|
case "symlink": return onsymlink();
|
|
84113
84223
|
}
|
|
84114
|
-
if (strict) return next(new Error("unsupported type for " + name$3 + " (" + header.type + ")"));
|
|
84224
|
+
if (strict) return next(/* @__PURE__ */ new Error("unsupported type for " + name$3 + " (" + header.type + ")"));
|
|
84115
84225
|
stream$3.resume();
|
|
84116
84226
|
next();
|
|
84117
84227
|
});
|
|
@@ -84128,7 +84238,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
|
|
|
84128
84238
|
if (win32$1) return next();
|
|
84129
84239
|
xfs.unlink(name$3, function() {
|
|
84130
84240
|
const dst = path$3.resolve(path$3.dirname(name$3), header.linkname);
|
|
84131
|
-
if (!inCwd(dst)) return next(new Error(name$3 + " is not a valid symlink"));
|
|
84241
|
+
if (!inCwd(dst)) return next(/* @__PURE__ */ new Error(name$3 + " is not a valid symlink"));
|
|
84132
84242
|
xfs.symlink(header.linkname, name$3, stat);
|
|
84133
84243
|
});
|
|
84134
84244
|
}
|
|
@@ -84137,7 +84247,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
|
|
|
84137
84247
|
xfs.unlink(name$3, function() {
|
|
84138
84248
|
const link$1 = path$3.join(cwd, path$3.join("/", header.linkname));
|
|
84139
84249
|
fs$3.realpath(link$1, function(err, dst) {
|
|
84140
|
-
if (err || !inCwd(dst)) return next(new Error(name$3 + " is not a valid hardlink"));
|
|
84250
|
+
if (err || !inCwd(dst)) return next(/* @__PURE__ */ new Error(name$3 + " is not a valid hardlink"));
|
|
84141
84251
|
xfs.link(dst, name$3, function(err$1) {
|
|
84142
84252
|
if (err$1 && err$1.code === "EPERM" && opts.hardlinkAsFilesFallback) {
|
|
84143
84253
|
stream$3 = xfs.createReadStream(dst);
|
|
@@ -84337,9 +84447,9 @@ var require_bzip2 = __commonJS$1({ "node_modules/unbzip2-stream/lib/bzip2.js"(ex
|
|
|
84337
84447
|
function Bzip2Error(message$1) {
|
|
84338
84448
|
this.name = "Bzip2Error";
|
|
84339
84449
|
this.message = message$1;
|
|
84340
|
-
this.stack = new Error().stack;
|
|
84450
|
+
this.stack = (/* @__PURE__ */ new Error()).stack;
|
|
84341
84451
|
}
|
|
84342
|
-
Bzip2Error.prototype = new Error();
|
|
84452
|
+
Bzip2Error.prototype = /* @__PURE__ */ new Error();
|
|
84343
84453
|
var message = { Error: function(message$1) {
|
|
84344
84454
|
throw new Bzip2Error(message$1);
|
|
84345
84455
|
} };
|
|
@@ -84945,7 +85055,7 @@ var require_unbzip2_stream = __commonJS$1({ "node_modules/unbzip2-stream/index.j
|
|
|
84945
85055
|
}, function end(x$2) {
|
|
84946
85056
|
while (!broken && bitReader && hasBytes > bitReader.bytesRead) decompressAndQueue(this);
|
|
84947
85057
|
if (!broken) {
|
|
84948
|
-
if (streamCRC !== null) this.emit("error", new Error("input stream ended prematurely"));
|
|
85058
|
+
if (streamCRC !== null) this.emit("error", /* @__PURE__ */ new Error("input stream ended prematurely"));
|
|
84949
85059
|
this.queue(null);
|
|
84950
85060
|
}
|
|
84951
85061
|
});
|
|
@@ -85726,7 +85836,7 @@ var require_build$2 = __commonJS$1({ "node_modules/yargs-parser/build/index.cjs"
|
|
|
85726
85836
|
keys: []
|
|
85727
85837
|
};
|
|
85728
85838
|
const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/;
|
|
85729
|
-
const negatedBoolean = new RegExp("^--" + configuration["negation-prefix"] + "(.+)");
|
|
85839
|
+
const negatedBoolean = /* @__PURE__ */ new RegExp("^--" + configuration["negation-prefix"] + "(.+)");
|
|
85730
85840
|
[].concat(opts.array || []).filter(Boolean).forEach(function(opt) {
|
|
85731
85841
|
const key = typeof opt === "object" ? opt.key : opt;
|
|
85732
85842
|
const assignment = Object.keys(opt).map(function(key$1) {
|
|
@@ -88343,7 +88453,7 @@ var require_wrap_ansi = __commonJS$1({ "node_modules/wrap-ansi/index.js"(exports
|
|
|
88343
88453
|
for (const [index, character] of pre.entries()) {
|
|
88344
88454
|
returnValue += character;
|
|
88345
88455
|
if (ESCAPES.has(character)) {
|
|
88346
|
-
const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join("")) || { groups: {} };
|
|
88456
|
+
const { groups } = (/* @__PURE__ */ new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`)).exec(pre.slice(index).join("")) || { groups: {} };
|
|
88347
88457
|
if (groups.code !== void 0) {
|
|
88348
88458
|
const code$1 = Number.parseFloat(groups.code);
|
|
88349
88459
|
escapeCode = code$1 === END_CODE ? void 0 : code$1;
|
|
@@ -88622,7 +88732,7 @@ var require_get_caller_file = __commonJS$1({ "node_modules/get-caller-file/index
|
|
|
88622
88732
|
Error.prepareStackTrace = function(_$2, stack$1) {
|
|
88623
88733
|
return stack$1;
|
|
88624
88734
|
};
|
|
88625
|
-
var stack = new Error().stack;
|
|
88735
|
+
var stack = (/* @__PURE__ */ new Error()).stack;
|
|
88626
88736
|
Error.prepareStackTrace = oldPrepareStackTrace;
|
|
88627
88737
|
if (stack !== null && typeof stack === "object") return stack[position] ? stack[position].getFileName() : void 0;
|
|
88628
88738
|
};
|
|
@@ -91550,7 +91660,7 @@ var require_ChromeLauncher = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs
|
|
|
91550
91660
|
return options.filter((s$2) => {
|
|
91551
91661
|
return s$2.startsWith(flag.endsWith("=") ? flag : `${flag}=`);
|
|
91552
91662
|
}).map((s$2) => {
|
|
91553
|
-
return s$2.split(new RegExp(`${flag}=\\s*`))[1]?.trim();
|
|
91663
|
+
return s$2.split(/* @__PURE__ */ new RegExp(`${flag}=\\s*`))[1]?.trim();
|
|
91554
91664
|
}).filter((s$2) => {
|
|
91555
91665
|
return s$2;
|
|
91556
91666
|
});
|
|
@@ -91563,7 +91673,7 @@ var require_ChromeLauncher = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs
|
|
|
91563
91673
|
* @internal
|
|
91564
91674
|
*/
|
|
91565
91675
|
function removeMatchingFlags(array, flag) {
|
|
91566
|
-
const regex = new RegExp(`^${flag}=.*`);
|
|
91676
|
+
const regex = /* @__PURE__ */ new RegExp(`^${flag}=.*`);
|
|
91567
91677
|
let i$1 = 0;
|
|
91568
91678
|
while (i$1 < array.length) if (regex.test(array[i$1])) array.splice(i$1, 1);
|
|
91569
91679
|
else i$1++;
|
|
@@ -92202,31 +92312,31 @@ var require_darwin = __commonJS$1({ "node_modules/puppeteer-finder/lib/darwin.js
|
|
|
92202
92312
|
});
|
|
92203
92313
|
const priorities = [
|
|
92204
92314
|
{
|
|
92205
|
-
regex: new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge.app`),
|
|
92315
|
+
regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge.app`),
|
|
92206
92316
|
weight: 46
|
|
92207
92317
|
},
|
|
92208
92318
|
{
|
|
92209
|
-
regex: new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge Dev.app`),
|
|
92319
|
+
regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge Dev.app`),
|
|
92210
92320
|
weight: 47
|
|
92211
92321
|
},
|
|
92212
92322
|
{
|
|
92213
|
-
regex: new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge Canary.app`),
|
|
92323
|
+
regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge Canary.app`),
|
|
92214
92324
|
weight: 48
|
|
92215
92325
|
},
|
|
92216
92326
|
{
|
|
92217
|
-
regex: new RegExp(`^${process.env.HOME}/Applications/.*Chromium.app`),
|
|
92327
|
+
regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Chromium.app`),
|
|
92218
92328
|
weight: 49
|
|
92219
92329
|
},
|
|
92220
92330
|
{
|
|
92221
|
-
regex: new RegExp(`^${process.env.HOME}/Applications/.*Chrome.app`),
|
|
92331
|
+
regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Chrome.app`),
|
|
92222
92332
|
weight: 50
|
|
92223
92333
|
},
|
|
92224
92334
|
{
|
|
92225
|
-
regex: new RegExp(`^${process.env.HOME}/Applications/.*Chrome Dev.app`),
|
|
92335
|
+
regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Chrome Dev.app`),
|
|
92226
92336
|
weight: 51
|
|
92227
92337
|
},
|
|
92228
92338
|
{
|
|
92229
|
-
regex: new RegExp(`^${process.env.HOME}/Applications/.*Chrome Canary.app`),
|
|
92339
|
+
regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Chrome Canary.app`),
|
|
92230
92340
|
weight: 52
|
|
92231
92341
|
},
|
|
92232
92342
|
{
|
|
@@ -92399,8 +92509,8 @@ var require_lib$2 = __commonJS$1({ "node_modules/puppeteer-finder/lib/index.js"(
|
|
|
92399
92509
|
const win32_1 = __importDefault(require_win32());
|
|
92400
92510
|
const darwin_1 = __importDefault(require_darwin());
|
|
92401
92511
|
const linux_1 = __importDefault(require_linux());
|
|
92402
|
-
const ERROR_PLATFORM_NOT_SUPPORT = new Error("platform not support");
|
|
92403
|
-
const ERROR_NO_INSTALLATIONS_FOUND = new Error("no chrome installations found");
|
|
92512
|
+
const ERROR_PLATFORM_NOT_SUPPORT = /* @__PURE__ */ new Error("platform not support");
|
|
92513
|
+
const ERROR_NO_INSTALLATIONS_FOUND = /* @__PURE__ */ new Error("no chrome installations found");
|
|
92404
92514
|
function findChromes() {
|
|
92405
92515
|
switch (process.platform) {
|
|
92406
92516
|
case "win32": return (0, win32_1.default)();
|
|
@@ -94265,7 +94375,7 @@ var GenerateImg = class extends Service {
|
|
|
94265
94375
|
return parts.length > 0 ? `${sign}${parts.join("")}` : "0秒";
|
|
94266
94376
|
}
|
|
94267
94377
|
unixTimestampToString(timestamp) {
|
|
94268
|
-
const date = new Date(timestamp * 1e3);
|
|
94378
|
+
const date = /* @__PURE__ */ new Date(timestamp * 1e3);
|
|
94269
94379
|
const year = date.getFullYear();
|
|
94270
94380
|
const month = `0${date.getMonth() + 1}`.slice(-2);
|
|
94271
94381
|
const day = `0${date.getDate()}`.slice(-2);
|
|
@@ -94456,7 +94566,7 @@ var BiliAPI = class extends Service {
|
|
|
94456
94566
|
getMixinKey = (orig) => mixinKeyEncTab.map((n$2) => orig[n$2]).join("").slice(0, 32);
|
|
94457
94567
|
encWbi(params, img_key, sub_key) {
|
|
94458
94568
|
const mixin_key = this.getMixinKey(img_key + sub_key);
|
|
94459
|
-
const curr_time = Math.round(
|
|
94569
|
+
const curr_time = Math.round(DateTime.now().toSeconds() / 1e3);
|
|
94460
94570
|
const chr_filter = /[!'()*]/g;
|
|
94461
94571
|
Object.assign(params, { wts: curr_time });
|
|
94462
94572
|
const query = Object.keys(params).sort().map((key) => {
|
|
@@ -94629,7 +94739,7 @@ var BiliAPI = class extends Service {
|
|
|
94629
94739
|
* @returns {Promise<any>} Promise of the ticket response in JSON format
|
|
94630
94740
|
*/
|
|
94631
94741
|
async getBiliTicket(csrf) {
|
|
94632
|
-
const ts = Math.floor(
|
|
94742
|
+
const ts = Math.floor(DateTime.now().toSeconds() / 1e3);
|
|
94633
94743
|
const hexSign = this.hmacSha256("XgwSnGZ1p", `ts${ts}`);
|
|
94634
94744
|
const params = new URLSearchParams({
|
|
94635
94745
|
key_id: "ec02",
|
|
@@ -94660,8 +94770,16 @@ var BiliAPI = class extends Service {
|
|
|
94660
94770
|
}));
|
|
94661
94771
|
}
|
|
94662
94772
|
getCookies() {
|
|
94663
|
-
|
|
94664
|
-
|
|
94773
|
+
try {
|
|
94774
|
+
const cookies = this.jar.serializeSync().cookies.map((cookie) => {
|
|
94775
|
+
if (!cookie.expires) cookie.expires = "Infinity";
|
|
94776
|
+
return cookie;
|
|
94777
|
+
});
|
|
94778
|
+
return JSON.stringify(cookies);
|
|
94779
|
+
} catch (e$1) {
|
|
94780
|
+
console.error("获取cookies失败:", e$1);
|
|
94781
|
+
return void 0;
|
|
94782
|
+
}
|
|
94665
94783
|
}
|
|
94666
94784
|
async getCookiesForHeader() {
|
|
94667
94785
|
try {
|
|
@@ -94727,7 +94845,7 @@ var BiliAPI = class extends Service {
|
|
|
94727
94845
|
for (const cookieData of cookies) {
|
|
94728
94846
|
if (cookieData.key === "bili_jct") {
|
|
94729
94847
|
csrf = cookieData.value;
|
|
94730
|
-
expires =
|
|
94848
|
+
expires = cookieData.expires ? DateTime.fromISO(cookieData.expires).toJSDate() : "Infinity";
|
|
94731
94849
|
domain = cookieData.domain;
|
|
94732
94850
|
path$5 = cookieData.path;
|
|
94733
94851
|
secure = cookieData.secure;
|
|
@@ -94737,14 +94855,14 @@ var BiliAPI = class extends Service {
|
|
|
94737
94855
|
const cookie = new Cookie({
|
|
94738
94856
|
key: cookieData.key,
|
|
94739
94857
|
value: cookieData.value,
|
|
94740
|
-
expires:
|
|
94858
|
+
expires: cookieData.expires ? DateTime.fromISO(cookieData.expires).toJSDate() : "Infinity",
|
|
94741
94859
|
domain: cookieData.domain,
|
|
94742
94860
|
path: cookieData.path,
|
|
94743
94861
|
secure: cookieData.secure,
|
|
94744
94862
|
httpOnly: cookieData.httpOnly,
|
|
94745
94863
|
sameSite: cookieData.sameSite
|
|
94746
94864
|
});
|
|
94747
|
-
this.jar.setCookieSync(cookie, `http${cookie.secure ? "s" : ""}://${cookie.domain}${cookie.path}
|
|
94865
|
+
this.jar.setCookieSync(cookie, `http${cookie.secure ? "s" : ""}://${cookie.domain}${cookie.path}`);
|
|
94748
94866
|
}
|
|
94749
94867
|
const buvid3Cookie = new Cookie({
|
|
94750
94868
|
key: "buvid3",
|
|
@@ -94756,7 +94874,7 @@ var BiliAPI = class extends Service {
|
|
|
94756
94874
|
httpOnly,
|
|
94757
94875
|
sameSite
|
|
94758
94876
|
});
|
|
94759
|
-
this.jar.setCookieSync(buvid3Cookie, `http${buvid3Cookie.secure ? "s" : ""}://${buvid3Cookie.domain}${buvid3Cookie.path}
|
|
94877
|
+
this.jar.setCookieSync(buvid3Cookie, `http${buvid3Cookie.secure ? "s" : ""}://${buvid3Cookie.domain}${buvid3Cookie.path}`);
|
|
94760
94878
|
this.loginInfoIsLoaded = true;
|
|
94761
94879
|
this.checkIfTokenNeedRefresh(refresh_token, csrf);
|
|
94762
94880
|
this.enableRefreshCookiesDetect();
|
|
@@ -94803,7 +94921,7 @@ var BiliAPI = class extends Service {
|
|
|
94803
94921
|
const encrypted = new Uint8Array(await crypto.subtle.encrypt({ name: "RSA-OAEP" }, publicKey, data$1));
|
|
94804
94922
|
return encrypted.reduce((str, c$1) => str + c$1.toString(16).padStart(2, "0"), "");
|
|
94805
94923
|
}
|
|
94806
|
-
const ts =
|
|
94924
|
+
const ts = DateTime.now().toSeconds();
|
|
94807
94925
|
const correspondPath = await getCorrespondPath(ts);
|
|
94808
94926
|
const { data: refreshCsrfHtml } = await this.client.get(`https://www.bilibili.com/correspond/1/${correspondPath}`);
|
|
94809
94927
|
const { document: document$1 } = new JSDOM(refreshCsrfHtml).window;
|
|
@@ -95141,85 +95259,7 @@ function apply(ctx, config) {
|
|
|
95141
95259
|
return next();
|
|
95142
95260
|
});
|
|
95143
95261
|
}
|
|
95144
|
-
const Config =
|
|
95145
|
-
require: Schema.object({}).description("必填设置"),
|
|
95146
|
-
key: Schema.string().pattern(/^[0-9a-f]{32}$/).role("secret").required().description("请输入一个32位小写字母的十六进制密钥(例如:9b8db7ae562b9864efefe06289cc5530),使用此密钥将你的B站登录信息存储在数据库中,请一定保存好此密钥。如果你忘记了此密钥,必须重新登录。你可以自行生成,或到这个网站生成:https://www.sexauth.com/"),
|
|
95147
|
-
master: Schema.intersect([Schema.object({ enable: Schema.boolean().default(false).description("是否开启主人账号功能,如果您的机器人没有私聊权限请不要开启此功能。开启后如果机器人运行错误会向您进行报告") }).description("主人账号"), Schema.union([Schema.object({
|
|
95148
|
-
enable: Schema.const(true).required(),
|
|
95149
|
-
platform: Schema.union([
|
|
95150
|
-
"qq",
|
|
95151
|
-
"qqguild",
|
|
95152
|
-
"onebot",
|
|
95153
|
-
"discord",
|
|
95154
|
-
"red",
|
|
95155
|
-
"telegram",
|
|
95156
|
-
"satori",
|
|
95157
|
-
"chronocat",
|
|
95158
|
-
"lark"
|
|
95159
|
-
]).description("请选择您的私人机器人平台,目前支持QQ、QQ群、OneBot、Discord、RedBot、Telegram、Satori、ChronoCat、Lark。从2.0版本开始,只能在一个平台下使用本插件"),
|
|
95160
|
-
masterAccount: Schema.string().role("secret").required().description("主人账号,在Q群使用可直接使用QQ号,若在其他平台使用,请使用inspect插件获取自身ID"),
|
|
95161
|
-
masterAccountGuildId: Schema.string().role("secret").description("主人账号所在的群组ID,只有在QQ频道、Discord这样的环境才需要填写,请使用inspect插件获取群组ID")
|
|
95162
|
-
}), Schema.object({})])]),
|
|
95163
|
-
basicSettings: Schema.object({}).description("基本设置"),
|
|
95164
|
-
userAgent: Schema.string().description("设置请求头User-Agen,请求出现-352时可以尝试修改,UA获取方法可参考:https://blog.csdn.net/qq_44503987/article/details/104929111"),
|
|
95165
|
-
subTitle: Schema.object({}).description("订阅配置"),
|
|
95166
|
-
sub: Schema.array(Schema.object({
|
|
95167
|
-
name: Schema.string().description("订阅用户昵称,只是给你自己看的(相当于备注),可填可不填"),
|
|
95168
|
-
uid: Schema.string().required().description("订阅用户UID"),
|
|
95169
|
-
dynamic: Schema.boolean().default(false).description("是否订阅用户动态"),
|
|
95170
|
-
live: Schema.boolean().default(false).description("是否订阅用户直播"),
|
|
95171
|
-
target: Schema.array(Schema.object({
|
|
95172
|
-
platform: Schema.string().required().description("推送平台,例如onebot、qq、discord"),
|
|
95173
|
-
channelArr: Schema.array(Schema.object({
|
|
95174
|
-
channelId: Schema.string().required().description("频道/群组号"),
|
|
95175
|
-
dynamic: Schema.boolean().default(false).description("该频道/群组是否推送动态信息"),
|
|
95176
|
-
live: Schema.boolean().default(false).description("该频道/群组是否推送直播通知"),
|
|
95177
|
-
liveGuardBuy: Schema.boolean().default(false).description("该频道/群组是否推送上舰消息"),
|
|
95178
|
-
atAll: Schema.boolean().default(false).description("推送开播通知时是否艾特全体成员"),
|
|
95179
|
-
bot: Schema.string().description("若您有多个相同平台机器人,可在此填写当前群聊执行推送的机器人账号。不填则默认第一个")
|
|
95180
|
-
})).role("table").required().description("需推送的频道/群组详细设置")
|
|
95181
|
-
})).description("订阅用户需要发送的平台和频道/群组信息(一个平台下可以推送多个频道/群组)"),
|
|
95182
|
-
card: Schema.intersect([Schema.object({ enable: Schema.boolean().default(false).description("是否开启自定义卡片颜色") }), Schema.union([Schema.object({
|
|
95183
|
-
enable: Schema.const(true).required(),
|
|
95184
|
-
cardColorStart: Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片的开始渐变背景色,请填入16进制颜色代码,参考网站:https://webkul.github.io/coolhue/"),
|
|
95185
|
-
cardColorEnd: Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/"),
|
|
95186
|
-
cardBasePlateColor: Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片底板颜色,请填入16进制颜色代码"),
|
|
95187
|
-
cardBasePlateBorder: Schema.string().pattern(/\d*\.?\d+(?:px|em|rem|%|vh|vw|vmin|vmax)/).description("推送卡片底板边框宽度,请填入css单位,例如1px,12.5rem,100%")
|
|
95188
|
-
}), Schema.object({})])])
|
|
95189
|
-
}).collapse()).collapse().description("输入订阅信息,自定义订阅内容; uid: 订阅用户UID,dynamic: 是否需要订阅动态,live: 是否需要订阅直播"),
|
|
95190
|
-
dynamic: Schema.object({}).description("动态推送设置"),
|
|
95191
|
-
dynamicUrl: Schema.boolean().default(false).description("发送动态时是否同时发送链接。注意:如果使用的是QQ官方机器人不能开启此项!"),
|
|
95192
|
-
dynamicCron: Schema.string().default("*/2 * * * *").description("动态监测时间,请填入cron表达式,请勿填入过短时间"),
|
|
95193
|
-
dynamicVideoUrlToBV: Schema.boolean().default(false).description("如果推送的动态是视频动态,且开启了发送链接选项,开启此选项则会将链接转换为BV号以便其他用途"),
|
|
95194
|
-
pushImgsInDynamic: Schema.boolean().default(false).description("是否推送动态中的图片,默认不开启。开启后会单独推送动态中的图片,该功能容易导致QQ风控"),
|
|
95195
|
-
live: Schema.object({}).description("直播推送设置"),
|
|
95196
|
-
liveDetectType: Schema.union([Schema.const("WS").description("使用WebSocket连接到B站消息服务器进行直播检测,推荐使用"), Schema.const("API").description("通过轮询API发送请求监测直播状态,此模式理论可无限订阅,但容易产生其他问题,功能没有WS模式全面").experimental()]).role("radio").default("WS").description("直播检测方式,WS为连接到B站消息服务器,API为通过轮询发送请求监测,默认使用WS检测"),
|
|
95197
|
-
restartPush: Schema.boolean().default(true).description("插件重启后,如果订阅的主播正在直播,是否进行一次推送,默认开启"),
|
|
95198
|
-
pushTime: Schema.number().min(0).max(12).step(.5).default(1).description("设定间隔多长时间推送一次直播状态,单位为小时,默认为一小时"),
|
|
95199
|
-
customLiveStart: Schema.string().default("-name开播啦,当前粉丝数:-follower\\n-link").description("自定义开播提示语,-name代表UP昵称,-follower代表当前粉丝数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name开播啦,会发送为xxxUP开播啦"),
|
|
95200
|
-
customLive: Schema.string().default("-name正在直播,目前已播-time,累计观看人数:-watched\\n-link").description("自定义直播中提示语,-name代表UP昵称,-time代表开播时长,-watched代表累计观看人数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name正在直播,会发送为xxxUP正在直播xxx"),
|
|
95201
|
-
customLiveEnd: Schema.string().default("-name下播啦,本次直播了-time,粉丝数变化-follower_change").description("自定义下播提示语,-name代表UP昵称,-follower_change代表本场直播粉丝数变,-time代表开播时长,\\n为换行。例如-name下播啦,本次直播了-time,会发送为xxxUP下播啦,直播时长为xx小时xx分钟xx秒"),
|
|
95202
|
-
followerDisplay: Schema.boolean().default(true).description("粉丝数变化和累积观看本场直播的人数是否显示在推送卡片中"),
|
|
95203
|
-
hideDesc: Schema.boolean().default(false).description("是否隐藏UP主直播间简介,开启后推送的直播卡片将不再展示简介"),
|
|
95204
|
-
style: Schema.object({}).description("美化设置"),
|
|
95205
|
-
removeBorder: Schema.boolean().default(false).description("移除推送卡片边框"),
|
|
95206
|
-
cardColorStart: Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#F38AB5").description("推送卡片的开始渐变背景色,请填入16进制颜色代码,参考网站:https://webkul.github.io/coolhue/"),
|
|
95207
|
-
cardColorEnd: Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#F9CCDF").description("推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/"),
|
|
95208
|
-
cardBasePlateColor: Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#FFF5EE").description("推送卡片底板颜色,请填入16进制颜色代码"),
|
|
95209
|
-
cardBasePlateBorder: Schema.string().pattern(/\d*\.?\d+(?:px|em|rem|%|vh|vw|vmin|vmax)/).default("15px").description("推送卡片底板边框宽度,请填入css单位,例如1px,12.5rem,100%"),
|
|
95210
|
-
enableLargeFont: Schema.boolean().default(false).description("是否开启动态推送卡片大字体模式,默认为小字体。小字体更漂亮,但阅读比较吃力,大字体更易阅读,但相对没这么好看"),
|
|
95211
|
-
font: Schema.string().description("推送卡片的字体样式,如果你想用你自己的字体可以在此填写,例如:Microsoft YaHei"),
|
|
95212
|
-
filter: Schema.intersect([Schema.object({ enable: Schema.boolean().default(false).description("是否开启动态屏蔽功能") }).description("屏蔽设置"), Schema.union([Schema.object({
|
|
95213
|
-
enable: Schema.const(true).required().experimental(),
|
|
95214
|
-
notify: Schema.boolean().default(false).description("动态被屏蔽是否发送提示"),
|
|
95215
|
-
regex: Schema.string().description("正则表达式屏蔽"),
|
|
95216
|
-
keywords: Schema.array(String).description("关键字屏蔽,一个关键字为一项"),
|
|
95217
|
-
forward: Schema.boolean().default(false).description("是否屏蔽转发动态"),
|
|
95218
|
-
article: Schema.boolean().default(false).description("是否屏蔽专栏")
|
|
95219
|
-
}), Schema.object({})])]),
|
|
95220
|
-
debug: Schema.object({}).description("调试设置"),
|
|
95221
|
-
dynamicDebugMode: Schema.boolean().default(false).description("动态调试模式,开启后会在控制台输出动态推送的详细信息,用于调试")
|
|
95222
|
-
});
|
|
95262
|
+
const Config = BAConfigSchema;
|
|
95223
95263
|
|
|
95224
95264
|
//#endregion
|
|
95225
95265
|
export { Config, apply, inject, name, usage };
|