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.js
CHANGED
|
@@ -51,6 +51,94 @@ const tough_cookie = __toESM$1(require("tough-cookie"));
|
|
|
51
51
|
const jsdom = __toESM$1(require("jsdom"));
|
|
52
52
|
const __akokko_blive_message_listener = __toESM$1(require("@akokko/blive-message-listener"));
|
|
53
53
|
|
|
54
|
+
//#region src/config.ts
|
|
55
|
+
const BAConfigSchema = koishi.Schema.object({
|
|
56
|
+
require: koishi.Schema.object({}).description("必填设置"),
|
|
57
|
+
key: koishi.Schema.string().pattern(/^[0-9a-f]{32}$/).role("secret").required().description("请输入一个32位小写字母的十六进制密钥(例如:9b8db7ae562b9864efefe06289cc5530),使用此密钥将你的B站登录信息存储在数据库中,请一定保存好此密钥。如果你忘记了此密钥,必须重新登录。你可以自行生成,或到这个网站生成:https://www.sexauth.com/"),
|
|
58
|
+
master: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启主人账号功能,如果您的机器人没有私聊权限请不要开启此功能。开启后如果机器人运行错误会向您进行报告") }).description("主人账号"), koishi.Schema.union([koishi.Schema.object({
|
|
59
|
+
enable: koishi.Schema.const(true).required(),
|
|
60
|
+
platform: koishi.Schema.union([
|
|
61
|
+
"qq",
|
|
62
|
+
"qqguild",
|
|
63
|
+
"onebot",
|
|
64
|
+
"discord",
|
|
65
|
+
"red",
|
|
66
|
+
"telegram",
|
|
67
|
+
"satori",
|
|
68
|
+
"chronocat",
|
|
69
|
+
"lark"
|
|
70
|
+
]).description("请选择您的私人机器人平台,目前支持QQ、QQ群、OneBot、Discord、RedBot、Telegram、Satori、ChronoCat、Lark。从2.0版本开始,只能在一个平台下使用本插件"),
|
|
71
|
+
masterAccount: koishi.Schema.string().role("secret").required().description("主人账号,在Q群使用可直接使用QQ号,若在其他平台使用,请使用inspect插件获取自身ID"),
|
|
72
|
+
masterAccountGuildId: koishi.Schema.string().role("secret").description("主人账号所在的群组ID,只有在QQ频道、Discord这样的环境才需要填写,请使用inspect插件获取群组ID")
|
|
73
|
+
}), koishi.Schema.object({})])]),
|
|
74
|
+
basicSettings: koishi.Schema.object({}).description("基本设置"),
|
|
75
|
+
userAgent: koishi.Schema.string().description("设置请求头User-Agen,请求出现-352时可以尝试修改,UA获取方法可参考:https://blog.csdn.net/qq_44503987/article/details/104929111"),
|
|
76
|
+
subTitle: koishi.Schema.object({}).description("订阅配置"),
|
|
77
|
+
sub: koishi.Schema.array(koishi.Schema.object({
|
|
78
|
+
name: koishi.Schema.string().description("订阅用户昵称,只是给你自己看的(相当于备注),可填可不填"),
|
|
79
|
+
uid: koishi.Schema.string().required().description("订阅用户UID"),
|
|
80
|
+
dynamic: koishi.Schema.boolean().default(false).description("是否订阅用户动态"),
|
|
81
|
+
live: koishi.Schema.boolean().default(false).description("是否订阅用户直播"),
|
|
82
|
+
target: koishi.Schema.array(koishi.Schema.object({
|
|
83
|
+
platform: koishi.Schema.string().required().description("推送平台,例如onebot、qq、discord"),
|
|
84
|
+
channelArr: koishi.Schema.array(koishi.Schema.object({
|
|
85
|
+
channelId: koishi.Schema.string().required().description("频道/群组号"),
|
|
86
|
+
dynamic: koishi.Schema.boolean().default(false).description("该频道/群组是否推送动态信息"),
|
|
87
|
+
live: koishi.Schema.boolean().default(false).description("该频道/群组是否推送直播通知"),
|
|
88
|
+
liveGuardBuy: koishi.Schema.boolean().default(false).description("该频道/群组是否推送上舰消息"),
|
|
89
|
+
atAll: koishi.Schema.boolean().default(false).description("推送开播通知时是否艾特全体成员"),
|
|
90
|
+
bot: koishi.Schema.string().description("若您有多个相同平台机器人,可在此填写当前群聊执行推送的机器人账号。不填则默认第一个")
|
|
91
|
+
})).role("table").required().description("需推送的频道/群组详细设置")
|
|
92
|
+
})).description("订阅用户需要发送的平台和频道/群组信息(一个平台下可以推送多个频道/群组)"),
|
|
93
|
+
liveMsg: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启个性化直播消息设置") }), koishi.Schema.union([koishi.Schema.object({
|
|
94
|
+
enable: koishi.Schema.const(true).required(),
|
|
95
|
+
customLiveStart: koishi.Schema.string().description("自定义开播提示语,-name代表UP昵称,-follower代表当前粉丝数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name开播啦,会发送为xxxUP开播啦"),
|
|
96
|
+
customLive: koishi.Schema.string().description("自定义直播中提示语,-name代表UP昵称,-time代表开播时长,-watched代表累计观看人数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name正在直播,会发送为xxxUP正在直播xxx"),
|
|
97
|
+
customLiveEnd: koishi.Schema.string().description("自定义下播提示语,-name代表UP昵称,-follower_change代表本场直播粉丝数变,-time代表开播时长,\\n为换行。例如-name下播啦,本次直播了-time,会发送为xxxUP下播啦,直播时长为xx小时xx分钟xx秒")
|
|
98
|
+
}), koishi.Schema.object({})])]),
|
|
99
|
+
card: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启自定义卡片颜色") }), koishi.Schema.union([koishi.Schema.object({
|
|
100
|
+
enable: koishi.Schema.const(true).required(),
|
|
101
|
+
cardColorStart: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片的开始渐变背景色,请填入16进制颜色代码,参考网站:https://webkul.github.io/coolhue/"),
|
|
102
|
+
cardColorEnd: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/"),
|
|
103
|
+
cardBasePlateColor: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片底板颜色,请填入16进制颜色代码"),
|
|
104
|
+
cardBasePlateBorder: koishi.Schema.string().pattern(/\d*\.?\d+(?:px|em|rem|%|vh|vw|vmin|vmax)/).description("推送卡片底板边框宽度,请填入css单位,例如1px,12.5rem,100%")
|
|
105
|
+
}), koishi.Schema.object({})])])
|
|
106
|
+
}).collapse()).collapse().description("输入订阅信息,自定义订阅内容; uid: 订阅用户UID,dynamic: 是否需要订阅动态,live: 是否需要订阅直播"),
|
|
107
|
+
dynamic: koishi.Schema.object({}).description("动态推送设置"),
|
|
108
|
+
dynamicUrl: koishi.Schema.boolean().default(false).description("发送动态时是否同时发送链接。注意:如果使用的是QQ官方机器人不能开启此项!"),
|
|
109
|
+
dynamicCron: koishi.Schema.string().default("*/2 * * * *").description("动态监测时间,请填入cron表达式,请勿填入过短时间"),
|
|
110
|
+
dynamicVideoUrlToBV: koishi.Schema.boolean().default(false).description("如果推送的动态是视频动态,且开启了发送链接选项,开启此选项则会将链接转换为BV号以便其他用途"),
|
|
111
|
+
pushImgsInDynamic: koishi.Schema.boolean().default(false).description("是否推送动态中的图片,默认不开启。开启后会单独推送动态中的图片,该功能容易导致QQ风控"),
|
|
112
|
+
live: koishi.Schema.object({}).description("直播推送设置"),
|
|
113
|
+
liveDetectType: koishi.Schema.union([koishi.Schema.const("WS").description("使用WebSocket连接到B站消息服务器进行直播检测,推荐使用"), koishi.Schema.const("API").description("通过轮询API发送请求监测直播状态,此模式理论可无限订阅,但容易产生其他问题,功能没有WS模式全面").experimental()]).role("radio").default("WS").description("直播检测方式,WS为连接到B站消息服务器,API为通过轮询发送请求监测,默认使用WS检测"),
|
|
114
|
+
restartPush: koishi.Schema.boolean().default(true).description("插件重启后,如果订阅的主播正在直播,是否进行一次推送,默认开启"),
|
|
115
|
+
pushTime: koishi.Schema.number().min(0).max(12).step(.5).default(1).description("设定间隔多长时间推送一次直播状态,单位为小时,默认为一小时"),
|
|
116
|
+
customLiveStart: koishi.Schema.string().default("-name开播啦,当前粉丝数:-follower\\n-link").description("自定义开播提示语,-name代表UP昵称,-follower代表当前粉丝数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name开播啦,会发送为xxxUP开播啦"),
|
|
117
|
+
customLive: koishi.Schema.string().default("-name正在直播,目前已播-time,累计观看人数:-watched\\n-link").description("自定义直播中提示语,-name代表UP昵称,-time代表开播时长,-watched代表累计观看人数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name正在直播,会发送为xxxUP正在直播xxx"),
|
|
118
|
+
customLiveEnd: koishi.Schema.string().default("-name下播啦,本次直播了-time,粉丝数变化-follower_change").description("自定义下播提示语,-name代表UP昵称,-follower_change代表本场直播粉丝数变,-time代表开播时长,\\n为换行。例如-name下播啦,本次直播了-time,会发送为xxxUP下播啦,直播时长为xx小时xx分钟xx秒"),
|
|
119
|
+
followerDisplay: koishi.Schema.boolean().default(true).description("粉丝数变化和累积观看本场直播的人数是否显示在推送卡片中"),
|
|
120
|
+
hideDesc: koishi.Schema.boolean().default(false).description("是否隐藏UP主直播间简介,开启后推送的直播卡片将不再展示简介"),
|
|
121
|
+
style: koishi.Schema.object({}).description("美化设置"),
|
|
122
|
+
removeBorder: koishi.Schema.boolean().default(false).description("移除推送卡片边框"),
|
|
123
|
+
cardColorStart: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#F38AB5").description("推送卡片的开始渐变背景色,请填入16进制颜色代码,参考网站:https://webkul.github.io/coolhue/"),
|
|
124
|
+
cardColorEnd: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#F9CCDF").description("推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/"),
|
|
125
|
+
cardBasePlateColor: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#FFF5EE").description("推送卡片底板颜色,请填入16进制颜色代码"),
|
|
126
|
+
cardBasePlateBorder: koishi.Schema.string().pattern(/\d*\.?\d+(?:px|em|rem|%|vh|vw|vmin|vmax)/).default("15px").description("推送卡片底板边框宽度,请填入css单位,例如1px,12.5rem,100%"),
|
|
127
|
+
enableLargeFont: koishi.Schema.boolean().default(false).description("是否开启动态推送卡片大字体模式,默认为小字体。小字体更漂亮,但阅读比较吃力,大字体更易阅读,但相对没这么好看"),
|
|
128
|
+
font: koishi.Schema.string().description("推送卡片的字体样式,如果你想用你自己的字体可以在此填写,例如:Microsoft YaHei"),
|
|
129
|
+
filter: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启动态屏蔽功能") }).description("屏蔽设置"), koishi.Schema.union([koishi.Schema.object({
|
|
130
|
+
enable: koishi.Schema.const(true).required().experimental(),
|
|
131
|
+
notify: koishi.Schema.boolean().default(false).description("动态被屏蔽是否发送提示"),
|
|
132
|
+
regex: koishi.Schema.string().description("正则表达式屏蔽"),
|
|
133
|
+
keywords: koishi.Schema.array(String).description("关键字屏蔽,一个关键字为一项"),
|
|
134
|
+
forward: koishi.Schema.boolean().default(false).description("是否屏蔽转发动态"),
|
|
135
|
+
article: koishi.Schema.boolean().default(false).description("是否屏蔽专栏")
|
|
136
|
+
}), koishi.Schema.object({})])]),
|
|
137
|
+
debug: koishi.Schema.object({}).description("调试设置"),
|
|
138
|
+
dynamicDebugMode: koishi.Schema.boolean().default(false).description("动态调试模式,开启后会在控制台输出动态推送的详细信息,用于调试")
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
//#endregion
|
|
54
142
|
//#region node_modules/@koishijs/plugin-notifier/lib/index.mjs
|
|
55
143
|
var __defProp$5 = Object.defineProperty;
|
|
56
144
|
var __name$3 = (target, value) => __defProp$5(target, "name", {
|
|
@@ -552,6 +640,7 @@ var ComRegister = class {
|
|
|
552
640
|
subManager = [];
|
|
553
641
|
dynamicTimelineManager = /* @__PURE__ */ new Map();
|
|
554
642
|
liveStatusManager = /* @__PURE__ */ new Map();
|
|
643
|
+
liveMsgManager = /* @__PURE__ */ new Map();
|
|
555
644
|
pushArrMap = /* @__PURE__ */ new Map();
|
|
556
645
|
loginDBData;
|
|
557
646
|
privateBot;
|
|
@@ -796,8 +885,19 @@ var ComRegister = class {
|
|
|
796
885
|
await this.sendPrivateMsg(`发送群组ID:${channelId}消息失败,请查看日志`);
|
|
797
886
|
});
|
|
798
887
|
}
|
|
799
|
-
|
|
888
|
+
preInitConfig(subs) {
|
|
800
889
|
for (const sub of subs) {
|
|
890
|
+
const liveMsg = {
|
|
891
|
+
customLiveStart: this.config.customLiveStart || "",
|
|
892
|
+
customLive: this.config.customLive || "",
|
|
893
|
+
customLiveEnd: this.config.customLiveEnd || ""
|
|
894
|
+
};
|
|
895
|
+
if (sub.liveMsg.enable) {
|
|
896
|
+
liveMsg.customLiveStart = sub.liveMsg.customLiveStart || this.config.customLiveStart;
|
|
897
|
+
liveMsg.customLive = sub.liveMsg.customLive || this.config.customLive;
|
|
898
|
+
liveMsg.customLiveEnd = sub.liveMsg.customLiveEnd || this.config.customLiveEnd;
|
|
899
|
+
}
|
|
900
|
+
this.liveMsgManager.set(sub.uid, liveMsg);
|
|
801
901
|
const atAllArr = [];
|
|
802
902
|
const dynamicArr = [];
|
|
803
903
|
const liveArr = [];
|
|
@@ -1129,6 +1229,7 @@ var ComRegister = class {
|
|
|
1129
1229
|
let liveRoomInfo;
|
|
1130
1230
|
let masterInfo;
|
|
1131
1231
|
let watchedNum;
|
|
1232
|
+
const liveMsgObj = this.liveMsgManager.get(uid);
|
|
1132
1233
|
const pushAtTimeFunc = async () => {
|
|
1133
1234
|
if (!await useMasterAndLiveRoomInfo(LiveType.LiveBroadcast)) {
|
|
1134
1235
|
await this.sendPrivateMsg("获取直播间信息失败,推送直播卡片失败!");
|
|
@@ -1142,7 +1243,7 @@ var ComRegister = class {
|
|
|
1142
1243
|
}
|
|
1143
1244
|
liveTime = liveRoomInfo.live_time;
|
|
1144
1245
|
const watched = watchedNum || "暂未获取到";
|
|
1145
|
-
const liveMsg =
|
|
1246
|
+
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}`);
|
|
1146
1247
|
await this.sendLiveNotifyCard(LiveType.LiveBroadcast, watched, {
|
|
1147
1248
|
liveRoomInfo,
|
|
1148
1249
|
masterInfo,
|
|
@@ -1204,7 +1305,7 @@ var ComRegister = class {
|
|
|
1204
1305
|
}
|
|
1205
1306
|
liveTime = liveRoomInfo.live_time;
|
|
1206
1307
|
const follower = masterInfo.liveOpenFollowerNum >= 1e4 ? `${(masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : masterInfo.liveOpenFollowerNum.toString();
|
|
1207
|
-
const liveStartMsg =
|
|
1308
|
+
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}`);
|
|
1208
1309
|
await this.sendLiveNotifyCard(LiveType.StartBroadcasting, follower, {
|
|
1209
1310
|
liveRoomInfo,
|
|
1210
1311
|
masterInfo,
|
|
@@ -1224,7 +1325,7 @@ var ComRegister = class {
|
|
|
1224
1325
|
if (liveFollowerChangeNum > 0) return liveFollowerChangeNum >= 1e4 ? `+${liveFollowerChangeNum.toFixed(1)}万` : `+${liveFollowerChangeNum}`;
|
|
1225
1326
|
return liveFollowerChangeNum <= -1e4 ? `${liveFollowerChangeNum.toFixed(1)}万` : liveFollowerChangeNum.toString();
|
|
1226
1327
|
})();
|
|
1227
|
-
const liveEndMsg =
|
|
1328
|
+
const liveEndMsg = liveMsgObj?.customLiveEnd.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower_change", followerChange).replace("\\n", "\n");
|
|
1228
1329
|
await this.sendLiveNotifyCard(LiveType.StopBroadcast, followerChange, {
|
|
1229
1330
|
liveRoomInfo,
|
|
1230
1331
|
masterInfo,
|
|
@@ -1239,7 +1340,7 @@ var ComRegister = class {
|
|
|
1239
1340
|
if (liveRoomInfo.live_status === 1) {
|
|
1240
1341
|
liveTime = liveRoomInfo.live_time;
|
|
1241
1342
|
const watched = watchedNum || "暂未获取到";
|
|
1242
|
-
const liveMsg =
|
|
1343
|
+
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}`);
|
|
1243
1344
|
if (this.config.restartPush) await this.sendLiveNotifyCard(LiveType.LiveBroadcast, watched, {
|
|
1244
1345
|
liveRoomInfo,
|
|
1245
1346
|
masterInfo,
|
|
@@ -1282,6 +1383,7 @@ var ComRegister = class {
|
|
|
1282
1383
|
for (const item of Object.values(data$1)) {
|
|
1283
1384
|
const uid = item.uid.toString();
|
|
1284
1385
|
const liveStatus = this.liveStatusManager.get(uid);
|
|
1386
|
+
const liveMsgObj = this.liveMsgManager.get(uid);
|
|
1285
1387
|
const sub = this.subManager.find((sub$1) => sub$1.uid === uid);
|
|
1286
1388
|
if (item.live_status === 1) {
|
|
1287
1389
|
liveStatus.live = true;
|
|
@@ -1290,7 +1392,7 @@ var ComRegister = class {
|
|
|
1290
1392
|
liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
|
|
1291
1393
|
liveStatus.liveStartTimeInit = true;
|
|
1292
1394
|
}
|
|
1293
|
-
const liveMsg =
|
|
1395
|
+
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}`);
|
|
1294
1396
|
await this.sendLiveNotifyCard(LiveType.LiveBroadcast, "API", {
|
|
1295
1397
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1296
1398
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1303,6 +1405,7 @@ var ComRegister = class {
|
|
|
1303
1405
|
for (const item of Object.values(data$2)) {
|
|
1304
1406
|
const uid = item.uid.toString();
|
|
1305
1407
|
const liveStatus = this.liveStatusManager.get(uid);
|
|
1408
|
+
const liveMsgObj = this.liveMsgManager.get(uid);
|
|
1306
1409
|
const sub = this.subManager.find((sub$1) => sub$1.uid === uid);
|
|
1307
1410
|
if (!sub) return;
|
|
1308
1411
|
switch (item.live_status) {
|
|
@@ -1322,7 +1425,7 @@ var ComRegister = class {
|
|
|
1322
1425
|
if (liveFollowerChangeNum > 0) return liveFollowerChangeNum >= 1e4 ? `+${liveFollowerChangeNum.toFixed(1)}万` : `+${liveFollowerChangeNum}`;
|
|
1323
1426
|
return liveFollowerChangeNum <= -1e4 ? `${liveFollowerChangeNum.toFixed(1)}万` : liveFollowerChangeNum.toString();
|
|
1324
1427
|
})();
|
|
1325
|
-
const liveEndMsg =
|
|
1428
|
+
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");
|
|
1326
1429
|
await this.sendLiveNotifyCard(LiveType.StopBroadcast, followerChange, {
|
|
1327
1430
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1328
1431
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1341,7 +1444,7 @@ var ComRegister = class {
|
|
|
1341
1444
|
liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
|
|
1342
1445
|
liveStatus.liveStartTimeInit = true;
|
|
1343
1446
|
const follower = liveStatus.masterInfo.liveOpenFollowerNum >= 1e4 ? `${(liveStatus.masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : liveStatus.masterInfo.liveOpenFollowerNum.toString();
|
|
1344
|
-
const liveStartMsg =
|
|
1447
|
+
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}`);
|
|
1345
1448
|
await this.sendLiveNotifyCard(LiveType.StartBroadcasting, follower, {
|
|
1346
1449
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1347
1450
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1362,7 +1465,7 @@ var ComRegister = class {
|
|
|
1362
1465
|
liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
|
|
1363
1466
|
liveStatus.liveStartTimeInit = true;
|
|
1364
1467
|
}
|
|
1365
|
-
const liveMsg =
|
|
1468
|
+
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}`);
|
|
1366
1469
|
await this.sendLiveNotifyCard(LiveType.LiveBroadcast, "API", {
|
|
1367
1470
|
liveRoomInfo: liveStatus.liveRoomInfo,
|
|
1368
1471
|
masterInfo: liveStatus.masterInfo,
|
|
@@ -1535,7 +1638,7 @@ var ComRegister = class {
|
|
|
1535
1638
|
return await subUserMatchPattern[subUserData.code]();
|
|
1536
1639
|
}
|
|
1537
1640
|
async loadSubFromConfig(subs) {
|
|
1538
|
-
this.
|
|
1641
|
+
this.preInitConfig(subs);
|
|
1539
1642
|
for (const sub of subs) {
|
|
1540
1643
|
this.logger.info(`加载订阅UID:${sub.uid}中...`);
|
|
1541
1644
|
const { code: userInfoCode, msg: userInfoMsg, data: userInfoData } = await withRetry(async () => {
|
|
@@ -1573,7 +1676,8 @@ var ComRegister = class {
|
|
|
1573
1676
|
platform: "",
|
|
1574
1677
|
live: sub.live,
|
|
1575
1678
|
dynamic: sub.dynamic,
|
|
1576
|
-
card: sub.card
|
|
1679
|
+
card: sub.card,
|
|
1680
|
+
liveMsg: sub.liveMsg
|
|
1577
1681
|
});
|
|
1578
1682
|
this.logger.info(`UID:${sub.uid}订阅加载完毕!`);
|
|
1579
1683
|
const randomDelay = Math.floor(Math.random() * 3) + 1;
|
|
@@ -1633,7 +1737,13 @@ var ComRegister = class {
|
|
|
1633
1737
|
cardColorEnd: koishi.Schema.string(),
|
|
1634
1738
|
cardBasePlateColor: koishi.Schema.string(),
|
|
1635
1739
|
cardBasePlateBorder: koishi.Schema.string()
|
|
1636
|
-
}).description("自定义推送卡片颜色,默认使用插件内置的颜色,设置后会覆盖插件内置的颜色")
|
|
1740
|
+
}).description("自定义推送卡片颜色,默认使用插件内置的颜色,设置后会覆盖插件内置的颜色"),
|
|
1741
|
+
liveMsg: koishi.Schema.object({
|
|
1742
|
+
enable: koishi.Schema.boolean(),
|
|
1743
|
+
customLiveStart: koishi.Schema.string(),
|
|
1744
|
+
customLive: koishi.Schema.string(),
|
|
1745
|
+
customLiveEnd: koishi.Schema.string()
|
|
1746
|
+
})
|
|
1637
1747
|
})).role("table").description("手动输入订阅信息,方便自定义订阅内容,这里的订阅内容不会存入数据库。uid: 订阅用户UID,dynamic: 是否需要订阅动态,live: 是否需要订阅直播"),
|
|
1638
1748
|
master: koishi.Schema.object({
|
|
1639
1749
|
enable: koishi.Schema.boolean(),
|
|
@@ -1703,7 +1813,7 @@ var require_rxjs = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/third_par
|
|
|
1703
1813
|
function createErrorClass(createImpl) {
|
|
1704
1814
|
var _super = function(instance) {
|
|
1705
1815
|
Error.call(instance);
|
|
1706
|
-
instance.stack = new Error().stack;
|
|
1816
|
+
instance.stack = (/* @__PURE__ */ new Error()).stack;
|
|
1707
1817
|
};
|
|
1708
1818
|
var ctorFunc = createImpl(_super);
|
|
1709
1819
|
ctorFunc.prototype = Object.create(Error.prototype);
|
|
@@ -3167,7 +3277,7 @@ var require_rxjs = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/third_par
|
|
|
3167
3277
|
return void 0;
|
|
3168
3278
|
};
|
|
3169
3279
|
AsyncAction2.prototype.execute = function(state, delay) {
|
|
3170
|
-
if (this.closed) return new Error("executing a cancelled action");
|
|
3280
|
+
if (this.closed) return /* @__PURE__ */ new Error("executing a cancelled action");
|
|
3171
3281
|
this.pending = false;
|
|
3172
3282
|
var error = this._execute(state, delay);
|
|
3173
3283
|
if (error) return error;
|
|
@@ -3180,7 +3290,7 @@ var require_rxjs = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/third_par
|
|
|
3180
3290
|
this.work(state);
|
|
3181
3291
|
} catch (e$1) {
|
|
3182
3292
|
errored = true;
|
|
3183
|
-
errorValue = e$1 ? e$1 : new Error("Scheduled action threw falsy error");
|
|
3293
|
+
errorValue = e$1 ? e$1 : /* @__PURE__ */ new Error("Scheduled action threw falsy error");
|
|
3184
3294
|
}
|
|
3185
3295
|
if (errored) {
|
|
3186
3296
|
this.unsubscribe();
|
|
@@ -3874,7 +3984,7 @@ var require_rxjs = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/third_par
|
|
|
3874
3984
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
3875
3985
|
exports2.createInvalidObservableTypeError = void 0;
|
|
3876
3986
|
function createInvalidObservableTypeError(input) {
|
|
3877
|
-
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.");
|
|
3987
|
+
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.");
|
|
3878
3988
|
}
|
|
3879
3989
|
exports2.createInvalidObservableTypeError = createInvalidObservableTypeError;
|
|
3880
3990
|
} });
|
|
@@ -12073,7 +12183,7 @@ var require_util$5 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppete
|
|
|
12073
12183
|
Error.prepareStackTrace = (_$2, stack) => {
|
|
12074
12184
|
return stack[2];
|
|
12075
12185
|
};
|
|
12076
|
-
const site = new Error().stack;
|
|
12186
|
+
const site = (/* @__PURE__ */ new Error()).stack;
|
|
12077
12187
|
Error.prepareStackTrace = original;
|
|
12078
12188
|
return Object.assign(object, { [SOURCE_URL]: PuppeteerURL.fromCallSite(functionName, site) });
|
|
12079
12189
|
};
|
|
@@ -12547,7 +12657,7 @@ var require_Deferred$1 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/pup
|
|
|
12547
12657
|
});
|
|
12548
12658
|
return await Promise.race(promises);
|
|
12549
12659
|
} finally {
|
|
12550
|
-
for (const deferred of deferredWithTimeout) deferred.reject(new Error("Timeout cleared"));
|
|
12660
|
+
for (const deferred of deferredWithTimeout) deferred.reject(/* @__PURE__ */ new Error("Timeout cleared"));
|
|
12551
12661
|
}
|
|
12552
12662
|
}
|
|
12553
12663
|
#isResolved = false;
|
|
@@ -16539,7 +16649,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
|
|
|
16539
16649
|
};
|
|
16540
16650
|
#click(options) {
|
|
16541
16651
|
const signal = options?.signal;
|
|
16542
|
-
const cause = new Error("Locator.click");
|
|
16652
|
+
const cause = /* @__PURE__ */ new Error("Locator.click");
|
|
16543
16653
|
return this._wait(options).pipe(this.operators.conditions([
|
|
16544
16654
|
this.#ensureElementIsInTheViewportIfNeeded,
|
|
16545
16655
|
this.#waitForStableBoundingBoxIfNeeded,
|
|
@@ -16555,7 +16665,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
|
|
|
16555
16665
|
}
|
|
16556
16666
|
#fill(value, options) {
|
|
16557
16667
|
const signal = options?.signal;
|
|
16558
|
-
const cause = new Error("Locator.fill");
|
|
16668
|
+
const cause = /* @__PURE__ */ new Error("Locator.fill");
|
|
16559
16669
|
return this._wait(options).pipe(this.operators.conditions([
|
|
16560
16670
|
this.#ensureElementIsInTheViewportIfNeeded,
|
|
16561
16671
|
this.#waitForStableBoundingBoxIfNeeded,
|
|
@@ -16619,7 +16729,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
|
|
|
16619
16729
|
}
|
|
16620
16730
|
#hover(options) {
|
|
16621
16731
|
const signal = options?.signal;
|
|
16622
|
-
const cause = new Error("Locator.hover");
|
|
16732
|
+
const cause = /* @__PURE__ */ new Error("Locator.hover");
|
|
16623
16733
|
return this._wait(options).pipe(this.operators.conditions([this.#ensureElementIsInTheViewportIfNeeded, this.#waitForStableBoundingBoxIfNeeded], signal), (0, rxjs_js_1$7.tap)(() => {
|
|
16624
16734
|
return this.emit(LocatorEvent.Action, void 0);
|
|
16625
16735
|
}), (0, rxjs_js_1$7.mergeMap)((handle) => {
|
|
@@ -16631,7 +16741,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
|
|
|
16631
16741
|
}
|
|
16632
16742
|
#scroll(options) {
|
|
16633
16743
|
const signal = options?.signal;
|
|
16634
|
-
const cause = new Error("Locator.scroll");
|
|
16744
|
+
const cause = /* @__PURE__ */ new Error("Locator.scroll");
|
|
16635
16745
|
return this._wait(options).pipe(this.operators.conditions([this.#ensureElementIsInTheViewportIfNeeded, this.#waitForStableBoundingBoxIfNeeded], signal), (0, rxjs_js_1$7.tap)(() => {
|
|
16636
16746
|
return this.emit(LocatorEvent.Action, void 0);
|
|
16637
16747
|
}), (0, rxjs_js_1$7.mergeMap)((handle) => {
|
|
@@ -16656,7 +16766,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
|
|
|
16656
16766
|
* @public
|
|
16657
16767
|
*/
|
|
16658
16768
|
async waitHandle(options) {
|
|
16659
|
-
const cause = new Error("Locator.waitHandle");
|
|
16769
|
+
const cause = /* @__PURE__ */ new Error("Locator.waitHandle");
|
|
16660
16770
|
return await (0, rxjs_js_1$7.firstValueFrom)(this._wait(options).pipe(this.operators.retryAndRaceWithSignalAndTimer(options?.signal, cause)));
|
|
16661
16771
|
}
|
|
16662
16772
|
/**
|
|
@@ -20494,7 +20604,7 @@ var require_WaitTask = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
|
|
|
20494
20604
|
*/
|
|
20495
20605
|
getBadError(error) {
|
|
20496
20606
|
if ((0, ErrorLike_js_1$12.isErrorLike)(error)) {
|
|
20497
|
-
if (error.message.includes("Execution context is not available in detached frame")) return new Error("Waiting failed: Frame detached");
|
|
20607
|
+
if (error.message.includes("Execution context is not available in detached frame")) return /* @__PURE__ */ new Error("Waiting failed: Frame detached");
|
|
20498
20608
|
if (error.message.includes("Execution context was destroyed")) return;
|
|
20499
20609
|
if (error.message.includes("Cannot find context with specified id")) return;
|
|
20500
20610
|
if (error.message.includes("AbortError: Actor 'MessageHandlerFrame' destroyed")) return;
|
|
@@ -20567,7 +20677,7 @@ var require_Realm$3 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppet
|
|
|
20567
20677
|
/** @internal */
|
|
20568
20678
|
dispose() {
|
|
20569
20679
|
this.#disposed = true;
|
|
20570
|
-
this.taskManager.terminateAll(new Error("waitForFunction failed: frame got detached."));
|
|
20680
|
+
this.taskManager.terminateAll(/* @__PURE__ */ new Error("waitForFunction failed: frame got detached."));
|
|
20571
20681
|
}
|
|
20572
20682
|
/** @internal */
|
|
20573
20683
|
[disposable_js_1$19.disposeSymbol]() {
|
|
@@ -21456,7 +21566,7 @@ var require_CallbackRegistry = __commonJS$1({ "node_modules/puppeteer-core/lib/c
|
|
|
21456
21566
|
*/
|
|
21457
21567
|
getPendingProtocolErrors() {
|
|
21458
21568
|
const result = [];
|
|
21459
|
-
for (const callback of this.#callbacks.values()) result.push(new Error(`${callback.label} timed out. Trace: ${callback.error.stack}`));
|
|
21569
|
+
for (const callback of this.#callbacks.values()) result.push(/* @__PURE__ */ new Error(`${callback.label} timed out. Trace: ${callback.error.stack}`));
|
|
21460
21570
|
return result;
|
|
21461
21571
|
}
|
|
21462
21572
|
};
|
|
@@ -21867,7 +21977,7 @@ var require_Connection$1 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/p
|
|
|
21867
21977
|
* @internal
|
|
21868
21978
|
*/
|
|
21869
21979
|
_rawSend(callbacks, method, params, sessionId, options) {
|
|
21870
|
-
if (this.#closed) return Promise.reject(new Error("Protocol error: Connection closed."));
|
|
21980
|
+
if (this.#closed) return Promise.reject(/* @__PURE__ */ new Error("Protocol error: Connection closed."));
|
|
21871
21981
|
return callbacks.create(method, options?.timeout ?? this.#timeout, (id) => {
|
|
21872
21982
|
const stringifiedMessage = JSON.stringify({
|
|
21873
21983
|
method,
|
|
@@ -24389,7 +24499,7 @@ var require_LifecycleWatcher = __commonJS$1({ "node_modules/puppeteer-core/lib/c
|
|
|
24389
24499
|
}
|
|
24390
24500
|
#onFrameDetached(frame) {
|
|
24391
24501
|
if (this.#frame === frame) {
|
|
24392
|
-
this.#terminationDeferred.resolve(new Error("Navigating frame was detached"));
|
|
24502
|
+
this.#terminationDeferred.resolve(/* @__PURE__ */ new Error("Navigating frame was detached"));
|
|
24393
24503
|
return;
|
|
24394
24504
|
}
|
|
24395
24505
|
this.#checkLifecycleComplete();
|
|
@@ -24435,7 +24545,7 @@ var require_LifecycleWatcher = __commonJS$1({ "node_modules/puppeteer-core/lib/c
|
|
|
24435
24545
|
}
|
|
24436
24546
|
dispose() {
|
|
24437
24547
|
this.#subscriptions.dispose();
|
|
24438
|
-
this.#terminationDeferred.resolve(new Error("LifecycleWatcher disposed"));
|
|
24548
|
+
this.#terminationDeferred.resolve(/* @__PURE__ */ new Error("LifecycleWatcher disposed"));
|
|
24439
24549
|
}
|
|
24440
24550
|
};
|
|
24441
24551
|
exports.LifecycleWatcher = LifecycleWatcher;
|
|
@@ -24684,7 +24794,7 @@ var require_Frame$1 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppet
|
|
|
24684
24794
|
});
|
|
24685
24795
|
ensureNewDocumentNavigation = !!response.loaderId;
|
|
24686
24796
|
if (response.errorText === "net::ERR_HTTP_RESPONSE_CODE_FAILURE") return null;
|
|
24687
|
-
return response.errorText ? new Error(`${response.errorText} at ${url$1}`) : null;
|
|
24797
|
+
return response.errorText ? /* @__PURE__ */ new Error(`${response.errorText} at ${url$1}`) : null;
|
|
24688
24798
|
} catch (error$1) {
|
|
24689
24799
|
if ((0, ErrorLike_js_1$6.isErrorLike)(error$1)) return error$1;
|
|
24690
24800
|
throw error$1;
|
|
@@ -25607,7 +25717,7 @@ var require_NetworkManager = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs
|
|
|
25607
25717
|
const response = new HTTPResponse_js_1$2.CdpHTTPResponse(client, request, responsePayload, extraInfo);
|
|
25608
25718
|
request._response = response;
|
|
25609
25719
|
request._redirectChain.push(request);
|
|
25610
|
-
response._resolveBody(new Error("Response body is unavailable for redirect responses"));
|
|
25720
|
+
response._resolveBody(/* @__PURE__ */ new Error("Response body is unavailable for redirect responses"));
|
|
25611
25721
|
this.#forgetRequest(request, false);
|
|
25612
25722
|
this.emit(NetworkManagerEvents_js_1$1.NetworkManagerEvent.Response, response);
|
|
25613
25723
|
this.emit(NetworkManagerEvents_js_1$1.NetworkManagerEvent.RequestFinished, request);
|
|
@@ -25616,7 +25726,7 @@ var require_NetworkManager = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs
|
|
|
25616
25726
|
const request = this.#networkEventManager.getRequest(responseReceived.requestId);
|
|
25617
25727
|
if (!request) return;
|
|
25618
25728
|
const extraInfos = this.#networkEventManager.responseExtraInfo(responseReceived.requestId);
|
|
25619
|
-
if (extraInfos.length) (0, util_js_1$22.debugError)(new Error("Unexpected extraInfo events for request " + responseReceived.requestId));
|
|
25729
|
+
if (extraInfos.length) (0, util_js_1$22.debugError)(/* @__PURE__ */ new Error("Unexpected extraInfo events for request " + responseReceived.requestId));
|
|
25620
25730
|
if (responseReceived.response.fromDiskCache) extraInfo = null;
|
|
25621
25731
|
const response = new HTTPResponse_js_1$2.CdpHTTPResponse(client, request, responseReceived.response, extraInfo);
|
|
25622
25732
|
request._response = response;
|
|
@@ -27952,7 +28062,7 @@ var require_Tracing = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppet
|
|
|
27952
28062
|
contentDeferred.resolve(buffer ?? void 0);
|
|
27953
28063
|
} catch (error) {
|
|
27954
28064
|
if ((0, ErrorLike_js_1$4.isErrorLike)(error)) contentDeferred.reject(error);
|
|
27955
|
-
else contentDeferred.reject(new Error(`Unknown error: ${error}`));
|
|
28065
|
+
else contentDeferred.reject(/* @__PURE__ */ new Error(`Unknown error: ${error}`));
|
|
27956
28066
|
}
|
|
27957
28067
|
});
|
|
27958
28068
|
await this.#client.send("Tracing.end");
|
|
@@ -28367,7 +28477,7 @@ var require_Page$1 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppete
|
|
|
28367
28477
|
return this.#primaryTarget.browserContext();
|
|
28368
28478
|
}
|
|
28369
28479
|
#onTargetCrashed() {
|
|
28370
|
-
this.emit("error", new Error("Page crashed!"));
|
|
28480
|
+
this.emit("error", /* @__PURE__ */ new Error("Page crashed!"));
|
|
28371
28481
|
}
|
|
28372
28482
|
#onLogEntryAdded(event) {
|
|
28373
28483
|
const { level, text, args, source, url, lineNumber } = event.entry;
|
|
@@ -31927,7 +32037,7 @@ var require_ErrorResponse = __commonJS$1({ "node_modules/chromium-bidi/lib/cjs/p
|
|
|
31927
32037
|
};
|
|
31928
32038
|
exports.UnknownCommandException = UnknownCommandException;
|
|
31929
32039
|
var UnknownErrorException = class extends Exception {
|
|
31930
|
-
constructor(message$1, stacktrace = new Error().stack) {
|
|
32040
|
+
constructor(message$1, stacktrace = (/* @__PURE__ */ new Error()).stack) {
|
|
31931
32041
|
super("unknown error", message$1, stacktrace);
|
|
31932
32042
|
}
|
|
31933
32043
|
};
|
|
@@ -36773,7 +36883,7 @@ var require_SharedId = __commonJS$1({ "node_modules/chromium-bidi/lib/cjs/bidiMa
|
|
|
36773
36883
|
return `f.${frameId}.d.${documentId}.e.${backendNodeId}`;
|
|
36774
36884
|
}
|
|
36775
36885
|
function parseLegacySharedId(sharedId) {
|
|
36776
|
-
const match = sharedId.match(new RegExp(`(.*)${SHARED_ID_DIVIDER}(.*)`));
|
|
36886
|
+
const match = sharedId.match(/* @__PURE__ */ new RegExp(`(.*)${SHARED_ID_DIVIDER}(.*)`));
|
|
36777
36887
|
if (!match) return null;
|
|
36778
36888
|
const documentId = match[1];
|
|
36779
36889
|
const elementId = match[2];
|
|
@@ -47037,7 +47147,7 @@ var require_permessage_deflate = __commonJS$1({ "node_modules/ws/lib/permessage-
|
|
|
47037
47147
|
const callback = this._deflate[kCallback];
|
|
47038
47148
|
this._deflate.close();
|
|
47039
47149
|
this._deflate = null;
|
|
47040
|
-
if (callback) callback(new Error("The deflate stream was closed while data was being processed"));
|
|
47150
|
+
if (callback) callback(/* @__PURE__ */ new Error("The deflate stream was closed while data was being processed"));
|
|
47041
47151
|
}
|
|
47042
47152
|
}
|
|
47043
47153
|
/**
|
|
@@ -47243,7 +47353,7 @@ var require_permessage_deflate = __commonJS$1({ "node_modules/ws/lib/permessage-
|
|
|
47243
47353
|
this[kBuffers].push(chunk);
|
|
47244
47354
|
return;
|
|
47245
47355
|
}
|
|
47246
|
-
this[kError$1] = new RangeError("Max payload size exceeded");
|
|
47356
|
+
this[kError$1] = /* @__PURE__ */ new RangeError("Max payload size exceeded");
|
|
47247
47357
|
this[kError$1].code = "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH";
|
|
47248
47358
|
this[kError$1][kStatusCode$2] = 1009;
|
|
47249
47359
|
this.removeListener("data", inflateOnData);
|
|
@@ -48298,7 +48408,7 @@ var require_sender = __commonJS$1({ "node_modules/ws/lib/sender.js"(exports, mod
|
|
|
48298
48408
|
this._state = GET_BLOB_DATA;
|
|
48299
48409
|
blob.arrayBuffer().then((arrayBuffer) => {
|
|
48300
48410
|
if (this._socket.destroyed) {
|
|
48301
|
-
const err = new Error("The socket was closed while the blob was being read");
|
|
48411
|
+
const err = /* @__PURE__ */ new Error("The socket was closed while the blob was being read");
|
|
48302
48412
|
process.nextTick(callCallbacks, this, err, cb);
|
|
48303
48413
|
return;
|
|
48304
48414
|
}
|
|
@@ -48346,7 +48456,7 @@ var require_sender = __commonJS$1({ "node_modules/ws/lib/sender.js"(exports, mod
|
|
|
48346
48456
|
this._state = DEFLATING;
|
|
48347
48457
|
perMessageDeflate.compress(data$1, options.fin, (_$2, buf) => {
|
|
48348
48458
|
if (this._socket.destroyed) {
|
|
48349
|
-
const err = new Error("The socket was closed while data was being compressed");
|
|
48459
|
+
const err = /* @__PURE__ */ new Error("The socket was closed while data was being compressed");
|
|
48350
48460
|
callCallbacks(this, err, cb);
|
|
48351
48461
|
return;
|
|
48352
48462
|
}
|
|
@@ -49433,7 +49543,7 @@ var require_websocket = __commonJS$1({ "node_modules/ws/lib/websocket.js"(export
|
|
|
49433
49543
|
try {
|
|
49434
49544
|
addr = new URL$1(location, address);
|
|
49435
49545
|
} catch (e$1) {
|
|
49436
|
-
const err = new SyntaxError(`Invalid URL: ${location}`);
|
|
49546
|
+
const err = /* @__PURE__ */ new SyntaxError(`Invalid URL: ${location}`);
|
|
49437
49547
|
emitErrorAndClose(websocket, err);
|
|
49438
49548
|
return;
|
|
49439
49549
|
}
|
|
@@ -49581,7 +49691,7 @@ var require_websocket = __commonJS$1({ "node_modules/ws/lib/websocket.js"(export
|
|
|
49581
49691
|
else websocket._bufferedAmount += length;
|
|
49582
49692
|
}
|
|
49583
49693
|
if (cb) {
|
|
49584
|
-
const err = new Error(`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`);
|
|
49694
|
+
const err = /* @__PURE__ */ new Error(`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`);
|
|
49585
49695
|
process.nextTick(cb, err);
|
|
49586
49696
|
}
|
|
49587
49697
|
}
|
|
@@ -50047,7 +50157,7 @@ var require_websocket_server = __commonJS$1({ "node_modules/ws/lib/websocket-ser
|
|
|
50047
50157
|
close(cb) {
|
|
50048
50158
|
if (this._state === CLOSED) {
|
|
50049
50159
|
if (cb) this.once("close", () => {
|
|
50050
|
-
cb(new Error("The server is not running"));
|
|
50160
|
+
cb(/* @__PURE__ */ new Error("The server is not running"));
|
|
50051
50161
|
});
|
|
50052
50162
|
process.nextTick(emitClose, this);
|
|
50053
50163
|
return;
|
|
@@ -52290,7 +52400,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
|
|
|
52290
52400
|
constructor() {
|
|
52291
52401
|
this.signal = new AS();
|
|
52292
52402
|
}
|
|
52293
|
-
abort(reason = new Error("This operation was aborted")) {
|
|
52403
|
+
abort(reason = /* @__PURE__ */ new Error("This operation was aborted")) {
|
|
52294
52404
|
this.signal.reason = this.signal.reason || reason;
|
|
52295
52405
|
this.signal.aborted = true;
|
|
52296
52406
|
this.signal.dispatchEvent({
|
|
@@ -52676,7 +52786,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
|
|
|
52676
52786
|
this.moveToTail(index);
|
|
52677
52787
|
const oldVal = this.valList[index];
|
|
52678
52788
|
if (v$2 !== oldVal) {
|
|
52679
|
-
if (this.isBackgroundFetch(oldVal)) oldVal.__abortController.abort(new Error("replaced"));
|
|
52789
|
+
if (this.isBackgroundFetch(oldVal)) oldVal.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
|
|
52680
52790
|
else if (!noDisposeOnSet) {
|
|
52681
52791
|
this.dispose(oldVal, k$2, "set");
|
|
52682
52792
|
if (this.disposeAfter) this.disposed.push([
|
|
@@ -52718,7 +52828,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
|
|
|
52718
52828
|
const head$1 = this.head;
|
|
52719
52829
|
const k$2 = this.keyList[head$1];
|
|
52720
52830
|
const v$2 = this.valList[head$1];
|
|
52721
|
-
if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(new Error("evicted"));
|
|
52831
|
+
if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(/* @__PURE__ */ new Error("evicted"));
|
|
52722
52832
|
else {
|
|
52723
52833
|
this.dispose(v$2, k$2, "evict");
|
|
52724
52834
|
if (this.disposeAfter) this.disposed.push([
|
|
@@ -52945,7 +53055,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
|
|
|
52945
53055
|
else {
|
|
52946
53056
|
this.removeItemSize(index);
|
|
52947
53057
|
const v$2 = this.valList[index];
|
|
52948
|
-
if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(new Error("deleted"));
|
|
53058
|
+
if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
|
|
52949
53059
|
else {
|
|
52950
53060
|
this.dispose(v$2, k$2, "delete");
|
|
52951
53061
|
if (this.disposeAfter) this.disposed.push([
|
|
@@ -52974,7 +53084,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
|
|
|
52974
53084
|
clear() {
|
|
52975
53085
|
for (const index of this.rindexes({ allowStale: true })) {
|
|
52976
53086
|
const v$2 = this.valList[index];
|
|
52977
|
-
if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(new Error("deleted"));
|
|
53087
|
+
if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
|
|
52978
53088
|
else {
|
|
52979
53089
|
const k$2 = this.keyList[index];
|
|
52980
53090
|
this.dispose(v$2, k$2, "delete");
|
|
@@ -53148,7 +53258,7 @@ var require_dist$10 = __commonJS$1({ "node_modules/agent-base/dist/index.js"(exp
|
|
|
53148
53258
|
if (typeof options.secureEndpoint === "boolean") return options.secureEndpoint;
|
|
53149
53259
|
if (typeof options.protocol === "string") return options.protocol === "https:";
|
|
53150
53260
|
}
|
|
53151
|
-
const { stack } = new Error();
|
|
53261
|
+
const { stack } = /* @__PURE__ */ new Error();
|
|
53152
53262
|
if (typeof stack !== "string") return false;
|
|
53153
53263
|
return stack.split("\n").some((l$1) => l$1.indexOf("(https.js:") !== -1 || l$1.indexOf("node:https:") !== -1);
|
|
53154
53264
|
}
|
|
@@ -53439,7 +53549,7 @@ var require_parse_proxy_response = __commonJS$1({ "node_modules/https-proxy-agen
|
|
|
53439
53549
|
function onend() {
|
|
53440
53550
|
cleanup();
|
|
53441
53551
|
debug$10("onend");
|
|
53442
|
-
reject(new Error("Proxy connection ended before receiving CONNECT response"));
|
|
53552
|
+
reject(/* @__PURE__ */ new Error("Proxy connection ended before receiving CONNECT response"));
|
|
53443
53553
|
}
|
|
53444
53554
|
function onerror(err) {
|
|
53445
53555
|
cleanup();
|
|
@@ -53460,7 +53570,7 @@ var require_parse_proxy_response = __commonJS$1({ "node_modules/https-proxy-agen
|
|
|
53460
53570
|
const firstLine = headerParts.shift();
|
|
53461
53571
|
if (!firstLine) {
|
|
53462
53572
|
socket.destroy();
|
|
53463
|
-
return reject(new Error("No header received from proxy CONNECT response"));
|
|
53573
|
+
return reject(/* @__PURE__ */ new Error("No header received from proxy CONNECT response"));
|
|
53464
53574
|
}
|
|
53465
53575
|
const firstLineParts = firstLine.split(" ");
|
|
53466
53576
|
const statusCode = +firstLineParts[1];
|
|
@@ -53471,7 +53581,7 @@ var require_parse_proxy_response = __commonJS$1({ "node_modules/https-proxy-agen
|
|
|
53471
53581
|
const firstColon = header.indexOf(":");
|
|
53472
53582
|
if (firstColon === -1) {
|
|
53473
53583
|
socket.destroy();
|
|
53474
|
-
return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`));
|
|
53584
|
+
return reject(/* @__PURE__ */ new Error(`Invalid header from proxy CONNECT response: "${header}"`));
|
|
53475
53585
|
}
|
|
53476
53586
|
const key = header.slice(0, firstColon).toLowerCase();
|
|
53477
53587
|
const value = header.slice(firstColon + 1).trimStart();
|
|
@@ -56994,8 +57104,8 @@ var require_constants$1 = __commonJS$1({ "node_modules/ip-address/dist/v6/consta
|
|
|
56994
57104
|
* @static
|
|
56995
57105
|
*/
|
|
56996
57106
|
exports.RE_ZONE_STRING = /%.*$/;
|
|
56997
|
-
exports.RE_URL = new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);
|
|
56998
|
-
exports.RE_URL_WITH_PORT = new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/);
|
|
57107
|
+
exports.RE_URL = /* @__PURE__ */ new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);
|
|
57108
|
+
exports.RE_URL_WITH_PORT = /* @__PURE__ */ new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/);
|
|
56999
57109
|
} });
|
|
57000
57110
|
|
|
57001
57111
|
//#endregion
|
|
@@ -59174,7 +59284,7 @@ var require_parseControlResponse = __commonJS$1({ "node_modules/basic-ftp/dist/p
|
|
|
59174
59284
|
if (!tokenRegex) {
|
|
59175
59285
|
if (isMultiline(line)) {
|
|
59176
59286
|
const token = line.substr(0, 3);
|
|
59177
|
-
tokenRegex = new RegExp(`^${token}(?:$| )`);
|
|
59287
|
+
tokenRegex = /* @__PURE__ */ new RegExp(`^${token}(?:$| )`);
|
|
59178
59288
|
startAt = i$1;
|
|
59179
59289
|
} else if (isSingleLine(line)) messages.push(line);
|
|
59180
59290
|
} else if (tokenRegex.test(line)) {
|
|
@@ -59321,9 +59431,9 @@ var require_FtpContext = __commonJS$1({ "node_modules/basic-ftp/dist/FtpContext.
|
|
|
59321
59431
|
socket.setEncoding(this._encoding);
|
|
59322
59432
|
socket.setKeepAlive(true);
|
|
59323
59433
|
socket.on("data", (data$1) => this._onControlSocketData(data$1));
|
|
59324
|
-
socket.on("end", () => this.closeWithError(new Error("Server sent FIN packet unexpectedly, closing connection.")));
|
|
59434
|
+
socket.on("end", () => this.closeWithError(/* @__PURE__ */ new Error("Server sent FIN packet unexpectedly, closing connection.")));
|
|
59325
59435
|
socket.on("close", (hadError) => {
|
|
59326
|
-
if (!hadError) this.closeWithError(new Error("Server closed connection unexpectedly."));
|
|
59436
|
+
if (!hadError) this.closeWithError(/* @__PURE__ */ new Error("Server closed connection unexpectedly."));
|
|
59327
59437
|
});
|
|
59328
59438
|
this._setupDefaultErrorHandlers(socket, "control socket");
|
|
59329
59439
|
}
|
|
@@ -59387,13 +59497,13 @@ var require_FtpContext = __commonJS$1({ "node_modules/basic-ftp/dist/FtpContext.
|
|
|
59387
59497
|
*/
|
|
59388
59498
|
handle(command, responseHandler) {
|
|
59389
59499
|
if (this._task) {
|
|
59390
|
-
const err = new Error("User launched a task while another one is still running. Forgot to use 'await' or '.then()'?");
|
|
59500
|
+
const err = /* @__PURE__ */ new Error("User launched a task while another one is still running. Forgot to use 'await' or '.then()'?");
|
|
59391
59501
|
err.stack += `\nRunning task launched at: ${this._task.stack}`;
|
|
59392
59502
|
this.closeWithError(err);
|
|
59393
59503
|
}
|
|
59394
59504
|
return new Promise((resolveTask, rejectTask) => {
|
|
59395
59505
|
this._task = {
|
|
59396
|
-
stack: new Error().stack || "Unknown call stack",
|
|
59506
|
+
stack: (/* @__PURE__ */ new Error()).stack || "Unknown call stack",
|
|
59397
59507
|
responseHandler,
|
|
59398
59508
|
resolver: {
|
|
59399
59509
|
resolve: (arg) => {
|
|
@@ -59407,7 +59517,7 @@ var require_FtpContext = __commonJS$1({ "node_modules/basic-ftp/dist/FtpContext.
|
|
|
59407
59517
|
}
|
|
59408
59518
|
};
|
|
59409
59519
|
if (this._closingError) {
|
|
59410
|
-
const err = new Error(`Client is closed because ${this._closingError.message}`);
|
|
59520
|
+
const err = /* @__PURE__ */ new Error(`Client is closed because ${this._closingError.message}`);
|
|
59411
59521
|
err.stack += `\nClosing reason: ${this._closingError.stack}`;
|
|
59412
59522
|
err.code = this._closingError.code !== void 0 ? this._closingError.code : "0";
|
|
59413
59523
|
this._passToHandler(err);
|
|
@@ -59476,11 +59586,11 @@ var require_FtpContext = __commonJS$1({ "node_modules/basic-ftp/dist/FtpContext.
|
|
|
59476
59586
|
this.closeWithError(error);
|
|
59477
59587
|
});
|
|
59478
59588
|
socket.once("close", (hadError) => {
|
|
59479
|
-
if (hadError) this.closeWithError(new Error(`Socket closed due to transmission error (${identifier})`));
|
|
59589
|
+
if (hadError) this.closeWithError(/* @__PURE__ */ new Error(`Socket closed due to transmission error (${identifier})`));
|
|
59480
59590
|
});
|
|
59481
59591
|
socket.once("timeout", () => {
|
|
59482
59592
|
socket.destroy();
|
|
59483
|
-
this.closeWithError(new Error(`Timeout (${identifier})`));
|
|
59593
|
+
this.closeWithError(/* @__PURE__ */ new Error(`Timeout (${identifier})`));
|
|
59484
59594
|
});
|
|
59485
59595
|
}
|
|
59486
59596
|
/**
|
|
@@ -59636,7 +59746,7 @@ var require_parseListDOS = __commonJS$1({ "node_modules/basic-ftp/dist/parseList
|
|
|
59636
59746
|
*
|
|
59637
59747
|
* https://github.com/apache/commons-net/blob/master/src/main/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java
|
|
59638
59748
|
*/
|
|
59639
|
-
const RE_LINE$1 = new RegExp("(\\S+)\\s+(\\S+)\\s+(?:(<DIR>)|([0-9]+))\\s+(\\S.*)");
|
|
59749
|
+
const RE_LINE$1 = /* @__PURE__ */ new RegExp("(\\S+)\\s+(\\S+)\\s+(?:(<DIR>)|([0-9]+))\\s+(\\S.*)");
|
|
59640
59750
|
/**
|
|
59641
59751
|
* Returns true if a given line might be a DOS-style listing.
|
|
59642
59752
|
*
|
|
@@ -59712,7 +59822,7 @@ var require_parseListUnix = __commonJS$1({ "node_modules/basic-ftp/dist/parseLis
|
|
|
59712
59822
|
* this is not allowed for here as does not appear to be shown by FTP servers
|
|
59713
59823
|
* {@code @} file has extended attributes
|
|
59714
59824
|
*/
|
|
59715
|
-
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(.*)");
|
|
59825
|
+
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(.*)");
|
|
59716
59826
|
/**
|
|
59717
59827
|
* Returns true if a given line might be a Unix-style listing.
|
|
59718
59828
|
*
|
|
@@ -60083,7 +60193,7 @@ var require_StringWriter = __commonJS$1({ "node_modules/basic-ftp/dist/StringWri
|
|
|
60083
60193
|
if (chunk instanceof Buffer) {
|
|
60084
60194
|
this.buf = Buffer.concat([this.buf, chunk]);
|
|
60085
60195
|
callback(null);
|
|
60086
|
-
} else callback(new Error("StringWriter expects chunks of type 'Buffer'."));
|
|
60196
|
+
} else callback(/* @__PURE__ */ new Error("StringWriter expects chunks of type 'Buffer'."));
|
|
60087
60197
|
}
|
|
60088
60198
|
getText(encoding) {
|
|
60089
60199
|
return this.buf.toString(encoding);
|
|
@@ -60217,7 +60327,7 @@ var require_transfer = __commonJS$1({ "node_modules/basic-ftp/dist/transfer.js"(
|
|
|
60217
60327
|
};
|
|
60218
60328
|
const handleTimeout = function() {
|
|
60219
60329
|
socket.destroy();
|
|
60220
|
-
reject(new Error(`Timeout when trying to open data connection to ${host}:${port}`));
|
|
60330
|
+
reject(/* @__PURE__ */ new Error(`Timeout when trying to open data connection to ${host}:${port}`));
|
|
60221
60331
|
};
|
|
60222
60332
|
socket.setTimeout(ftp$1.timeout);
|
|
60223
60333
|
socket.on("error", handleConnErr);
|
|
@@ -60301,7 +60411,7 @@ var require_transfer = __commonJS$1({ "node_modules/basic-ftp/dist/transfer.js"(
|
|
|
60301
60411
|
* the FTP server is now caught up in a state we can't resolve.
|
|
60302
60412
|
*/
|
|
60303
60413
|
onUnexpectedRequest(response) {
|
|
60304
|
-
const err = new Error(`Unexpected FTP response is requesting an answer: ${response.message}`);
|
|
60414
|
+
const err = /* @__PURE__ */ new Error(`Unexpected FTP response is requesting an answer: ${response.message}`);
|
|
60305
60415
|
this.ftp.closeWithError(err);
|
|
60306
60416
|
}
|
|
60307
60417
|
tryResolve(task) {
|
|
@@ -60320,7 +60430,7 @@ var require_transfer = __commonJS$1({ "node_modules/basic-ftp/dist/transfer.js"(
|
|
|
60320
60430
|
else if (res.code === 150 || res.code === 125) {
|
|
60321
60431
|
const dataSocket = config.ftp.dataSocket;
|
|
60322
60432
|
if (!dataSocket) {
|
|
60323
|
-
resolver.onError(task, new Error("Upload should begin but no data connection is available."));
|
|
60433
|
+
resolver.onError(task, /* @__PURE__ */ new Error("Upload should begin but no data connection is available."));
|
|
60324
60434
|
return;
|
|
60325
60435
|
}
|
|
60326
60436
|
const canUpload = "getCipher" in dataSocket ? dataSocket.getCipher() !== void 0 : true;
|
|
@@ -60345,7 +60455,7 @@ var require_transfer = __commonJS$1({ "node_modules/basic-ftp/dist/transfer.js"(
|
|
|
60345
60455
|
else if (res.code === 150 || res.code === 125) {
|
|
60346
60456
|
const dataSocket = config.ftp.dataSocket;
|
|
60347
60457
|
if (!dataSocket) {
|
|
60348
|
-
resolver.onError(task, new Error("Download should begin but no data connection is available."));
|
|
60458
|
+
resolver.onError(task, /* @__PURE__ */ new Error("Download should begin but no data connection is available."));
|
|
60349
60459
|
return;
|
|
60350
60460
|
}
|
|
60351
60461
|
config.ftp.log(`Downloading from ${(0, netUtils_1$1.describeAddress)(dataSocket)} (${(0, netUtils_1$1.describeTLS)(dataSocket)})`);
|
|
@@ -75013,7 +75123,7 @@ var require_myIpAddress = __commonJS$1({ "node_modules/pac-resolver/dist/myIpAdd
|
|
|
75013
75123
|
socket.destroy();
|
|
75014
75124
|
if (typeof addr === "string") resolve$4(addr);
|
|
75015
75125
|
else if (addr.address) resolve$4(addr.address);
|
|
75016
|
-
else reject(new Error("Expected a `string`"));
|
|
75126
|
+
else reject(/* @__PURE__ */ new Error("Expected a `string`"));
|
|
75017
75127
|
});
|
|
75018
75128
|
});
|
|
75019
75129
|
}
|
|
@@ -75057,7 +75167,7 @@ var require_shExpMatch = __commonJS$1({ "node_modules/pac-resolver/dist/shExpMat
|
|
|
75057
75167
|
*/
|
|
75058
75168
|
function toRegExp(str) {
|
|
75059
75169
|
str = String(str).replace(/\./g, "\\.").replace(/\?/g, ".").replace(/\*/g, ".*");
|
|
75060
|
-
return new RegExp(`^${str}$`);
|
|
75170
|
+
return /* @__PURE__ */ new RegExp(`^${str}$`);
|
|
75061
75171
|
}
|
|
75062
75172
|
} });
|
|
75063
75173
|
|
|
@@ -75468,7 +75578,7 @@ var require_lifetime = __commonJS$1({ "node_modules/@tootallnate/quickjs-emscrip
|
|
|
75468
75578
|
this.disposer = disposer;
|
|
75469
75579
|
this._owner = _owner;
|
|
75470
75580
|
this._alive = true;
|
|
75471
|
-
this._constructorStack = debug_1$8.QTS_DEBUG ? new Error("Lifetime constructed").stack : void 0;
|
|
75581
|
+
this._constructorStack = debug_1$8.QTS_DEBUG ? (/* @__PURE__ */ new Error("Lifetime constructed")).stack : void 0;
|
|
75472
75582
|
}
|
|
75473
75583
|
get alive() {
|
|
75474
75584
|
return this._alive;
|
|
@@ -77635,7 +77745,7 @@ var require_emscripten_module_WASM_RELEASE_SYNC = __commonJS$1({ "node_modules/@
|
|
|
77635
77745
|
]);
|
|
77636
77746
|
},
|
|
77637
77747
|
l: function(b$2, c$1) {
|
|
77638
|
-
b$2 = new Date(1e3 * (L$1[b$2 >> 2] + 4294967296 * K$2[b$2 + 4 >> 2]));
|
|
77748
|
+
b$2 = /* @__PURE__ */ new Date(1e3 * (L$1[b$2 >> 2] + 4294967296 * K$2[b$2 + 4 >> 2]));
|
|
77639
77749
|
K$2[c$1 >> 2] = b$2.getSeconds();
|
|
77640
77750
|
K$2[c$1 + 4 >> 2] = b$2.getMinutes();
|
|
77641
77751
|
K$2[c$1 + 8 >> 2] = b$2.getHours();
|
|
@@ -78848,7 +78958,7 @@ var require_httpUtil = __commonJS$1({ "node_modules/@puppeteer/browsers/lib/cjs/
|
|
|
78848
78958
|
}
|
|
78849
78959
|
const request = httpRequest(url, "GET", (response) => {
|
|
78850
78960
|
if (response.statusCode !== 200) {
|
|
78851
|
-
const error = new Error(`Download failed: server returned code ${response.statusCode}. URL: ${url}`);
|
|
78961
|
+
const error = /* @__PURE__ */ new Error(`Download failed: server returned code ${response.statusCode}. URL: ${url}`);
|
|
78852
78962
|
response.resume();
|
|
78853
78963
|
reject(error);
|
|
78854
78964
|
return;
|
|
@@ -78883,7 +78993,7 @@ var require_httpUtil = __commonJS$1({ "node_modules/@puppeteer/browsers/lib/cjs/
|
|
|
78883
78993
|
return new Promise((resolve$4, reject) => {
|
|
78884
78994
|
const request = httpRequest(url, "GET", (response) => {
|
|
78885
78995
|
let data$1 = "";
|
|
78886
|
-
if (response.statusCode && response.statusCode >= 400) return reject(new Error(`Got status code ${response.statusCode}`));
|
|
78996
|
+
if (response.statusCode && response.statusCode >= 400) return reject(/* @__PURE__ */ new Error(`Got status code ${response.statusCode}`));
|
|
78887
78997
|
response.on("data", (chunk) => {
|
|
78888
78998
|
data$1 += chunk;
|
|
78889
78999
|
});
|
|
@@ -78891,7 +79001,7 @@ var require_httpUtil = __commonJS$1({ "node_modules/@puppeteer/browsers/lib/cjs/
|
|
|
78891
79001
|
try {
|
|
78892
79002
|
return resolve$4(String(data$1));
|
|
78893
79003
|
} catch {
|
|
78894
|
-
return reject(new Error("Chrome version not found"));
|
|
79004
|
+
return reject(/* @__PURE__ */ new Error("Chrome version not found"));
|
|
78895
79005
|
}
|
|
78896
79006
|
});
|
|
78897
79007
|
}, false);
|
|
@@ -80315,7 +80425,7 @@ var require_end_of_stream = __commonJS$1({ "node_modules/end-of-stream/index.js"
|
|
|
80315
80425
|
if (!writable) callback.call(stream$3);
|
|
80316
80426
|
};
|
|
80317
80427
|
var onexit = function(exitCode) {
|
|
80318
|
-
callback.call(stream$3, exitCode ? new Error("exited with error code: " + exitCode) : null);
|
|
80428
|
+
callback.call(stream$3, exitCode ? /* @__PURE__ */ new Error("exited with error code: " + exitCode) : null);
|
|
80319
80429
|
};
|
|
80320
80430
|
var onerror = function(err) {
|
|
80321
80431
|
callback.call(stream$3, err);
|
|
@@ -80325,8 +80435,8 @@ var require_end_of_stream = __commonJS$1({ "node_modules/end-of-stream/index.js"
|
|
|
80325
80435
|
};
|
|
80326
80436
|
var onclosenexttick = function() {
|
|
80327
80437
|
if (cancelled) return;
|
|
80328
|
-
if (readable && !(rs && rs.ended && !rs.destroyed)) return callback.call(stream$3, new Error("premature close"));
|
|
80329
|
-
if (writable && !(ws && ws.ended && !ws.destroyed)) return callback.call(stream$3, new Error("premature close"));
|
|
80438
|
+
if (readable && !(rs && rs.ended && !rs.destroyed)) return callback.call(stream$3, /* @__PURE__ */ new Error("premature close"));
|
|
80439
|
+
if (writable && !(ws && ws.ended && !ws.destroyed)) return callback.call(stream$3, /* @__PURE__ */ new Error("premature close"));
|
|
80330
80440
|
};
|
|
80331
80441
|
var onrequest = function() {
|
|
80332
80442
|
stream$3.req.on("finish", onfinish);
|
|
@@ -80407,7 +80517,7 @@ var require_pump = __commonJS$1({ "node_modules/pump/index.js"(exports, module)
|
|
|
80407
80517
|
if (isFS(stream$3)) return stream$3.close(noop$4);
|
|
80408
80518
|
if (isRequest(stream$3)) return stream$3.abort();
|
|
80409
80519
|
if (isFn(stream$3.destroy)) return stream$3.destroy();
|
|
80410
|
-
callback(err || new Error("stream was destroyed"));
|
|
80520
|
+
callback(err || /* @__PURE__ */ new Error("stream was destroyed"));
|
|
80411
80521
|
};
|
|
80412
80522
|
};
|
|
80413
80523
|
var call = function(fn) {
|
|
@@ -80482,7 +80592,7 @@ var require_get_stream = __commonJS$1({ "node_modules/get-stream/index.js"(expor
|
|
|
80482
80592
|
}
|
|
80483
80593
|
};
|
|
80484
80594
|
async function getStream$1(inputStream, options) {
|
|
80485
|
-
if (!inputStream) return Promise.reject(new Error("Expected a stream"));
|
|
80595
|
+
if (!inputStream) return Promise.reject(/* @__PURE__ */ new Error("Expected a stream"));
|
|
80486
80596
|
options = {
|
|
80487
80597
|
maxBuffer: Infinity,
|
|
80488
80598
|
...options
|
|
@@ -80671,7 +80781,7 @@ var require_fd_slicer = __commonJS$1({ "node_modules/fd-slicer/index.js"(exports
|
|
|
80671
80781
|
};
|
|
80672
80782
|
ReadStream.prototype.destroy = function(err) {
|
|
80673
80783
|
if (this.destroyed) return;
|
|
80674
|
-
err = err || new Error("stream destroyed");
|
|
80784
|
+
err = err || /* @__PURE__ */ new Error("stream destroyed");
|
|
80675
80785
|
this.destroyed = true;
|
|
80676
80786
|
this.emit("error", err);
|
|
80677
80787
|
this.context.unref();
|
|
@@ -80693,7 +80803,7 @@ var require_fd_slicer = __commonJS$1({ "node_modules/fd-slicer/index.js"(exports
|
|
|
80693
80803
|
var self$1 = this;
|
|
80694
80804
|
if (self$1.destroyed) return;
|
|
80695
80805
|
if (self$1.pos + buffer.length > self$1.endOffset) {
|
|
80696
|
-
var err = new Error("maximum file length exceeded");
|
|
80806
|
+
var err = /* @__PURE__ */ new Error("maximum file length exceeded");
|
|
80697
80807
|
err.code = "ETOOBIG";
|
|
80698
80808
|
self$1.destroy();
|
|
80699
80809
|
callback(err);
|
|
@@ -80781,7 +80891,7 @@ var require_fd_slicer = __commonJS$1({ "node_modules/fd-slicer/index.js"(exports
|
|
|
80781
80891
|
if (writeStream.destroyed) return;
|
|
80782
80892
|
var end = writeStream.pos + buffer.length;
|
|
80783
80893
|
if (end > writeStream.endOffset) {
|
|
80784
|
-
var err = new Error("maximum file length exceeded");
|
|
80894
|
+
var err = /* @__PURE__ */ new Error("maximum file length exceeded");
|
|
80785
80895
|
err.code = "ETOOBIG";
|
|
80786
80896
|
writeStream.destroyed = true;
|
|
80787
80897
|
callback(err);
|
|
@@ -81207,24 +81317,24 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81207
81317
|
if (buffer.readUInt32LE(i$1) !== 101010256) continue;
|
|
81208
81318
|
var eocdrBuffer = buffer.slice(i$1);
|
|
81209
81319
|
var diskNumber = eocdrBuffer.readUInt16LE(4);
|
|
81210
|
-
if (diskNumber !== 0) return callback(new Error("multi-disk zip files are not supported: found disk number: " + diskNumber));
|
|
81320
|
+
if (diskNumber !== 0) return callback(/* @__PURE__ */ new Error("multi-disk zip files are not supported: found disk number: " + diskNumber));
|
|
81211
81321
|
var entryCount = eocdrBuffer.readUInt16LE(10);
|
|
81212
81322
|
var centralDirectoryOffset = eocdrBuffer.readUInt32LE(16);
|
|
81213
81323
|
var commentLength = eocdrBuffer.readUInt16LE(20);
|
|
81214
81324
|
var expectedCommentLength = eocdrBuffer.length - eocdrWithoutCommentSize;
|
|
81215
|
-
if (commentLength !== expectedCommentLength) return callback(new Error("invalid comment length. expected: " + expectedCommentLength + ". found: " + commentLength));
|
|
81325
|
+
if (commentLength !== expectedCommentLength) return callback(/* @__PURE__ */ new Error("invalid comment length. expected: " + expectedCommentLength + ". found: " + commentLength));
|
|
81216
81326
|
var comment = decodeStrings ? decodeBuffer(eocdrBuffer, 22, eocdrBuffer.length, false) : eocdrBuffer.slice(22);
|
|
81217
81327
|
if (!(entryCount === 65535 || centralDirectoryOffset === 4294967295)) return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options.autoClose, options.lazyEntries, decodeStrings, options.validateEntrySizes, options.strictFileNames));
|
|
81218
81328
|
var zip64EocdlBuffer = newBuffer(20);
|
|
81219
81329
|
var zip64EocdlOffset = bufferReadStart + i$1 - zip64EocdlBuffer.length;
|
|
81220
81330
|
readAndAssertNoEof(reader, zip64EocdlBuffer, 0, zip64EocdlBuffer.length, zip64EocdlOffset, function(err$1) {
|
|
81221
81331
|
if (err$1) return callback(err$1);
|
|
81222
|
-
if (zip64EocdlBuffer.readUInt32LE(0) !== 117853008) return callback(new Error("invalid zip64 end of central directory locator signature"));
|
|
81332
|
+
if (zip64EocdlBuffer.readUInt32LE(0) !== 117853008) return callback(/* @__PURE__ */ new Error("invalid zip64 end of central directory locator signature"));
|
|
81223
81333
|
var zip64EocdrOffset = readUInt64LE(zip64EocdlBuffer, 8);
|
|
81224
81334
|
var zip64EocdrBuffer = newBuffer(56);
|
|
81225
81335
|
readAndAssertNoEof(reader, zip64EocdrBuffer, 0, zip64EocdrBuffer.length, zip64EocdrOffset, function(err$2) {
|
|
81226
81336
|
if (err$2) return callback(err$2);
|
|
81227
|
-
if (zip64EocdrBuffer.readUInt32LE(0) !== 101075792) return callback(new Error("invalid zip64 end of central directory record signature"));
|
|
81337
|
+
if (zip64EocdrBuffer.readUInt32LE(0) !== 101075792) return callback(/* @__PURE__ */ new Error("invalid zip64 end of central directory record signature"));
|
|
81228
81338
|
entryCount = readUInt64LE(zip64EocdrBuffer, 32);
|
|
81229
81339
|
centralDirectoryOffset = readUInt64LE(zip64EocdrBuffer, 48);
|
|
81230
81340
|
return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options.autoClose, options.lazyEntries, decodeStrings, options.validateEntrySizes, options.strictFileNames));
|
|
@@ -81232,7 +81342,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81232
81342
|
});
|
|
81233
81343
|
return;
|
|
81234
81344
|
}
|
|
81235
|
-
callback(new Error("end of central directory record signature not found"));
|
|
81345
|
+
callback(/* @__PURE__ */ new Error("end of central directory record signature not found"));
|
|
81236
81346
|
});
|
|
81237
81347
|
}
|
|
81238
81348
|
util$2.inherits(ZipFile, EventEmitter$1);
|
|
@@ -81295,7 +81405,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81295
81405
|
if (self$1.emittedError) return;
|
|
81296
81406
|
var entry = new Entry();
|
|
81297
81407
|
var signature = buffer.readUInt32LE(0);
|
|
81298
|
-
if (signature !== 33639248) return emitErrorAndAutoClose(self$1, new Error("invalid central directory file header signature: 0x" + signature.toString(16)));
|
|
81408
|
+
if (signature !== 33639248) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("invalid central directory file header signature: 0x" + signature.toString(16)));
|
|
81299
81409
|
entry.versionMadeBy = buffer.readUInt16LE(4);
|
|
81300
81410
|
entry.versionNeededToExtract = buffer.readUInt16LE(6);
|
|
81301
81411
|
entry.generalPurposeBitFlag = buffer.readUInt16LE(8);
|
|
@@ -81311,7 +81421,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81311
81421
|
entry.internalFileAttributes = buffer.readUInt16LE(36);
|
|
81312
81422
|
entry.externalFileAttributes = buffer.readUInt32LE(38);
|
|
81313
81423
|
entry.relativeOffsetOfLocalHeader = buffer.readUInt32LE(42);
|
|
81314
|
-
if (entry.generalPurposeBitFlag & 64) return emitErrorAndAutoClose(self$1, new Error("strong encryption is not supported"));
|
|
81424
|
+
if (entry.generalPurposeBitFlag & 64) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("strong encryption is not supported"));
|
|
81315
81425
|
self$1.readEntryCursor += 46;
|
|
81316
81426
|
buffer = newBuffer(entry.fileNameLength + entry.extraFieldLength + entry.fileCommentLength);
|
|
81317
81427
|
readAndAssertNoEof(self$1.reader, buffer, 0, buffer.length, self$1.readEntryCursor, function(err$1) {
|
|
@@ -81328,7 +81438,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81328
81438
|
var dataSize = extraFieldBuffer.readUInt16LE(i$1 + 2);
|
|
81329
81439
|
var dataStart = i$1 + 4;
|
|
81330
81440
|
var dataEnd = dataStart + dataSize;
|
|
81331
|
-
if (dataEnd > extraFieldBuffer.length) return emitErrorAndAutoClose(self$1, new Error("extra field length exceeds extra field buffer size"));
|
|
81441
|
+
if (dataEnd > extraFieldBuffer.length) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("extra field length exceeds extra field buffer size"));
|
|
81332
81442
|
var dataBuffer = newBuffer(dataSize);
|
|
81333
81443
|
extraFieldBuffer.copy(dataBuffer, 0, dataStart, dataEnd);
|
|
81334
81444
|
entry.extraFields.push({
|
|
@@ -81350,20 +81460,20 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81350
81460
|
break;
|
|
81351
81461
|
}
|
|
81352
81462
|
}
|
|
81353
|
-
if (zip64EiefBuffer == null) return emitErrorAndAutoClose(self$1, new Error("expected zip64 extended information extra field"));
|
|
81463
|
+
if (zip64EiefBuffer == null) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("expected zip64 extended information extra field"));
|
|
81354
81464
|
var index = 0;
|
|
81355
81465
|
if (entry.uncompressedSize === 4294967295) {
|
|
81356
|
-
if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, new Error("zip64 extended information extra field does not include uncompressed size"));
|
|
81466
|
+
if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("zip64 extended information extra field does not include uncompressed size"));
|
|
81357
81467
|
entry.uncompressedSize = readUInt64LE(zip64EiefBuffer, index);
|
|
81358
81468
|
index += 8;
|
|
81359
81469
|
}
|
|
81360
81470
|
if (entry.compressedSize === 4294967295) {
|
|
81361
|
-
if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, new Error("zip64 extended information extra field does not include compressed size"));
|
|
81471
|
+
if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("zip64 extended information extra field does not include compressed size"));
|
|
81362
81472
|
entry.compressedSize = readUInt64LE(zip64EiefBuffer, index);
|
|
81363
81473
|
index += 8;
|
|
81364
81474
|
}
|
|
81365
81475
|
if (entry.relativeOffsetOfLocalHeader === 4294967295) {
|
|
81366
|
-
if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, new Error("zip64 extended information extra field does not include relative header offset"));
|
|
81476
|
+
if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("zip64 extended information extra field does not include relative header offset"));
|
|
81367
81477
|
entry.relativeOffsetOfLocalHeader = readUInt64LE(zip64EiefBuffer, index);
|
|
81368
81478
|
index += 8;
|
|
81369
81479
|
}
|
|
@@ -81432,9 +81542,9 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81432
81542
|
if (relativeEnd < relativeStart) throw new Error("options.end < options.start");
|
|
81433
81543
|
}
|
|
81434
81544
|
}
|
|
81435
|
-
if (!self$1.isOpen) return callback(new Error("closed"));
|
|
81545
|
+
if (!self$1.isOpen) return callback(/* @__PURE__ */ new Error("closed"));
|
|
81436
81546
|
if (entry.isEncrypted()) {
|
|
81437
|
-
if (options.decrypt !== false) return callback(new Error("entry is encrypted, and options.decrypt !== false"));
|
|
81547
|
+
if (options.decrypt !== false) return callback(/* @__PURE__ */ new Error("entry is encrypted, and options.decrypt !== false"));
|
|
81438
81548
|
}
|
|
81439
81549
|
self$1.reader.ref();
|
|
81440
81550
|
var buffer = newBuffer(30);
|
|
@@ -81442,18 +81552,18 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81442
81552
|
try {
|
|
81443
81553
|
if (err) return callback(err);
|
|
81444
81554
|
var signature = buffer.readUInt32LE(0);
|
|
81445
|
-
if (signature !== 67324752) return callback(new Error("invalid local file header signature: 0x" + signature.toString(16)));
|
|
81555
|
+
if (signature !== 67324752) return callback(/* @__PURE__ */ new Error("invalid local file header signature: 0x" + signature.toString(16)));
|
|
81446
81556
|
var fileNameLength = buffer.readUInt16LE(26);
|
|
81447
81557
|
var extraFieldLength = buffer.readUInt16LE(28);
|
|
81448
81558
|
var localFileHeaderEnd = entry.relativeOffsetOfLocalHeader + buffer.length + fileNameLength + extraFieldLength;
|
|
81449
81559
|
var decompress;
|
|
81450
81560
|
if (entry.compressionMethod === 0) decompress = false;
|
|
81451
81561
|
else if (entry.compressionMethod === 8) decompress = options.decompress != null ? options.decompress : true;
|
|
81452
|
-
else return callback(new Error("unsupported compression method: " + entry.compressionMethod));
|
|
81562
|
+
else return callback(/* @__PURE__ */ new Error("unsupported compression method: " + entry.compressionMethod));
|
|
81453
81563
|
var fileDataStart = localFileHeaderEnd;
|
|
81454
81564
|
var fileDataEnd = fileDataStart + entry.compressedSize;
|
|
81455
81565
|
if (entry.compressedSize !== 0) {
|
|
81456
|
-
if (fileDataEnd > self$1.fileSize) return callback(new Error("file data overflows file bounds: " + fileDataStart + " + " + entry.compressedSize + " > " + self$1.fileSize));
|
|
81566
|
+
if (fileDataEnd > self$1.fileSize) return callback(/* @__PURE__ */ new Error("file data overflows file bounds: " + fileDataStart + " + " + entry.compressedSize + " > " + self$1.fileSize));
|
|
81457
81567
|
}
|
|
81458
81568
|
var readStream = self$1.reader.createReadStream({
|
|
81459
81569
|
start: fileDataStart + relativeStart,
|
|
@@ -81523,7 +81633,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
|
|
|
81523
81633
|
});
|
|
81524
81634
|
reader.read(buffer, offset, length, position, function(err, bytesRead) {
|
|
81525
81635
|
if (err) return callback(err);
|
|
81526
|
-
if (bytesRead < length) return callback(new Error("unexpected EOF"));
|
|
81636
|
+
if (bytesRead < length) return callback(/* @__PURE__ */ new Error("unexpected EOF"));
|
|
81527
81637
|
callback();
|
|
81528
81638
|
});
|
|
81529
81639
|
}
|
|
@@ -82190,8 +82300,8 @@ var require_text_decoder = __commonJS$1({ "node_modules/text-decoder/index.js"(e
|
|
|
82190
82300
|
//#region node_modules/streamx/index.js
|
|
82191
82301
|
var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, module) {
|
|
82192
82302
|
const { EventEmitter } = require("events");
|
|
82193
|
-
const STREAM_DESTROYED = new Error("Stream was destroyed");
|
|
82194
|
-
const PREMATURE_CLOSE = new Error("Premature close");
|
|
82303
|
+
const STREAM_DESTROYED = /* @__PURE__ */ new Error("Stream was destroyed");
|
|
82304
|
+
const PREMATURE_CLOSE = /* @__PURE__ */ new Error("Premature close");
|
|
82195
82305
|
const FIFO$1 = require_fast_fifo();
|
|
82196
82306
|
const TextDecoder$1 = require_text_decoder();
|
|
82197
82307
|
const qmt = typeof queueMicrotask === "undefined" ? (fn) => global.process.nextTick(fn) : queueMicrotask;
|
|
@@ -82555,14 +82665,14 @@ var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, mo
|
|
|
82555
82665
|
if (stream$3 === this.to) {
|
|
82556
82666
|
this.to = null;
|
|
82557
82667
|
if (this.from !== null) {
|
|
82558
|
-
if ((this.from._duplexState & READ_DONE) === 0 || !this.pipeToFinished) this.from.destroy(this.error || new Error("Writable stream closed prematurely"));
|
|
82668
|
+
if ((this.from._duplexState & READ_DONE) === 0 || !this.pipeToFinished) this.from.destroy(this.error || /* @__PURE__ */ new Error("Writable stream closed prematurely"));
|
|
82559
82669
|
return;
|
|
82560
82670
|
}
|
|
82561
82671
|
}
|
|
82562
82672
|
if (stream$3 === this.from) {
|
|
82563
82673
|
this.from = null;
|
|
82564
82674
|
if (this.to !== null) {
|
|
82565
|
-
if ((stream$3._duplexState & READ_DONE) === 0) this.to.destroy(this.error || new Error("Readable stream closed before ending"));
|
|
82675
|
+
if ((stream$3._duplexState & READ_DONE) === 0) this.to.destroy(this.error || /* @__PURE__ */ new Error("Readable stream closed before ending"));
|
|
82566
82676
|
return;
|
|
82567
82677
|
}
|
|
82568
82678
|
}
|
|
@@ -83100,7 +83210,7 @@ var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, mo
|
|
|
83100
83210
|
}
|
|
83101
83211
|
function noop$3() {}
|
|
83102
83212
|
function abort() {
|
|
83103
|
-
this.destroy(new Error("Stream aborted."));
|
|
83213
|
+
this.destroy(/* @__PURE__ */ new Error("Stream aborted."));
|
|
83104
83214
|
}
|
|
83105
83215
|
function isWritev(s$2) {
|
|
83106
83216
|
return s$2._writev !== Writable$2.prototype._writev && s$2._writev !== Duplex.prototype._writev;
|
|
@@ -83236,7 +83346,7 @@ var require_headers = __commonJS$1({ "node_modules/tar-stream/headers.js"(export
|
|
|
83236
83346
|
uid,
|
|
83237
83347
|
gid,
|
|
83238
83348
|
size,
|
|
83239
|
-
mtime: new Date(1e3 * mtime),
|
|
83349
|
+
mtime: /* @__PURE__ */ new Date(1e3 * mtime),
|
|
83240
83350
|
type,
|
|
83241
83351
|
linkname,
|
|
83242
83352
|
uname,
|
|
@@ -83589,7 +83699,7 @@ var require_extract = __commonJS$1({ "node_modules/tar-stream/extract.js"(export
|
|
|
83589
83699
|
}
|
|
83590
83700
|
_final(cb) {
|
|
83591
83701
|
this._finished = this._missing === 0 && this._buffer.buffered === 0;
|
|
83592
|
-
cb(this._finished ? null : new Error("Unexpected end of data"));
|
|
83702
|
+
cb(this._finished ? null : /* @__PURE__ */ new Error("Unexpected end of data"));
|
|
83593
83703
|
}
|
|
83594
83704
|
_predestroy() {
|
|
83595
83705
|
this._continueWrite(null);
|
|
@@ -83762,8 +83872,8 @@ var require_pack = __commonJS$1({ "node_modules/tar-stream/pack.js"(exports, mod
|
|
|
83762
83872
|
const cb = this._openCallback;
|
|
83763
83873
|
this._openCallback = null;
|
|
83764
83874
|
if (cb === null) return;
|
|
83765
|
-
if (this._pack.destroying) return cb(new Error("pack stream destroyed"));
|
|
83766
|
-
if (this._pack._finalized) return cb(new Error("pack stream is already finalized"));
|
|
83875
|
+
if (this._pack.destroying) return cb(/* @__PURE__ */ new Error("pack stream destroyed"));
|
|
83876
|
+
if (this._pack._finalized) return cb(/* @__PURE__ */ new Error("pack stream is already finalized"));
|
|
83767
83877
|
this._pack._stream = this;
|
|
83768
83878
|
if (!this._isLinkname) this._pack._encode(this.header);
|
|
83769
83879
|
if (this._isVoid) {
|
|
@@ -83778,7 +83888,7 @@ var require_pack = __commonJS$1({ "node_modules/tar-stream/pack.js"(exports, mod
|
|
|
83778
83888
|
return cb(null);
|
|
83779
83889
|
}
|
|
83780
83890
|
if (this._isVoid) {
|
|
83781
|
-
if (data$1.byteLength > 0) return cb(new Error("No body allowed for this entry"));
|
|
83891
|
+
if (data$1.byteLength > 0) return cb(/* @__PURE__ */ new Error("No body allowed for this entry"));
|
|
83782
83892
|
return cb();
|
|
83783
83893
|
}
|
|
83784
83894
|
this.written += data$1.byteLength;
|
|
@@ -83796,12 +83906,12 @@ var require_pack = __commonJS$1({ "node_modules/tar-stream/pack.js"(exports, mod
|
|
|
83796
83906
|
this._pack._done(this);
|
|
83797
83907
|
}
|
|
83798
83908
|
_final(cb) {
|
|
83799
|
-
if (this.written !== this.header.size) return cb(new Error("Size mismatch"));
|
|
83909
|
+
if (this.written !== this.header.size) return cb(/* @__PURE__ */ new Error("Size mismatch"));
|
|
83800
83910
|
this._finish();
|
|
83801
83911
|
cb(null);
|
|
83802
83912
|
}
|
|
83803
83913
|
_getError() {
|
|
83804
|
-
return getStreamError(this) || new Error("tar entry destroyed");
|
|
83914
|
+
return getStreamError(this) || /* @__PURE__ */ new Error("tar entry destroyed");
|
|
83805
83915
|
}
|
|
83806
83916
|
_predestroy() {
|
|
83807
83917
|
this._pack.destroy(this._getError());
|
|
@@ -84018,7 +84128,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
|
|
|
84018
84128
|
}
|
|
84019
84129
|
header = map(header) || header;
|
|
84020
84130
|
if (!stat.isFile()) {
|
|
84021
|
-
if (strict) return pack$1.destroy(new Error("unsupported type for " + filename));
|
|
84131
|
+
if (strict) return pack$1.destroy(/* @__PURE__ */ new Error("unsupported type for " + filename));
|
|
84022
84132
|
return onnextentry();
|
|
84023
84133
|
}
|
|
84024
84134
|
const entry = pack$1.entry(header, onnextentry);
|
|
@@ -84085,7 +84195,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
|
|
|
84085
84195
|
const dir = path$4.join(name$3, ".") === path$4.join(cwd, ".") ? cwd : path$4.dirname(name$3);
|
|
84086
84196
|
validate(xfs, dir, path$4.join(cwd, "."), function(err, valid$2) {
|
|
84087
84197
|
if (err) return next(err);
|
|
84088
|
-
if (!valid$2) return next(new Error(dir + " is not a valid path"));
|
|
84198
|
+
if (!valid$2) return next(/* @__PURE__ */ new Error(dir + " is not a valid path"));
|
|
84089
84199
|
if (header.type === "directory") {
|
|
84090
84200
|
stack.push([name$3, header.mtime]);
|
|
84091
84201
|
return mkdirfix(name$3, {
|
|
@@ -84109,7 +84219,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
|
|
|
84109
84219
|
case "link": return onlink();
|
|
84110
84220
|
case "symlink": return onsymlink();
|
|
84111
84221
|
}
|
|
84112
|
-
if (strict) return next(new Error("unsupported type for " + name$3 + " (" + header.type + ")"));
|
|
84222
|
+
if (strict) return next(/* @__PURE__ */ new Error("unsupported type for " + name$3 + " (" + header.type + ")"));
|
|
84113
84223
|
stream$3.resume();
|
|
84114
84224
|
next();
|
|
84115
84225
|
});
|
|
@@ -84126,7 +84236,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
|
|
|
84126
84236
|
if (win32$1) return next();
|
|
84127
84237
|
xfs.unlink(name$3, function() {
|
|
84128
84238
|
const dst = path$4.resolve(path$4.dirname(name$3), header.linkname);
|
|
84129
|
-
if (!inCwd(dst)) return next(new Error(name$3 + " is not a valid symlink"));
|
|
84239
|
+
if (!inCwd(dst)) return next(/* @__PURE__ */ new Error(name$3 + " is not a valid symlink"));
|
|
84130
84240
|
xfs.symlink(header.linkname, name$3, stat);
|
|
84131
84241
|
});
|
|
84132
84242
|
}
|
|
@@ -84135,7 +84245,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
|
|
|
84135
84245
|
xfs.unlink(name$3, function() {
|
|
84136
84246
|
const link$1 = path$4.join(cwd, path$4.join("/", header.linkname));
|
|
84137
84247
|
fs$3.realpath(link$1, function(err, dst) {
|
|
84138
|
-
if (err || !inCwd(dst)) return next(new Error(name$3 + " is not a valid hardlink"));
|
|
84248
|
+
if (err || !inCwd(dst)) return next(/* @__PURE__ */ new Error(name$3 + " is not a valid hardlink"));
|
|
84139
84249
|
xfs.link(dst, name$3, function(err$1) {
|
|
84140
84250
|
if (err$1 && err$1.code === "EPERM" && opts.hardlinkAsFilesFallback) {
|
|
84141
84251
|
stream$3 = xfs.createReadStream(dst);
|
|
@@ -84335,9 +84445,9 @@ var require_bzip2 = __commonJS$1({ "node_modules/unbzip2-stream/lib/bzip2.js"(ex
|
|
|
84335
84445
|
function Bzip2Error(message$1) {
|
|
84336
84446
|
this.name = "Bzip2Error";
|
|
84337
84447
|
this.message = message$1;
|
|
84338
|
-
this.stack = new Error().stack;
|
|
84448
|
+
this.stack = (/* @__PURE__ */ new Error()).stack;
|
|
84339
84449
|
}
|
|
84340
|
-
Bzip2Error.prototype = new Error();
|
|
84450
|
+
Bzip2Error.prototype = /* @__PURE__ */ new Error();
|
|
84341
84451
|
var message = { Error: function(message$1) {
|
|
84342
84452
|
throw new Bzip2Error(message$1);
|
|
84343
84453
|
} };
|
|
@@ -84943,7 +85053,7 @@ var require_unbzip2_stream = __commonJS$1({ "node_modules/unbzip2-stream/index.j
|
|
|
84943
85053
|
}, function end(x$2) {
|
|
84944
85054
|
while (!broken && bitReader && hasBytes > bitReader.bytesRead) decompressAndQueue(this);
|
|
84945
85055
|
if (!broken) {
|
|
84946
|
-
if (streamCRC !== null) this.emit("error", new Error("input stream ended prematurely"));
|
|
85056
|
+
if (streamCRC !== null) this.emit("error", /* @__PURE__ */ new Error("input stream ended prematurely"));
|
|
84947
85057
|
this.queue(null);
|
|
84948
85058
|
}
|
|
84949
85059
|
});
|
|
@@ -85724,7 +85834,7 @@ var require_build$2 = __commonJS$1({ "node_modules/yargs-parser/build/index.cjs"
|
|
|
85724
85834
|
keys: []
|
|
85725
85835
|
};
|
|
85726
85836
|
const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/;
|
|
85727
|
-
const negatedBoolean = new RegExp("^--" + configuration["negation-prefix"] + "(.+)");
|
|
85837
|
+
const negatedBoolean = /* @__PURE__ */ new RegExp("^--" + configuration["negation-prefix"] + "(.+)");
|
|
85728
85838
|
[].concat(opts.array || []).filter(Boolean).forEach(function(opt) {
|
|
85729
85839
|
const key = typeof opt === "object" ? opt.key : opt;
|
|
85730
85840
|
const assignment = Object.keys(opt).map(function(key$1) {
|
|
@@ -88341,7 +88451,7 @@ var require_wrap_ansi = __commonJS$1({ "node_modules/wrap-ansi/index.js"(exports
|
|
|
88341
88451
|
for (const [index, character] of pre.entries()) {
|
|
88342
88452
|
returnValue += character;
|
|
88343
88453
|
if (ESCAPES.has(character)) {
|
|
88344
|
-
const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join("")) || { groups: {} };
|
|
88454
|
+
const { groups } = (/* @__PURE__ */ new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`)).exec(pre.slice(index).join("")) || { groups: {} };
|
|
88345
88455
|
if (groups.code !== void 0) {
|
|
88346
88456
|
const code$1 = Number.parseFloat(groups.code);
|
|
88347
88457
|
escapeCode = code$1 === END_CODE ? void 0 : code$1;
|
|
@@ -88620,7 +88730,7 @@ var require_get_caller_file = __commonJS$1({ "node_modules/get-caller-file/index
|
|
|
88620
88730
|
Error.prepareStackTrace = function(_$2, stack$1) {
|
|
88621
88731
|
return stack$1;
|
|
88622
88732
|
};
|
|
88623
|
-
var stack = new Error().stack;
|
|
88733
|
+
var stack = (/* @__PURE__ */ new Error()).stack;
|
|
88624
88734
|
Error.prepareStackTrace = oldPrepareStackTrace;
|
|
88625
88735
|
if (stack !== null && typeof stack === "object") return stack[position] ? stack[position].getFileName() : void 0;
|
|
88626
88736
|
};
|
|
@@ -91548,7 +91658,7 @@ var require_ChromeLauncher = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs
|
|
|
91548
91658
|
return options.filter((s$2) => {
|
|
91549
91659
|
return s$2.startsWith(flag.endsWith("=") ? flag : `${flag}=`);
|
|
91550
91660
|
}).map((s$2) => {
|
|
91551
|
-
return s$2.split(new RegExp(`${flag}=\\s*`))[1]?.trim();
|
|
91661
|
+
return s$2.split(/* @__PURE__ */ new RegExp(`${flag}=\\s*`))[1]?.trim();
|
|
91552
91662
|
}).filter((s$2) => {
|
|
91553
91663
|
return s$2;
|
|
91554
91664
|
});
|
|
@@ -91561,7 +91671,7 @@ var require_ChromeLauncher = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs
|
|
|
91561
91671
|
* @internal
|
|
91562
91672
|
*/
|
|
91563
91673
|
function removeMatchingFlags(array, flag) {
|
|
91564
|
-
const regex = new RegExp(`^${flag}=.*`);
|
|
91674
|
+
const regex = /* @__PURE__ */ new RegExp(`^${flag}=.*`);
|
|
91565
91675
|
let i$1 = 0;
|
|
91566
91676
|
while (i$1 < array.length) if (regex.test(array[i$1])) array.splice(i$1, 1);
|
|
91567
91677
|
else i$1++;
|
|
@@ -92200,31 +92310,31 @@ var require_darwin = __commonJS$1({ "node_modules/puppeteer-finder/lib/darwin.js
|
|
|
92200
92310
|
});
|
|
92201
92311
|
const priorities = [
|
|
92202
92312
|
{
|
|
92203
|
-
regex: new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge.app`),
|
|
92313
|
+
regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge.app`),
|
|
92204
92314
|
weight: 46
|
|
92205
92315
|
},
|
|
92206
92316
|
{
|
|
92207
|
-
regex: new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge Dev.app`),
|
|
92317
|
+
regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge Dev.app`),
|
|
92208
92318
|
weight: 47
|
|
92209
92319
|
},
|
|
92210
92320
|
{
|
|
92211
|
-
regex: new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge Canary.app`),
|
|
92321
|
+
regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge Canary.app`),
|
|
92212
92322
|
weight: 48
|
|
92213
92323
|
},
|
|
92214
92324
|
{
|
|
92215
|
-
regex: new RegExp(`^${process.env.HOME}/Applications/.*Chromium.app`),
|
|
92325
|
+
regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Chromium.app`),
|
|
92216
92326
|
weight: 49
|
|
92217
92327
|
},
|
|
92218
92328
|
{
|
|
92219
|
-
regex: new RegExp(`^${process.env.HOME}/Applications/.*Chrome.app`),
|
|
92329
|
+
regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Chrome.app`),
|
|
92220
92330
|
weight: 50
|
|
92221
92331
|
},
|
|
92222
92332
|
{
|
|
92223
|
-
regex: new RegExp(`^${process.env.HOME}/Applications/.*Chrome Dev.app`),
|
|
92333
|
+
regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Chrome Dev.app`),
|
|
92224
92334
|
weight: 51
|
|
92225
92335
|
},
|
|
92226
92336
|
{
|
|
92227
|
-
regex: new RegExp(`^${process.env.HOME}/Applications/.*Chrome Canary.app`),
|
|
92337
|
+
regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Chrome Canary.app`),
|
|
92228
92338
|
weight: 52
|
|
92229
92339
|
},
|
|
92230
92340
|
{
|
|
@@ -92397,8 +92507,8 @@ var require_lib$2 = __commonJS$1({ "node_modules/puppeteer-finder/lib/index.js"(
|
|
|
92397
92507
|
const win32_1 = __importDefault(require_win32());
|
|
92398
92508
|
const darwin_1 = __importDefault(require_darwin());
|
|
92399
92509
|
const linux_1 = __importDefault(require_linux());
|
|
92400
|
-
const ERROR_PLATFORM_NOT_SUPPORT = new Error("platform not support");
|
|
92401
|
-
const ERROR_NO_INSTALLATIONS_FOUND = new Error("no chrome installations found");
|
|
92510
|
+
const ERROR_PLATFORM_NOT_SUPPORT = /* @__PURE__ */ new Error("platform not support");
|
|
92511
|
+
const ERROR_NO_INSTALLATIONS_FOUND = /* @__PURE__ */ new Error("no chrome installations found");
|
|
92402
92512
|
function findChromes() {
|
|
92403
92513
|
switch (process.platform) {
|
|
92404
92514
|
case "win32": return (0, win32_1.default)();
|
|
@@ -94263,7 +94373,7 @@ var GenerateImg = class extends koishi.Service {
|
|
|
94263
94373
|
return parts.length > 0 ? `${sign}${parts.join("")}` : "0秒";
|
|
94264
94374
|
}
|
|
94265
94375
|
unixTimestampToString(timestamp) {
|
|
94266
|
-
const date = new Date(timestamp * 1e3);
|
|
94376
|
+
const date = /* @__PURE__ */ new Date(timestamp * 1e3);
|
|
94267
94377
|
const year = date.getFullYear();
|
|
94268
94378
|
const month = `0${date.getMonth() + 1}`.slice(-2);
|
|
94269
94379
|
const day = `0${date.getDate()}`.slice(-2);
|
|
@@ -94454,7 +94564,7 @@ var BiliAPI = class extends koishi.Service {
|
|
|
94454
94564
|
getMixinKey = (orig) => mixinKeyEncTab.map((n$2) => orig[n$2]).join("").slice(0, 32);
|
|
94455
94565
|
encWbi(params, img_key, sub_key) {
|
|
94456
94566
|
const mixin_key = this.getMixinKey(img_key + sub_key);
|
|
94457
|
-
const curr_time = Math.round(
|
|
94567
|
+
const curr_time = Math.round(luxon.DateTime.now().toSeconds() / 1e3);
|
|
94458
94568
|
const chr_filter = /[!'()*]/g;
|
|
94459
94569
|
Object.assign(params, { wts: curr_time });
|
|
94460
94570
|
const query = Object.keys(params).sort().map((key) => {
|
|
@@ -94627,7 +94737,7 @@ var BiliAPI = class extends koishi.Service {
|
|
|
94627
94737
|
* @returns {Promise<any>} Promise of the ticket response in JSON format
|
|
94628
94738
|
*/
|
|
94629
94739
|
async getBiliTicket(csrf) {
|
|
94630
|
-
const ts = Math.floor(
|
|
94740
|
+
const ts = Math.floor(luxon.DateTime.now().toSeconds() / 1e3);
|
|
94631
94741
|
const hexSign = this.hmacSha256("XgwSnGZ1p", `ts${ts}`);
|
|
94632
94742
|
const params = new URLSearchParams({
|
|
94633
94743
|
key_id: "ec02",
|
|
@@ -94658,8 +94768,16 @@ var BiliAPI = class extends koishi.Service {
|
|
|
94658
94768
|
}));
|
|
94659
94769
|
}
|
|
94660
94770
|
getCookies() {
|
|
94661
|
-
|
|
94662
|
-
|
|
94771
|
+
try {
|
|
94772
|
+
const cookies = this.jar.serializeSync().cookies.map((cookie) => {
|
|
94773
|
+
if (!cookie.expires) cookie.expires = "Infinity";
|
|
94774
|
+
return cookie;
|
|
94775
|
+
});
|
|
94776
|
+
return JSON.stringify(cookies);
|
|
94777
|
+
} catch (e$1) {
|
|
94778
|
+
console.error("获取cookies失败:", e$1);
|
|
94779
|
+
return void 0;
|
|
94780
|
+
}
|
|
94663
94781
|
}
|
|
94664
94782
|
async getCookiesForHeader() {
|
|
94665
94783
|
try {
|
|
@@ -94725,7 +94843,7 @@ var BiliAPI = class extends koishi.Service {
|
|
|
94725
94843
|
for (const cookieData of cookies) {
|
|
94726
94844
|
if (cookieData.key === "bili_jct") {
|
|
94727
94845
|
csrf = cookieData.value;
|
|
94728
|
-
expires =
|
|
94846
|
+
expires = cookieData.expires ? luxon.DateTime.fromISO(cookieData.expires).toJSDate() : "Infinity";
|
|
94729
94847
|
domain = cookieData.domain;
|
|
94730
94848
|
path$6 = cookieData.path;
|
|
94731
94849
|
secure = cookieData.secure;
|
|
@@ -94735,14 +94853,14 @@ var BiliAPI = class extends koishi.Service {
|
|
|
94735
94853
|
const cookie = new tough_cookie.Cookie({
|
|
94736
94854
|
key: cookieData.key,
|
|
94737
94855
|
value: cookieData.value,
|
|
94738
|
-
expires:
|
|
94856
|
+
expires: cookieData.expires ? luxon.DateTime.fromISO(cookieData.expires).toJSDate() : "Infinity",
|
|
94739
94857
|
domain: cookieData.domain,
|
|
94740
94858
|
path: cookieData.path,
|
|
94741
94859
|
secure: cookieData.secure,
|
|
94742
94860
|
httpOnly: cookieData.httpOnly,
|
|
94743
94861
|
sameSite: cookieData.sameSite
|
|
94744
94862
|
});
|
|
94745
|
-
this.jar.setCookieSync(cookie, `http${cookie.secure ? "s" : ""}://${cookie.domain}${cookie.path}
|
|
94863
|
+
this.jar.setCookieSync(cookie, `http${cookie.secure ? "s" : ""}://${cookie.domain}${cookie.path}`);
|
|
94746
94864
|
}
|
|
94747
94865
|
const buvid3Cookie = new tough_cookie.Cookie({
|
|
94748
94866
|
key: "buvid3",
|
|
@@ -94754,7 +94872,7 @@ var BiliAPI = class extends koishi.Service {
|
|
|
94754
94872
|
httpOnly,
|
|
94755
94873
|
sameSite
|
|
94756
94874
|
});
|
|
94757
|
-
this.jar.setCookieSync(buvid3Cookie, `http${buvid3Cookie.secure ? "s" : ""}://${buvid3Cookie.domain}${buvid3Cookie.path}
|
|
94875
|
+
this.jar.setCookieSync(buvid3Cookie, `http${buvid3Cookie.secure ? "s" : ""}://${buvid3Cookie.domain}${buvid3Cookie.path}`);
|
|
94758
94876
|
this.loginInfoIsLoaded = true;
|
|
94759
94877
|
this.checkIfTokenNeedRefresh(refresh_token, csrf);
|
|
94760
94878
|
this.enableRefreshCookiesDetect();
|
|
@@ -94801,7 +94919,7 @@ var BiliAPI = class extends koishi.Service {
|
|
|
94801
94919
|
const encrypted = new Uint8Array(await node_crypto.default.subtle.encrypt({ name: "RSA-OAEP" }, publicKey, data$1));
|
|
94802
94920
|
return encrypted.reduce((str, c$1) => str + c$1.toString(16).padStart(2, "0"), "");
|
|
94803
94921
|
}
|
|
94804
|
-
const ts =
|
|
94922
|
+
const ts = luxon.DateTime.now().toSeconds();
|
|
94805
94923
|
const correspondPath = await getCorrespondPath(ts);
|
|
94806
94924
|
const { data: refreshCsrfHtml } = await this.client.get(`https://www.bilibili.com/correspond/1/${correspondPath}`);
|
|
94807
94925
|
const { document: document$1 } = new jsdom.JSDOM(refreshCsrfHtml).window;
|
|
@@ -95139,85 +95257,7 @@ function apply(ctx, config) {
|
|
|
95139
95257
|
return next();
|
|
95140
95258
|
});
|
|
95141
95259
|
}
|
|
95142
|
-
const Config =
|
|
95143
|
-
require: koishi.Schema.object({}).description("必填设置"),
|
|
95144
|
-
key: koishi.Schema.string().pattern(/^[0-9a-f]{32}$/).role("secret").required().description("请输入一个32位小写字母的十六进制密钥(例如:9b8db7ae562b9864efefe06289cc5530),使用此密钥将你的B站登录信息存储在数据库中,请一定保存好此密钥。如果你忘记了此密钥,必须重新登录。你可以自行生成,或到这个网站生成:https://www.sexauth.com/"),
|
|
95145
|
-
master: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启主人账号功能,如果您的机器人没有私聊权限请不要开启此功能。开启后如果机器人运行错误会向您进行报告") }).description("主人账号"), koishi.Schema.union([koishi.Schema.object({
|
|
95146
|
-
enable: koishi.Schema.const(true).required(),
|
|
95147
|
-
platform: koishi.Schema.union([
|
|
95148
|
-
"qq",
|
|
95149
|
-
"qqguild",
|
|
95150
|
-
"onebot",
|
|
95151
|
-
"discord",
|
|
95152
|
-
"red",
|
|
95153
|
-
"telegram",
|
|
95154
|
-
"satori",
|
|
95155
|
-
"chronocat",
|
|
95156
|
-
"lark"
|
|
95157
|
-
]).description("请选择您的私人机器人平台,目前支持QQ、QQ群、OneBot、Discord、RedBot、Telegram、Satori、ChronoCat、Lark。从2.0版本开始,只能在一个平台下使用本插件"),
|
|
95158
|
-
masterAccount: koishi.Schema.string().role("secret").required().description("主人账号,在Q群使用可直接使用QQ号,若在其他平台使用,请使用inspect插件获取自身ID"),
|
|
95159
|
-
masterAccountGuildId: koishi.Schema.string().role("secret").description("主人账号所在的群组ID,只有在QQ频道、Discord这样的环境才需要填写,请使用inspect插件获取群组ID")
|
|
95160
|
-
}), koishi.Schema.object({})])]),
|
|
95161
|
-
basicSettings: koishi.Schema.object({}).description("基本设置"),
|
|
95162
|
-
userAgent: koishi.Schema.string().description("设置请求头User-Agen,请求出现-352时可以尝试修改,UA获取方法可参考:https://blog.csdn.net/qq_44503987/article/details/104929111"),
|
|
95163
|
-
subTitle: koishi.Schema.object({}).description("订阅配置"),
|
|
95164
|
-
sub: koishi.Schema.array(koishi.Schema.object({
|
|
95165
|
-
name: koishi.Schema.string().description("订阅用户昵称,只是给你自己看的(相当于备注),可填可不填"),
|
|
95166
|
-
uid: koishi.Schema.string().required().description("订阅用户UID"),
|
|
95167
|
-
dynamic: koishi.Schema.boolean().default(false).description("是否订阅用户动态"),
|
|
95168
|
-
live: koishi.Schema.boolean().default(false).description("是否订阅用户直播"),
|
|
95169
|
-
target: koishi.Schema.array(koishi.Schema.object({
|
|
95170
|
-
platform: koishi.Schema.string().required().description("推送平台,例如onebot、qq、discord"),
|
|
95171
|
-
channelArr: koishi.Schema.array(koishi.Schema.object({
|
|
95172
|
-
channelId: koishi.Schema.string().required().description("频道/群组号"),
|
|
95173
|
-
dynamic: koishi.Schema.boolean().default(false).description("该频道/群组是否推送动态信息"),
|
|
95174
|
-
live: koishi.Schema.boolean().default(false).description("该频道/群组是否推送直播通知"),
|
|
95175
|
-
liveGuardBuy: koishi.Schema.boolean().default(false).description("该频道/群组是否推送上舰消息"),
|
|
95176
|
-
atAll: koishi.Schema.boolean().default(false).description("推送开播通知时是否艾特全体成员"),
|
|
95177
|
-
bot: koishi.Schema.string().description("若您有多个相同平台机器人,可在此填写当前群聊执行推送的机器人账号。不填则默认第一个")
|
|
95178
|
-
})).role("table").required().description("需推送的频道/群组详细设置")
|
|
95179
|
-
})).description("订阅用户需要发送的平台和频道/群组信息(一个平台下可以推送多个频道/群组)"),
|
|
95180
|
-
card: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启自定义卡片颜色") }), koishi.Schema.union([koishi.Schema.object({
|
|
95181
|
-
enable: koishi.Schema.const(true).required(),
|
|
95182
|
-
cardColorStart: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片的开始渐变背景色,请填入16进制颜色代码,参考网站:https://webkul.github.io/coolhue/"),
|
|
95183
|
-
cardColorEnd: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/"),
|
|
95184
|
-
cardBasePlateColor: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片底板颜色,请填入16进制颜色代码"),
|
|
95185
|
-
cardBasePlateBorder: koishi.Schema.string().pattern(/\d*\.?\d+(?:px|em|rem|%|vh|vw|vmin|vmax)/).description("推送卡片底板边框宽度,请填入css单位,例如1px,12.5rem,100%")
|
|
95186
|
-
}), koishi.Schema.object({})])])
|
|
95187
|
-
}).collapse()).collapse().description("输入订阅信息,自定义订阅内容; uid: 订阅用户UID,dynamic: 是否需要订阅动态,live: 是否需要订阅直播"),
|
|
95188
|
-
dynamic: koishi.Schema.object({}).description("动态推送设置"),
|
|
95189
|
-
dynamicUrl: koishi.Schema.boolean().default(false).description("发送动态时是否同时发送链接。注意:如果使用的是QQ官方机器人不能开启此项!"),
|
|
95190
|
-
dynamicCron: koishi.Schema.string().default("*/2 * * * *").description("动态监测时间,请填入cron表达式,请勿填入过短时间"),
|
|
95191
|
-
dynamicVideoUrlToBV: koishi.Schema.boolean().default(false).description("如果推送的动态是视频动态,且开启了发送链接选项,开启此选项则会将链接转换为BV号以便其他用途"),
|
|
95192
|
-
pushImgsInDynamic: koishi.Schema.boolean().default(false).description("是否推送动态中的图片,默认不开启。开启后会单独推送动态中的图片,该功能容易导致QQ风控"),
|
|
95193
|
-
live: koishi.Schema.object({}).description("直播推送设置"),
|
|
95194
|
-
liveDetectType: koishi.Schema.union([koishi.Schema.const("WS").description("使用WebSocket连接到B站消息服务器进行直播检测,推荐使用"), koishi.Schema.const("API").description("通过轮询API发送请求监测直播状态,此模式理论可无限订阅,但容易产生其他问题,功能没有WS模式全面").experimental()]).role("radio").default("WS").description("直播检测方式,WS为连接到B站消息服务器,API为通过轮询发送请求监测,默认使用WS检测"),
|
|
95195
|
-
restartPush: koishi.Schema.boolean().default(true).description("插件重启后,如果订阅的主播正在直播,是否进行一次推送,默认开启"),
|
|
95196
|
-
pushTime: koishi.Schema.number().min(0).max(12).step(.5).default(1).description("设定间隔多长时间推送一次直播状态,单位为小时,默认为一小时"),
|
|
95197
|
-
customLiveStart: koishi.Schema.string().default("-name开播啦,当前粉丝数:-follower\\n-link").description("自定义开播提示语,-name代表UP昵称,-follower代表当前粉丝数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name开播啦,会发送为xxxUP开播啦"),
|
|
95198
|
-
customLive: koishi.Schema.string().default("-name正在直播,目前已播-time,累计观看人数:-watched\\n-link").description("自定义直播中提示语,-name代表UP昵称,-time代表开播时长,-watched代表累计观看人数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name正在直播,会发送为xxxUP正在直播xxx"),
|
|
95199
|
-
customLiveEnd: koishi.Schema.string().default("-name下播啦,本次直播了-time,粉丝数变化-follower_change").description("自定义下播提示语,-name代表UP昵称,-follower_change代表本场直播粉丝数变,-time代表开播时长,\\n为换行。例如-name下播啦,本次直播了-time,会发送为xxxUP下播啦,直播时长为xx小时xx分钟xx秒"),
|
|
95200
|
-
followerDisplay: koishi.Schema.boolean().default(true).description("粉丝数变化和累积观看本场直播的人数是否显示在推送卡片中"),
|
|
95201
|
-
hideDesc: koishi.Schema.boolean().default(false).description("是否隐藏UP主直播间简介,开启后推送的直播卡片将不再展示简介"),
|
|
95202
|
-
style: koishi.Schema.object({}).description("美化设置"),
|
|
95203
|
-
removeBorder: koishi.Schema.boolean().default(false).description("移除推送卡片边框"),
|
|
95204
|
-
cardColorStart: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#F38AB5").description("推送卡片的开始渐变背景色,请填入16进制颜色代码,参考网站:https://webkul.github.io/coolhue/"),
|
|
95205
|
-
cardColorEnd: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#F9CCDF").description("推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/"),
|
|
95206
|
-
cardBasePlateColor: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#FFF5EE").description("推送卡片底板颜色,请填入16进制颜色代码"),
|
|
95207
|
-
cardBasePlateBorder: koishi.Schema.string().pattern(/\d*\.?\d+(?:px|em|rem|%|vh|vw|vmin|vmax)/).default("15px").description("推送卡片底板边框宽度,请填入css单位,例如1px,12.5rem,100%"),
|
|
95208
|
-
enableLargeFont: koishi.Schema.boolean().default(false).description("是否开启动态推送卡片大字体模式,默认为小字体。小字体更漂亮,但阅读比较吃力,大字体更易阅读,但相对没这么好看"),
|
|
95209
|
-
font: koishi.Schema.string().description("推送卡片的字体样式,如果你想用你自己的字体可以在此填写,例如:Microsoft YaHei"),
|
|
95210
|
-
filter: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启动态屏蔽功能") }).description("屏蔽设置"), koishi.Schema.union([koishi.Schema.object({
|
|
95211
|
-
enable: koishi.Schema.const(true).required().experimental(),
|
|
95212
|
-
notify: koishi.Schema.boolean().default(false).description("动态被屏蔽是否发送提示"),
|
|
95213
|
-
regex: koishi.Schema.string().description("正则表达式屏蔽"),
|
|
95214
|
-
keywords: koishi.Schema.array(String).description("关键字屏蔽,一个关键字为一项"),
|
|
95215
|
-
forward: koishi.Schema.boolean().default(false).description("是否屏蔽转发动态"),
|
|
95216
|
-
article: koishi.Schema.boolean().default(false).description("是否屏蔽专栏")
|
|
95217
|
-
}), koishi.Schema.object({})])]),
|
|
95218
|
-
debug: koishi.Schema.object({}).description("调试设置"),
|
|
95219
|
-
dynamicDebugMode: koishi.Schema.boolean().default(false).description("动态调试模式,开启后会在控制台输出动态推送的详细信息,用于调试")
|
|
95220
|
-
});
|
|
95260
|
+
const Config = BAConfigSchema;
|
|
95221
95261
|
|
|
95222
95262
|
//#endregion
|
|
95223
95263
|
exports.Config = Config;
|