apple-mail-mcp 2.17.4 → 2.17.6
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 +673 -308
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -3110,15 +3110,33 @@ var require_data = __commonJS({
|
|
|
3110
3110
|
}
|
|
3111
3111
|
});
|
|
3112
3112
|
|
|
3113
|
-
// node_modules/.pnpm/fast-uri@3.1.
|
|
3113
|
+
// node_modules/.pnpm/fast-uri@3.1.6/node_modules/fast-uri/lib/utils.js
|
|
3114
3114
|
var require_utils = __commonJS({
|
|
3115
|
-
"node_modules/.pnpm/fast-uri@3.1.
|
|
3115
|
+
"node_modules/.pnpm/fast-uri@3.1.6/node_modules/fast-uri/lib/utils.js"(exports, module) {
|
|
3116
3116
|
"use strict";
|
|
3117
3117
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
3118
3118
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
3119
3119
|
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
3120
3120
|
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
3121
|
-
var isPathCharacter = RegExp.prototype.test.bind(/^[
|
|
3121
|
+
var isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u);
|
|
3122
|
+
var isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u);
|
|
3123
|
+
var isUserinfoCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u);
|
|
3124
|
+
var BYTE_HEX = new Array(256);
|
|
3125
|
+
{
|
|
3126
|
+
const HEX_DIGITS = "0123456789ABCDEF";
|
|
3127
|
+
for (let i = 0; i < 256; i++) {
|
|
3128
|
+
BYTE_HEX[i] = "%" + HEX_DIGITS[i >> 4] + HEX_DIGITS[i & 15];
|
|
3129
|
+
}
|
|
3130
|
+
}
|
|
3131
|
+
function percentEncodeNonAscii(cp) {
|
|
3132
|
+
if (cp < 2048) {
|
|
3133
|
+
return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];
|
|
3134
|
+
}
|
|
3135
|
+
if (cp < 65536) {
|
|
3136
|
+
return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
3137
|
+
}
|
|
3138
|
+
return BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
3139
|
+
}
|
|
3122
3140
|
function stringArrayToHexStripped(input) {
|
|
3123
3141
|
let acc = "";
|
|
3124
3142
|
let code = 0;
|
|
@@ -3143,91 +3161,105 @@ var require_utils = __commonJS({
|
|
|
3143
3161
|
}
|
|
3144
3162
|
return acc;
|
|
3145
3163
|
}
|
|
3164
|
+
var isHextet = RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/);
|
|
3165
|
+
var isIPvFuture = RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/);
|
|
3166
|
+
var isZoneCharacter = RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/);
|
|
3146
3167
|
var nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
|
|
3147
|
-
function
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
if (hex !== "") {
|
|
3155
|
-
address.push(hex);
|
|
3156
|
-
} else {
|
|
3157
|
-
output.error = true;
|
|
3158
|
-
return false;
|
|
3168
|
+
function isZoneIdentifier(zone) {
|
|
3169
|
+
if (zone.length === 0) return false;
|
|
3170
|
+
for (let i = 0; i < zone.length; i++) {
|
|
3171
|
+
if (isZoneCharacter(zone[i])) continue;
|
|
3172
|
+
if (zone[i] === "%" && i + 2 < zone.length && isHexPair(zone.slice(i + 1, i + 3))) {
|
|
3173
|
+
i += 2;
|
|
3174
|
+
continue;
|
|
3159
3175
|
}
|
|
3160
|
-
|
|
3176
|
+
return false;
|
|
3161
3177
|
}
|
|
3162
3178
|
return true;
|
|
3163
3179
|
}
|
|
3164
|
-
function
|
|
3165
|
-
let
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
let
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
}
|
|
3177
|
-
if (cursor === ":") {
|
|
3178
|
-
if (endipv6Encountered === true) {
|
|
3179
|
-
endIpv6 = true;
|
|
3180
|
-
}
|
|
3181
|
-
if (!consume(buffer, address, output)) {
|
|
3182
|
-
break;
|
|
3183
|
-
}
|
|
3184
|
-
if (++tokenCount > 7) {
|
|
3185
|
-
output.error = true;
|
|
3186
|
-
break;
|
|
3180
|
+
function compressIPv6ZeroRun(hextets) {
|
|
3181
|
+
let bestStart = -1;
|
|
3182
|
+
let bestLength = 0;
|
|
3183
|
+
let runStart = -1;
|
|
3184
|
+
let runLength = 0;
|
|
3185
|
+
for (let i = 0; i < hextets.length; i++) {
|
|
3186
|
+
if (hextets[i] === "0") {
|
|
3187
|
+
if (runStart === -1) runStart = i;
|
|
3188
|
+
runLength++;
|
|
3189
|
+
if (runLength > bestLength) {
|
|
3190
|
+
bestLength = runLength;
|
|
3191
|
+
bestStart = runStart;
|
|
3187
3192
|
}
|
|
3188
|
-
if (i > 0 && input[i - 1] === ":") {
|
|
3189
|
-
endipv6Encountered = true;
|
|
3190
|
-
}
|
|
3191
|
-
address.push(":");
|
|
3192
|
-
continue;
|
|
3193
|
-
} else if (cursor === "%") {
|
|
3194
|
-
if (!consume(buffer, address, output)) {
|
|
3195
|
-
break;
|
|
3196
|
-
}
|
|
3197
|
-
consume = consumeIsZone;
|
|
3198
3193
|
} else {
|
|
3199
|
-
|
|
3194
|
+
runStart = -1;
|
|
3195
|
+
runLength = 0;
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
if (bestLength < 2) return hextets.join(":");
|
|
3199
|
+
const head = hextets.slice(0, bestStart).join(":");
|
|
3200
|
+
const tail = hextets.slice(bestStart + bestLength).join(":");
|
|
3201
|
+
return head + "::" + tail;
|
|
3202
|
+
}
|
|
3203
|
+
function normalizeIPv6Address(input) {
|
|
3204
|
+
const compression = input.indexOf("::");
|
|
3205
|
+
if (compression !== -1 && input.indexOf("::", compression + 1) !== -1) return void 0;
|
|
3206
|
+
const left = compression === -1 ? input.split(":") : input.slice(0, compression).split(":");
|
|
3207
|
+
const right = compression === -1 ? [] : input.slice(compression + 2).split(":");
|
|
3208
|
+
if (compression !== -1) {
|
|
3209
|
+
if (left.length === 1 && left[0] === "") left.length = 0;
|
|
3210
|
+
if (right.length === 1 && right[0] === "") right.length = 0;
|
|
3211
|
+
}
|
|
3212
|
+
const parts = left.concat(right);
|
|
3213
|
+
let hextetCount = 0;
|
|
3214
|
+
for (let i = 0; i < parts.length; i++) {
|
|
3215
|
+
const part = parts[i];
|
|
3216
|
+
if (part === "") return void 0;
|
|
3217
|
+
if (part.indexOf(".") !== -1) {
|
|
3218
|
+
if (i !== parts.length - 1 || compression !== -1 && right.length === 0 || !isIPv4(part)) return void 0;
|
|
3219
|
+
hextetCount += 2;
|
|
3200
3220
|
continue;
|
|
3201
3221
|
}
|
|
3222
|
+
if (!isHextet(part)) return void 0;
|
|
3223
|
+
parts[i] = parseInt(part, 16).toString(16);
|
|
3224
|
+
hextetCount++;
|
|
3202
3225
|
}
|
|
3203
|
-
if (
|
|
3204
|
-
if (
|
|
3205
|
-
|
|
3206
|
-
} else if (endIpv6) {
|
|
3207
|
-
address.push(buffer.join(""));
|
|
3208
|
-
} else {
|
|
3209
|
-
address.push(stringArrayToHexStripped(buffer));
|
|
3210
|
-
}
|
|
3226
|
+
if (compression === -1) {
|
|
3227
|
+
if (hextetCount !== 8) return void 0;
|
|
3228
|
+
return compressIPv6ZeroRun(parts);
|
|
3211
3229
|
}
|
|
3212
|
-
|
|
3213
|
-
|
|
3230
|
+
if (hextetCount >= 8) return void 0;
|
|
3231
|
+
const expanded = parts.slice(0, left.length);
|
|
3232
|
+
for (let i = hextetCount; i < 8; i++) expanded.push("0");
|
|
3233
|
+
for (let i = left.length; i < parts.length; i++) expanded.push(parts[i]);
|
|
3234
|
+
return compressIPv6ZeroRun(expanded);
|
|
3214
3235
|
}
|
|
3215
3236
|
function normalizeIPv6(host) {
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
}
|
|
3219
|
-
|
|
3220
|
-
if (
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3237
|
+
const bracketed = host[0] === "[" && host[host.length - 1] === "]";
|
|
3238
|
+
const hasBracket = host[0] === "[" || host[host.length - 1] === "]";
|
|
3239
|
+
if (hasBracket && !bracketed) return { host, isIPV6: false, error: true };
|
|
3240
|
+
let input = bracketed ? host.slice(1, -1) : host;
|
|
3241
|
+
if (bracketed && isIPvFuture(input)) {
|
|
3242
|
+
input = input.toLowerCase();
|
|
3243
|
+
return { host: `[${input}]`, escapedHost: input, isIPV6: false, isIPVFuture: true };
|
|
3244
|
+
}
|
|
3245
|
+
if (findToken(input, ":") < 2) {
|
|
3246
|
+
return { host, isIPV6: false, error: bracketed };
|
|
3247
|
+
}
|
|
3248
|
+
let zoneIdentifier = "";
|
|
3249
|
+
const zoneSeparator = input.indexOf("%");
|
|
3250
|
+
if (zoneSeparator !== -1) {
|
|
3251
|
+
const separatorLength = input.slice(zoneSeparator, zoneSeparator + 3).toLowerCase() === "%25" ? 3 : 1;
|
|
3252
|
+
zoneIdentifier = input.slice(zoneSeparator + separatorLength);
|
|
3253
|
+
if (!isZoneIdentifier(zoneIdentifier)) return { host, isIPV6: false, error: true };
|
|
3254
|
+
input = input.slice(0, zoneSeparator);
|
|
3255
|
+
}
|
|
3256
|
+
const address = normalizeIPv6Address(input);
|
|
3257
|
+
if (address === void 0) return { host, isIPV6: false, error: true };
|
|
3258
|
+
return {
|
|
3259
|
+
host: address + (zoneIdentifier ? "%" + zoneIdentifier : ""),
|
|
3260
|
+
escapedHost: address + (zoneIdentifier ? "%25" + zoneIdentifier : ""),
|
|
3261
|
+
isIPV6: true
|
|
3262
|
+
};
|
|
3231
3263
|
}
|
|
3232
3264
|
function findToken(str2, token) {
|
|
3233
3265
|
let ind = 0;
|
|
@@ -3346,7 +3378,8 @@ var require_utils = __commonJS({
|
|
|
3346
3378
|
function normalizePathEncoding(input) {
|
|
3347
3379
|
let output = "";
|
|
3348
3380
|
for (let i = 0; i < input.length; i++) {
|
|
3349
|
-
|
|
3381
|
+
const ch = input[i];
|
|
3382
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
3350
3383
|
const hex = input.slice(i + 1, i + 3);
|
|
3351
3384
|
if (isHexPair(hex)) {
|
|
3352
3385
|
const normalizedHex = hex.toUpperCase();
|
|
@@ -3360,10 +3393,152 @@ var require_utils = __commonJS({
|
|
|
3360
3393
|
continue;
|
|
3361
3394
|
}
|
|
3362
3395
|
}
|
|
3363
|
-
if (isPathCharacter(
|
|
3364
|
-
output +=
|
|
3396
|
+
if (isPathCharacter(ch)) {
|
|
3397
|
+
output += ch;
|
|
3398
|
+
} else {
|
|
3399
|
+
const code = input.charCodeAt(i);
|
|
3400
|
+
if (code < 128) {
|
|
3401
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
3402
|
+
} else if (code < 55296 || code > 57343) {
|
|
3403
|
+
output += percentEncodeNonAscii(code);
|
|
3404
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
3405
|
+
const low = input.charCodeAt(i + 1);
|
|
3406
|
+
if (low >= 56320 && low <= 57343) {
|
|
3407
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
3408
|
+
i++;
|
|
3409
|
+
} else {
|
|
3410
|
+
output += percentEncodeNonAscii(65533);
|
|
3411
|
+
}
|
|
3412
|
+
} else {
|
|
3413
|
+
output += percentEncodeNonAscii(65533);
|
|
3414
|
+
}
|
|
3415
|
+
}
|
|
3416
|
+
}
|
|
3417
|
+
return output;
|
|
3418
|
+
}
|
|
3419
|
+
function serializePathEncoding(input, pathNoScheme = false) {
|
|
3420
|
+
let output = "";
|
|
3421
|
+
let firstSegment = pathNoScheme && input[0] !== "/";
|
|
3422
|
+
for (let i = 0; i < input.length; i++) {
|
|
3423
|
+
const ch = input[i];
|
|
3424
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
3425
|
+
const hex = input.slice(i + 1, i + 3);
|
|
3426
|
+
if (isHexPair(hex)) {
|
|
3427
|
+
output += "%" + hex.toUpperCase();
|
|
3428
|
+
i += 2;
|
|
3429
|
+
continue;
|
|
3430
|
+
}
|
|
3431
|
+
}
|
|
3432
|
+
if (ch === "/") {
|
|
3433
|
+
firstSegment = false;
|
|
3434
|
+
}
|
|
3435
|
+
if (isPathCharacter(ch) && (ch !== ":" || !firstSegment)) {
|
|
3436
|
+
output += ch;
|
|
3365
3437
|
} else {
|
|
3366
|
-
|
|
3438
|
+
const code = input.charCodeAt(i);
|
|
3439
|
+
if (code < 128) {
|
|
3440
|
+
output += BYTE_HEX[code];
|
|
3441
|
+
} else if (code < 55296 || code > 57343) {
|
|
3442
|
+
output += percentEncodeNonAscii(code);
|
|
3443
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
3444
|
+
const low = input.charCodeAt(i + 1);
|
|
3445
|
+
if (low >= 56320 && low <= 57343) {
|
|
3446
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
3447
|
+
i++;
|
|
3448
|
+
} else {
|
|
3449
|
+
output += percentEncodeNonAscii(65533);
|
|
3450
|
+
}
|
|
3451
|
+
} else {
|
|
3452
|
+
output += percentEncodeNonAscii(65533);
|
|
3453
|
+
}
|
|
3454
|
+
}
|
|
3455
|
+
}
|
|
3456
|
+
return output;
|
|
3457
|
+
}
|
|
3458
|
+
function encodeComponent(input, isAllowed) {
|
|
3459
|
+
let output = "";
|
|
3460
|
+
for (let i = 0; i < input.length; i++) {
|
|
3461
|
+
const ch = input[i];
|
|
3462
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
3463
|
+
const hex = input.slice(i + 1, i + 3);
|
|
3464
|
+
if (isHexPair(hex)) {
|
|
3465
|
+
output += "%" + hex.toUpperCase();
|
|
3466
|
+
i += 2;
|
|
3467
|
+
continue;
|
|
3468
|
+
}
|
|
3469
|
+
}
|
|
3470
|
+
if (isAllowed(ch)) {
|
|
3471
|
+
output += ch;
|
|
3472
|
+
} else {
|
|
3473
|
+
const code = input.charCodeAt(i);
|
|
3474
|
+
if (code < 128) {
|
|
3475
|
+
output += BYTE_HEX[code];
|
|
3476
|
+
} else if (code < 55296 || code > 57343) {
|
|
3477
|
+
output += percentEncodeNonAscii(code);
|
|
3478
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
3479
|
+
const low = input.charCodeAt(i + 1);
|
|
3480
|
+
if (low >= 56320 && low <= 57343) {
|
|
3481
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
3482
|
+
i++;
|
|
3483
|
+
} else {
|
|
3484
|
+
output += percentEncodeNonAscii(65533);
|
|
3485
|
+
}
|
|
3486
|
+
} else {
|
|
3487
|
+
output += percentEncodeNonAscii(65533);
|
|
3488
|
+
}
|
|
3489
|
+
}
|
|
3490
|
+
}
|
|
3491
|
+
return output;
|
|
3492
|
+
}
|
|
3493
|
+
function encodeUserinfo(input) {
|
|
3494
|
+
return encodeComponent(input, isUserinfoCharacter);
|
|
3495
|
+
}
|
|
3496
|
+
function encodeQuery(input) {
|
|
3497
|
+
return encodeComponent(input, isQueryFragmentCharacter);
|
|
3498
|
+
}
|
|
3499
|
+
function encodeFragment(input) {
|
|
3500
|
+
return encodeComponent(input, isQueryFragmentCharacter);
|
|
3501
|
+
}
|
|
3502
|
+
function isEscapeSafe(cp) {
|
|
3503
|
+
return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;
|
|
3504
|
+
}
|
|
3505
|
+
function normalizeQueryFragmentEncoding(input) {
|
|
3506
|
+
let output = "";
|
|
3507
|
+
for (let i = 0; i < input.length; i++) {
|
|
3508
|
+
const ch = input[i];
|
|
3509
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
3510
|
+
const hex = input.slice(i + 1, i + 3);
|
|
3511
|
+
if (isHexPair(hex)) {
|
|
3512
|
+
const normalizedHex = hex.toUpperCase();
|
|
3513
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
3514
|
+
if (isUnreserved(decoded)) {
|
|
3515
|
+
output += decoded;
|
|
3516
|
+
} else {
|
|
3517
|
+
output += "%" + normalizedHex;
|
|
3518
|
+
}
|
|
3519
|
+
i += 2;
|
|
3520
|
+
continue;
|
|
3521
|
+
}
|
|
3522
|
+
}
|
|
3523
|
+
if (isQueryFragmentCharacter(ch)) {
|
|
3524
|
+
output += ch;
|
|
3525
|
+
} else {
|
|
3526
|
+
const code = input.charCodeAt(i);
|
|
3527
|
+
if (code < 128) {
|
|
3528
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
3529
|
+
} else if (code < 55296 || code > 57343) {
|
|
3530
|
+
output += percentEncodeNonAscii(code);
|
|
3531
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
3532
|
+
const low = input.charCodeAt(i + 1);
|
|
3533
|
+
if (low >= 56320 && low <= 57343) {
|
|
3534
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
3535
|
+
i++;
|
|
3536
|
+
} else {
|
|
3537
|
+
output += percentEncodeNonAscii(65533);
|
|
3538
|
+
}
|
|
3539
|
+
} else {
|
|
3540
|
+
output += percentEncodeNonAscii(65533);
|
|
3541
|
+
}
|
|
3367
3542
|
}
|
|
3368
3543
|
}
|
|
3369
3544
|
return output;
|
|
@@ -3386,14 +3561,18 @@ var require_utils = __commonJS({
|
|
|
3386
3561
|
function recomposeAuthority(component) {
|
|
3387
3562
|
const uriTokens = [];
|
|
3388
3563
|
if (component.userinfo !== void 0) {
|
|
3389
|
-
uriTokens.push(component.userinfo);
|
|
3564
|
+
uriTokens.push(encodeUserinfo(component.userinfo));
|
|
3390
3565
|
uriTokens.push("@");
|
|
3391
3566
|
}
|
|
3392
3567
|
if (component.host !== void 0) {
|
|
3393
|
-
let host =
|
|
3568
|
+
let host = component.host;
|
|
3394
3569
|
if (!isIPv4(host)) {
|
|
3395
|
-
|
|
3396
|
-
if (ipV6res.isIPV6
|
|
3570
|
+
let ipV6res = normalizeIPv6(host);
|
|
3571
|
+
if (ipV6res.isIPV6 !== true && ipV6res.isIPVFuture !== true) {
|
|
3572
|
+
host = normalizePercentEncoding(host, true);
|
|
3573
|
+
ipV6res = normalizeIPv6(host);
|
|
3574
|
+
}
|
|
3575
|
+
if (ipV6res.isIPV6 === true || ipV6res.isIPVFuture === true) {
|
|
3397
3576
|
host = `[${ipV6res.escapedHost}]`;
|
|
3398
3577
|
} else {
|
|
3399
3578
|
host = reescapeHostDelimiters(host, false);
|
|
@@ -3413,6 +3592,11 @@ var require_utils = __commonJS({
|
|
|
3413
3592
|
reescapeHostDelimiters,
|
|
3414
3593
|
normalizePercentEncoding,
|
|
3415
3594
|
normalizePathEncoding,
|
|
3595
|
+
serializePathEncoding,
|
|
3596
|
+
normalizeQueryFragmentEncoding,
|
|
3597
|
+
encodeUserinfo,
|
|
3598
|
+
encodeQuery,
|
|
3599
|
+
encodeFragment,
|
|
3416
3600
|
escapePreservingEscapes,
|
|
3417
3601
|
removeDotSegments,
|
|
3418
3602
|
isIPv4,
|
|
@@ -3423,12 +3607,12 @@ var require_utils = __commonJS({
|
|
|
3423
3607
|
}
|
|
3424
3608
|
});
|
|
3425
3609
|
|
|
3426
|
-
// node_modules/.pnpm/fast-uri@3.1.
|
|
3610
|
+
// node_modules/.pnpm/fast-uri@3.1.6/node_modules/fast-uri/lib/schemes.js
|
|
3427
3611
|
var require_schemes = __commonJS({
|
|
3428
|
-
"node_modules/.pnpm/fast-uri@3.1.
|
|
3612
|
+
"node_modules/.pnpm/fast-uri@3.1.6/node_modules/fast-uri/lib/schemes.js"(exports, module) {
|
|
3429
3613
|
"use strict";
|
|
3430
3614
|
var { isUUID } = require_utils();
|
|
3431
|
-
var URN_REG =
|
|
3615
|
+
var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
|
|
3432
3616
|
var supportedSchemeNames = (
|
|
3433
3617
|
/** @type {const} */
|
|
3434
3618
|
[
|
|
@@ -3489,9 +3673,10 @@ var require_schemes = __commonJS({
|
|
|
3489
3673
|
wsComponent.secure = void 0;
|
|
3490
3674
|
}
|
|
3491
3675
|
if (wsComponent.resourceName) {
|
|
3492
|
-
const
|
|
3676
|
+
const queryIndex = wsComponent.resourceName.indexOf("?");
|
|
3677
|
+
const path = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
|
|
3493
3678
|
wsComponent.path = path && path !== "/" ? path : void 0;
|
|
3494
|
-
wsComponent.query =
|
|
3679
|
+
wsComponent.query = queryIndex === -1 ? void 0 : wsComponent.resourceName.slice(queryIndex + 1);
|
|
3495
3680
|
wsComponent.resourceName = void 0;
|
|
3496
3681
|
}
|
|
3497
3682
|
wsComponent.fragment = void 0;
|
|
@@ -3503,7 +3688,7 @@ var require_schemes = __commonJS({
|
|
|
3503
3688
|
return urnComponent;
|
|
3504
3689
|
}
|
|
3505
3690
|
const matches = urnComponent.path.match(URN_REG);
|
|
3506
|
-
if (matches) {
|
|
3691
|
+
if (matches && matches[0] === urnComponent.path) {
|
|
3507
3692
|
const scheme = options.scheme || urnComponent.scheme || "urn";
|
|
3508
3693
|
urnComponent.nid = matches[1].toLowerCase();
|
|
3509
3694
|
urnComponent.nss = matches[2];
|
|
@@ -3633,12 +3818,21 @@ var require_schemes = __commonJS({
|
|
|
3633
3818
|
}
|
|
3634
3819
|
});
|
|
3635
3820
|
|
|
3636
|
-
// node_modules/.pnpm/fast-uri@3.1.
|
|
3821
|
+
// node_modules/.pnpm/fast-uri@3.1.6/node_modules/fast-uri/index.js
|
|
3637
3822
|
var require_fast_uri = __commonJS({
|
|
3638
|
-
"node_modules/.pnpm/fast-uri@3.1.
|
|
3823
|
+
"node_modules/.pnpm/fast-uri@3.1.6/node_modules/fast-uri/index.js"(exports, module) {
|
|
3639
3824
|
"use strict";
|
|
3640
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding,
|
|
3825
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
3641
3826
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
3827
|
+
var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
|
|
3828
|
+
var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
|
|
3829
|
+
function decodeValidScheme(scheme) {
|
|
3830
|
+
const decodedScheme = unescape(String(scheme));
|
|
3831
|
+
if (!VALID_SCHEME.test(decodedScheme)) {
|
|
3832
|
+
throw new TypeError(MALFORMED_SCHEME_ERROR);
|
|
3833
|
+
}
|
|
3834
|
+
return decodedScheme;
|
|
3835
|
+
}
|
|
3642
3836
|
function normalize(uri, options) {
|
|
3643
3837
|
if (typeof uri === "string") {
|
|
3644
3838
|
uri = /** @type {T} */
|
|
@@ -3651,12 +3845,34 @@ var require_fast_uri = __commonJS({
|
|
|
3651
3845
|
}
|
|
3652
3846
|
function resolve3(baseURI, relativeURI, options) {
|
|
3653
3847
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
3654
|
-
const {
|
|
3655
|
-
|
|
3656
|
-
|
|
3848
|
+
const {
|
|
3849
|
+
parsed: baseParsed,
|
|
3850
|
+
malformedAuthorityOrPort: baseMalformed,
|
|
3851
|
+
malformedPercentEncoding: baseMalformedPercentEncoding,
|
|
3852
|
+
malformedSchemeSpecific: baseMalformedSchemeSpecific,
|
|
3853
|
+
malformedHost: baseMalformedHost,
|
|
3854
|
+
malformedScheme: baseMalformedScheme
|
|
3855
|
+
} = parseWithStatus(baseURI, schemelessOptions);
|
|
3856
|
+
const {
|
|
3857
|
+
parsed: relativeParsed,
|
|
3858
|
+
malformedAuthorityOrPort: relativeMalformed,
|
|
3859
|
+
malformedPercentEncoding: relativeMalformedPercentEncoding,
|
|
3860
|
+
malformedSchemeSpecific: relativeMalformedSchemeSpecific,
|
|
3861
|
+
malformedHost: relativeMalformedHost,
|
|
3862
|
+
malformedScheme: relativeMalformedScheme
|
|
3863
|
+
} = parseWithStatus(relativeURI, schemelessOptions);
|
|
3864
|
+
if (baseMalformed || relativeMalformed || baseMalformedPercentEncoding || relativeMalformedPercentEncoding || baseMalformedSchemeSpecific || relativeMalformedSchemeSpecific || baseMalformedHost || relativeMalformedHost || baseMalformedScheme || relativeMalformedScheme) {
|
|
3657
3865
|
throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
|
|
3658
3866
|
}
|
|
3659
3867
|
const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
|
|
3868
|
+
const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
|
|
3869
|
+
const resolvedHost = resolved.host;
|
|
3870
|
+
const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
|
|
3871
|
+
canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
|
|
3872
|
+
const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !new RegExp("\\P{ASCII}", "u").test(resolvedHost);
|
|
3873
|
+
if (resolved.error && !encodedASCIIHost) {
|
|
3874
|
+
throw new Error(resolved.error);
|
|
3875
|
+
}
|
|
3660
3876
|
schemelessOptions.skipEscape = true;
|
|
3661
3877
|
return serialize(resolved, schemelessOptions);
|
|
3662
3878
|
}
|
|
@@ -3716,7 +3932,7 @@ var require_fast_uri = __commonJS({
|
|
|
3716
3932
|
function equal(uriA, uriB, options) {
|
|
3717
3933
|
const normalizedA = normalizeComparableURI(uriA, options);
|
|
3718
3934
|
const normalizedB = normalizeComparableURI(uriB, options);
|
|
3719
|
-
return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA
|
|
3935
|
+
return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA === normalizedB;
|
|
3720
3936
|
}
|
|
3721
3937
|
function serialize(cmpts, opts) {
|
|
3722
3938
|
const component = {
|
|
@@ -3737,19 +3953,22 @@ var require_fast_uri = __commonJS({
|
|
|
3737
3953
|
};
|
|
3738
3954
|
const options = Object.assign({}, opts);
|
|
3739
3955
|
const uriTokens = [];
|
|
3956
|
+
if (component.scheme) {
|
|
3957
|
+
component.scheme = decodeValidScheme(component.scheme);
|
|
3958
|
+
}
|
|
3740
3959
|
const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
|
|
3741
3960
|
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
|
|
3961
|
+
const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
|
|
3962
|
+
const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
|
|
3742
3963
|
if (component.path !== void 0) {
|
|
3743
3964
|
if (!options.skipEscape) {
|
|
3744
|
-
component.path =
|
|
3745
|
-
if (component.scheme !== void 0) {
|
|
3746
|
-
component.path = component.path.split("%3A").join(":");
|
|
3747
|
-
}
|
|
3965
|
+
component.path = serializePathEncoding(component.path, pathNoScheme);
|
|
3748
3966
|
} else {
|
|
3749
3967
|
component.path = normalizePercentEncoding(component.path);
|
|
3750
3968
|
}
|
|
3751
3969
|
}
|
|
3752
3970
|
if (options.reference !== "suffix" && component.scheme) {
|
|
3971
|
+
component.scheme = decodeValidScheme(component.scheme);
|
|
3753
3972
|
uriTokens.push(component.scheme, ":");
|
|
3754
3973
|
}
|
|
3755
3974
|
const authority = recomposeAuthority(component);
|
|
@@ -3767,16 +3986,19 @@ var require_fast_uri = __commonJS({
|
|
|
3767
3986
|
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
3768
3987
|
s = removeDotSegments(s);
|
|
3769
3988
|
}
|
|
3989
|
+
if (pathNoScheme) {
|
|
3990
|
+
s = serializePathEncoding(s, true);
|
|
3991
|
+
}
|
|
3770
3992
|
if (authority === void 0 && s[0] === "/" && s[1] === "/") {
|
|
3771
3993
|
s = "/%2F" + s.slice(2);
|
|
3772
3994
|
}
|
|
3773
3995
|
uriTokens.push(s);
|
|
3774
3996
|
}
|
|
3775
3997
|
if (component.query !== void 0) {
|
|
3776
|
-
uriTokens.push("?", component.query);
|
|
3998
|
+
uriTokens.push("?", encodeQuery(component.query));
|
|
3777
3999
|
}
|
|
3778
4000
|
if (component.fragment !== void 0) {
|
|
3779
|
-
uriTokens.push("#", component.fragment);
|
|
4001
|
+
uriTokens.push("#", encodeFragment(component.fragment));
|
|
3780
4002
|
}
|
|
3781
4003
|
return uriTokens.join("");
|
|
3782
4004
|
}
|
|
@@ -3792,6 +4014,32 @@ var require_fast_uri = __commonJS({
|
|
|
3792
4014
|
}
|
|
3793
4015
|
return void 0;
|
|
3794
4016
|
}
|
|
4017
|
+
function hasMalformedPercentEncoding(component) {
|
|
4018
|
+
if (component === void 0) return false;
|
|
4019
|
+
let percent = component.indexOf("%");
|
|
4020
|
+
while (percent !== -1) {
|
|
4021
|
+
if (percent + 2 >= component.length || !/^[\da-f]{2}$/iu.test(component.slice(percent + 1, percent + 3))) {
|
|
4022
|
+
return true;
|
|
4023
|
+
}
|
|
4024
|
+
percent = component.indexOf("%", percent + 3);
|
|
4025
|
+
}
|
|
4026
|
+
return false;
|
|
4027
|
+
}
|
|
4028
|
+
function hasMalformedComponentPercentEncoding(matches) {
|
|
4029
|
+
const host = matches[4];
|
|
4030
|
+
return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !(host[0] === "[" && host[host.length - 1] === "]") && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
|
|
4031
|
+
}
|
|
4032
|
+
function canonicalizeHost(parsed, options, schemeHandler, isIP) {
|
|
4033
|
+
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && parsed.host[0] !== "[" && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
4034
|
+
try {
|
|
4035
|
+
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
4036
|
+
} catch (e) {
|
|
4037
|
+
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
4038
|
+
return true;
|
|
4039
|
+
}
|
|
4040
|
+
}
|
|
4041
|
+
return false;
|
|
4042
|
+
}
|
|
3795
4043
|
function parseWithStatus(uri, opts) {
|
|
3796
4044
|
const options = Object.assign({}, opts);
|
|
3797
4045
|
const parsed = {
|
|
@@ -3804,6 +4052,11 @@ var require_fast_uri = __commonJS({
|
|
|
3804
4052
|
fragment: void 0
|
|
3805
4053
|
};
|
|
3806
4054
|
let malformedAuthorityOrPort = false;
|
|
4055
|
+
let malformedPercentEncoding = false;
|
|
4056
|
+
let malformedSchemeSpecific = false;
|
|
4057
|
+
let malformedHost = false;
|
|
4058
|
+
let malformedIPLiteral = false;
|
|
4059
|
+
let malformedScheme = false;
|
|
3807
4060
|
let isIP = false;
|
|
3808
4061
|
if (options.reference === "suffix") {
|
|
3809
4062
|
if (options.scheme) {
|
|
@@ -3840,6 +4093,19 @@ var require_fast_uri = __commonJS({
|
|
|
3840
4093
|
parsed.path = matches[6] || "";
|
|
3841
4094
|
parsed.query = matches[7];
|
|
3842
4095
|
parsed.fragment = matches[8];
|
|
4096
|
+
if (parsed.scheme !== void 0) {
|
|
4097
|
+
const decodedScheme = unescape(parsed.scheme);
|
|
4098
|
+
if (VALID_SCHEME.test(decodedScheme)) {
|
|
4099
|
+
parsed.scheme = decodedScheme.toLowerCase();
|
|
4100
|
+
} else {
|
|
4101
|
+
parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
|
|
4102
|
+
malformedScheme = true;
|
|
4103
|
+
}
|
|
4104
|
+
}
|
|
4105
|
+
malformedPercentEncoding = hasMalformedComponentPercentEncoding(matches);
|
|
4106
|
+
if (malformedPercentEncoding) {
|
|
4107
|
+
parsed.error = parsed.error || "URI contains malformed percent-encoding.";
|
|
4108
|
+
}
|
|
3843
4109
|
if (isNaN(parsed.port)) {
|
|
3844
4110
|
parsed.port = matches[5];
|
|
3845
4111
|
}
|
|
@@ -3851,9 +4117,15 @@ var require_fast_uri = __commonJS({
|
|
|
3851
4117
|
if (parsed.host) {
|
|
3852
4118
|
const ipv4result = isIPv4(parsed.host);
|
|
3853
4119
|
if (ipv4result === false) {
|
|
4120
|
+
const bracketedIPLiteral = parsed.host[0] === "[" && parsed.host[parsed.host.length - 1] === "]";
|
|
3854
4121
|
const ipv6result = normalizeIPv6(parsed.host);
|
|
3855
|
-
|
|
3856
|
-
|
|
4122
|
+
isIP = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
|
|
4123
|
+
malformedIPLiteral = bracketedIPLiteral && ipv6result.error === true;
|
|
4124
|
+
parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
|
|
4125
|
+
if (malformedIPLiteral) {
|
|
4126
|
+
parsed.error = parsed.error || "URI host is malformed.";
|
|
4127
|
+
malformedAuthorityOrPort = true;
|
|
4128
|
+
}
|
|
3857
4129
|
} else {
|
|
3858
4130
|
isIP = true;
|
|
3859
4131
|
}
|
|
@@ -3871,42 +4143,34 @@ var require_fast_uri = __commonJS({
|
|
|
3871
4143
|
parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
|
|
3872
4144
|
}
|
|
3873
4145
|
const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
|
|
3874
|
-
|
|
3875
|
-
if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
3876
|
-
try {
|
|
3877
|
-
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
3878
|
-
} catch (e) {
|
|
3879
|
-
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
3880
|
-
}
|
|
3881
|
-
}
|
|
3882
|
-
}
|
|
4146
|
+
malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
|
|
3883
4147
|
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
3884
4148
|
if (uri.indexOf("%") !== -1) {
|
|
3885
|
-
if (parsed.
|
|
3886
|
-
parsed.
|
|
3887
|
-
|
|
3888
|
-
if (parsed.host !== void 0) {
|
|
3889
|
-
parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
|
|
4149
|
+
if (parsed.host !== void 0 && !malformedIPLiteral) {
|
|
4150
|
+
const host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
|
|
4151
|
+
parsed.host = reescapeHostDelimiters(host, isIP);
|
|
3890
4152
|
}
|
|
3891
4153
|
}
|
|
3892
4154
|
if (parsed.path) {
|
|
3893
4155
|
parsed.path = normalizePathEncoding(parsed.path);
|
|
3894
4156
|
}
|
|
4157
|
+
if (parsed.query) {
|
|
4158
|
+
parsed.query = normalizeQueryFragmentEncoding(parsed.query);
|
|
4159
|
+
}
|
|
3895
4160
|
if (parsed.fragment) {
|
|
3896
|
-
|
|
3897
|
-
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
3898
|
-
} catch {
|
|
3899
|
-
parsed.error = parsed.error || "URI malformed";
|
|
3900
|
-
}
|
|
4161
|
+
parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
|
|
3901
4162
|
}
|
|
3902
4163
|
}
|
|
3903
4164
|
if (schemeHandler && schemeHandler.parse) {
|
|
3904
4165
|
schemeHandler.parse(parsed, options);
|
|
4166
|
+
if (schemeHandler === SCHEMES.urn && parsed.nid === void 0) {
|
|
4167
|
+
malformedSchemeSpecific = true;
|
|
4168
|
+
}
|
|
3905
4169
|
}
|
|
3906
4170
|
} else {
|
|
3907
4171
|
parsed.error = parsed.error || "URI can not be parsed.";
|
|
3908
4172
|
}
|
|
3909
|
-
return { parsed, malformedAuthorityOrPort };
|
|
4173
|
+
return { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme };
|
|
3910
4174
|
}
|
|
3911
4175
|
function parse3(uri, opts) {
|
|
3912
4176
|
return parseWithStatus(uri, opts).parsed;
|
|
@@ -3915,20 +4179,28 @@ var require_fast_uri = __commonJS({
|
|
|
3915
4179
|
return normalizeStringWithStatus(uri, opts).normalized;
|
|
3916
4180
|
}
|
|
3917
4181
|
function normalizeStringWithStatus(uri, opts) {
|
|
3918
|
-
const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
|
|
4182
|
+
const { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = parseWithStatus(uri, opts);
|
|
3919
4183
|
return {
|
|
3920
|
-
normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
|
|
3921
|
-
malformedAuthorityOrPort
|
|
4184
|
+
normalized: malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? uri : serialize(parsed, opts),
|
|
4185
|
+
malformedAuthorityOrPort,
|
|
4186
|
+
malformedPercentEncoding,
|
|
4187
|
+
malformedSchemeSpecific,
|
|
4188
|
+
malformedHost,
|
|
4189
|
+
malformedScheme
|
|
3922
4190
|
};
|
|
3923
4191
|
}
|
|
3924
4192
|
function normalizeComparableURI(uri, opts) {
|
|
3925
|
-
if (typeof uri
|
|
3926
|
-
|
|
3927
|
-
return malformedAuthorityOrPort ? void 0 : normalized;
|
|
4193
|
+
if (typeof uri !== "string" && typeof uri !== "object") {
|
|
4194
|
+
return void 0;
|
|
3928
4195
|
}
|
|
3929
|
-
|
|
3930
|
-
|
|
4196
|
+
let value;
|
|
4197
|
+
try {
|
|
4198
|
+
value = typeof uri === "string" ? uri : serialize(uri, opts);
|
|
4199
|
+
} catch {
|
|
4200
|
+
return void 0;
|
|
3931
4201
|
}
|
|
4202
|
+
const { normalized, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = normalizeStringWithStatus(value, opts);
|
|
4203
|
+
return malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? void 0 : normalized;
|
|
3932
4204
|
}
|
|
3933
4205
|
var fastUri = {
|
|
3934
4206
|
SCHEMES,
|
|
@@ -23342,9 +23614,9 @@ var require_pino = __commonJS({
|
|
|
23342
23614
|
}
|
|
23343
23615
|
});
|
|
23344
23616
|
|
|
23345
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
23617
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/logger.js
|
|
23346
23618
|
var require_logger = __commonJS({
|
|
23347
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
23619
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/logger.js"(exports, module) {
|
|
23348
23620
|
"use strict";
|
|
23349
23621
|
var logger = require_pino()();
|
|
23350
23622
|
logger.level = "trace";
|
|
@@ -48700,9 +48972,9 @@ var require_mailsplit = __commonJS({
|
|
|
48700
48972
|
}
|
|
48701
48973
|
});
|
|
48702
48974
|
|
|
48703
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
48975
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/limited-passthrough.js
|
|
48704
48976
|
var require_limited_passthrough = __commonJS({
|
|
48705
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
48977
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/limited-passthrough.js"(exports, module) {
|
|
48706
48978
|
"use strict";
|
|
48707
48979
|
var { Transform } = __require("stream");
|
|
48708
48980
|
var normalizeByteLimit = (value) => {
|
|
@@ -48741,9 +49013,9 @@ var require_limited_passthrough = __commonJS({
|
|
|
48741
49013
|
}
|
|
48742
49014
|
});
|
|
48743
49015
|
|
|
48744
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
49016
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/limits.js
|
|
48745
49017
|
var require_limits = __commonJS({
|
|
48746
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
49018
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/limits.js"(exports, module) {
|
|
48747
49019
|
"use strict";
|
|
48748
49020
|
var MAX_LITERAL_SIZE = 1024 * 1024 * 1024;
|
|
48749
49021
|
var MAX_LINE_SIZE = MAX_LITERAL_SIZE;
|
|
@@ -48760,9 +49032,9 @@ var require_limits = __commonJS({
|
|
|
48760
49032
|
}
|
|
48761
49033
|
});
|
|
48762
49034
|
|
|
48763
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
49035
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/imap-stream.js
|
|
48764
49036
|
var require_imap_stream = __commonJS({
|
|
48765
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
49037
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/imap-stream.js"(exports, module) {
|
|
48766
49038
|
"use strict";
|
|
48767
49039
|
var Transform = __require("stream").Transform;
|
|
48768
49040
|
var logger = require_logger();
|
|
@@ -49163,9 +49435,9 @@ var require_imap_stream = __commonJS({
|
|
|
49163
49435
|
}
|
|
49164
49436
|
});
|
|
49165
49437
|
|
|
49166
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
49438
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/imap-formal-syntax.js
|
|
49167
49439
|
var require_imap_formal_syntax = __commonJS({
|
|
49168
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
49440
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/imap-formal-syntax.js"(exports, module) {
|
|
49169
49441
|
"use strict";
|
|
49170
49442
|
function expandRange(start, end) {
|
|
49171
49443
|
let chars = [];
|
|
@@ -49309,9 +49581,9 @@ var require_imap_formal_syntax = __commonJS({
|
|
|
49309
49581
|
}
|
|
49310
49582
|
});
|
|
49311
49583
|
|
|
49312
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
49584
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/token-parser.js
|
|
49313
49585
|
var require_token_parser = __commonJS({
|
|
49314
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
49586
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/token-parser.js"(exports, module) {
|
|
49315
49587
|
"use strict";
|
|
49316
49588
|
var imapFormalSyntax = require_imap_formal_syntax();
|
|
49317
49589
|
var { MAX_LITERAL_SIZE, normalizeLimit, createLiteralTooLargeError } = require_limits();
|
|
@@ -49878,9 +50150,9 @@ var require_token_parser = __commonJS({
|
|
|
49878
50150
|
}
|
|
49879
50151
|
});
|
|
49880
50152
|
|
|
49881
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
50153
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/parser-instance.js
|
|
49882
50154
|
var require_parser_instance = __commonJS({
|
|
49883
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
50155
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/parser-instance.js"(exports, module) {
|
|
49884
50156
|
"use strict";
|
|
49885
50157
|
var imapFormalSyntax = require_imap_formal_syntax();
|
|
49886
50158
|
var { TokenParser } = require_token_parser();
|
|
@@ -50074,9 +50346,9 @@ var require_parser_instance = __commonJS({
|
|
|
50074
50346
|
}
|
|
50075
50347
|
});
|
|
50076
50348
|
|
|
50077
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
50349
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/imap-parser.js
|
|
50078
50350
|
var require_imap_parser = __commonJS({
|
|
50079
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
50351
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/imap-parser.js"(exports, module) {
|
|
50080
50352
|
"use strict";
|
|
50081
50353
|
var imapFormalSyntax = require_imap_formal_syntax();
|
|
50082
50354
|
var { ParserInstance } = require_parser_instance();
|
|
@@ -50134,9 +50406,9 @@ var require_imap_parser = __commonJS({
|
|
|
50134
50406
|
}
|
|
50135
50407
|
});
|
|
50136
50408
|
|
|
50137
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
50409
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/imap-compiler.js
|
|
50138
50410
|
var require_imap_compiler = __commonJS({
|
|
50139
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
50411
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/imap-compiler.js"(exports, module) {
|
|
50140
50412
|
"use strict";
|
|
50141
50413
|
var imapFormalSyntax = require_imap_formal_syntax();
|
|
50142
50414
|
var SEQ_RANGE = /^(\d+|\*)(:(\d+|\*))?$/;
|
|
@@ -50324,9 +50596,9 @@ var require_imap_compiler = __commonJS({
|
|
|
50324
50596
|
}
|
|
50325
50597
|
});
|
|
50326
50598
|
|
|
50327
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
50599
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/imap-handler.js
|
|
50328
50600
|
var require_imap_handler = __commonJS({
|
|
50329
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
50601
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/handler/imap-handler.js"(exports, module) {
|
|
50330
50602
|
"use strict";
|
|
50331
50603
|
var parser = require_imap_parser();
|
|
50332
50604
|
var compiler = require_imap_compiler();
|
|
@@ -50337,12 +50609,12 @@ var require_imap_handler = __commonJS({
|
|
|
50337
50609
|
}
|
|
50338
50610
|
});
|
|
50339
50611
|
|
|
50340
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
50612
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/package.json
|
|
50341
50613
|
var require_package4 = __commonJS({
|
|
50342
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
50614
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/package.json"(exports, module) {
|
|
50343
50615
|
module.exports = {
|
|
50344
50616
|
name: "imapflow",
|
|
50345
|
-
version: "1.7.
|
|
50617
|
+
version: "1.7.6",
|
|
50346
50618
|
description: "IMAP Client for Node",
|
|
50347
50619
|
main: "lib/imap-flow.js",
|
|
50348
50620
|
types: "lib/imap-flow.d.ts",
|
|
@@ -50374,7 +50646,7 @@ var require_package4 = __commonJS({
|
|
|
50374
50646
|
"@eslint/js": "10.0.1",
|
|
50375
50647
|
"@types/node": "26.2.0",
|
|
50376
50648
|
c8: "12.0.0",
|
|
50377
|
-
eslint: "10.
|
|
50649
|
+
eslint: "10.9.0",
|
|
50378
50650
|
"eslint-config-nodemailer": "1.2.0",
|
|
50379
50651
|
"eslint-config-prettier": "10.1.8",
|
|
50380
50652
|
grunt: "1.6.3",
|
|
@@ -54688,9 +54960,9 @@ var require_build = __commonJS({
|
|
|
54688
54960
|
}
|
|
54689
54961
|
});
|
|
54690
54962
|
|
|
54691
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
54963
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/connection-deadline.js
|
|
54692
54964
|
var require_connection_deadline = __commonJS({
|
|
54693
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
54965
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/connection-deadline.js"(exports, module) {
|
|
54694
54966
|
"use strict";
|
|
54695
54967
|
var CONNECT_TIMEOUT = 90 * 1e3;
|
|
54696
54968
|
var ConnectionDeadline = class {
|
|
@@ -54771,9 +55043,9 @@ var require_connection_deadline = __commonJS({
|
|
|
54771
55043
|
}
|
|
54772
55044
|
});
|
|
54773
55045
|
|
|
54774
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
55046
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/proxy-connection.js
|
|
54775
55047
|
var require_proxy_connection = __commonJS({
|
|
54776
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
55048
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/proxy-connection.js"(exports, module) {
|
|
54777
55049
|
"use strict";
|
|
54778
55050
|
var { SocksClient } = require_build();
|
|
54779
55051
|
var dns = __require("dns").promises;
|
|
@@ -55056,9 +55328,9 @@ var require_proxy_connection = __commonJS({
|
|
|
55056
55328
|
}
|
|
55057
55329
|
});
|
|
55058
55330
|
|
|
55059
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
55331
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/charsets.js
|
|
55060
55332
|
var require_charsets2 = __commonJS({
|
|
55061
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
55333
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/charsets.js"(exports, module) {
|
|
55062
55334
|
"use strict";
|
|
55063
55335
|
var CHARACTER_SETS = [
|
|
55064
55336
|
"US-ASCII",
|
|
@@ -55335,9 +55607,9 @@ var require_charsets2 = __commonJS({
|
|
|
55335
55607
|
}
|
|
55336
55608
|
});
|
|
55337
55609
|
|
|
55338
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
55610
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/jp-decoder.js
|
|
55339
55611
|
var require_jp_decoder = __commonJS({
|
|
55340
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
55612
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/jp-decoder.js"(exports, module) {
|
|
55341
55613
|
"use strict";
|
|
55342
55614
|
var { Transform } = __require("stream");
|
|
55343
55615
|
var encodingJapanese = require_src();
|
|
@@ -55401,9 +55673,9 @@ var require_jp_decoder = __commonJS({
|
|
|
55401
55673
|
}
|
|
55402
55674
|
});
|
|
55403
55675
|
|
|
55404
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
55676
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/tools.js
|
|
55405
55677
|
var require_tools2 = __commonJS({
|
|
55406
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
55678
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/tools.js"(exports, module) {
|
|
55407
55679
|
"use strict";
|
|
55408
55680
|
var libmime = require_libmime();
|
|
55409
55681
|
var { resolveCharset } = require_charsets2();
|
|
@@ -55436,7 +55708,103 @@ var require_tools2 = __commonJS({
|
|
|
55436
55708
|
var AuthenticationFailure = class extends Error {
|
|
55437
55709
|
authenticationFailed = true;
|
|
55438
55710
|
};
|
|
55711
|
+
var noop = () => {
|
|
55712
|
+
};
|
|
55713
|
+
var CONNECTION_ERROR_SITE_KEYS = ["rejectedFrom", "command", "path"];
|
|
55439
55714
|
var tools = {
|
|
55715
|
+
noop,
|
|
55716
|
+
/**
|
|
55717
|
+
* Builds an error describing a connection that is gone, stamped so it can be traced back to
|
|
55718
|
+
* where it came from: the connection id always travels on it, and each site names itself
|
|
55719
|
+
* through `meta` (`rejectedFrom`, plus the command or mailbox path it belongs to).
|
|
55720
|
+
*
|
|
55721
|
+
* A stack trace only records where an error was built, and close() hands a rejection to every
|
|
55722
|
+
* pending request and every queued lock in the same tick, so without these an error that
|
|
55723
|
+
* reaches a global unhandledRejection handler arrives with nothing that identifies the
|
|
55724
|
+
* connection it came from, let alone which of the rejected promises carried it.
|
|
55725
|
+
*
|
|
55726
|
+
* Takes the connection id rather than the connection, so the stamping stays in one place
|
|
55727
|
+
* without every caller having to be a full ImapFlow instance.
|
|
55728
|
+
*
|
|
55729
|
+
* @param {String} cid - Connection id
|
|
55730
|
+
* @param {String} code - Error code, e.g. 'NoConnection'
|
|
55731
|
+
* @param {String} message - Error message
|
|
55732
|
+
* @param {Object} [meta] - Fields to stamp on the error
|
|
55733
|
+
* @returns {Error} The stamped error
|
|
55734
|
+
*/
|
|
55735
|
+
buildConnectionError(cid, code, message, meta) {
|
|
55736
|
+
const error2 = new Error(message);
|
|
55737
|
+
error2.code = code;
|
|
55738
|
+
error2.cid = cid;
|
|
55739
|
+
if (meta) {
|
|
55740
|
+
Object.assign(error2, meta);
|
|
55741
|
+
}
|
|
55742
|
+
return error2;
|
|
55743
|
+
},
|
|
55744
|
+
/**
|
|
55745
|
+
* Re-stamps an existing connection error for a different rejection site.
|
|
55746
|
+
*
|
|
55747
|
+
* The same failure can be handed to more than one promise - close() rejects the in-flight
|
|
55748
|
+
* command, and runIdle() then rejects everything queued behind it - and each of those is a
|
|
55749
|
+
* separate promise with a separate consumer. Sharing one error object reports whichever of
|
|
55750
|
+
* them escapes under the first site's marker, which is the attribution these markers exist to
|
|
55751
|
+
* give.
|
|
55752
|
+
*
|
|
55753
|
+
* Everything describing *what went wrong* is carried over, because a re-stamped error reaches
|
|
55754
|
+
* user code through run() and callers branch on `responseStatus`, `serverResponseCode` and
|
|
55755
|
+
* friends. Everything describing *where it was rejected* is dropped, because the new site owns
|
|
55756
|
+
* those and a leftover `command` from the previous site is exactly as misleading as a leftover
|
|
55757
|
+
* `rejectedFrom`. The original travels on as `cause`.
|
|
55758
|
+
*
|
|
55759
|
+
* @param {Error} err - The error being re-stamped
|
|
55760
|
+
* @param {Object} meta - Fields for the new site, e.g. { rejectedFrom: 'preCheckWaiter' }
|
|
55761
|
+
* @returns {Error} A separate error describing the same failure at the new site
|
|
55762
|
+
*/
|
|
55763
|
+
restampConnectionError(err, meta) {
|
|
55764
|
+
let error2 = tools.buildConnectionError(err.cid, err.code, err.message, err);
|
|
55765
|
+
for (let key of CONNECTION_ERROR_SITE_KEYS) {
|
|
55766
|
+
delete error2[key];
|
|
55767
|
+
}
|
|
55768
|
+
if (meta) {
|
|
55769
|
+
Object.assign(error2, meta);
|
|
55770
|
+
}
|
|
55771
|
+
error2.cause = err;
|
|
55772
|
+
return error2;
|
|
55773
|
+
},
|
|
55774
|
+
/**
|
|
55775
|
+
* Creates a promise whose rejection is observed as soon as it exists.
|
|
55776
|
+
*
|
|
55777
|
+
* close() rejects every promise it owns - the in-flight and queued commands, the pending
|
|
55778
|
+
* connect(), the queued mailbox locks, the waiters for an IDLE break - synchronously, from a
|
|
55779
|
+
* socket event. A consumer that only reaches its `await` a microtask later has not attached a
|
|
55780
|
+
* handler yet at the moment Node decides whether the rejection was observed, and the whole
|
|
55781
|
+
* worker dies on the resulting unhandledRejection. The pre-attached observer settles that
|
|
55782
|
+
* question; the rejection still propagates normally to whoever awaits the returned promise.
|
|
55783
|
+
*
|
|
55784
|
+
* Creation and guarding are one call because splitting them is what actually goes wrong: the
|
|
55785
|
+
* guard was hand-attached at three of the four sites and the fourth (the IDLE-break waiter)
|
|
55786
|
+
* went unguarded, on exactly the path a server BYE takes.
|
|
55787
|
+
*
|
|
55788
|
+
* @param {Function} executor - Promise executor, (resolve, reject) => {}
|
|
55789
|
+
* @returns {Promise} The promise, with its rejection already observed
|
|
55790
|
+
*/
|
|
55791
|
+
guardedPromise(executor) {
|
|
55792
|
+
let promise = new Promise(executor);
|
|
55793
|
+
promise.catch(noop);
|
|
55794
|
+
return promise;
|
|
55795
|
+
},
|
|
55796
|
+
/**
|
|
55797
|
+
* The already-rejected form of guardedPromise(), for a call that has to hand back a rejected
|
|
55798
|
+
* promise rather than throw.
|
|
55799
|
+
*
|
|
55800
|
+
* @param {Error} error - Rejection reason
|
|
55801
|
+
* @returns {Promise} Rejected promise, with its rejection already observed
|
|
55802
|
+
*/
|
|
55803
|
+
guardedReject(error2) {
|
|
55804
|
+
let promise = Promise.reject(error2);
|
|
55805
|
+
promise.catch(noop);
|
|
55806
|
+
return promise;
|
|
55807
|
+
},
|
|
55440
55808
|
/**
|
|
55441
55809
|
* Detaches a background timer from the event loop, so it cannot keep the process alive on its
|
|
55442
55810
|
* own. Applied to every background timer (auto-IDLE, IDLE restart, fallback polling, throttle
|
|
@@ -55965,6 +56333,16 @@ var require_tools2 = __commonJS({
|
|
|
55965
56333
|
}
|
|
55966
56334
|
return name;
|
|
55967
56335
|
},
|
|
56336
|
+
/**
|
|
56337
|
+
* Decodes an ENVELOPE text field for display: encoded words first, then the
|
|
56338
|
+
* surrounding quotes some servers leave in place.
|
|
56339
|
+
*
|
|
56340
|
+
* @param {String} value - Raw field value from an ENVELOPE response
|
|
56341
|
+
* @returns {String} Decoded, unquoted text
|
|
56342
|
+
*/
|
|
56343
|
+
decodeText(value) {
|
|
56344
|
+
return tools.processName(libmime.decodeWords(value));
|
|
56345
|
+
},
|
|
55968
56346
|
/**
|
|
55969
56347
|
* Parses a raw IMAP ENVELOPE response into a structured envelope object.
|
|
55970
56348
|
*
|
|
@@ -55989,14 +56367,13 @@ var require_tools2 = __commonJS({
|
|
|
55989
56367
|
if (!addr) {
|
|
55990
56368
|
return false;
|
|
55991
56369
|
}
|
|
55992
|
-
let
|
|
55993
|
-
|
|
55994
|
-
|
|
56370
|
+
let name = tools.decodeText(getStrValue(addr[0]));
|
|
56371
|
+
let mailbox = getStrValue(addr[2]) || "";
|
|
56372
|
+
let host = getStrValue(addr[3]) || "";
|
|
56373
|
+
if (!host) {
|
|
56374
|
+
return { name: name || mailbox && tools.decodeText(mailbox), address: "" };
|
|
55995
56375
|
}
|
|
55996
|
-
return {
|
|
55997
|
-
name: tools.processName(libmime.decodeWords(getStrValue(addr[0]))),
|
|
55998
|
-
address
|
|
55999
|
-
};
|
|
56376
|
+
return { name, address: `${mailbox}@${host}` };
|
|
56000
56377
|
}).filter((addr) => addr && (addr.name || addr.address));
|
|
56001
56378
|
}, envelope = {};
|
|
56002
56379
|
if (entry[0] && entry[0].value) {
|
|
@@ -56503,9 +56880,9 @@ var require_tools2 = __commonJS({
|
|
|
56503
56880
|
}
|
|
56504
56881
|
});
|
|
56505
56882
|
|
|
56506
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
56883
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/id.js
|
|
56507
56884
|
var require_id2 = __commonJS({
|
|
56508
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
56885
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/id.js"(exports, module) {
|
|
56509
56886
|
"use strict";
|
|
56510
56887
|
var { formatDateTime } = require_tools2();
|
|
56511
56888
|
module.exports = async (connection, clientInfo) => {
|
|
@@ -56555,9 +56932,9 @@ var require_id2 = __commonJS({
|
|
|
56555
56932
|
}
|
|
56556
56933
|
});
|
|
56557
56934
|
|
|
56558
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
56935
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/capability.js
|
|
56559
56936
|
var require_capability = __commonJS({
|
|
56560
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
56937
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/capability.js"(exports, module) {
|
|
56561
56938
|
"use strict";
|
|
56562
56939
|
module.exports = async (connection) => {
|
|
56563
56940
|
if (connection.capabilities.size && !connection.expectCapabilityUpdate) {
|
|
@@ -56576,9 +56953,9 @@ var require_capability = __commonJS({
|
|
|
56576
56953
|
}
|
|
56577
56954
|
});
|
|
56578
56955
|
|
|
56579
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
56956
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/namespace.js
|
|
56580
56957
|
var require_namespace = __commonJS({
|
|
56581
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
56958
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/namespace.js"(exports, module) {
|
|
56582
56959
|
"use strict";
|
|
56583
56960
|
var { hasCapability, getStringList } = require_tools2();
|
|
56584
56961
|
module.exports = async (connection) => {
|
|
@@ -56684,9 +57061,9 @@ var require_namespace = __commonJS({
|
|
|
56684
57061
|
}
|
|
56685
57062
|
});
|
|
56686
57063
|
|
|
56687
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
57064
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/login.js
|
|
56688
57065
|
var require_login = __commonJS({
|
|
56689
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
57066
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/login.js"(exports, module) {
|
|
56690
57067
|
"use strict";
|
|
56691
57068
|
var { getStatusCode, getErrorText } = require_tools2();
|
|
56692
57069
|
module.exports = async (connection, username, password) => {
|
|
@@ -56715,9 +57092,9 @@ var require_login = __commonJS({
|
|
|
56715
57092
|
}
|
|
56716
57093
|
});
|
|
56717
57094
|
|
|
56718
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
57095
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/logout.js
|
|
56719
57096
|
var require_logout = __commonJS({
|
|
56720
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
57097
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/logout.js"(exports, module) {
|
|
56721
57098
|
"use strict";
|
|
56722
57099
|
module.exports = async (connection) => {
|
|
56723
57100
|
if (connection.state === connection.states.LOGOUT) {
|
|
@@ -56749,9 +57126,9 @@ var require_logout = __commonJS({
|
|
|
56749
57126
|
}
|
|
56750
57127
|
});
|
|
56751
57128
|
|
|
56752
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
57129
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/starttls.js
|
|
56753
57130
|
var require_starttls = __commonJS({
|
|
56754
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
57131
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/starttls.js"(exports, module) {
|
|
56755
57132
|
"use strict";
|
|
56756
57133
|
module.exports = async (connection) => {
|
|
56757
57134
|
if (!connection.capabilities.has("STARTTLS") || connection.secureConnection) {
|
|
@@ -56771,9 +57148,9 @@ var require_starttls = __commonJS({
|
|
|
56771
57148
|
}
|
|
56772
57149
|
});
|
|
56773
57150
|
|
|
56774
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
57151
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/status-fields.js
|
|
56775
57152
|
var require_status_fields = __commonJS({
|
|
56776
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
57153
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/status-fields.js"(exports, module) {
|
|
56777
57154
|
"use strict";
|
|
56778
57155
|
var { parseBigIntValue, parseUintValue, MAX_UINT32_DIGITS } = require_tools2();
|
|
56779
57156
|
var uint32 = (value) => parseUintValue(value, MAX_UINT32_DIGITS);
|
|
@@ -56816,9 +57193,9 @@ var require_status_fields = __commonJS({
|
|
|
56816
57193
|
}
|
|
56817
57194
|
});
|
|
56818
57195
|
|
|
56819
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
57196
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/special-use.js
|
|
56820
57197
|
var require_special_use = __commonJS({
|
|
56821
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
57198
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/special-use.js"(exports, module) {
|
|
56822
57199
|
"use strict";
|
|
56823
57200
|
var GENERIC_TOKENS = new Set(
|
|
56824
57201
|
[
|
|
@@ -57695,9 +58072,9 @@ var require_special_use = __commonJS({
|
|
|
57695
58072
|
}
|
|
57696
58073
|
});
|
|
57697
58074
|
|
|
57698
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58075
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/list.js
|
|
57699
58076
|
var require_list = __commonJS({
|
|
57700
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58077
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/list.js"(exports, module) {
|
|
57701
58078
|
"use strict";
|
|
57702
58079
|
var {
|
|
57703
58080
|
decodePath,
|
|
@@ -58042,9 +58419,9 @@ var require_list = __commonJS({
|
|
|
58042
58419
|
}
|
|
58043
58420
|
});
|
|
58044
58421
|
|
|
58045
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58422
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/enable.js
|
|
58046
58423
|
var require_enable = __commonJS({
|
|
58047
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58424
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/enable.js"(exports, module) {
|
|
58048
58425
|
"use strict";
|
|
58049
58426
|
var { hasCapability } = require_tools2();
|
|
58050
58427
|
module.exports = async (connection, extensionList) => {
|
|
@@ -58091,9 +58468,9 @@ var require_enable = __commonJS({
|
|
|
58091
58468
|
}
|
|
58092
58469
|
});
|
|
58093
58470
|
|
|
58094
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58471
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/select.js
|
|
58095
58472
|
var require_select = __commonJS({
|
|
58096
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58473
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/select.js"(exports, module) {
|
|
58097
58474
|
"use strict";
|
|
58098
58475
|
var { encodePath, normalizePath, enhanceCommandError, parseBigIntValue, parseUintValue, getStringList, MAX_UINT32_DIGITS } = require_tools2();
|
|
58099
58476
|
var VALUED_RESPONSE_CODES = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
@@ -58276,9 +58653,9 @@ var require_select = __commonJS({
|
|
|
58276
58653
|
}
|
|
58277
58654
|
});
|
|
58278
58655
|
|
|
58279
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58656
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/fetch.js
|
|
58280
58657
|
var require_fetch2 = __commonJS({
|
|
58281
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58658
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/fetch.js"(exports, module) {
|
|
58282
58659
|
"use strict";
|
|
58283
58660
|
var { formatMessageResponse, isRev2Active } = require_tools2();
|
|
58284
58661
|
module.exports = async (connection, range, query, options) => {
|
|
@@ -58450,7 +58827,7 @@ var require_fetch2 = __commonJS({
|
|
|
58450
58827
|
});
|
|
58451
58828
|
let aborted2 = await connection.throttleWait(delay);
|
|
58452
58829
|
if (aborted2) {
|
|
58453
|
-
throw connection.createNoConnectionError(connection.byeReason);
|
|
58830
|
+
throw connection.createNoConnectionError(connection.byeReason, { rejectedFrom: "throttleAbort", command: "FETCH" });
|
|
58454
58831
|
}
|
|
58455
58832
|
retryCount++;
|
|
58456
58833
|
continue;
|
|
@@ -58463,9 +58840,9 @@ var require_fetch2 = __commonJS({
|
|
|
58463
58840
|
}
|
|
58464
58841
|
});
|
|
58465
58842
|
|
|
58466
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58843
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/create.js
|
|
58467
58844
|
var require_create = __commonJS({
|
|
58468
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58845
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/create.js"(exports, module) {
|
|
58469
58846
|
"use strict";
|
|
58470
58847
|
var { encodePath, normalizePath, getStatusCode, enhanceCommandError } = require_tools2();
|
|
58471
58848
|
module.exports = async (connection, path) => {
|
|
@@ -58522,9 +58899,9 @@ var require_create = __commonJS({
|
|
|
58522
58899
|
}
|
|
58523
58900
|
});
|
|
58524
58901
|
|
|
58525
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58902
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/delete.js
|
|
58526
58903
|
var require_delete = __commonJS({
|
|
58527
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58904
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/delete.js"(exports, module) {
|
|
58528
58905
|
"use strict";
|
|
58529
58906
|
var { encodePath, normalizePath, enhanceCommandError } = require_tools2();
|
|
58530
58907
|
module.exports = async (connection, path) => {
|
|
@@ -58552,9 +58929,9 @@ var require_delete = __commonJS({
|
|
|
58552
58929
|
}
|
|
58553
58930
|
});
|
|
58554
58931
|
|
|
58555
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58932
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/rename.js
|
|
58556
58933
|
var require_rename = __commonJS({
|
|
58557
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58934
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/rename.js"(exports, module) {
|
|
58558
58935
|
"use strict";
|
|
58559
58936
|
var { encodePath, normalizePath, enhanceCommandError } = require_tools2();
|
|
58560
58937
|
module.exports = async (connection, path, newPath) => {
|
|
@@ -58587,9 +58964,9 @@ var require_rename = __commonJS({
|
|
|
58587
58964
|
}
|
|
58588
58965
|
});
|
|
58589
58966
|
|
|
58590
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58967
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/close.js
|
|
58591
58968
|
var require_close = __commonJS({
|
|
58592
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58969
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/close.js"(exports, module) {
|
|
58593
58970
|
"use strict";
|
|
58594
58971
|
module.exports = async (connection) => {
|
|
58595
58972
|
if (connection.state !== connection.states.SELECTED) {
|
|
@@ -58615,9 +58992,9 @@ var require_close = __commonJS({
|
|
|
58615
58992
|
}
|
|
58616
58993
|
});
|
|
58617
58994
|
|
|
58618
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
58995
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/subscribe.js
|
|
58619
58996
|
var require_subscribe = __commonJS({
|
|
58620
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
58997
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/subscribe.js"(exports, module) {
|
|
58621
58998
|
"use strict";
|
|
58622
58999
|
var { encodePath, normalizePath, enhanceCommandError } = require_tools2();
|
|
58623
59000
|
module.exports = async (connection, path) => {
|
|
@@ -58639,9 +59016,9 @@ var require_subscribe = __commonJS({
|
|
|
58639
59016
|
}
|
|
58640
59017
|
});
|
|
58641
59018
|
|
|
58642
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59019
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/unsubscribe.js
|
|
58643
59020
|
var require_unsubscribe = __commonJS({
|
|
58644
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59021
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/unsubscribe.js"(exports, module) {
|
|
58645
59022
|
"use strict";
|
|
58646
59023
|
var { encodePath, normalizePath, enhanceCommandError } = require_tools2();
|
|
58647
59024
|
module.exports = async (connection, path) => {
|
|
@@ -58663,9 +59040,9 @@ var require_unsubscribe = __commonJS({
|
|
|
58663
59040
|
}
|
|
58664
59041
|
});
|
|
58665
59042
|
|
|
58666
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59043
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/store.js
|
|
58667
59044
|
var require_store = __commonJS({
|
|
58668
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59045
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/store.js"(exports, module) {
|
|
58669
59046
|
"use strict";
|
|
58670
59047
|
var { formatFlag, canUseFlag, enhanceCommandError } = require_tools2();
|
|
58671
59048
|
module.exports = async (connection, range, flags, options) => {
|
|
@@ -58727,11 +59104,11 @@ var require_store = __commonJS({
|
|
|
58727
59104
|
}
|
|
58728
59105
|
});
|
|
58729
59106
|
|
|
58730
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59107
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/search-compiler.js
|
|
58731
59108
|
var require_search_compiler = __commonJS({
|
|
58732
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59109
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/search-compiler.js"(exports, module) {
|
|
58733
59110
|
"use strict";
|
|
58734
|
-
var { formatDate, formatFlag, canUseFlag,
|
|
59111
|
+
var { formatDate, formatFlag, canUseFlag, toValidDate, isRev2Active } = require_tools2();
|
|
58735
59112
|
var setBoolOpt = (attributes, term, value) => {
|
|
58736
59113
|
if (!value) {
|
|
58737
59114
|
if (/^un/i.test(term)) {
|
|
@@ -58755,7 +59132,11 @@ var require_search_compiler = __commonJS({
|
|
|
58755
59132
|
}
|
|
58756
59133
|
};
|
|
58757
59134
|
var processDateField = (attributes, term, value) => {
|
|
58758
|
-
|
|
59135
|
+
value = toValidDate(value);
|
|
59136
|
+
if (!value) {
|
|
59137
|
+
return;
|
|
59138
|
+
}
|
|
59139
|
+
if (["BEFORE", "SENTBEFORE"].includes(term.toUpperCase()) && value.toISOString().substring(11) !== "00:00:00.000Z") {
|
|
58759
59140
|
value = new Date(value.getTime() + 24 * 3600 * 1e3);
|
|
58760
59141
|
}
|
|
58761
59142
|
let date3 = formatDate(value);
|
|
@@ -58927,14 +59308,18 @@ var require_search_compiler = __commonJS({
|
|
|
58927
59308
|
case "BEFORE":
|
|
58928
59309
|
case "SINCE":
|
|
58929
59310
|
{
|
|
58930
|
-
|
|
59311
|
+
let value = toValidDate(params[term]);
|
|
59312
|
+
if (!value) {
|
|
59313
|
+
break;
|
|
59314
|
+
}
|
|
59315
|
+
if (connection.capabilities.has("WITHIN")) {
|
|
58931
59316
|
const now = Date.now();
|
|
58932
|
-
const withinSeconds = Math.round(Math.max(0, now -
|
|
59317
|
+
const withinSeconds = Math.round(Math.max(0, now - value.getTime()) / 1e3);
|
|
58933
59318
|
const withinKeyword = term.toUpperCase() === "BEFORE" ? "OLDER" : "YOUNGER";
|
|
58934
59319
|
setOpt(attributes, withinKeyword, withinSeconds.toString());
|
|
58935
59320
|
break;
|
|
58936
59321
|
}
|
|
58937
|
-
processDateField(attributes, term,
|
|
59322
|
+
processDateField(attributes, term, value);
|
|
58938
59323
|
}
|
|
58939
59324
|
break;
|
|
58940
59325
|
// Standard date searches
|
|
@@ -59053,9 +59438,9 @@ var require_search_compiler = __commonJS({
|
|
|
59053
59438
|
}
|
|
59054
59439
|
});
|
|
59055
59440
|
|
|
59056
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59441
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/search.js
|
|
59057
59442
|
var require_search = __commonJS({
|
|
59058
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59443
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/search.js"(exports, module) {
|
|
59059
59444
|
"use strict";
|
|
59060
59445
|
var {
|
|
59061
59446
|
enhanceCommandError,
|
|
@@ -59280,9 +59665,9 @@ var require_search = __commonJS({
|
|
|
59280
59665
|
}
|
|
59281
59666
|
});
|
|
59282
59667
|
|
|
59283
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59668
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/noop.js
|
|
59284
59669
|
var require_noop = __commonJS({
|
|
59285
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59670
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/noop.js"(exports, module) {
|
|
59286
59671
|
"use strict";
|
|
59287
59672
|
module.exports = async (connection) => {
|
|
59288
59673
|
try {
|
|
@@ -59297,9 +59682,9 @@ var require_noop = __commonJS({
|
|
|
59297
59682
|
}
|
|
59298
59683
|
});
|
|
59299
59684
|
|
|
59300
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59685
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/expunge.js
|
|
59301
59686
|
var require_expunge = __commonJS({
|
|
59302
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59687
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/expunge.js"(exports, module) {
|
|
59303
59688
|
"use strict";
|
|
59304
59689
|
var { enhanceCommandError, hasCapability, parseBigIntValue } = require_tools2();
|
|
59305
59690
|
module.exports = async (connection, range, options) => {
|
|
@@ -59333,9 +59718,9 @@ var require_expunge = __commonJS({
|
|
|
59333
59718
|
}
|
|
59334
59719
|
});
|
|
59335
59720
|
|
|
59336
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59721
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/append.js
|
|
59337
59722
|
var require_append = __commonJS({
|
|
59338
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59723
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/append.js"(exports, module) {
|
|
59339
59724
|
"use strict";
|
|
59340
59725
|
var {
|
|
59341
59726
|
formatFlag,
|
|
@@ -59450,9 +59835,9 @@ var require_append = __commonJS({
|
|
|
59450
59835
|
}
|
|
59451
59836
|
});
|
|
59452
59837
|
|
|
59453
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59838
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/status.js
|
|
59454
59839
|
var require_status = __commonJS({
|
|
59455
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59840
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/status.js"(exports, module) {
|
|
59456
59841
|
"use strict";
|
|
59457
59842
|
var { encodePath, normalizePath, buildStatusQueryAttributes, isRev2Active } = require_tools2();
|
|
59458
59843
|
var { parseStatusList } = require_status_fields();
|
|
@@ -59528,9 +59913,9 @@ var require_status = __commonJS({
|
|
|
59528
59913
|
}
|
|
59529
59914
|
});
|
|
59530
59915
|
|
|
59531
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59916
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/copyuid-parser.js
|
|
59532
59917
|
var require_copyuid_parser = __commonJS({
|
|
59533
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59918
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/copyuid-parser.js"(exports, module) {
|
|
59534
59919
|
"use strict";
|
|
59535
59920
|
var { expandRange, parseBigIntValue } = require_tools2();
|
|
59536
59921
|
function parseCopyUid(response, map) {
|
|
@@ -59553,9 +59938,9 @@ var require_copyuid_parser = __commonJS({
|
|
|
59553
59938
|
}
|
|
59554
59939
|
});
|
|
59555
59940
|
|
|
59556
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59941
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/copy.js
|
|
59557
59942
|
var require_copy = __commonJS({
|
|
59558
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59943
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/copy.js"(exports, module) {
|
|
59559
59944
|
"use strict";
|
|
59560
59945
|
var { normalizePath, encodePath, enhanceCommandError } = require_tools2();
|
|
59561
59946
|
var { parseCopyUid } = require_copyuid_parser();
|
|
@@ -59585,9 +59970,9 @@ var require_copy = __commonJS({
|
|
|
59585
59970
|
}
|
|
59586
59971
|
});
|
|
59587
59972
|
|
|
59588
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
59973
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/move.js
|
|
59589
59974
|
var require_move = __commonJS({
|
|
59590
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
59975
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/move.js"(exports, module) {
|
|
59591
59976
|
"use strict";
|
|
59592
59977
|
var { normalizePath, encodePath, enhanceCommandError, hasCapability } = require_tools2();
|
|
59593
59978
|
var { parseCopyUid } = require_copyuid_parser();
|
|
@@ -59628,9 +60013,9 @@ var require_move = __commonJS({
|
|
|
59628
60013
|
}
|
|
59629
60014
|
});
|
|
59630
60015
|
|
|
59631
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
60016
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/compress.js
|
|
59632
60017
|
var require_compress = __commonJS({
|
|
59633
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
60018
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/compress.js"(exports, module) {
|
|
59634
60019
|
"use strict";
|
|
59635
60020
|
module.exports = async (connection) => {
|
|
59636
60021
|
if (!connection.capabilities.has("COMPRESS=DEFLATE") || connection._inflate) {
|
|
@@ -59657,9 +60042,9 @@ var require_compress = __commonJS({
|
|
|
59657
60042
|
}
|
|
59658
60043
|
});
|
|
59659
60044
|
|
|
59660
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
60045
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/quota.js
|
|
59661
60046
|
var require_quota = __commonJS({
|
|
59662
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
60047
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/quota.js"(exports, module) {
|
|
59663
60048
|
"use strict";
|
|
59664
60049
|
var { encodePath, normalizePath, enhanceCommandError, parseUintValue, isUnsafeKey } = require_tools2();
|
|
59665
60050
|
module.exports = async (connection, path) => {
|
|
@@ -59748,11 +60133,11 @@ var require_quota = __commonJS({
|
|
|
59748
60133
|
}
|
|
59749
60134
|
});
|
|
59750
60135
|
|
|
59751
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
60136
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/idle.js
|
|
59752
60137
|
var require_idle = __commonJS({
|
|
59753
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
60138
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/idle.js"(exports, module) {
|
|
59754
60139
|
"use strict";
|
|
59755
|
-
var { hasCapability, logConnectionError, unrefTimer } = require_tools2();
|
|
60140
|
+
var { guardedPromise, hasCapability, logConnectionError, restampConnectionError, unrefTimer } = require_tools2();
|
|
59756
60141
|
var NOOP_INTERVAL = 2 * 60 * 1e3;
|
|
59757
60142
|
function claimIdling(connection) {
|
|
59758
60143
|
let token = {};
|
|
@@ -59798,7 +60183,7 @@ var require_idle = __commonJS({
|
|
|
59798
60183
|
}
|
|
59799
60184
|
};
|
|
59800
60185
|
let connectionPreCheck = () => {
|
|
59801
|
-
let handler =
|
|
60186
|
+
let handler = guardedPromise((resolve3, reject) => {
|
|
59802
60187
|
preCheckWaitQueue.push({ resolve: resolve3, reject });
|
|
59803
60188
|
});
|
|
59804
60189
|
connection.log.trace({
|
|
@@ -59843,9 +60228,12 @@ var require_idle = __commonJS({
|
|
|
59843
60228
|
return;
|
|
59844
60229
|
} catch (err) {
|
|
59845
60230
|
logConnectionError(connection, "IDLE session failed", err);
|
|
59846
|
-
|
|
59847
|
-
let {
|
|
59848
|
-
|
|
60231
|
+
if (preCheckWaitQueue.length) {
|
|
60232
|
+
let waiterError = restampConnectionError(err, { rejectedFrom: "preCheckWaiter" });
|
|
60233
|
+
while (preCheckWaitQueue.length) {
|
|
60234
|
+
let { reject } = preCheckWaitQueue.shift();
|
|
60235
|
+
reject(waiterError);
|
|
60236
|
+
}
|
|
59849
60237
|
}
|
|
59850
60238
|
return false;
|
|
59851
60239
|
} finally {
|
|
@@ -59991,9 +60379,9 @@ var require_idle = __commonJS({
|
|
|
59991
60379
|
}
|
|
59992
60380
|
});
|
|
59993
60381
|
|
|
59994
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
60382
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/authenticate.js
|
|
59995
60383
|
var require_authenticate = __commonJS({
|
|
59996
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
60384
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/commands/authenticate.js"(exports, module) {
|
|
59997
60385
|
"use strict";
|
|
59998
60386
|
var { getStatusCode, getErrorText } = require_tools2();
|
|
59999
60387
|
async function handleAuthError(err, errorResponse2) {
|
|
@@ -60137,9 +60525,9 @@ var require_authenticate = __commonJS({
|
|
|
60137
60525
|
}
|
|
60138
60526
|
});
|
|
60139
60527
|
|
|
60140
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
60528
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/imap-commands.js
|
|
60141
60529
|
var require_imap_commands = __commonJS({
|
|
60142
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
60530
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/imap-commands.js"(exports, module) {
|
|
60143
60531
|
"use strict";
|
|
60144
60532
|
module.exports = /* @__PURE__ */ new Map([
|
|
60145
60533
|
["ID", require_id2()],
|
|
@@ -60174,9 +60562,9 @@ var require_imap_commands = __commonJS({
|
|
|
60174
60562
|
}
|
|
60175
60563
|
});
|
|
60176
60564
|
|
|
60177
|
-
// node_modules/.pnpm/imapflow@1.7.
|
|
60565
|
+
// node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/imap-flow.js
|
|
60178
60566
|
var require_imap_flow = __commonJS({
|
|
60179
|
-
"node_modules/.pnpm/imapflow@1.7.
|
|
60567
|
+
"node_modules/.pnpm/imapflow@1.7.6/node_modules/imapflow/lib/imap-flow.js"(exports, module) {
|
|
60180
60568
|
"use strict";
|
|
60181
60569
|
var tls = __require("tls");
|
|
60182
60570
|
var net = __require("net");
|
|
@@ -60213,11 +60601,12 @@ var require_imap_flow = __commonJS({
|
|
|
60213
60601
|
parseUintValue,
|
|
60214
60602
|
isUnsafeKey,
|
|
60215
60603
|
getStringList,
|
|
60604
|
+
buildConnectionError,
|
|
60605
|
+
guardedPromise,
|
|
60606
|
+
guardedReject,
|
|
60216
60607
|
MAX_UINT32_DIGITS
|
|
60217
60608
|
} = require_tools2();
|
|
60218
60609
|
var imapCommands = require_imap_commands();
|
|
60219
|
-
var noop = () => {
|
|
60220
|
-
};
|
|
60221
60610
|
var GREETING_TIMEOUT = 16 * 1e3;
|
|
60222
60611
|
var UPGRADE_TIMEOUT = 10 * 1e3;
|
|
60223
60612
|
var SOCKET_TIMEOUT = 5 * 60 * 1e3;
|
|
@@ -60568,14 +60957,10 @@ var require_imap_flow = __commonJS({
|
|
|
60568
60957
|
}
|
|
60569
60958
|
write(chunk) {
|
|
60570
60959
|
if (!this.socket || this.socket.destroyed) {
|
|
60571
|
-
|
|
60572
|
-
error2.code = "NoConnection";
|
|
60573
|
-
throw error2;
|
|
60960
|
+
throw this.createConnectionError("NoConnection", "Socket is already closed", { rejectedFrom: "writeNoSocket" });
|
|
60574
60961
|
}
|
|
60575
60962
|
if (this.state === this.states.LOGOUT) {
|
|
60576
|
-
|
|
60577
|
-
error2.code = "StateLogout";
|
|
60578
|
-
throw error2;
|
|
60963
|
+
throw this.createConnectionError("StateLogout", "Can not send data after logged out", { rejectedFrom: "writeAfterLogout" });
|
|
60579
60964
|
}
|
|
60580
60965
|
if (this.writeSocket.destroyed) {
|
|
60581
60966
|
this.log.error({ msg: "Write socket destroyed", cid: this.id });
|
|
@@ -60641,9 +61026,7 @@ var require_imap_flow = __commonJS({
|
|
|
60641
61026
|
let request = this.requestTagMap.get(data.tag);
|
|
60642
61027
|
if (request) {
|
|
60643
61028
|
this.requestTagMap.delete(request.tag);
|
|
60644
|
-
|
|
60645
|
-
error2.code = "NoConnection";
|
|
60646
|
-
request.reject(error2);
|
|
61029
|
+
request.reject(this.createNoConnectionError(false, { rejectedFrom: "sendAfterLogout", command: request.command }));
|
|
60647
61030
|
}
|
|
60648
61031
|
}
|
|
60649
61032
|
return;
|
|
@@ -60691,28 +61074,18 @@ var require_imap_flow = __commonJS({
|
|
|
60691
61074
|
}
|
|
60692
61075
|
exec(command, attributes, options) {
|
|
60693
61076
|
if (this.state === this.states.LOGOUT || this.isClosed) {
|
|
60694
|
-
|
|
60695
|
-
error2.code = "NoConnection";
|
|
60696
|
-
let p = Promise.reject(error2);
|
|
60697
|
-
p.catch(noop);
|
|
60698
|
-
return p;
|
|
61077
|
+
return guardedReject(this.createNoConnectionError(false, { rejectedFrom: "execClosed", command }));
|
|
60699
61078
|
}
|
|
60700
61079
|
if (!this.socket || this.socket.destroyed) {
|
|
60701
|
-
|
|
60702
|
-
error2.code = "EConnectionClosed";
|
|
60703
|
-
let p = Promise.reject(error2);
|
|
60704
|
-
p.catch(noop);
|
|
60705
|
-
return p;
|
|
61080
|
+
return guardedReject(this.createConnectionError("EConnectionClosed", "Connection closed", { rejectedFrom: "execNoSocket", command }));
|
|
60706
61081
|
}
|
|
60707
61082
|
let tag = (++this.tagCounter).toString(16).toUpperCase();
|
|
60708
61083
|
options = options || {};
|
|
60709
|
-
|
|
61084
|
+
return guardedPromise((resolve3, reject) => {
|
|
60710
61085
|
this.requestTagMap.set(tag, { command, attributes, options, resolve: resolve3, reject });
|
|
60711
61086
|
this.requestQueue.push({ tag, command, attributes, options });
|
|
60712
61087
|
this.trySend().catch((err) => logConnectionError(this, "Failed to dispatch command", err));
|
|
60713
61088
|
});
|
|
60714
|
-
promise.catch(noop);
|
|
60715
|
-
return promise;
|
|
60716
61089
|
}
|
|
60717
61090
|
// Resolves an untagged server response to the keyword it is dispatched on. IMAP untagged
|
|
60718
61091
|
// responses come in two forms:
|
|
@@ -61046,7 +61419,7 @@ var require_imap_flow = __commonJS({
|
|
|
61046
61419
|
this.log.warn({ msg: "Throttling detected", cid: this.id, throttleDelay, delayResponse, err });
|
|
61047
61420
|
let aborted2 = await this.throttleWait(delayResponse);
|
|
61048
61421
|
if (aborted2) {
|
|
61049
|
-
request.reject(this.createNoConnectionError(this.byeReason));
|
|
61422
|
+
request.reject(this.createNoConnectionError(this.byeReason, { rejectedFrom: "throttleAbort", command: request.command }));
|
|
61050
61423
|
break;
|
|
61051
61424
|
}
|
|
61052
61425
|
}
|
|
@@ -61381,9 +61754,7 @@ var require_imap_flow = __commonJS({
|
|
|
61381
61754
|
this.socket = tls.connect(opts, () => {
|
|
61382
61755
|
try {
|
|
61383
61756
|
if (this.isClosed) {
|
|
61384
|
-
|
|
61385
|
-
err.code = "NoConnection";
|
|
61386
|
-
return settle2(err);
|
|
61757
|
+
return settle2(this.createNoConnectionError(false, { rejectedFrom: "tlsUpgrade" }));
|
|
61387
61758
|
}
|
|
61388
61759
|
this.secureConnection = true;
|
|
61389
61760
|
this.streamer.secureConnection = true;
|
|
@@ -61782,7 +62153,7 @@ var require_imap_flow = __commonJS({
|
|
|
61782
62153
|
throw error2;
|
|
61783
62154
|
}
|
|
61784
62155
|
}
|
|
61785
|
-
let connectPromise =
|
|
62156
|
+
let connectPromise = guardedPromise((resolve3, reject) => {
|
|
61786
62157
|
this.connectTimeout = setTimeout(() => {
|
|
61787
62158
|
let err = deadline.error();
|
|
61788
62159
|
this.log.error({ err, cid: this.id });
|
|
@@ -61859,7 +62230,6 @@ var require_imap_flow = __commonJS({
|
|
|
61859
62230
|
};
|
|
61860
62231
|
this.socket.on("error", this._connectErrorHandler);
|
|
61861
62232
|
});
|
|
61862
|
-
connectPromise.catch(noop);
|
|
61863
62233
|
await connectPromise;
|
|
61864
62234
|
}
|
|
61865
62235
|
/**
|
|
@@ -61883,11 +62253,14 @@ var require_imap_flow = __commonJS({
|
|
|
61883
62253
|
closeAfter() {
|
|
61884
62254
|
setImmediate(() => this.close());
|
|
61885
62255
|
}
|
|
61886
|
-
//
|
|
61887
|
-
|
|
61888
|
-
|
|
61889
|
-
|
|
61890
|
-
|
|
62256
|
+
// Connection-scoped wrapper around the shared stamping helper; see buildConnectionError().
|
|
62257
|
+
createConnectionError(code, message, meta) {
|
|
62258
|
+
return buildConnectionError(this.id, code, message, meta);
|
|
62259
|
+
}
|
|
62260
|
+
// The standard "connection not available" error, optionally annotated with the server's BYE
|
|
62261
|
+
// reason. Single source of truth so every NoConnection rejection is consistent.
|
|
62262
|
+
createNoConnectionError(byeReason, meta) {
|
|
62263
|
+
const error2 = this.createConnectionError("NoConnection", "Connection not available", meta);
|
|
61891
62264
|
if (byeReason) {
|
|
61892
62265
|
error2.reason = byeReason;
|
|
61893
62266
|
}
|
|
@@ -61919,9 +62292,7 @@ var require_imap_flow = __commonJS({
|
|
|
61919
62292
|
if (typeof this._upgradeReject === "function") {
|
|
61920
62293
|
let reject = this._upgradeReject;
|
|
61921
62294
|
this._upgradeReject = null;
|
|
61922
|
-
|
|
61923
|
-
err.code = "NoConnection";
|
|
61924
|
-
reject(err);
|
|
62295
|
+
reject(this.createNoConnectionError(false, { rejectedFrom: "upgrade" }));
|
|
61925
62296
|
}
|
|
61926
62297
|
if (typeof this.initialReject === "function" && !this.options.verifyOnly) {
|
|
61927
62298
|
clearTimeout(this.greetingTimeout);
|
|
@@ -61968,10 +62339,9 @@ var require_imap_flow = __commonJS({
|
|
|
61968
62339
|
}
|
|
61969
62340
|
}
|
|
61970
62341
|
}
|
|
61971
|
-
const createNoConnectionError = (byeReason2) => this.createNoConnectionError(byeReason2);
|
|
61972
62342
|
let byeReason = this.byeReason;
|
|
61973
62343
|
for (let request of pendingRequests) {
|
|
61974
|
-
request.reject(createNoConnectionError(byeReason));
|
|
62344
|
+
request.reject(this.createNoConnectionError(byeReason, { rejectedFrom: "pendingRequest", command: request.command }));
|
|
61975
62345
|
}
|
|
61976
62346
|
if (this.currentLock && this.currentLock.heldWarnTimer) {
|
|
61977
62347
|
clearTimeout(this.currentLock.heldWarnTimer);
|
|
@@ -61986,7 +62356,7 @@ var require_imap_flow = __commonJS({
|
|
|
61986
62356
|
lock.acquireTimer = null;
|
|
61987
62357
|
}
|
|
61988
62358
|
if (typeof lock.reject === "function") {
|
|
61989
|
-
lock.reject(createNoConnectionError(byeReason));
|
|
62359
|
+
lock.reject(this.createNoConnectionError(byeReason, { rejectedFrom: "mailboxLock", path: lock.path }));
|
|
61990
62360
|
}
|
|
61991
62361
|
}
|
|
61992
62362
|
}
|
|
@@ -62082,7 +62452,7 @@ var require_imap_flow = __commonJS({
|
|
|
62082
62452
|
/**
|
|
62083
62453
|
* Returns current quota
|
|
62084
62454
|
*
|
|
62085
|
-
* @param {
|
|
62455
|
+
* @param {string|array} [path] Optional mailbox path if you want to check quota for specific folder. If value is an array then it is joined using current delimiter symbols. Namespace prefix is added automatically if required.
|
|
62086
62456
|
* @returns {Promise<QuotaResponse|Boolean>} Quota information or `false` if QUOTA extension is not supported or requested path does not exist
|
|
62087
62457
|
*
|
|
62088
62458
|
* @example
|
|
@@ -62317,7 +62687,7 @@ var require_imap_flow = __commonJS({
|
|
|
62317
62687
|
/**
|
|
62318
62688
|
* Requests the status of the indicated mailbox. Only requested status values will be returned.
|
|
62319
62689
|
*
|
|
62320
|
-
* @param {
|
|
62690
|
+
* @param {string|array} path mailbox path to check for (unicode string). If value is an array then it is joined using current delimiter symbols. Namespace prefix is added automatically if required.
|
|
62321
62691
|
* @param {Object} query defines requested status items
|
|
62322
62692
|
* @param {Boolean} query.messages if `true` request count of messages
|
|
62323
62693
|
* @param {Boolean} query.recent if `true` request count of messages with \\Recent tag
|
|
@@ -62580,7 +62950,7 @@ var require_imap_flow = __commonJS({
|
|
|
62580
62950
|
/**
|
|
62581
62951
|
* Appends a new message to a mailbox
|
|
62582
62952
|
*
|
|
62583
|
-
* @param {
|
|
62953
|
+
* @param {string|array} path Mailbox path to upload the message to (unicode string). If value is an array then it is joined using current delimiter symbols. Namespace prefix is added automatically if required.
|
|
62584
62954
|
* @param {string|Buffer} content RFC822 formatted email message
|
|
62585
62955
|
* @param {string[]} [flags] an array of flags to be set for the uploaded message
|
|
62586
62956
|
* @param {Date|string} [idate=now] internal date to be set for the message
|
|
@@ -62604,7 +62974,7 @@ var require_imap_flow = __commonJS({
|
|
|
62604
62974
|
* Copies messages from current mailbox to destination mailbox
|
|
62605
62975
|
*
|
|
62606
62976
|
* @param {SequenceString | Number[] | SearchObject} range Range of messages to copy
|
|
62607
|
-
* @param {
|
|
62977
|
+
* @param {string|array} destination Mailbox path to copy the messages to. If value is an array then it is joined using current delimiter symbols. Namespace prefix is added automatically if required.
|
|
62608
62978
|
* @param {Object} [options]
|
|
62609
62979
|
* @param {Boolean} [options.uid] If `true` then uses UID {@link SequenceString} instead of sequence numbers
|
|
62610
62980
|
* @returns {Promise<CopyResponseObject>} info about copies messages
|
|
@@ -62627,7 +62997,7 @@ var require_imap_flow = __commonJS({
|
|
|
62627
62997
|
* Moves messages from current mailbox to destination mailbox
|
|
62628
62998
|
*
|
|
62629
62999
|
* @param {SequenceString | Number[] | SearchObject} range Range of messages to move
|
|
62630
|
-
* @param {
|
|
63000
|
+
* @param {string|array} destination Mailbox path to move the messages to. If value is an array then it is joined using current delimiter symbols. Namespace prefix is added automatically if required.
|
|
62631
63001
|
* @param {Object} [options]
|
|
62632
63002
|
* @param {Boolean} [options.uid] If `true` then uses UID {@link SequenceString} instead of sequence numbers
|
|
62633
63003
|
* @returns {Promise<CopyResponseObject>} info about moved messages
|
|
@@ -62865,9 +63235,7 @@ var require_imap_flow = __commonJS({
|
|
|
62865
63235
|
while (res = await getNext()) {
|
|
62866
63236
|
lastRes = res;
|
|
62867
63237
|
if (this.isClosed || !this.socket || this.socket.destroyed) {
|
|
62868
|
-
|
|
62869
|
-
error2.code = "EConnectionClosed";
|
|
62870
|
-
throw error2;
|
|
63238
|
+
throw this.createConnectionError("EConnectionClosed", "Connection closed", { rejectedFrom: "fetchStream", command: "FETCH" });
|
|
62871
63239
|
}
|
|
62872
63240
|
yield res.response;
|
|
62873
63241
|
res.next();
|
|
@@ -63380,7 +63748,7 @@ var require_imap_flow = __commonJS({
|
|
|
63380
63748
|
return false;
|
|
63381
63749
|
}
|
|
63382
63750
|
if (!this.socket || this.socket.destroyed) {
|
|
63383
|
-
throw this.createNoConnectionError();
|
|
63751
|
+
throw this.createNoConnectionError(false, { rejectedFrom: "noSocket", command });
|
|
63384
63752
|
}
|
|
63385
63753
|
clearTimeout(this.idleStartTimer);
|
|
63386
63754
|
try {
|
|
@@ -63413,7 +63781,7 @@ var require_imap_flow = __commonJS({
|
|
|
63413
63781
|
return false;
|
|
63414
63782
|
}
|
|
63415
63783
|
if (!this.socket || this.socket.destroyed) {
|
|
63416
|
-
throw this.createNoConnectionError();
|
|
63784
|
+
throw this.createNoConnectionError(false, { rejectedFrom: "noSocket", command });
|
|
63417
63785
|
}
|
|
63418
63786
|
let handler = this.commands.get(command);
|
|
63419
63787
|
return await handler(this, ...args);
|
|
@@ -63503,9 +63871,7 @@ var require_imap_flow = __commonJS({
|
|
|
63503
63871
|
};
|
|
63504
63872
|
if (!this.usable || !this.socket || this.socket.destroyed) {
|
|
63505
63873
|
this.log.trace({ msg: "Failed to acquire mailbox lock", path, lockId, idling: this.idling });
|
|
63506
|
-
|
|
63507
|
-
error2.code = "NoConnection";
|
|
63508
|
-
reject(error2);
|
|
63874
|
+
reject(this.createNoConnectionError(false, { rejectedFrom: "mailboxLock", path }));
|
|
63509
63875
|
continue;
|
|
63510
63876
|
}
|
|
63511
63877
|
const grantLock = () => {
|
|
@@ -63602,7 +63968,7 @@ var require_imap_flow = __commonJS({
|
|
|
63602
63968
|
...this.currentLock.options?.description && { description: this.currentLock.options?.description }
|
|
63603
63969
|
} : null
|
|
63604
63970
|
});
|
|
63605
|
-
let lockPromise =
|
|
63971
|
+
let lockPromise = guardedPromise((resolve3, reject) => {
|
|
63606
63972
|
let lockEntry = { resolve: resolve3, reject, path, options, lockId };
|
|
63607
63973
|
this.locks.push(lockEntry);
|
|
63608
63974
|
if (Number(options.acquireTimeout) > 0) {
|
|
@@ -63620,7 +63986,6 @@ var require_imap_flow = __commonJS({
|
|
|
63620
63986
|
}
|
|
63621
63987
|
this.processLocks().catch((err) => reject(err));
|
|
63622
63988
|
});
|
|
63623
|
-
lockPromise.catch(noop);
|
|
63624
63989
|
return lockPromise;
|
|
63625
63990
|
}
|
|
63626
63991
|
getLogger() {
|