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