llonebot-dist 7.10.0 → 7.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/llbot.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as path from "node:path";
2
2
  import path__default, { resolve, dirname } from "node:path";
3
- import fsPromise, { writeFile, stat, unlink, copyFile, readFile, access, mkdir } from "node:fs/promises";
3
+ import fsPromise, { writeFile, stat, unlink, mkdir, copyFile, readFile, access } from "node:fs/promises";
4
4
  import require$$0$9, { existsSync as existsSync$1 } from "fs";
5
5
  import require$$0$6 from "util";
6
6
  import require$$0$5 from "stream";
@@ -5895,6 +5895,24 @@ var require_index$1 = __commonJS$1({
5895
5895
  }, "Schema");
5896
5896
  Schema.prototype = Object.create(Function.prototype);
5897
5897
  Schema.prototype[kSchema] = true;
5898
+ Object.defineProperty(Schema.prototype, "~standard", {
5899
+ get() {
5900
+ return {
5901
+ version: 1,
5902
+ vendor: "schemastery",
5903
+ validate: /* @__PURE__ */ __name$8((value) => {
5904
+ try {
5905
+ return { value: Schema.resolve(value, this, {})[0] };
5906
+ } catch (error2) {
5907
+ if (ValidationError.is(error2)) {
5908
+ return { issues: [{ message: error2.message, path: error2.options.path }] };
5909
+ }
5910
+ throw error2;
5911
+ }
5912
+ }, "validate")
5913
+ };
5914
+ }
5915
+ });
5898
5916
  Schema.ValidationError = ValidationError;
5899
5917
  Schema.prototype.toJSON = /* @__PURE__ */ __name$8(function toJSON() {
5900
5918
  if (globalThis.__schemastery_refs__) {
@@ -9197,6 +9215,9 @@ function extractOrientation(exifBlock, isBigEndian) {
9197
9215
  return;
9198
9216
  }
9199
9217
  const block = exifBlock.slice(start, end);
9218
+ if (block.length < IDF_ENTRY_BYTES) {
9219
+ return;
9220
+ }
9200
9221
  const tagNumber = readUInt(block, 16, 0, isBigEndian);
9201
9222
  if (tagNumber === 274) {
9202
9223
  const dataFormat = readUInt(block, 16, 2, isBigEndian);
@@ -10397,7 +10418,7 @@ function isNumeric(str) {
10397
10418
  }
10398
10419
  function calcQQLevel(level) {
10399
10420
  const { penguinNum, crownNum, sunNum, moonNum, starNum } = level;
10400
- return (penguinNum || 0) * 256 + crownNum * 64 + sunNum * 16 + moonNum * 4 + starNum;
10421
+ return (penguinNum ?? 0) * 256 + crownNum * 64 + sunNum * 16 + moonNum * 4 + starNum;
10401
10422
  }
10402
10423
  function mergeNewProperties(newObj, oldObj) {
10403
10424
  Object.keys(newObj).forEach((key2) => {
@@ -11797,7 +11818,7 @@ class WebUITokenUtil {
11797
11818
  }
11798
11819
  const webuiTokenUtil = new WebUITokenUtil(path__default.join(DATA_DIR, "webui_token.txt"));
11799
11820
  const logFileName = `llbot-${(/* @__PURE__ */ new Date()).toLocaleString("zh-CN")}.log`.replace(/\//g, "-").replace(/:/g, "-");
11800
- const version$3 = "7.10.0";
11821
+ const version$3 = "7.10.1";
11801
11822
  var utils$4 = { exports: {} };
11802
11823
  var windows;
11803
11824
  var hasRequiredWindows;
@@ -16045,7 +16066,7 @@ function UserMixin(Base) {
16045
16066
  });
16046
16067
  const res = await this.httpSendPB("MQUpdateSvc_com_qq_ti.web.OidbSvc.0xdef_1", body);
16047
16068
  const { json: json2 } = Action.FetchUserLoginDaysResp.decode(Buffer.from(res.pb, "hex"));
16048
- return JSON.parse(json2).msg_rsp_basic_info.rpt_msg_basic_info.find((e) => e.uint64_uin === uin)?.uint32_login_days || 0;
16069
+ return JSON.parse(json2).msg_rsp_basic_info.rpt_msg_basic_info.find((e) => e.uint64_uin === uin)?.uint32_login_days ?? 0;
16049
16070
  }
16050
16071
  };
16051
16072
  }
@@ -16852,9 +16873,10 @@ class OB11GroupRequestAddEvent extends OB11BaseNoticeEvent {
16852
16873
  post_type = EventType.REQUEST;
16853
16874
  request_type = "group";
16854
16875
  sub_type;
16876
+ group_id;
16877
+ user_id;
16855
16878
  comment;
16856
16879
  flag;
16857
- group_id;
16858
16880
  // 当有 invitor_id 时表示有邀请人
16859
16881
  invitor_id;
16860
16882
  // https://github.com/Mrs4s/go-cqhttp/blob/master/coolq/event.go#L566
@@ -16873,18 +16895,20 @@ class OB11GroupRequestInviteBotEvent extends OB11BaseNoticeEvent {
16873
16895
  request_type = "group";
16874
16896
  sub_type;
16875
16897
  // invite 为邀请 bot 进群
16876
- comment;
16877
- flag;
16878
16898
  group_id;
16879
16899
  user_id;
16880
16900
  // 当 sub_type 为 invite 的时候, user_id 为邀请人的 QQ 号
16881
- constructor(groupId, userId, flag, comment) {
16901
+ comment;
16902
+ flag;
16903
+ source_group_id;
16904
+ constructor(groupId, userId, flag, comment, sourceGroupId) {
16882
16905
  super();
16883
16906
  this.group_id = groupId;
16884
16907
  this.user_id = userId;
16885
16908
  this.comment = comment;
16886
16909
  this.flag = flag;
16887
16910
  this.sub_type = "invite";
16911
+ this.source_group_id = sourceGroupId;
16888
16912
  }
16889
16913
  }
16890
16914
  var OB11Entities;
@@ -17363,7 +17387,7 @@ var OB11Entities;
17363
17387
  id: element.fileElement.fileUuid,
17364
17388
  name: element.fileElement.fileName,
17365
17389
  size: +element.fileElement.fileSize,
17366
- busid: element.fileElement.fileBizId || 0
17390
+ busid: element.fileElement.fileBizId ?? 0
17367
17391
  });
17368
17392
  } else if (element.grayTipElement) {
17369
17393
  const grayTipElement = element.grayTipElement;
@@ -33587,6 +33611,7 @@ var SendElement;
33587
33611
  }
33588
33612
  const thumbDir = path__default.dirname(path2.replaceAll("\\", "/").replace(`/Ori/`, `/Thumb/`));
33589
33613
  const thumbFilePath = path__default.join(thumbDir, `${md5}_0.png`);
33614
+ await mkdir(thumbDir, { recursive: true });
33590
33615
  if (diyThumbPath) {
33591
33616
  await copyFile(diyThumbPath, thumbFilePath);
33592
33617
  } else {
@@ -33874,8 +33899,8 @@ async function createSendElements(ctx, messageData, peer, ignoreTypes = []) {
33874
33899
  const res = await SendElement.pic(
33875
33900
  ctx,
33876
33901
  (await handleOb11RichMedia(ctx, segment, deleteAfterSentFiles)).path,
33877
- segment.data.summary || "",
33878
- segment.data.subType || 0,
33902
+ segment.data.summary ?? "",
33903
+ Number(segment.data.subType) || 0,
33879
33904
  segment.data.type === "flash"
33880
33905
  );
33881
33906
  deleteAfterSentFiles.push(res.picElement.sourcePath);
@@ -34615,6 +34640,7 @@ var ActionName = /* @__PURE__ */ ((ActionName2) => {
34615
34640
  ActionName2["SetGroupMsgMask"] = "set_group_msg_mask";
34616
34641
  ActionName2["SetGroupRemark"] = "set_group_remark";
34617
34642
  ActionName2["MoveGroupFile"] = "move_group_file";
34643
+ ActionName2["RenameGroupFile"] = "rename_group_file";
34618
34644
  ActionName2["SetGroupFileForever"] = "set_group_file_forever";
34619
34645
  ActionName2["GetGroupShutList"] = "get_group_shut_list";
34620
34646
  ActionName2["RenameGroupFileFolder"] = "rename_group_file_folder";
@@ -36683,11 +36709,7 @@ class GetProfileLikeMe extends BaseAction {
36683
36709
  }
36684
36710
  const users = ret.info.userLikeInfos[0].voteInfo.userInfos;
36685
36711
  for (const item of users) {
36686
- try {
36687
- item.uin = Number(await this.ctx.ntUserApi.getUinByUid(item.uid)) || 0;
36688
- } catch (e) {
36689
- item.uin = 0;
36690
- }
36712
+ item.uin = Number(await this.ctx.ntUserApi.getUinByUid(item.uid));
36691
36713
  }
36692
36714
  return { users, nextStart: ret.info.start };
36693
36715
  }
@@ -37249,11 +37271,7 @@ class GetProfileLike extends BaseAction {
37249
37271
  }
37250
37272
  const users = ret.info.userLikeInfos[0].favoriteInfo.userInfos;
37251
37273
  for (const item of users) {
37252
- try {
37253
- item.uin = Number(await this.ctx.ntUserApi.getUinByUid(item.uid)) || 0;
37254
- } catch (e) {
37255
- item.uin = 0;
37256
- }
37274
+ item.uin = Number(await this.ctx.ntUserApi.getUinByUid(item.uid));
37257
37275
  }
37258
37276
  return { users, nextStart: ret.info.start };
37259
37277
  }
@@ -37306,6 +37324,23 @@ let MoveGroupFile$1 = class MoveGroupFile extends BaseAction {
37306
37324
  return null;
37307
37325
  }
37308
37326
  };
37327
+ let RenameGroupFile$1 = class RenameGroupFile extends BaseAction {
37328
+ actionName = ActionName.RenameGroupFile;
37329
+ payloadSchema = z$2.object({
37330
+ group_id: z$2.union([Number, String]).required(),
37331
+ file_id: z$2.string().required(),
37332
+ current_parent_directory: z$2.string().required(),
37333
+ new_name: z$2.string().required()
37334
+ });
37335
+ async _handle(payload) {
37336
+ const groupId = payload.group_id.toString();
37337
+ const res = await this.ctx.ntGroupApi.renameGroupFile(groupId, payload.file_id, payload.current_parent_directory, payload.new_name);
37338
+ if (res.renameGroupFileResult.result.retCode !== 0) {
37339
+ throw new Error(res.renameGroupFileResult.result.clientWording);
37340
+ }
37341
+ return null;
37342
+ }
37343
+ };
37309
37344
  class GetGroupShutList extends BaseAction {
37310
37345
  actionName = ActionName.GetGroupShutList;
37311
37346
  payloadSchema = z$2.object({
@@ -37858,6 +37893,7 @@ function initActionMap(adapter) {
37858
37893
  new SetGroupMsgMask(adapter),
37859
37894
  new SetGroupRemark(adapter),
37860
37895
  new MoveGroupFile$1(adapter),
37896
+ new RenameGroupFile$1(adapter),
37861
37897
  new GetGroupShutList(adapter),
37862
37898
  new RenameGroupFileFolder(adapter),
37863
37899
  new GetRecommendFace(adapter),
@@ -38092,10 +38128,14 @@ class OneBot11Adapter extends Service2 {
38092
38128
  this.config = config2;
38093
38129
  this.actionMap = initActionMap(this);
38094
38130
  this.reportOfflineMessage = false;
38131
+ this.reportSelfMessage = false;
38095
38132
  this.connect = config2.connect.map((item) => {
38096
38133
  if (item.reportOfflineMessage) {
38097
38134
  this.reportOfflineMessage = true;
38098
38135
  }
38136
+ if (item.reportSelfMessage) {
38137
+ this.reportSelfMessage = true;
38138
+ }
38099
38139
  if (item.type === "http") {
38100
38140
  return new OB11Http(ctx, {
38101
38141
  ...item,
@@ -38133,6 +38173,7 @@ class OneBot11Adapter extends Service2 {
38133
38173
  connect;
38134
38174
  actionMap;
38135
38175
  reportOfflineMessage;
38176
+ reportSelfMessage;
38136
38177
  dispatch(event) {
38137
38178
  for (const item of this.connect) {
38138
38179
  item.emitEvent(event);
@@ -38151,7 +38192,7 @@ class OneBot11Adapter extends Service2 {
38151
38192
  const requestUin = await this.ctx.ntUserApi.getUinByUid(notify.user1.uid);
38152
38193
  const event = new OB11GroupRequestAddEvent(
38153
38194
  +notify.group.groupCode,
38154
- +requestUin || 0,
38195
+ +requestUin,
38155
38196
  flag,
38156
38197
  notify.postscript
38157
38198
  );
@@ -38162,9 +38203,10 @@ class OneBot11Adapter extends Service2 {
38162
38203
  this.ctx.logger.info("收到邀请我加群通知, 邀请人uin:", userId);
38163
38204
  const event = new OB11GroupRequestInviteBotEvent(
38164
38205
  +notify.group.groupCode,
38165
- +userId || 0,
38206
+ +userId,
38166
38207
  flag,
38167
- notify.postscript
38208
+ notify.postscript,
38209
+ +notify.invitationExt.groupCode
38168
38210
  );
38169
38211
  this.dispatch(event);
38170
38212
  } else if (notify.type === GroupNotifyType.InvitedNeedAdminiStratorPass && notify.status === GroupNotifyStatus.Unhandle) {
@@ -38173,10 +38215,10 @@ class OneBot11Adapter extends Service2 {
38173
38215
  const invitorId = await this.ctx.ntUserApi.getUinByUid(notify.user2.uid);
38174
38216
  const event = new OB11GroupRequestAddEvent(
38175
38217
  +notify.group.groupCode,
38176
- +userId || 0,
38218
+ +userId,
38177
38219
  flag,
38178
38220
  notify.postscript,
38179
- +invitorId || 0
38221
+ +invitorId
38180
38222
  );
38181
38223
  this.dispatch(event);
38182
38224
  }
@@ -38188,6 +38230,9 @@ class OneBot11Adapter extends Service2 {
38188
38230
  if (offline && !this.reportOfflineMessage) {
38189
38231
  return;
38190
38232
  }
38233
+ if (self2 && !this.reportSelfMessage) {
38234
+ return;
38235
+ }
38191
38236
  OB11Entities.message(this.ctx, message).then((msg) => {
38192
38237
  if (!msg) {
38193
38238
  return;
@@ -38281,10 +38326,14 @@ class OneBot11Adapter extends Service2 {
38281
38326
  }
38282
38327
  if (config2.ob11.enable) {
38283
38328
  this.reportOfflineMessage = false;
38329
+ this.reportSelfMessage = false;
38284
38330
  this.connect = config2.ob11.connect.map((item) => {
38285
38331
  if (item.reportOfflineMessage) {
38286
38332
  this.reportOfflineMessage = true;
38287
38333
  }
38334
+ if (item.reportSelfMessage) {
38335
+ this.reportSelfMessage = true;
38336
+ }
38288
38337
  if (item.type === "http") {
38289
38338
  return new OB11Http(this.ctx, {
38290
38339
  ...item,
@@ -54892,7 +54941,8 @@ const GroupInvitedJoinRequestEvent = object({
54892
54941
  const GroupInvitationEvent = object({
54893
54942
  group_id: ZUin.describe("群号"),
54894
54943
  invitation_seq: ZInt64.describe("邀请序列号"),
54895
- initiator_id: ZUin.describe("邀请者 QQ 号")
54944
+ initiator_id: ZUin.describe("邀请者 QQ 号"),
54945
+ source_group_id: ZUin.nullish().describe("来源群号,如果是通过 QQ 群邀请")
54896
54946
  });
54897
54947
  const FriendNudgeEvent = object({
54898
54948
  user_id: ZUin.describe("好友 QQ 号"),
@@ -55094,7 +55144,7 @@ discriminatedUnion("event_type", [
55094
55144
  data: GroupFileUploadEvent
55095
55145
  }).describe("群文件上传事件")
55096
55146
  ]).describe("事件");
55097
- var version$1 = "1.2.0-rc.2";
55147
+ var version$1 = "1.2.0-rc.3";
55098
55148
  const milkyPackageVersion = version$1;
55099
55149
  const milkyVersion = milkyPackageVersion.split(".").slice(0, 2).join(".");
55100
55150
  const CachedApiBase = object({ no_cache: ZBooleanWithDefault(false).describe("是否强制不使用缓存") });
@@ -55849,7 +55899,7 @@ async function transformOutgoingMessage(ctx, segments2, peerUid, isGroup = false
55849
55899
  peerUid,
55850
55900
  guildId: ""
55851
55901
  };
55852
- const source2 = await ctx.ntMsgApi.getMsgsBySeqAndCount(peer, replyMsgSeq, 1, true, true);
55902
+ const source2 = await ctx.ntMsgApi.getSingleMsg(peer, replyMsgSeq);
55853
55903
  if (source2.msgList.length === 0) {
55854
55904
  throw new Error("被回复的消息未找到");
55855
55905
  }
@@ -56567,6 +56617,7 @@ function normalizeProcessEntities(value) {
56567
56617
  maxExpansionDepth: 10,
56568
56618
  maxTotalExpansions: 1e3,
56569
56619
  maxExpandedLength: 1e5,
56620
+ maxEntityCount: 100,
56570
56621
  allowedTags: null,
56571
56622
  tagFilter: null
56572
56623
  };
@@ -56579,6 +56630,7 @@ function normalizeProcessEntities(value) {
56579
56630
  maxExpansionDepth: value.maxExpansionDepth ?? 10,
56580
56631
  maxTotalExpansions: value.maxTotalExpansions ?? 1e3,
56581
56632
  maxExpandedLength: value.maxExpandedLength ?? 1e5,
56633
+ maxEntityCount: value.maxEntityCount ?? 100,
56582
56634
  allowedTags: value.allowedTags ?? null,
56583
56635
  tagFilter: value.tagFilter ?? null
56584
56636
  };
@@ -56629,6 +56681,7 @@ class DocTypeReader {
56629
56681
  }
56630
56682
  readDocType(xmlData, i) {
56631
56683
  const entities = /* @__PURE__ */ Object.create(null);
56684
+ let entityCount = 0;
56632
56685
  if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") {
56633
56686
  i = i + 9;
56634
56687
  let angleBracketsCount = 1;
@@ -56641,11 +56694,17 @@ class DocTypeReader {
56641
56694
  let entityName, val;
56642
56695
  [entityName, val, i] = this.readEntityExp(xmlData, i + 1, this.suppressValidationErr);
56643
56696
  if (val.indexOf("&") === -1) {
56697
+ if (this.options.enabled !== false && this.options.maxEntityCount && entityCount >= this.options.maxEntityCount) {
56698
+ throw new Error(
56699
+ `Entity count (${entityCount + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`
56700
+ );
56701
+ }
56644
56702
  const escaped = entityName.replace(/[.\-+*:]/g, "\\.");
56645
56703
  entities[entityName] = {
56646
56704
  regx: RegExp(`&${escaped};`, "g"),
56647
56705
  val
56648
56706
  };
56707
+ entityCount++;
56649
56708
  }
56650
56709
  } else if (hasBody && hasSeq(xmlData, "!ELEMENT", i)) {
56651
56710
  i += 8;
@@ -59187,7 +59246,7 @@ const MoveGroupFile2 = defineApi(
59187
59246
  return Ok({});
59188
59247
  }
59189
59248
  );
59190
- const RenameGroupFile = defineApi(
59249
+ const RenameGroupFile2 = defineApi(
59191
59250
  "rename_group_file",
59192
59251
  RenameGroupFileInput,
59193
59252
  z.object({}),
@@ -59274,7 +59333,7 @@ const FileApi = [
59274
59333
  GetGroupFileDownloadUrl,
59275
59334
  GetGroupFiles,
59276
59335
  MoveGroupFile2,
59277
- RenameGroupFile,
59336
+ RenameGroupFile2,
59278
59337
  DeleteGroupFile2,
59279
59338
  CreateGroupFolder,
59280
59339
  RenameGroupFolder,
@@ -59400,7 +59459,8 @@ async function transformGroupNotify(ctx, notify, doubt) {
59400
59459
  data: {
59401
59460
  group_id: Number(notify.group.groupCode),
59402
59461
  invitation_seq: Number(notify.seq),
59403
- initiator_id: Number(await ctx.ntUserApi.getUinByUid(notify.user2.uid))
59462
+ initiator_id: Number(await ctx.ntUserApi.getUinByUid(notify.user2.uid)),
59463
+ source_group_id: Number(notify.invitationExt.groupCode)
59404
59464
  }
59405
59465
  };
59406
59466
  } else {
@@ -72308,7 +72368,9 @@ function requireRemoveUploadedFiles() {
72308
72368
  errors2.push(err);
72309
72369
  }
72310
72370
  if (idx < length - 1) {
72311
- handleFile(idx + 1);
72371
+ setImmediate(function() {
72372
+ handleFile(idx + 1);
72373
+ });
72312
72374
  } else {
72313
72375
  cb(null, errors2);
72314
72376
  }
@@ -72356,6 +72418,12 @@ function requireMakeMiddleware() {
72356
72418
  var pendingWrites = new Counter();
72357
72419
  var uploadedFiles = [];
72358
72420
  function done(err) {
72421
+ var called = false;
72422
+ function onFinished2() {
72423
+ if (called) return;
72424
+ called = true;
72425
+ next(err);
72426
+ }
72359
72427
  if (isDone) return;
72360
72428
  isDone = true;
72361
72429
  if (busboy) {
@@ -72366,15 +72434,21 @@ function requireMakeMiddleware() {
72366
72434
  }
72367
72435
  drainStream(req);
72368
72436
  req.resume();
72437
+ if (err && req.readable && !req.destroyed) {
72438
+ req.once("end", onFinished2);
72439
+ req.once("error", onFinished2);
72440
+ req.once("close", onFinished2);
72441
+ return;
72442
+ }
72369
72443
  next(err);
72370
72444
  }
72371
72445
  function indicateDone() {
72372
72446
  if (readFinished && pendingWrites.isZero() && !errorOccured) done();
72373
72447
  }
72374
- function abortWithError(uploadError) {
72448
+ function abortWithError(uploadError, skipPendingWait) {
72375
72449
  if (errorOccured) return;
72376
72450
  errorOccured = true;
72377
- pendingWrites.onceZero(function() {
72451
+ function finishAbort() {
72378
72452
  function remove2(file2, cb) {
72379
72453
  storage._removeFile(req, file2, cb);
72380
72454
  }
@@ -72383,15 +72457,23 @@ function requireMakeMiddleware() {
72383
72457
  uploadError.storageErrors = storageErrors;
72384
72458
  done(uploadError);
72385
72459
  });
72386
- });
72460
+ }
72461
+ if (skipPendingWait) {
72462
+ finishAbort();
72463
+ } else {
72464
+ pendingWrites.onceZero(finishAbort);
72465
+ }
72387
72466
  }
72388
72467
  function abortWithCode(code, optionalField) {
72389
72468
  abortWithError(new MulterError(code, optionalField));
72390
72469
  }
72391
72470
  function handleRequestFailure(err) {
72392
72471
  if (isDone) return;
72393
- if (busboy) busboy.destroy(err);
72394
- abortWithError(err);
72472
+ if (busboy) {
72473
+ req.unpipe(busboy);
72474
+ busboy.destroy(err);
72475
+ }
72476
+ abortWithError(err, true);
72395
72477
  }
72396
72478
  req.on("error", function(err) {
72397
72479
  handleRequestFailure(err || new Error("Request error"));
@@ -76098,6 +76180,13 @@ function serializeResult(result) {
76098
76180
  }
76099
76181
  return result;
76100
76182
  }
76183
+ function isDockerEnvironment() {
76184
+ try {
76185
+ return existsSync$1("/.dockerenv");
76186
+ } catch {
76187
+ return false;
76188
+ }
76189
+ }
76101
76190
  function isListenAllInterfaces(host) {
76102
76191
  return !host || host === "0.0.0.0" || host === "::";
76103
76192
  }
@@ -76123,16 +76212,19 @@ function createConfigRoutes(ctx) {
76123
76212
  const router2 = expressExports.Router();
76124
76213
  router2.get("/network-interfaces", (req, res) => {
76125
76214
  try {
76215
+ const isDocker = isDockerEnvironment();
76126
76216
  const interfaces = networkInterfaces();
76127
76217
  const addresses = [];
76128
- for (const name2 in interfaces) {
76129
- for (const iface of interfaces[name2] || []) {
76130
- if (iface.family === "IPv4" && !iface.internal) {
76131
- addresses.push(iface.address);
76218
+ if (!isDocker) {
76219
+ for (const name2 in interfaces) {
76220
+ for (const iface of interfaces[name2] || []) {
76221
+ if (iface.family === "IPv4" && !iface.internal) {
76222
+ addresses.push(iface.address);
76223
+ }
76132
76224
  }
76133
76225
  }
76134
76226
  }
76135
- res.json({ success: true, data: addresses });
76227
+ res.json({ success: true, data: addresses, isDocker });
76136
76228
  } catch (e) {
76137
76229
  res.status(500).json({ success: false, message: "获取网卡列表失败", error: e });
76138
76230
  }
@@ -77468,7 +77560,7 @@ function requireCookies() {
77468
77560
  return cookies;
77469
77561
  }
77470
77562
  const name = "nodemailer";
77471
- const version = "8.0.1";
77563
+ const version = "8.0.2";
77472
77564
  const homepage = "https://nodemailer.com/";
77473
77565
  const require$$10 = {
77474
77566
  name,
@@ -81686,6 +81778,14 @@ function requireAddressparser() {
81686
81778
  parsedAddresses = parsedAddresses.concat(address2);
81687
81779
  }
81688
81780
  });
81781
+ for (let i = parsedAddresses.length - 2; i >= 0; i--) {
81782
+ let current = parsedAddresses[i];
81783
+ let next = parsedAddresses[i + 1];
81784
+ if (current.address === "" && current.name && !current.group && next.address && next.name && !next.group) {
81785
+ next.name = current.name + ", " + next.name;
81786
+ parsedAddresses.splice(i, 1);
81787
+ }
81788
+ }
81689
81789
  if (options.flatten) {
81690
81790
  let addresses2 = [];
81691
81791
  let walkAddressList = (list) => {
@@ -88833,7 +88933,7 @@ class EmailNotificationService extends Service2 {
88833
88933
  }
88834
88934
  }
88835
88935
  registerPmhqDisconnectCallback() {
88836
- this.pmhqDisconnectId = pmhq.onDisconnect(6e4, (duration2) => {
88936
+ this.pmhqDisconnectId = pmhq.onDisconnect(1e4, (duration2) => {
88837
88937
  if (!this.notificationSent && this.hasLoggedIn) {
88838
88938
  this.ctx.logger.warn(`[EmailNotification] PMHQ disconnected for ${duration2}ms`);
88839
88939
  this.onOffline("可能 QQ 已经有点死了");
@@ -88881,13 +88981,6 @@ class EmailNotificationService extends Service2 {
88881
88981
  return this.configManager;
88882
88982
  }
88883
88983
  }
88884
- function isDockerEnvironment() {
88885
- try {
88886
- return existsSync$1("/.dockerenv");
88887
- } catch {
88888
- return false;
88889
- }
88890
- }
88891
88984
  process.on("uncaughtException", (err) => {
88892
88985
  console.error("[uncaughtException]", err?.message || err);
88893
88986
  });