apple-mail-mcp 2.17.1 → 2.17.2
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/build/index.js +277 -178
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -23342,9 +23342,9 @@ var require_pino = __commonJS({
|
|
|
23342
23342
|
}
|
|
23343
23343
|
});
|
|
23344
23344
|
|
|
23345
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
23345
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/logger.js
|
|
23346
23346
|
var require_logger = __commonJS({
|
|
23347
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
23347
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/logger.js"(exports, module) {
|
|
23348
23348
|
"use strict";
|
|
23349
23349
|
var logger = require_pino()();
|
|
23350
23350
|
logger.level = "trace";
|
|
@@ -48700,9 +48700,9 @@ var require_mailsplit = __commonJS({
|
|
|
48700
48700
|
}
|
|
48701
48701
|
});
|
|
48702
48702
|
|
|
48703
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
48703
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/limited-passthrough.js
|
|
48704
48704
|
var require_limited_passthrough = __commonJS({
|
|
48705
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
48705
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/limited-passthrough.js"(exports, module) {
|
|
48706
48706
|
"use strict";
|
|
48707
48707
|
var { Transform } = __require("stream");
|
|
48708
48708
|
var normalizeByteLimit = (value) => {
|
|
@@ -48741,9 +48741,9 @@ var require_limited_passthrough = __commonJS({
|
|
|
48741
48741
|
}
|
|
48742
48742
|
});
|
|
48743
48743
|
|
|
48744
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
48744
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/limits.js
|
|
48745
48745
|
var require_limits = __commonJS({
|
|
48746
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
48746
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/limits.js"(exports, module) {
|
|
48747
48747
|
"use strict";
|
|
48748
48748
|
var MAX_LITERAL_SIZE = 1024 * 1024 * 1024;
|
|
48749
48749
|
var MAX_LINE_SIZE = MAX_LITERAL_SIZE;
|
|
@@ -48760,9 +48760,9 @@ var require_limits = __commonJS({
|
|
|
48760
48760
|
}
|
|
48761
48761
|
});
|
|
48762
48762
|
|
|
48763
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
48763
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/imap-stream.js
|
|
48764
48764
|
var require_imap_stream = __commonJS({
|
|
48765
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
48765
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/imap-stream.js"(exports, module) {
|
|
48766
48766
|
"use strict";
|
|
48767
48767
|
var Transform = __require("stream").Transform;
|
|
48768
48768
|
var logger = require_logger();
|
|
@@ -49163,9 +49163,9 @@ var require_imap_stream = __commonJS({
|
|
|
49163
49163
|
}
|
|
49164
49164
|
});
|
|
49165
49165
|
|
|
49166
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
49166
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/imap-formal-syntax.js
|
|
49167
49167
|
var require_imap_formal_syntax = __commonJS({
|
|
49168
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
49168
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/imap-formal-syntax.js"(exports, module) {
|
|
49169
49169
|
"use strict";
|
|
49170
49170
|
function expandRange(start, end) {
|
|
49171
49171
|
let chars = [];
|
|
@@ -49309,9 +49309,9 @@ var require_imap_formal_syntax = __commonJS({
|
|
|
49309
49309
|
}
|
|
49310
49310
|
});
|
|
49311
49311
|
|
|
49312
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
49312
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/token-parser.js
|
|
49313
49313
|
var require_token_parser = __commonJS({
|
|
49314
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
49314
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/token-parser.js"(exports, module) {
|
|
49315
49315
|
"use strict";
|
|
49316
49316
|
var imapFormalSyntax = require_imap_formal_syntax();
|
|
49317
49317
|
var { MAX_LITERAL_SIZE, normalizeLimit, createLiteralTooLargeError } = require_limits();
|
|
@@ -49878,9 +49878,9 @@ var require_token_parser = __commonJS({
|
|
|
49878
49878
|
}
|
|
49879
49879
|
});
|
|
49880
49880
|
|
|
49881
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
49881
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/parser-instance.js
|
|
49882
49882
|
var require_parser_instance = __commonJS({
|
|
49883
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
49883
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/parser-instance.js"(exports, module) {
|
|
49884
49884
|
"use strict";
|
|
49885
49885
|
var imapFormalSyntax = require_imap_formal_syntax();
|
|
49886
49886
|
var { TokenParser } = require_token_parser();
|
|
@@ -50074,9 +50074,9 @@ var require_parser_instance = __commonJS({
|
|
|
50074
50074
|
}
|
|
50075
50075
|
});
|
|
50076
50076
|
|
|
50077
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
50077
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/imap-parser.js
|
|
50078
50078
|
var require_imap_parser = __commonJS({
|
|
50079
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
50079
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/imap-parser.js"(exports, module) {
|
|
50080
50080
|
"use strict";
|
|
50081
50081
|
var imapFormalSyntax = require_imap_formal_syntax();
|
|
50082
50082
|
var { ParserInstance } = require_parser_instance();
|
|
@@ -50134,9 +50134,9 @@ var require_imap_parser = __commonJS({
|
|
|
50134
50134
|
}
|
|
50135
50135
|
});
|
|
50136
50136
|
|
|
50137
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
50137
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/imap-compiler.js
|
|
50138
50138
|
var require_imap_compiler = __commonJS({
|
|
50139
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
50139
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/imap-compiler.js"(exports, module) {
|
|
50140
50140
|
"use strict";
|
|
50141
50141
|
var imapFormalSyntax = require_imap_formal_syntax();
|
|
50142
50142
|
var SEQ_RANGE = /^(\d+|\*)(:(\d+|\*))?$/;
|
|
@@ -50324,9 +50324,9 @@ var require_imap_compiler = __commonJS({
|
|
|
50324
50324
|
}
|
|
50325
50325
|
});
|
|
50326
50326
|
|
|
50327
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
50327
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/imap-handler.js
|
|
50328
50328
|
var require_imap_handler = __commonJS({
|
|
50329
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
50329
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/handler/imap-handler.js"(exports, module) {
|
|
50330
50330
|
"use strict";
|
|
50331
50331
|
var parser = require_imap_parser();
|
|
50332
50332
|
var compiler = require_imap_compiler();
|
|
@@ -50337,12 +50337,12 @@ var require_imap_handler = __commonJS({
|
|
|
50337
50337
|
}
|
|
50338
50338
|
});
|
|
50339
50339
|
|
|
50340
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
50340
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/package.json
|
|
50341
50341
|
var require_package4 = __commonJS({
|
|
50342
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
50342
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/package.json"(exports, module) {
|
|
50343
50343
|
module.exports = {
|
|
50344
50344
|
name: "imapflow",
|
|
50345
|
-
version: "1.7.
|
|
50345
|
+
version: "1.7.1",
|
|
50346
50346
|
description: "IMAP Client for Node",
|
|
50347
50347
|
main: "lib/imap-flow.js",
|
|
50348
50348
|
types: "lib/imap-flow.d.ts",
|
|
@@ -50372,9 +50372,9 @@ var require_package4 = __commonJS({
|
|
|
50372
50372
|
homepage: "https://imapflow.com/",
|
|
50373
50373
|
devDependencies: {
|
|
50374
50374
|
"@eslint/js": "10.0.1",
|
|
50375
|
-
"@types/node": "26.
|
|
50375
|
+
"@types/node": "26.2.0",
|
|
50376
50376
|
c8: "12.0.0",
|
|
50377
|
-
eslint: "10.8.
|
|
50377
|
+
eslint: "10.8.1",
|
|
50378
50378
|
"eslint-config-nodemailer": "1.2.0",
|
|
50379
50379
|
"eslint-config-prettier": "10.1.8",
|
|
50380
50380
|
grunt: "1.6.3",
|
|
@@ -54688,9 +54688,9 @@ var require_build = __commonJS({
|
|
|
54688
54688
|
}
|
|
54689
54689
|
});
|
|
54690
54690
|
|
|
54691
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
54691
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/connection-deadline.js
|
|
54692
54692
|
var require_connection_deadline = __commonJS({
|
|
54693
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
54693
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/connection-deadline.js"(exports, module) {
|
|
54694
54694
|
"use strict";
|
|
54695
54695
|
var CONNECT_TIMEOUT = 90 * 1e3;
|
|
54696
54696
|
var ConnectionDeadline = class {
|
|
@@ -54771,9 +54771,9 @@ var require_connection_deadline = __commonJS({
|
|
|
54771
54771
|
}
|
|
54772
54772
|
});
|
|
54773
54773
|
|
|
54774
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
54774
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/proxy-connection.js
|
|
54775
54775
|
var require_proxy_connection = __commonJS({
|
|
54776
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
54776
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/proxy-connection.js"(exports, module) {
|
|
54777
54777
|
"use strict";
|
|
54778
54778
|
var { SocksClient } = require_build();
|
|
54779
54779
|
var dns = __require("dns").promises;
|
|
@@ -54807,8 +54807,9 @@ var require_proxy_connection = __commonJS({
|
|
|
54807
54807
|
}
|
|
54808
54808
|
};
|
|
54809
54809
|
var stripProxyCredentials = (err) => {
|
|
54810
|
-
if (err && typeof err === "object"
|
|
54810
|
+
if (err && typeof err === "object") {
|
|
54811
54811
|
delete err.options;
|
|
54812
|
+
delete err.input;
|
|
54812
54813
|
}
|
|
54813
54814
|
return err;
|
|
54814
54815
|
};
|
|
@@ -55012,7 +55013,12 @@ var require_proxy_connection = __commonJS({
|
|
|
55012
55013
|
options = options || {};
|
|
55013
55014
|
let deadline = options.deadline || new ConnectionDeadline(options.connectionTimeout);
|
|
55014
55015
|
deadline.check();
|
|
55015
|
-
let proxyUrl
|
|
55016
|
+
let proxyUrl;
|
|
55017
|
+
try {
|
|
55018
|
+
proxyUrl = new URL(connectionUrl);
|
|
55019
|
+
} catch (err) {
|
|
55020
|
+
throw proxyError("Invalid proxy URL", err.code || "ERR_INVALID_URL");
|
|
55021
|
+
}
|
|
55016
55022
|
let protocol = proxyUrl.protocol.replace(/:$/, "").toLowerCase();
|
|
55017
55023
|
let proxyHost = unbracketAddress(proxyUrl.hostname);
|
|
55018
55024
|
switch (protocol) {
|
|
@@ -55050,9 +55056,9 @@ var require_proxy_connection = __commonJS({
|
|
|
55050
55056
|
}
|
|
55051
55057
|
});
|
|
55052
55058
|
|
|
55053
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
55059
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/charsets.js
|
|
55054
55060
|
var require_charsets2 = __commonJS({
|
|
55055
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
55061
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/charsets.js"(exports, module) {
|
|
55056
55062
|
"use strict";
|
|
55057
55063
|
var CHARACTER_SETS = [
|
|
55058
55064
|
"US-ASCII",
|
|
@@ -55329,9 +55335,9 @@ var require_charsets2 = __commonJS({
|
|
|
55329
55335
|
}
|
|
55330
55336
|
});
|
|
55331
55337
|
|
|
55332
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
55338
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/jp-decoder.js
|
|
55333
55339
|
var require_jp_decoder = __commonJS({
|
|
55334
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
55340
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/jp-decoder.js"(exports, module) {
|
|
55335
55341
|
"use strict";
|
|
55336
55342
|
var { Transform } = __require("stream");
|
|
55337
55343
|
var encodingJapanese = require_src();
|
|
@@ -55395,9 +55401,9 @@ var require_jp_decoder = __commonJS({
|
|
|
55395
55401
|
}
|
|
55396
55402
|
});
|
|
55397
55403
|
|
|
55398
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
55404
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/tools.js
|
|
55399
55405
|
var require_tools2 = __commonJS({
|
|
55400
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
55406
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/tools.js"(exports, module) {
|
|
55401
55407
|
"use strict";
|
|
55402
55408
|
var libmime = require_libmime();
|
|
55403
55409
|
var { resolveCharset } = require_charsets2();
|
|
@@ -55406,6 +55412,7 @@ var require_tools2 = __commonJS({
|
|
|
55406
55412
|
var { JPDecoder } = require_jp_decoder();
|
|
55407
55413
|
var iconv = require_lib();
|
|
55408
55414
|
var FLAG_COLORS = ["red", "orange", "yellow", "green", "blue", "purple", "grey"];
|
|
55415
|
+
var CONNECTION_GONE_CODES = /* @__PURE__ */ new Set(["NoConnection", "EConnectionClosed", "StateLogout"]);
|
|
55409
55416
|
var EXPANDED_RANGE_LIMIT = 16777216;
|
|
55410
55417
|
var MAX_UINT32_DIGITS = 10;
|
|
55411
55418
|
var MAX_NUMBER64_DIGITS = 19;
|
|
@@ -55445,6 +55452,31 @@ var require_tools2 = __commonJS({
|
|
|
55445
55452
|
}
|
|
55446
55453
|
return timer;
|
|
55447
55454
|
},
|
|
55455
|
+
/**
|
|
55456
|
+
* Logs a failure from background connection work at the level its cause deserves.
|
|
55457
|
+
*
|
|
55458
|
+
* Background work (IDLE sessions, polling timers, auto-IDLE) is interrupted by every normal
|
|
55459
|
+
* disconnect, so a rejection carrying one of the CONNECTION_GONE_CODES is expected rather
|
|
55460
|
+
* than notable and goes to debug. The three codes describe the same situation reached
|
|
55461
|
+
* through different guards: write() throws NoConnection or StateLogout, exec() rejects
|
|
55462
|
+
* EConnectionClosed for the window where the socket is destroyed but close() has not run
|
|
55463
|
+
* yet, and close() rejects pending requests with NoConnection.
|
|
55464
|
+
*
|
|
55465
|
+
* A connection error carrying `reason` is the exception. That field holds the server's
|
|
55466
|
+
* untagged BYE text ("Too many simultaneous connections", "Account is disabled"), which
|
|
55467
|
+
* serverBye() only records - this log call is the one place it becomes visible, and it is
|
|
55468
|
+
* usually the answer to why a client is reconnecting in a loop. Those stay at warn.
|
|
55469
|
+
*
|
|
55470
|
+
* Shared so the classification cannot drift between the call sites that make this decision.
|
|
55471
|
+
*
|
|
55472
|
+
* @param {Object} connection - IMAP connection instance
|
|
55473
|
+
* @param {String} msg - What failed, so the entries stay distinguishable in the log
|
|
55474
|
+
* @param {Error} err - The error to log
|
|
55475
|
+
*/
|
|
55476
|
+
logConnectionError(connection, msg, err) {
|
|
55477
|
+
let routine = !!err && CONNECTION_GONE_CODES.has(err.code) && !err.reason;
|
|
55478
|
+
connection.log[routine ? "debug" : "warn"]({ msg, err, cid: connection.id });
|
|
55479
|
+
},
|
|
55448
55480
|
/**
|
|
55449
55481
|
* Checks whether IMAP4rev2 semantics are active for the connection: either the
|
|
55450
55482
|
* client enabled IMAP4rev2 explicitly, or the server is rev2-only (advertises
|
|
@@ -56471,9 +56503,9 @@ var require_tools2 = __commonJS({
|
|
|
56471
56503
|
}
|
|
56472
56504
|
});
|
|
56473
56505
|
|
|
56474
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
56506
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/id.js
|
|
56475
56507
|
var require_id2 = __commonJS({
|
|
56476
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
56508
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/id.js"(exports, module) {
|
|
56477
56509
|
"use strict";
|
|
56478
56510
|
var { formatDateTime } = require_tools2();
|
|
56479
56511
|
module.exports = async (connection, clientInfo) => {
|
|
@@ -56523,9 +56555,9 @@ var require_id2 = __commonJS({
|
|
|
56523
56555
|
}
|
|
56524
56556
|
});
|
|
56525
56557
|
|
|
56526
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
56558
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/capability.js
|
|
56527
56559
|
var require_capability = __commonJS({
|
|
56528
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
56560
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/capability.js"(exports, module) {
|
|
56529
56561
|
"use strict";
|
|
56530
56562
|
module.exports = async (connection) => {
|
|
56531
56563
|
if (connection.capabilities.size && !connection.expectCapabilityUpdate) {
|
|
@@ -56544,9 +56576,9 @@ var require_capability = __commonJS({
|
|
|
56544
56576
|
}
|
|
56545
56577
|
});
|
|
56546
56578
|
|
|
56547
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
56579
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/namespace.js
|
|
56548
56580
|
var require_namespace = __commonJS({
|
|
56549
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
56581
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/namespace.js"(exports, module) {
|
|
56550
56582
|
"use strict";
|
|
56551
56583
|
var { hasCapability, getStringList } = require_tools2();
|
|
56552
56584
|
module.exports = async (connection) => {
|
|
@@ -56652,9 +56684,9 @@ var require_namespace = __commonJS({
|
|
|
56652
56684
|
}
|
|
56653
56685
|
});
|
|
56654
56686
|
|
|
56655
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
56687
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/login.js
|
|
56656
56688
|
var require_login = __commonJS({
|
|
56657
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
56689
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/login.js"(exports, module) {
|
|
56658
56690
|
"use strict";
|
|
56659
56691
|
var { getStatusCode, getErrorText } = require_tools2();
|
|
56660
56692
|
module.exports = async (connection, username, password) => {
|
|
@@ -56683,9 +56715,9 @@ var require_login = __commonJS({
|
|
|
56683
56715
|
}
|
|
56684
56716
|
});
|
|
56685
56717
|
|
|
56686
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
56718
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/logout.js
|
|
56687
56719
|
var require_logout = __commonJS({
|
|
56688
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
56720
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/logout.js"(exports, module) {
|
|
56689
56721
|
"use strict";
|
|
56690
56722
|
module.exports = async (connection) => {
|
|
56691
56723
|
if (connection.state === connection.states.LOGOUT) {
|
|
@@ -56717,9 +56749,9 @@ var require_logout = __commonJS({
|
|
|
56717
56749
|
}
|
|
56718
56750
|
});
|
|
56719
56751
|
|
|
56720
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
56752
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/starttls.js
|
|
56721
56753
|
var require_starttls = __commonJS({
|
|
56722
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
56754
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/starttls.js"(exports, module) {
|
|
56723
56755
|
"use strict";
|
|
56724
56756
|
module.exports = async (connection) => {
|
|
56725
56757
|
if (!connection.capabilities.has("STARTTLS") || connection.secureConnection) {
|
|
@@ -56739,9 +56771,9 @@ var require_starttls = __commonJS({
|
|
|
56739
56771
|
}
|
|
56740
56772
|
});
|
|
56741
56773
|
|
|
56742
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
56774
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/status-fields.js
|
|
56743
56775
|
var require_status_fields = __commonJS({
|
|
56744
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
56776
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/status-fields.js"(exports, module) {
|
|
56745
56777
|
"use strict";
|
|
56746
56778
|
var { parseBigIntValue, parseUintValue, MAX_UINT32_DIGITS } = require_tools2();
|
|
56747
56779
|
var uint32 = (value) => parseUintValue(value, MAX_UINT32_DIGITS);
|
|
@@ -56784,9 +56816,9 @@ var require_status_fields = __commonJS({
|
|
|
56784
56816
|
}
|
|
56785
56817
|
});
|
|
56786
56818
|
|
|
56787
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
56819
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/special-use.js
|
|
56788
56820
|
var require_special_use = __commonJS({
|
|
56789
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
56821
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/special-use.js"(exports, module) {
|
|
56790
56822
|
"use strict";
|
|
56791
56823
|
var GENERIC_TOKENS = new Set(
|
|
56792
56824
|
[
|
|
@@ -57663,9 +57695,9 @@ var require_special_use = __commonJS({
|
|
|
57663
57695
|
}
|
|
57664
57696
|
});
|
|
57665
57697
|
|
|
57666
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
57698
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/list.js
|
|
57667
57699
|
var require_list = __commonJS({
|
|
57668
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
57700
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/list.js"(exports, module) {
|
|
57669
57701
|
"use strict";
|
|
57670
57702
|
var {
|
|
57671
57703
|
decodePath,
|
|
@@ -58010,9 +58042,9 @@ var require_list = __commonJS({
|
|
|
58010
58042
|
}
|
|
58011
58043
|
});
|
|
58012
58044
|
|
|
58013
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58045
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/enable.js
|
|
58014
58046
|
var require_enable = __commonJS({
|
|
58015
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58047
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/enable.js"(exports, module) {
|
|
58016
58048
|
"use strict";
|
|
58017
58049
|
var { hasCapability } = require_tools2();
|
|
58018
58050
|
module.exports = async (connection, extensionList) => {
|
|
@@ -58059,9 +58091,9 @@ var require_enable = __commonJS({
|
|
|
58059
58091
|
}
|
|
58060
58092
|
});
|
|
58061
58093
|
|
|
58062
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58094
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/select.js
|
|
58063
58095
|
var require_select = __commonJS({
|
|
58064
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58096
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/select.js"(exports, module) {
|
|
58065
58097
|
"use strict";
|
|
58066
58098
|
var { encodePath, normalizePath, enhanceCommandError, parseBigIntValue, parseUintValue, getStringList, MAX_UINT32_DIGITS } = require_tools2();
|
|
58067
58099
|
var VALUED_RESPONSE_CODES = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
@@ -58244,9 +58276,9 @@ var require_select = __commonJS({
|
|
|
58244
58276
|
}
|
|
58245
58277
|
});
|
|
58246
58278
|
|
|
58247
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58279
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/fetch.js
|
|
58248
58280
|
var require_fetch2 = __commonJS({
|
|
58249
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58281
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/fetch.js"(exports, module) {
|
|
58250
58282
|
"use strict";
|
|
58251
58283
|
var { formatMessageResponse, isRev2Active } = require_tools2();
|
|
58252
58284
|
module.exports = async (connection, range, query, options) => {
|
|
@@ -58431,9 +58463,9 @@ var require_fetch2 = __commonJS({
|
|
|
58431
58463
|
}
|
|
58432
58464
|
});
|
|
58433
58465
|
|
|
58434
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58466
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/create.js
|
|
58435
58467
|
var require_create = __commonJS({
|
|
58436
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58468
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/create.js"(exports, module) {
|
|
58437
58469
|
"use strict";
|
|
58438
58470
|
var { encodePath, normalizePath, getStatusCode, enhanceCommandError } = require_tools2();
|
|
58439
58471
|
module.exports = async (connection, path) => {
|
|
@@ -58490,9 +58522,9 @@ var require_create = __commonJS({
|
|
|
58490
58522
|
}
|
|
58491
58523
|
});
|
|
58492
58524
|
|
|
58493
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58525
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/delete.js
|
|
58494
58526
|
var require_delete = __commonJS({
|
|
58495
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58527
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/delete.js"(exports, module) {
|
|
58496
58528
|
"use strict";
|
|
58497
58529
|
var { encodePath, normalizePath, enhanceCommandError } = require_tools2();
|
|
58498
58530
|
module.exports = async (connection, path) => {
|
|
@@ -58520,9 +58552,9 @@ var require_delete = __commonJS({
|
|
|
58520
58552
|
}
|
|
58521
58553
|
});
|
|
58522
58554
|
|
|
58523
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58555
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/rename.js
|
|
58524
58556
|
var require_rename = __commonJS({
|
|
58525
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58557
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/rename.js"(exports, module) {
|
|
58526
58558
|
"use strict";
|
|
58527
58559
|
var { encodePath, normalizePath, enhanceCommandError } = require_tools2();
|
|
58528
58560
|
module.exports = async (connection, path, newPath) => {
|
|
@@ -58555,9 +58587,9 @@ var require_rename = __commonJS({
|
|
|
58555
58587
|
}
|
|
58556
58588
|
});
|
|
58557
58589
|
|
|
58558
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58590
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/close.js
|
|
58559
58591
|
var require_close = __commonJS({
|
|
58560
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58592
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/close.js"(exports, module) {
|
|
58561
58593
|
"use strict";
|
|
58562
58594
|
module.exports = async (connection) => {
|
|
58563
58595
|
if (connection.state !== connection.states.SELECTED) {
|
|
@@ -58583,9 +58615,9 @@ var require_close = __commonJS({
|
|
|
58583
58615
|
}
|
|
58584
58616
|
});
|
|
58585
58617
|
|
|
58586
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58618
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/subscribe.js
|
|
58587
58619
|
var require_subscribe = __commonJS({
|
|
58588
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58620
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/subscribe.js"(exports, module) {
|
|
58589
58621
|
"use strict";
|
|
58590
58622
|
var { encodePath, normalizePath, enhanceCommandError } = require_tools2();
|
|
58591
58623
|
module.exports = async (connection, path) => {
|
|
@@ -58607,9 +58639,9 @@ var require_subscribe = __commonJS({
|
|
|
58607
58639
|
}
|
|
58608
58640
|
});
|
|
58609
58641
|
|
|
58610
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58642
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/unsubscribe.js
|
|
58611
58643
|
var require_unsubscribe = __commonJS({
|
|
58612
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58644
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/unsubscribe.js"(exports, module) {
|
|
58613
58645
|
"use strict";
|
|
58614
58646
|
var { encodePath, normalizePath, enhanceCommandError } = require_tools2();
|
|
58615
58647
|
module.exports = async (connection, path) => {
|
|
@@ -58631,9 +58663,9 @@ var require_unsubscribe = __commonJS({
|
|
|
58631
58663
|
}
|
|
58632
58664
|
});
|
|
58633
58665
|
|
|
58634
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58666
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/store.js
|
|
58635
58667
|
var require_store = __commonJS({
|
|
58636
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58668
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/store.js"(exports, module) {
|
|
58637
58669
|
"use strict";
|
|
58638
58670
|
var { formatFlag, canUseFlag, enhanceCommandError } = require_tools2();
|
|
58639
58671
|
module.exports = async (connection, range, flags, options) => {
|
|
@@ -58695,9 +58727,9 @@ var require_store = __commonJS({
|
|
|
58695
58727
|
}
|
|
58696
58728
|
});
|
|
58697
58729
|
|
|
58698
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58730
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/search-compiler.js
|
|
58699
58731
|
var require_search_compiler = __commonJS({
|
|
58700
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58732
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/search-compiler.js"(exports, module) {
|
|
58701
58733
|
"use strict";
|
|
58702
58734
|
var { formatDate, formatFlag, canUseFlag, isDate, isRev2Active } = require_tools2();
|
|
58703
58735
|
var setBoolOpt = (attributes, term, value) => {
|
|
@@ -59021,9 +59053,9 @@ var require_search_compiler = __commonJS({
|
|
|
59021
59053
|
}
|
|
59022
59054
|
});
|
|
59023
59055
|
|
|
59024
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59056
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/search.js
|
|
59025
59057
|
var require_search = __commonJS({
|
|
59026
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59058
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/search.js"(exports, module) {
|
|
59027
59059
|
"use strict";
|
|
59028
59060
|
var {
|
|
59029
59061
|
enhanceCommandError,
|
|
@@ -59248,9 +59280,9 @@ var require_search = __commonJS({
|
|
|
59248
59280
|
}
|
|
59249
59281
|
});
|
|
59250
59282
|
|
|
59251
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59283
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/noop.js
|
|
59252
59284
|
var require_noop = __commonJS({
|
|
59253
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59285
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/noop.js"(exports, module) {
|
|
59254
59286
|
"use strict";
|
|
59255
59287
|
module.exports = async (connection) => {
|
|
59256
59288
|
try {
|
|
@@ -59265,9 +59297,9 @@ var require_noop = __commonJS({
|
|
|
59265
59297
|
}
|
|
59266
59298
|
});
|
|
59267
59299
|
|
|
59268
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59300
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/expunge.js
|
|
59269
59301
|
var require_expunge = __commonJS({
|
|
59270
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59302
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/expunge.js"(exports, module) {
|
|
59271
59303
|
"use strict";
|
|
59272
59304
|
var { enhanceCommandError, hasCapability, parseBigIntValue } = require_tools2();
|
|
59273
59305
|
module.exports = async (connection, range, options) => {
|
|
@@ -59301,9 +59333,9 @@ var require_expunge = __commonJS({
|
|
|
59301
59333
|
}
|
|
59302
59334
|
});
|
|
59303
59335
|
|
|
59304
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59336
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/append.js
|
|
59305
59337
|
var require_append = __commonJS({
|
|
59306
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59338
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/append.js"(exports, module) {
|
|
59307
59339
|
"use strict";
|
|
59308
59340
|
var {
|
|
59309
59341
|
formatFlag,
|
|
@@ -59418,9 +59450,9 @@ var require_append = __commonJS({
|
|
|
59418
59450
|
}
|
|
59419
59451
|
});
|
|
59420
59452
|
|
|
59421
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59453
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/status.js
|
|
59422
59454
|
var require_status = __commonJS({
|
|
59423
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59455
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/status.js"(exports, module) {
|
|
59424
59456
|
"use strict";
|
|
59425
59457
|
var { encodePath, normalizePath, buildStatusQueryAttributes, isRev2Active } = require_tools2();
|
|
59426
59458
|
var { parseStatusList } = require_status_fields();
|
|
@@ -59496,9 +59528,9 @@ var require_status = __commonJS({
|
|
|
59496
59528
|
}
|
|
59497
59529
|
});
|
|
59498
59530
|
|
|
59499
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59531
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/copyuid-parser.js
|
|
59500
59532
|
var require_copyuid_parser = __commonJS({
|
|
59501
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59533
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/copyuid-parser.js"(exports, module) {
|
|
59502
59534
|
"use strict";
|
|
59503
59535
|
var { expandRange, parseBigIntValue } = require_tools2();
|
|
59504
59536
|
function parseCopyUid(response, map) {
|
|
@@ -59521,9 +59553,9 @@ var require_copyuid_parser = __commonJS({
|
|
|
59521
59553
|
}
|
|
59522
59554
|
});
|
|
59523
59555
|
|
|
59524
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59556
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/copy.js
|
|
59525
59557
|
var require_copy = __commonJS({
|
|
59526
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59558
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/copy.js"(exports, module) {
|
|
59527
59559
|
"use strict";
|
|
59528
59560
|
var { normalizePath, encodePath, enhanceCommandError } = require_tools2();
|
|
59529
59561
|
var { parseCopyUid } = require_copyuid_parser();
|
|
@@ -59553,9 +59585,9 @@ var require_copy = __commonJS({
|
|
|
59553
59585
|
}
|
|
59554
59586
|
});
|
|
59555
59587
|
|
|
59556
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59588
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/move.js
|
|
59557
59589
|
var require_move = __commonJS({
|
|
59558
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59590
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/move.js"(exports, module) {
|
|
59559
59591
|
"use strict";
|
|
59560
59592
|
var { normalizePath, encodePath, enhanceCommandError, hasCapability } = require_tools2();
|
|
59561
59593
|
var { parseCopyUid } = require_copyuid_parser();
|
|
@@ -59596,9 +59628,9 @@ var require_move = __commonJS({
|
|
|
59596
59628
|
}
|
|
59597
59629
|
});
|
|
59598
59630
|
|
|
59599
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59631
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/compress.js
|
|
59600
59632
|
var require_compress = __commonJS({
|
|
59601
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59633
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/compress.js"(exports, module) {
|
|
59602
59634
|
"use strict";
|
|
59603
59635
|
module.exports = async (connection) => {
|
|
59604
59636
|
if (!connection.capabilities.has("COMPRESS=DEFLATE") || connection._inflate) {
|
|
@@ -59625,9 +59657,9 @@ var require_compress = __commonJS({
|
|
|
59625
59657
|
}
|
|
59626
59658
|
});
|
|
59627
59659
|
|
|
59628
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59660
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/quota.js
|
|
59629
59661
|
var require_quota = __commonJS({
|
|
59630
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59662
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/quota.js"(exports, module) {
|
|
59631
59663
|
"use strict";
|
|
59632
59664
|
var { encodePath, normalizePath, enhanceCommandError, parseUintValue, isUnsafeKey } = require_tools2();
|
|
59633
59665
|
module.exports = async (connection, path) => {
|
|
@@ -59716,11 +59748,11 @@ var require_quota = __commonJS({
|
|
|
59716
59748
|
}
|
|
59717
59749
|
});
|
|
59718
59750
|
|
|
59719
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59751
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/idle.js
|
|
59720
59752
|
var require_idle = __commonJS({
|
|
59721
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59753
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/idle.js"(exports, module) {
|
|
59722
59754
|
"use strict";
|
|
59723
|
-
var { hasCapability, unrefTimer } = require_tools2();
|
|
59755
|
+
var { hasCapability, logConnectionError, unrefTimer } = require_tools2();
|
|
59724
59756
|
var NOOP_INTERVAL = 2 * 60 * 1e3;
|
|
59725
59757
|
function claimIdling(connection) {
|
|
59726
59758
|
let token = {};
|
|
@@ -59750,7 +59782,8 @@ var require_idle = __commonJS({
|
|
|
59750
59782
|
msg: `DONE`,
|
|
59751
59783
|
comment: `breaking IDLE`,
|
|
59752
59784
|
lockId: connection.currentLock?.lockId,
|
|
59753
|
-
path: connection.mailbox && connection.mailbox.path
|
|
59785
|
+
path: connection.mailbox && connection.mailbox.path,
|
|
59786
|
+
cid: connection.id
|
|
59754
59787
|
});
|
|
59755
59788
|
connection.write("DONE");
|
|
59756
59789
|
doneSent = true;
|
|
@@ -59775,9 +59808,10 @@ var require_idle = __commonJS({
|
|
|
59775
59808
|
queued: preCheckWaitQueue.length,
|
|
59776
59809
|
doneRequested,
|
|
59777
59810
|
canEnd,
|
|
59778
|
-
doneSent
|
|
59811
|
+
doneSent,
|
|
59812
|
+
cid: connection.id
|
|
59779
59813
|
});
|
|
59780
|
-
preCheck().catch((err) => connection
|
|
59814
|
+
preCheck().catch((err) => logConnectionError(connection, "Failed to break IDLE", err));
|
|
59781
59815
|
return handler;
|
|
59782
59816
|
};
|
|
59783
59817
|
ownPreCheck = connectionPreCheck;
|
|
@@ -59787,13 +59821,18 @@ var require_idle = __commonJS({
|
|
|
59787
59821
|
// After this, the server will push untagged responses for mailbox changes.
|
|
59788
59822
|
// We can now safely send DONE if a break was already requested.
|
|
59789
59823
|
onPlusTag: async () => {
|
|
59790
|
-
connection.log.debug({
|
|
59824
|
+
connection.log.debug({
|
|
59825
|
+
msg: `Initiated IDLE, waiting for server input`,
|
|
59826
|
+
lockId: connection.currentLock?.lockId,
|
|
59827
|
+
doneRequested,
|
|
59828
|
+
cid: connection.id
|
|
59829
|
+
});
|
|
59791
59830
|
canEnd = true;
|
|
59792
59831
|
if (doneRequested) {
|
|
59793
59832
|
try {
|
|
59794
59833
|
await preCheck();
|
|
59795
59834
|
} catch (err) {
|
|
59796
|
-
connection
|
|
59835
|
+
logConnectionError(connection, "Failed to break IDLE", err);
|
|
59797
59836
|
}
|
|
59798
59837
|
}
|
|
59799
59838
|
},
|
|
@@ -59803,7 +59842,7 @@ var require_idle = __commonJS({
|
|
|
59803
59842
|
response.next();
|
|
59804
59843
|
return;
|
|
59805
59844
|
} catch (err) {
|
|
59806
|
-
connection
|
|
59845
|
+
logConnectionError(connection, "IDLE session failed", err);
|
|
59807
59846
|
while (preCheckWaitQueue.length) {
|
|
59808
59847
|
let { reject } = preCheckWaitQueue.shift();
|
|
59809
59848
|
reject(err);
|
|
@@ -59824,11 +59863,11 @@ var require_idle = __commonJS({
|
|
|
59824
59863
|
let path = connection.mailbox && connection.mailbox.path;
|
|
59825
59864
|
switch (connection.missingIdleCommand) {
|
|
59826
59865
|
case "SELECT":
|
|
59827
|
-
connection.log.debug({
|
|
59866
|
+
connection.log.debug({ msg: `Running SELECT to detect changes in folder`, cid: connection.id });
|
|
59828
59867
|
await connection.runInternal("SELECT", path, { readOnly: session.selectCommand.command === "EXAMINE" });
|
|
59829
59868
|
break;
|
|
59830
59869
|
case "STATUS": {
|
|
59831
|
-
connection.log.debug({
|
|
59870
|
+
connection.log.debug({ msg: `Running STATUS to detect changes in folder`, cid: connection.id });
|
|
59832
59871
|
let status = await connection.runInternal("STATUS", path, {
|
|
59833
59872
|
messages: true,
|
|
59834
59873
|
uidNext: true,
|
|
@@ -59875,7 +59914,7 @@ var require_idle = __commonJS({
|
|
|
59875
59914
|
resolve3();
|
|
59876
59915
|
};
|
|
59877
59916
|
session.preCheck = async () => {
|
|
59878
|
-
connection.log.debug({
|
|
59917
|
+
connection.log.debug({ msg: `Breaking NOOP loop`, cid: connection.id });
|
|
59879
59918
|
cancel();
|
|
59880
59919
|
};
|
|
59881
59920
|
connection.preCheck = session.preCheck;
|
|
@@ -59893,7 +59932,7 @@ var require_idle = __commonJS({
|
|
|
59893
59932
|
}
|
|
59894
59933
|
scheduleNextPoll(interval);
|
|
59895
59934
|
}).catch((err) => {
|
|
59896
|
-
connection
|
|
59935
|
+
logConnectionError(connection, "Failed to poll for mailbox changes", err);
|
|
59897
59936
|
cancel();
|
|
59898
59937
|
});
|
|
59899
59938
|
};
|
|
@@ -59901,7 +59940,7 @@ var require_idle = __commonJS({
|
|
|
59901
59940
|
session.timer = setTimeout(runPoll, delay);
|
|
59902
59941
|
unrefTimer(session.timer);
|
|
59903
59942
|
}
|
|
59904
|
-
connection.log.debug({
|
|
59943
|
+
connection.log.debug({ msg: `Initiated NOOP loop`, cid: connection.id });
|
|
59905
59944
|
let sinceLastPoll = Math.max(0, Date.now() - (connection._lastPollAt || 0));
|
|
59906
59945
|
if (sinceLastPoll >= interval) {
|
|
59907
59946
|
runPoll();
|
|
@@ -59933,7 +59972,7 @@ var require_idle = __commonJS({
|
|
|
59933
59972
|
if (typeof connection.preCheck === "function") {
|
|
59934
59973
|
stillIdling = true;
|
|
59935
59974
|
connection.log.trace({ msg: "Max allowed IDLE time reached", cid: connection.id });
|
|
59936
|
-
connection.preCheck().catch((err) => connection
|
|
59975
|
+
connection.preCheck().catch((err) => logConnectionError(connection, "Failed to break IDLE for restart", err));
|
|
59937
59976
|
}
|
|
59938
59977
|
}
|
|
59939
59978
|
}, maxIdleTime);
|
|
@@ -59952,9 +59991,9 @@ var require_idle = __commonJS({
|
|
|
59952
59991
|
}
|
|
59953
59992
|
});
|
|
59954
59993
|
|
|
59955
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59994
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/authenticate.js
|
|
59956
59995
|
var require_authenticate = __commonJS({
|
|
59957
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59996
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/commands/authenticate.js"(exports, module) {
|
|
59958
59997
|
"use strict";
|
|
59959
59998
|
var { getStatusCode, getErrorText } = require_tools2();
|
|
59960
59999
|
async function handleAuthError(err, errorResponse2) {
|
|
@@ -60005,10 +60044,15 @@ var require_authenticate = __commonJS({
|
|
|
60005
60044
|
try {
|
|
60006
60045
|
errorResponse2 = JSON.parse(Buffer.from(resp.attributes[0].value, "base64").toString());
|
|
60007
60046
|
} catch (err) {
|
|
60008
|
-
connection.log.debug({
|
|
60047
|
+
connection.log.debug({
|
|
60048
|
+
msg: "Failed to parse OAuth error response",
|
|
60049
|
+
errorResponse: resp.attributes[0].value,
|
|
60050
|
+
err,
|
|
60051
|
+
cid: connection.id
|
|
60052
|
+
});
|
|
60009
60053
|
}
|
|
60010
60054
|
}
|
|
60011
|
-
connection.log.debug({ src: "c", msg: breaker, comment: `Error response for ${command}
|
|
60055
|
+
connection.log.debug({ src: "c", msg: breaker, comment: `Error response for ${command}`, cid: connection.id });
|
|
60012
60056
|
connection.write(breaker);
|
|
60013
60057
|
}
|
|
60014
60058
|
}
|
|
@@ -60029,10 +60073,10 @@ var require_authenticate = __commonJS({
|
|
|
60029
60073
|
let question = Buffer.from(resp.attributes[0].value, "base64").toString().toLowerCase().replace(/[:\x00]*$/, "");
|
|
60030
60074
|
if (question === "username" || question === "user name") {
|
|
60031
60075
|
let encodedUsername = Buffer.from(username).toString("base64");
|
|
60032
|
-
connection.log.debug({ src: "c", msg: encodedUsername, comment: `Encoded username for AUTH=LOGIN
|
|
60076
|
+
connection.log.debug({ src: "c", msg: encodedUsername, comment: `Encoded username for AUTH=LOGIN`, cid: connection.id });
|
|
60033
60077
|
connection.write(encodedUsername);
|
|
60034
60078
|
} else if (question === "password") {
|
|
60035
|
-
connection.log.debug({ src: "c", msg: "(* value hidden *)", comment: `Encoded password for AUTH=LOGIN
|
|
60079
|
+
connection.log.debug({ src: "c", msg: "(* value hidden *)", comment: `Encoded password for AUTH=LOGIN`, cid: connection.id });
|
|
60036
60080
|
connection.write(Buffer.from(password).toString("base64"));
|
|
60037
60081
|
} else {
|
|
60038
60082
|
throw new Error(`Unknown LOGIN question "${question}"`);
|
|
@@ -60055,7 +60099,12 @@ var require_authenticate = __commonJS({
|
|
|
60055
60099
|
let authzidValue = authzid || "";
|
|
60056
60100
|
let encodedResponse = Buffer.from([authzidValue, username, password].join("\0")).toString("base64");
|
|
60057
60101
|
let loggedResponse = Buffer.from([authzidValue, username, "(* value hidden *)"].join("\0")).toString("base64");
|
|
60058
|
-
connection.log.debug({
|
|
60102
|
+
connection.log.debug({
|
|
60103
|
+
src: "c",
|
|
60104
|
+
msg: loggedResponse,
|
|
60105
|
+
comment: `Encoded response for AUTH=PLAIN${authzid ? " with authzid" : ""}`,
|
|
60106
|
+
cid: connection.id
|
|
60107
|
+
});
|
|
60059
60108
|
connection.write(encodedResponse);
|
|
60060
60109
|
}
|
|
60061
60110
|
});
|
|
@@ -60088,9 +60137,9 @@ var require_authenticate = __commonJS({
|
|
|
60088
60137
|
}
|
|
60089
60138
|
});
|
|
60090
60139
|
|
|
60091
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
60140
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/imap-commands.js
|
|
60092
60141
|
var require_imap_commands = __commonJS({
|
|
60093
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
60142
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/imap-commands.js"(exports, module) {
|
|
60094
60143
|
"use strict";
|
|
60095
60144
|
module.exports = /* @__PURE__ */ new Map([
|
|
60096
60145
|
["ID", require_id2()],
|
|
@@ -60125,9 +60174,9 @@ var require_imap_commands = __commonJS({
|
|
|
60125
60174
|
}
|
|
60126
60175
|
});
|
|
60127
60176
|
|
|
60128
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
60177
|
+
// node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/imap-flow.js
|
|
60129
60178
|
var require_imap_flow = __commonJS({
|
|
60130
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
60179
|
+
"node_modules/.pnpm/imapflow@1.7.1/node_modules/imapflow/lib/imap-flow.js"(exports, module) {
|
|
60131
60180
|
"use strict";
|
|
60132
60181
|
var tls = __require("tls");
|
|
60133
60182
|
var net = __require("net");
|
|
@@ -60159,6 +60208,7 @@ var require_imap_flow = __commonJS({
|
|
|
60159
60208
|
AuthenticationFailure,
|
|
60160
60209
|
getColorFlags,
|
|
60161
60210
|
hasCapability,
|
|
60211
|
+
logConnectionError,
|
|
60162
60212
|
unrefTimer,
|
|
60163
60213
|
parseUintValue,
|
|
60164
60214
|
isUnsafeKey,
|
|
@@ -60175,6 +60225,40 @@ var require_imap_flow = __commonJS({
|
|
|
60175
60225
|
var HELD_LOCK_WARN_MS = 30 * 60 * 1e3;
|
|
60176
60226
|
var AUTO_IDLE_DELAY = 15 * 1e3;
|
|
60177
60227
|
var AUTO_IDLE_SOCKET_MARGIN = 1e3;
|
|
60228
|
+
var RAW_SENSITIVE_COMMANDS = /* @__PURE__ */ new Set(["LOGIN", "AUTHENTICATE"]);
|
|
60229
|
+
var RAW_HIDDEN_PLACEHOLDER = Buffer.from("(* value hidden *)\r\n").toString("base64");
|
|
60230
|
+
function hasSensitiveAttribute(attributes) {
|
|
60231
|
+
return [].concat(attributes || []).some((node) => Array.isArray(node) ? hasSensitiveAttribute(node) : !!node && node.sensitive);
|
|
60232
|
+
}
|
|
60233
|
+
var MAX_ERROR_FLATTEN_DEPTH = 4;
|
|
60234
|
+
function isErrorLike(value) {
|
|
60235
|
+
return value instanceof Error || !!value && typeof value === "object" && typeof value.message === "string" && typeof value.stack === "string";
|
|
60236
|
+
}
|
|
60237
|
+
function flattenLoggedError(value, depth = 0, seen = /* @__PURE__ */ new Set()) {
|
|
60238
|
+
if (depth >= MAX_ERROR_FLATTEN_DEPTH) {
|
|
60239
|
+
return isErrorLike(value) ? value.message : value;
|
|
60240
|
+
}
|
|
60241
|
+
if (Array.isArray(value)) {
|
|
60242
|
+
return value.map((entry) => flattenLoggedError(entry, depth + 1, seen));
|
|
60243
|
+
}
|
|
60244
|
+
if (!isErrorLike(value)) {
|
|
60245
|
+
return value;
|
|
60246
|
+
}
|
|
60247
|
+
if (seen.has(value)) {
|
|
60248
|
+
return value.message;
|
|
60249
|
+
}
|
|
60250
|
+
seen.add(value);
|
|
60251
|
+
let flatErr = {
|
|
60252
|
+
message: value.message,
|
|
60253
|
+
stack: value.stack
|
|
60254
|
+
};
|
|
60255
|
+
for (let key of /* @__PURE__ */ new Set([...Object.keys(value), "cause", "errors"])) {
|
|
60256
|
+
if (key in value) {
|
|
60257
|
+
flatErr[key] = flattenLoggedError(value[key], depth + 1, seen);
|
|
60258
|
+
}
|
|
60259
|
+
}
|
|
60260
|
+
return flatErr;
|
|
60261
|
+
}
|
|
60178
60262
|
var MAX_TIMER_DELAY = 2 ** 31 - 1;
|
|
60179
60263
|
var states = {
|
|
60180
60264
|
NOT_AUTHENTICATED: 1,
|
|
@@ -60292,6 +60376,7 @@ var require_imap_flow = __commonJS({
|
|
|
60292
60376
|
*
|
|
60293
60377
|
* @property {Boolean} [logRaw=false]
|
|
60294
60378
|
* If `true`, logs all raw data (read and written) in base64 encoding. You can pipe such logs to [eerawlog](https://github.com/postalsys/eerawlog) command for readable output.
|
|
60379
|
+
* Client frames that carry credentials are replaced with a fixed placeholder and the entry is marked with `hidden: true`.
|
|
60295
60380
|
*
|
|
60296
60381
|
* @property {Boolean} [emitLogs=false]
|
|
60297
60382
|
* If `true`, emits `'log'` events with the same data passed to the logger.
|
|
@@ -60402,6 +60487,7 @@ var require_imap_flow = __commonJS({
|
|
|
60402
60487
|
this._nextUnknownTagWarn = 1;
|
|
60403
60488
|
this.writeBytesCounter = 0;
|
|
60404
60489
|
this.commandParts = [];
|
|
60490
|
+
this.rawSensitiveCommand = true;
|
|
60405
60491
|
this.capabilities = /* @__PURE__ */ new Map();
|
|
60406
60492
|
this.authCapabilities = /* @__PURE__ */ new Map();
|
|
60407
60493
|
this.rawCapabilities = null;
|
|
@@ -60513,7 +60599,8 @@ var require_imap_flow = __commonJS({
|
|
|
60513
60599
|
this.log.trace({
|
|
60514
60600
|
src: "c",
|
|
60515
60601
|
msg: "write to socket",
|
|
60516
|
-
data: chunk.toString("base64"),
|
|
60602
|
+
data: this.rawSensitiveCommand ? RAW_HIDDEN_PLACEHOLDER : chunk.toString("base64"),
|
|
60603
|
+
...this.rawSensitiveCommand ? { hidden: true } : {},
|
|
60517
60604
|
compress: !!this._deflate,
|
|
60518
60605
|
secure: !!this.secureConnection,
|
|
60519
60606
|
cid: this.id
|
|
@@ -60561,6 +60648,7 @@ var require_imap_flow = __commonJS({
|
|
|
60561
60648
|
}
|
|
60562
60649
|
return;
|
|
60563
60650
|
}
|
|
60651
|
+
this.rawSensitiveCommand = RAW_SENSITIVE_COMMANDS.has(typeof data.command === "string" ? data.command.toUpperCase() : "") || hasSensitiveAttribute(data.attributes);
|
|
60564
60652
|
let compiled = await compiler(data, {
|
|
60565
60653
|
asArray: true,
|
|
60566
60654
|
// LITERAL- is part of base IMAP4rev2
|
|
@@ -60621,27 +60709,31 @@ var require_imap_flow = __commonJS({
|
|
|
60621
60709
|
let promise = new Promise((resolve3, reject) => {
|
|
60622
60710
|
this.requestTagMap.set(tag, { command, attributes, options, resolve: resolve3, reject });
|
|
60623
60711
|
this.requestQueue.push({ tag, command, attributes, options });
|
|
60624
|
-
this.trySend().catch((err) => this
|
|
60712
|
+
this.trySend().catch((err) => logConnectionError(this, "Failed to dispatch command", err));
|
|
60625
60713
|
});
|
|
60626
60714
|
promise.catch(noop);
|
|
60627
60715
|
return promise;
|
|
60628
60716
|
}
|
|
60629
|
-
// Resolves
|
|
60630
|
-
// come in two forms:
|
|
60717
|
+
// Resolves an untagged server response to the keyword it is dispatched on. IMAP untagged
|
|
60718
|
+
// responses come in two forms:
|
|
60631
60719
|
// * CAPABILITY ... (keyword as command)
|
|
60632
60720
|
// * 42 FETCH (...) (numeric prefix + keyword)
|
|
60633
|
-
// For numeric-prefixed responses
|
|
60634
|
-
//
|
|
60635
|
-
//
|
|
60636
|
-
|
|
60637
|
-
getUntaggedHandler(command, attributes) {
|
|
60721
|
+
// For numeric-prefixed responses the keyword sits in the first attribute, because `command`
|
|
60722
|
+
// holds the sequence number. Also used for logging, so a failure reports FETCH rather than
|
|
60723
|
+
// the message number that happened to precede it.
|
|
60724
|
+
normalizeUntaggedCommand(command, attributes) {
|
|
60638
60725
|
if (/^[0-9]+$/.test(command)) {
|
|
60639
60726
|
let type = attributes && attributes.length && typeof attributes[0].value === "string" ? attributes[0].value.toUpperCase() : false;
|
|
60640
60727
|
if (type) {
|
|
60641
60728
|
command = type;
|
|
60642
60729
|
}
|
|
60643
60730
|
}
|
|
60644
|
-
|
|
60731
|
+
return command.toUpperCase().trim();
|
|
60732
|
+
}
|
|
60733
|
+
// Handler priority: command-specific handlers (registered per exec() call) take
|
|
60734
|
+
// precedence over global handlers (registered on the connection).
|
|
60735
|
+
getUntaggedHandler(command, attributes) {
|
|
60736
|
+
command = this.normalizeUntaggedCommand(command, attributes);
|
|
60645
60737
|
if (this.currentRequest && this.currentRequest.options && this.currentRequest.options.untagged && this.currentRequest.options.untagged[command]) {
|
|
60646
60738
|
return this.currentRequest.options.untagged[command];
|
|
60647
60739
|
}
|
|
@@ -60787,7 +60879,7 @@ var require_imap_flow = __commonJS({
|
|
|
60787
60879
|
err.code = parserError.code || "ParserError";
|
|
60788
60880
|
err.parserError = parserError;
|
|
60789
60881
|
this.rejectCurrentRequest(err);
|
|
60790
|
-
this.trySend().catch((sendErr) => this
|
|
60882
|
+
this.trySend().catch((sendErr) => logConnectionError(this, "Failed to dispatch command", sendErr));
|
|
60791
60883
|
}
|
|
60792
60884
|
/**
|
|
60793
60885
|
* Handles a single parsed server response: telemetry, continuation requests, response-code
|
|
@@ -60828,7 +60920,7 @@ var require_imap_flow = __commonJS({
|
|
|
60828
60920
|
try {
|
|
60829
60921
|
await this.currentRequest.options.onPlusTag(parsed);
|
|
60830
60922
|
} catch (err) {
|
|
60831
|
-
this.log.warn({ err, cid: this.id });
|
|
60923
|
+
this.log.warn({ msg: "Failed to process continuation response", command: this.currentRequest?.command, err, cid: this.id });
|
|
60832
60924
|
}
|
|
60833
60925
|
return true;
|
|
60834
60926
|
}
|
|
@@ -60838,18 +60930,19 @@ var require_imap_flow = __commonJS({
|
|
|
60838
60930
|
this.write(content);
|
|
60839
60931
|
this.log.debug({ src: "c", msg: `(* ${content.length}B continuation *)`, cid: this.id });
|
|
60840
60932
|
} catch (err) {
|
|
60841
|
-
this
|
|
60933
|
+
logConnectionError(this, "Failed to send literal continuation", err);
|
|
60842
60934
|
}
|
|
60843
60935
|
return true;
|
|
60844
60936
|
}
|
|
60845
60937
|
let section = parsed.attributes && parsed.attributes.length && parsed.attributes[0] && !parsed.attributes[0].value && parsed.attributes[0].section;
|
|
60846
60938
|
if (section && section.length && section[0] && section[0].type === "ATOM" && typeof section[0].value === "string") {
|
|
60847
|
-
let
|
|
60939
|
+
let sectionKey = section[0].value.toUpperCase().trim();
|
|
60940
|
+
let sectionHandler = this.getSectionHandler(sectionKey);
|
|
60848
60941
|
if (sectionHandler) {
|
|
60849
60942
|
try {
|
|
60850
60943
|
await sectionHandler(section.slice(1));
|
|
60851
60944
|
} catch (err) {
|
|
60852
|
-
this.log.warn({ err, cid: this.id });
|
|
60945
|
+
this.log.warn({ msg: "Failed to process response section", section: sectionKey, err, cid: this.id });
|
|
60853
60946
|
}
|
|
60854
60947
|
}
|
|
60855
60948
|
}
|
|
@@ -60859,7 +60952,12 @@ var require_imap_flow = __commonJS({
|
|
|
60859
60952
|
try {
|
|
60860
60953
|
await untaggedHandler(parsed);
|
|
60861
60954
|
} catch (err) {
|
|
60862
|
-
this.log.warn({
|
|
60955
|
+
this.log.warn({
|
|
60956
|
+
msg: "Failed to process untagged response",
|
|
60957
|
+
command: this.normalizeUntaggedCommand(parsed.command, parsed.attributes),
|
|
60958
|
+
err,
|
|
60959
|
+
cid: this.id
|
|
60960
|
+
});
|
|
60863
60961
|
return true;
|
|
60864
60962
|
}
|
|
60865
60963
|
}
|
|
@@ -61139,7 +61237,7 @@ var require_imap_flow = __commonJS({
|
|
|
61139
61237
|
}
|
|
61140
61238
|
this.writeSocket.end();
|
|
61141
61239
|
} catch (err) {
|
|
61142
|
-
this.log.error({ err,
|
|
61240
|
+
this.log.error({ err, msg: "Failed to destroy PassThrough socket", cid: this.id });
|
|
61143
61241
|
throw err;
|
|
61144
61242
|
}
|
|
61145
61243
|
};
|
|
@@ -61474,6 +61572,19 @@ var require_imap_flow = __commonJS({
|
|
|
61474
61572
|
prevCount
|
|
61475
61573
|
});
|
|
61476
61574
|
}
|
|
61575
|
+
// Reports one expunged message, either through the caller's expungeHandler or as an
|
|
61576
|
+
// 'expunge' event. Shared by the EXPUNGE and VANISHED paths so the two cannot drift.
|
|
61577
|
+
async notifyExpunge(payload) {
|
|
61578
|
+
if (typeof this.options.expungeHandler !== "function") {
|
|
61579
|
+
this.emit("expunge", payload);
|
|
61580
|
+
return;
|
|
61581
|
+
}
|
|
61582
|
+
try {
|
|
61583
|
+
await this.options.expungeHandler(payload);
|
|
61584
|
+
} catch (err) {
|
|
61585
|
+
this.log.error({ msg: "Failed to notify expunge event", payload, err, cid: this.id });
|
|
61586
|
+
}
|
|
61587
|
+
}
|
|
61477
61588
|
async untaggedExpunge(untagged) {
|
|
61478
61589
|
if (!this.mailbox) {
|
|
61479
61590
|
return;
|
|
@@ -61489,15 +61600,7 @@ var require_imap_flow = __commonJS({
|
|
|
61489
61600
|
seq,
|
|
61490
61601
|
vanished: false
|
|
61491
61602
|
};
|
|
61492
|
-
|
|
61493
|
-
try {
|
|
61494
|
-
await this.options.expungeHandler(payload);
|
|
61495
|
-
} catch (err) {
|
|
61496
|
-
this.log.error({ msg: "Failed to notify expunge event", payload, error: err, cid: this.id });
|
|
61497
|
-
}
|
|
61498
|
-
} else {
|
|
61499
|
-
this.emit("expunge", payload);
|
|
61500
|
-
}
|
|
61603
|
+
await this.notifyExpunge(payload);
|
|
61501
61604
|
}
|
|
61502
61605
|
}
|
|
61503
61606
|
async untaggedVanished(untagged, mailbox) {
|
|
@@ -61525,15 +61628,7 @@ var require_imap_flow = __commonJS({
|
|
|
61525
61628
|
vanished: true,
|
|
61526
61629
|
earlier: tags.includes("EARLIER")
|
|
61527
61630
|
};
|
|
61528
|
-
|
|
61529
|
-
try {
|
|
61530
|
-
await this.options.expungeHandler(payload);
|
|
61531
|
-
} catch (err) {
|
|
61532
|
-
this.log.error({ msg: "Failed to notify expunge event", payload, error: err, cid: this.id });
|
|
61533
|
-
}
|
|
61534
|
-
} else {
|
|
61535
|
-
this.emit("expunge", payload);
|
|
61536
|
-
}
|
|
61631
|
+
await this.notifyExpunge(payload);
|
|
61537
61632
|
}
|
|
61538
61633
|
}
|
|
61539
61634
|
async untaggedFetch(untagged, mailbox) {
|
|
@@ -61631,7 +61726,7 @@ var require_imap_flow = __commonJS({
|
|
|
61631
61726
|
if (this.state !== this.states.SELECTED || this.connectionBusy()) {
|
|
61632
61727
|
return;
|
|
61633
61728
|
}
|
|
61634
|
-
this.idle().catch((err) => this
|
|
61729
|
+
this.idle().catch((err) => logConnectionError(this, "Auto-IDLE failed", err));
|
|
61635
61730
|
}, this.autoIdleDelay);
|
|
61636
61731
|
unrefTimer(this.idleStartTimer);
|
|
61637
61732
|
}
|
|
@@ -61677,14 +61772,13 @@ var require_imap_flow = __commonJS({
|
|
|
61677
61772
|
throw new Error("Failed to setup proxy connection");
|
|
61678
61773
|
}
|
|
61679
61774
|
} catch (err) {
|
|
61775
|
+
this.log.error({ msg: "Failed to setup proxy connection", err, cid: this.id });
|
|
61680
61776
|
if (err.code === "CONNECT_TIMEOUT") {
|
|
61681
|
-
this.log.error({ err, cid: this.id });
|
|
61682
61777
|
throw err;
|
|
61683
61778
|
}
|
|
61684
61779
|
let error2 = new Error("Failed to setup proxy connection");
|
|
61685
61780
|
error2.code = err.code || "ProxyError";
|
|
61686
61781
|
error2._err = err;
|
|
61687
|
-
this.log.error({ error: error2, cid: this.id });
|
|
61688
61782
|
throw error2;
|
|
61689
61783
|
}
|
|
61690
61784
|
}
|
|
@@ -61842,7 +61936,7 @@ var require_imap_flow = __commonJS({
|
|
|
61842
61936
|
reject(err);
|
|
61843
61937
|
}
|
|
61844
61938
|
if (typeof this.preCheck === "function") {
|
|
61845
|
-
this.preCheck().catch((err) => this
|
|
61939
|
+
this.preCheck().catch((err) => logConnectionError(this, "Failed to break IDLE while closing", err));
|
|
61846
61940
|
}
|
|
61847
61941
|
let closedMailbox = false;
|
|
61848
61942
|
if (!this.isClosed) {
|
|
@@ -61902,7 +61996,7 @@ var require_imap_flow = __commonJS({
|
|
|
61902
61996
|
this._inflate.destroy();
|
|
61903
61997
|
this._inflate = null;
|
|
61904
61998
|
} catch (err) {
|
|
61905
|
-
this.log.error({ err,
|
|
61999
|
+
this.log.error({ err, msg: "Failed to destroy inflate stream", cid: this.id });
|
|
61906
62000
|
}
|
|
61907
62001
|
}
|
|
61908
62002
|
if (this._deflate) {
|
|
@@ -61911,7 +62005,7 @@ var require_imap_flow = __commonJS({
|
|
|
61911
62005
|
this._deflate.destroy();
|
|
61912
62006
|
this._deflate = null;
|
|
61913
62007
|
} catch (err) {
|
|
61914
|
-
this.log.error({ err,
|
|
62008
|
+
this.log.error({ err, msg: "Failed to destroy deflate stream", cid: this.id });
|
|
61915
62009
|
}
|
|
61916
62010
|
}
|
|
61917
62011
|
if (this.streamer) {
|
|
@@ -61926,7 +62020,7 @@ var require_imap_flow = __commonJS({
|
|
|
61926
62020
|
this.streamer.destroy();
|
|
61927
62021
|
}
|
|
61928
62022
|
} catch (err) {
|
|
61929
|
-
this.log.error({ err,
|
|
62023
|
+
this.log.error({ err, msg: "Failed to cleanup streamer", cid: this.id });
|
|
61930
62024
|
}
|
|
61931
62025
|
}
|
|
61932
62026
|
this.clearSocketHandlers();
|
|
@@ -61961,7 +62055,7 @@ var require_imap_flow = __commonJS({
|
|
|
61961
62055
|
this._socketClose = null;
|
|
61962
62056
|
this._socketEnd = null;
|
|
61963
62057
|
this._socketTimeout = null;
|
|
61964
|
-
this.log.
|
|
62058
|
+
this.log.debug({
|
|
61965
62059
|
msg: "Connection closed",
|
|
61966
62060
|
cid: this.id,
|
|
61967
62061
|
...this._unknownTagCount ? { unknownTagCount: this._unknownTagCount } : {}
|
|
@@ -61971,7 +62065,7 @@ var require_imap_flow = __commonJS({
|
|
|
61971
62065
|
}
|
|
61972
62066
|
this.emit("close");
|
|
61973
62067
|
} catch (ex) {
|
|
61974
|
-
this.log.error(ex);
|
|
62068
|
+
this.log.error({ err: ex, cid: this.id });
|
|
61975
62069
|
}
|
|
61976
62070
|
}
|
|
61977
62071
|
/**
|
|
@@ -63541,24 +63635,29 @@ var require_imap_flow = __commonJS({
|
|
|
63541
63635
|
if (this.options.logger !== false) {
|
|
63542
63636
|
if (typeof mainLogger[level] !== "function") {
|
|
63543
63637
|
if (level === "fatal" || level === "error") {
|
|
63544
|
-
|
|
63638
|
+
let entry = args[0];
|
|
63639
|
+
try {
|
|
63640
|
+
if (entry && typeof entry === "object" && entry.err) {
|
|
63641
|
+
entry = Object.assign({}, entry, { err: flattenLoggedError(entry.err) });
|
|
63642
|
+
}
|
|
63643
|
+
console.error(JSON.stringify(entry));
|
|
63644
|
+
} catch {
|
|
63645
|
+
console.error(entry);
|
|
63646
|
+
}
|
|
63545
63647
|
}
|
|
63546
63648
|
} else {
|
|
63547
63649
|
mainLogger[level](...args);
|
|
63548
63650
|
}
|
|
63549
63651
|
}
|
|
63550
63652
|
if (this.emitLogs && args && args[0] && typeof args[0] === "object") {
|
|
63551
|
-
|
|
63552
|
-
|
|
63553
|
-
|
|
63554
|
-
|
|
63555
|
-
|
|
63556
|
-
|
|
63557
|
-
|
|
63558
|
-
logEntry.err[key] = err[key];
|
|
63559
|
-
});
|
|
63653
|
+
try {
|
|
63654
|
+
let logEntry = Object.assign({ level, t: Date.now(), cid: this.id, lo: ++this.lo }, args[0]);
|
|
63655
|
+
if (logEntry.err) {
|
|
63656
|
+
logEntry.err = flattenLoggedError(logEntry.err);
|
|
63657
|
+
}
|
|
63658
|
+
this.emit("log", logEntry);
|
|
63659
|
+
} catch {
|
|
63560
63660
|
}
|
|
63561
|
-
this.emit("log", logEntry);
|
|
63562
63661
|
}
|
|
63563
63662
|
};
|
|
63564
63663
|
}
|
package/package.json
CHANGED