emailjs-imap-client
Advanced tools
Comparing version 3.0.2 to 3.0.3
{ | ||
"name": "emailjs-imap-client", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"homepage": "https://github.com/emailjs/emailjs-imap-client", | ||
@@ -45,3 +45,3 @@ "description": "JavaScript IMAP client", | ||
"hoodiecrow-imap": "^2.1.0", | ||
"mocha": "^4.0.1", | ||
"mocha": "^5.0.0", | ||
"pre-commit": "^1.2.2", | ||
@@ -48,0 +48,0 @@ "sinon": "^4.1.3", |
@@ -29,2 +29,3 @@ # emailjs-imap-client | ||
* **options** (optional) is the options object | ||
* **logLevel** is the verbosity, can be set to error, warn, info, debug. See `src/common.js` | ||
* **auth** is the authentication information object | ||
@@ -31,0 +32,0 @@ * **user** is the username of the user (also applies to Oauth2) |
/* eslint-disable no-unused-expressions */ | ||
import hoodiecrow from 'hoodiecrow-imap' | ||
import ImapClient from '..' | ||
import ImapClient, { LOG_LEVEL_NONE as logLevel } from '..' | ||
import { parseSEARCH } from './command-parser' | ||
import { buildSEARCHCommand } from './command-builder' | ||
import { LOG_LEVEL_NONE } from './common' | ||
@@ -85,2 +84,3 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0' | ||
imap = new ImapClient('127.0.0.1', port, { | ||
logLevel, | ||
auth: { | ||
@@ -92,3 +92,2 @@ user: 'testuser', | ||
}) | ||
imap.logLevel = LOG_LEVEL_NONE | ||
@@ -104,2 +103,3 @@ return imap.connect().then(() => { | ||
imap = new ImapClient('127.0.0.1', port, { | ||
logLevel, | ||
auth: { | ||
@@ -112,3 +112,2 @@ user: 'testuser', | ||
}) | ||
imap.logLevel = imap.LOG_LEVEL_NONE | ||
@@ -124,2 +123,3 @@ return imap.connect().then(() => { | ||
imap = new ImapClient('127.0.0.1', port + 2, { | ||
logLevel, | ||
auth: { | ||
@@ -132,3 +132,2 @@ user: 'testuser', | ||
}) | ||
imap.logLevel = imap.LOG_LEVEL_NONE | ||
@@ -142,2 +141,3 @@ return imap.connect().catch((err) => { | ||
imap = new ImapClient('127.0.0.1', port + 2, { | ||
logLevel, | ||
auth: { | ||
@@ -149,3 +149,2 @@ user: 'testuser', | ||
}) | ||
imap.logLevel = imap.LOG_LEVEL_NONE | ||
@@ -163,2 +162,3 @@ return imap.connect().then(() => { | ||
imap = new ImapClient('127.0.0.1', port, { | ||
logLevel, | ||
auth: { | ||
@@ -170,3 +170,2 @@ user: 'testuser', | ||
}) | ||
imap.logLevel = imap.LOG_LEVEL_NONE | ||
@@ -433,2 +432,3 @@ return imap.connect().then(() => { | ||
imap = new ImapClient('127.0.0.1', port, { | ||
logLevel, | ||
auth: { | ||
@@ -440,3 +440,2 @@ user: 'testuser', | ||
}) | ||
imap.logLevel = imap.LOG_LEVEL_NONE | ||
@@ -443,0 +442,0 @@ return imap.connect() |
@@ -7,3 +7,3 @@ /* eslint-disable no-unused-expressions */ | ||
toTypedArray, | ||
LOG_LEVEL_NONE | ||
LOG_LEVEL_NONE as logLevel | ||
} from './common' | ||
@@ -16,4 +16,3 @@ | ||
const auth = { user: 'baldrian', pass: 'sleeper.de' } | ||
br = new ImapClient('somehost', 1234, { auth }) | ||
br.logLevel = LOG_LEVEL_NONE | ||
br = new ImapClient('somehost', 1234, { auth, logLevel }) | ||
br.client.socket = { | ||
@@ -20,0 +19,0 @@ send: () => { }, |
@@ -22,3 +22,4 @@ import { map, pipe, union, zip, fromPairs, propOr, pathOr, flatten } from 'ramda' | ||
LOG_LEVEL_INFO, | ||
LOG_LEVEL_DEBUG | ||
LOG_LEVEL_DEBUG, | ||
LOG_LEVEL_ALL | ||
} from './common' | ||
@@ -96,3 +97,3 @@ | ||
this.createLogger() | ||
this.logLevel = this.LOG_LEVEL_ALL | ||
this.logLevel = propOr(LOG_LEVEL_ALL, 'logLevel', options) | ||
} | ||
@@ -99,0 +100,0 @@ |
Sorry, the diff of this file is too big to display
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
705334
702
11058