imapflow 1.0.123 → 1.0.124
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/authenticate.js +2 -0
- package/lib/commands/login.js +2 -0
- package/lib/imap-flow.js +27 -0
- package/package.json +2 -2
package/lib/commands/login.js
CHANGED
package/lib/imap-flow.js
CHANGED
|
@@ -217,6 +217,8 @@ class ImapFlow extends EventEmitter {
|
|
|
217
217
|
* @type {Map<string, boolean|number>}
|
|
218
218
|
*/
|
|
219
219
|
this.capabilities = new Map();
|
|
220
|
+
this.authCapabilities = new Map();
|
|
221
|
+
|
|
220
222
|
this.rawCapabilities = null;
|
|
221
223
|
|
|
222
224
|
this.expectCapabilityUpdate = false; // force CAPABILITY after LOGIN
|
|
@@ -973,6 +975,15 @@ class ImapFlow extends EventEmitter {
|
|
|
973
975
|
async sectionCapability(section) {
|
|
974
976
|
this.rawCapabilities = section;
|
|
975
977
|
this.capabilities = updateCapabilities(section);
|
|
978
|
+
|
|
979
|
+
if (this.capabilities) {
|
|
980
|
+
for (let [capa] of this.capabilities) {
|
|
981
|
+
if (/^AUTH=/i.test(capa)) {
|
|
982
|
+
this.authCapabilities.set(capa.toUpperCase(), false);
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
|
|
976
987
|
if (this.expectCapabilityUpdate) {
|
|
977
988
|
this.expectCapabilityUpdate = false;
|
|
978
989
|
}
|
|
@@ -981,6 +992,15 @@ class ImapFlow extends EventEmitter {
|
|
|
981
992
|
async untaggedCapability(untagged) {
|
|
982
993
|
this.rawCapabilities = untagged.attributes;
|
|
983
994
|
this.capabilities = updateCapabilities(untagged.attributes);
|
|
995
|
+
|
|
996
|
+
if (this.capabilities) {
|
|
997
|
+
for (let [capa] of this.capabilities) {
|
|
998
|
+
if (/^AUTH=/i.test(capa)) {
|
|
999
|
+
this.authCapabilities.set(capa.toUpperCase(), false);
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
|
|
984
1004
|
if (this.expectCapabilityUpdate) {
|
|
985
1005
|
this.expectCapabilityUpdate = false;
|
|
986
1006
|
}
|
|
@@ -2179,6 +2199,13 @@ class ImapFlow extends EventEmitter {
|
|
|
2179
2199
|
res.next();
|
|
2180
2200
|
}
|
|
2181
2201
|
}
|
|
2202
|
+
|
|
2203
|
+
if (!finished) {
|
|
2204
|
+
// FETCH never finished!
|
|
2205
|
+
let error = new Error('FETCH did not finish');
|
|
2206
|
+
error.code = 'ENotFinished';
|
|
2207
|
+
throw error;
|
|
2208
|
+
}
|
|
2182
2209
|
} catch (err) {
|
|
2183
2210
|
setImmediate(() => this.close());
|
|
2184
2211
|
throw err;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "imapflow",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.124",
|
|
4
4
|
"description": "IMAP Client for Node",
|
|
5
5
|
"main": "./lib/imap-flow.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@babel/eslint-plugin": "7.19.1",
|
|
32
32
|
"@babel/plugin-syntax-class-properties": "7.12.13",
|
|
33
33
|
"@babel/preset-env": "7.20.2",
|
|
34
|
-
"@types/node": "18.15.
|
|
34
|
+
"@types/node": "18.15.10",
|
|
35
35
|
"braintree-jsdoc-template": "3.3.0",
|
|
36
36
|
"eslint": "8.36.0",
|
|
37
37
|
"eslint-config-nodemailer": "1.2.0",
|