Comparing version 1.0.44 to 1.0.45
# CHANGELOG | ||
- 1.0.45 - 2020-05-02 | ||
- Better support for XOAUTH2 | ||
- 1.0.44 - 2020-04-20 | ||
@@ -4,0 +8,0 @@ |
@@ -13,3 +13,3 @@ 'use strict'; | ||
// AUTH=OAUTHBEARER and AUTH=XOAUTH in the context of OAuth2 or very similar so we can handle these together | ||
if (connection.capabilities.has('AUTH=OAUTHBEARER') || connection.capabilities.has('AUTH=XOAUTH')) { | ||
if (connection.capabilities.has('AUTH=OAUTHBEARER') || connection.capabilities.has('AUTH=XOAUTH') || connection.capabilities.has('AUTH=XOAUTH2')) { | ||
let oauthbearer; | ||
@@ -23,3 +23,3 @@ let command; | ||
breaker = 'AQ=='; | ||
} else if (connection.capabilities.has('AUTH=XOAUTH')) { | ||
} else if (connection.capabilities.has('AUTH=XOAUTH') || connection.capabilities.has('AUTH=XOAUTH2')) { | ||
oauthbearer = [`user=${username}`, `auth=Bearer ${accessToken}`, '', ''].join('\x01'); | ||
@@ -26,0 +26,0 @@ command = 'XOAUTH2'; |
'use strict'; | ||
const { normalizePath } = require('../tools.js'); | ||
const utf7 = require('utf7').imap; | ||
const { specialUse } = require('../special-use'); | ||
const iconv = require('iconv-lite'); | ||
@@ -51,3 +51,3 @@ // Lists mailboxes from server | ||
try { | ||
return utf7.decode(folder); | ||
return iconv.decode(Buffer.from(folder), 'utf-7-imap').toString(); | ||
} catch (err) { | ||
@@ -109,3 +109,3 @@ return folder; // keep as is | ||
try { | ||
return utf7.decode(folder); | ||
return iconv.decode(Buffer.from(folder), 'utf-7-imap').toString(); | ||
} catch (err) { | ||
@@ -112,0 +112,0 @@ return folder; // keep as is |
@@ -187,2 +187,3 @@ 'use strict'; | ||
'draf', | ||
'draft', | ||
'drafts', | ||
@@ -189,0 +190,0 @@ 'drög', |
@@ -6,3 +6,2 @@ 'use strict'; | ||
const { createHash } = require('crypto'); | ||
const utf7 = require('utf7').imap; | ||
const { JPDecoder } = require('./jp-decoder'); | ||
@@ -24,3 +23,3 @@ const iconv = require('iconv-lite'); | ||
try { | ||
return utf7.encode(path); | ||
return iconv.encode(path, 'utf-7-imap').toString(); | ||
} catch (err) { | ||
@@ -33,3 +32,3 @@ // ignore, keep name as is | ||
try { | ||
return utf7.decode(path); | ||
return iconv.decode(Buffer.from(path), 'utf-7-imap').toString(); | ||
} catch (err) { | ||
@@ -331,3 +330,3 @@ // ignore, keep name as is | ||
try { | ||
path = utf7.encode(path); | ||
path = iconv.encode(path, 'utf-7-imap').toString(); | ||
} catch (err) { | ||
@@ -334,0 +333,0 @@ // ignore |
{ | ||
"name": "imapflow", | ||
"version": "1.0.44", | ||
"version": "1.0.45", | ||
"description": "IMAP Client for Node", | ||
@@ -32,3 +32,3 @@ "main": "./lib/imap-flow.js", | ||
"eslint-config-nodemailer": "1.2.0", | ||
"eslint-config-prettier": "6.10.1", | ||
"eslint-config-prettier": "6.11.0", | ||
"grunt": "1.1.0", | ||
@@ -42,3 +42,3 @@ "grunt-cli": "1.3.2", | ||
"dependencies": { | ||
"@types/node": "13.13.0", | ||
"@types/node": "13.13.4", | ||
"encoding-japanese": "1.0.30", | ||
@@ -50,5 +50,4 @@ "iconv-lite": "0.5.1", | ||
"mailsplit": "4.6.4", | ||
"pino": "6.2.0", | ||
"utf7": "1.0.2" | ||
"pino": "6.2.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
517950
8
+ Added@types/node@13.13.4(transitive)
+ Addedpino@6.2.1(transitive)
- Removedutf7@1.0.2
- Removed@types/node@13.13.0(transitive)
- Removedpino@6.2.0(transitive)
- Removedsemver@5.3.0(transitive)
- Removedutf7@1.0.2(transitive)
Updated@types/node@13.13.4
Updatedpino@6.2.1