imapflow 1.0.75 → 1.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/idle.js +33 -2
- package/package.json +4 -4
package/lib/commands/idle.js
CHANGED
|
@@ -24,7 +24,13 @@ module.exports = async connection => {
|
|
|
24
24
|
let preCheck = () => {
|
|
25
25
|
doneRequested = true;
|
|
26
26
|
if (canEnd && !doneSent) {
|
|
27
|
-
connection.log.debug({
|
|
27
|
+
connection.log.debug({
|
|
28
|
+
src: 'c',
|
|
29
|
+
msg: `DONE`,
|
|
30
|
+
comment: `breaking IDLE`,
|
|
31
|
+
lockId: connection.currentLockId,
|
|
32
|
+
path: connection.mailbox && connection.mailbox.path
|
|
33
|
+
});
|
|
28
34
|
connection.write('DONE');
|
|
29
35
|
doneSent = true;
|
|
30
36
|
|
|
@@ -43,6 +49,16 @@ module.exports = async connection => {
|
|
|
43
49
|
preCheckWaitQueue.push({ resolve, reject });
|
|
44
50
|
});
|
|
45
51
|
|
|
52
|
+
connection.log.trace({
|
|
53
|
+
msg: 'Requesting IDLE break',
|
|
54
|
+
lockId: connection.currentLockId,
|
|
55
|
+
path: connection.mailbox && connection.mailbox.path,
|
|
56
|
+
queued: preCheckWaitQueue.length,
|
|
57
|
+
doneRequested,
|
|
58
|
+
canEnd,
|
|
59
|
+
doneSent
|
|
60
|
+
});
|
|
61
|
+
|
|
46
62
|
preCheck();
|
|
47
63
|
|
|
48
64
|
return handler;
|
|
@@ -62,7 +78,22 @@ module.exports = async connection => {
|
|
|
62
78
|
});
|
|
63
79
|
|
|
64
80
|
// unset before response.next()
|
|
65
|
-
connection.preCheck
|
|
81
|
+
if (typeof connection.preCheck === 'function') {
|
|
82
|
+
connection.log.trace({
|
|
83
|
+
msg: 'Clearing pre-check function',
|
|
84
|
+
lockId: connection.currentLockId,
|
|
85
|
+
path: connection.mailbox && connection.mailbox.path,
|
|
86
|
+
queued: preCheckWaitQueue.length,
|
|
87
|
+
doneRequested,
|
|
88
|
+
canEnd,
|
|
89
|
+
doneSent
|
|
90
|
+
});
|
|
91
|
+
connection.preCheck = false;
|
|
92
|
+
while (preCheckWaitQueue.length) {
|
|
93
|
+
let { resolve } = preCheckWaitQueue.shift();
|
|
94
|
+
resolve();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
66
97
|
|
|
67
98
|
response.next();
|
|
68
99
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "imapflow",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.76",
|
|
4
4
|
"description": "IMAP Client for Node",
|
|
5
5
|
"main": "./lib/imap-flow.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@babel/eslint-plugin": "7.14.5",
|
|
31
31
|
"@babel/plugin-syntax-class-properties": "7.12.13",
|
|
32
32
|
"@babel/preset-env": "7.15.8",
|
|
33
|
-
"@types/node": "16.11.
|
|
33
|
+
"@types/node": "16.11.1",
|
|
34
34
|
"braintree-jsdoc-template": "3.3.0",
|
|
35
35
|
"eslint": "8.0.1",
|
|
36
36
|
"eslint-config-nodemailer": "1.2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"grunt": "1.4.1",
|
|
39
39
|
"grunt-cli": "1.4.3",
|
|
40
40
|
"grunt-contrib-nodeunit": "4.0.0",
|
|
41
|
-
"grunt-eslint": "
|
|
41
|
+
"grunt-eslint": "24.0.0",
|
|
42
42
|
"jsdoc": "3.6.7",
|
|
43
43
|
"tsd-jsdoc": "2.5.0"
|
|
44
44
|
},
|
|
@@ -49,6 +49,6 @@
|
|
|
49
49
|
"libmime": "5.0.0",
|
|
50
50
|
"libqp": "1.1.0",
|
|
51
51
|
"mailsplit": "5.3.1",
|
|
52
|
-
"pino": "7.0.
|
|
52
|
+
"pino": "7.0.2"
|
|
53
53
|
}
|
|
54
54
|
}
|