Comparing version 1.0.47 to 1.0.48
{ | ||
"name": "imapflow", | ||
"version": "1.0.47", | ||
"version": "1.0.48", | ||
"description": "IMAP Client for Node", | ||
@@ -30,22 +30,22 @@ "main": "./lib/imap-flow.js", | ||
"braintree-jsdoc-template": "3.3.0", | ||
"eslint": "7.1.0", | ||
"eslint": "7.6.0", | ||
"eslint-config-nodemailer": "1.2.0", | ||
"eslint-config-prettier": "6.11.0", | ||
"grunt": "1.1.0", | ||
"grunt": "1.2.1", | ||
"grunt-cli": "1.3.2", | ||
"grunt-contrib-nodeunit": "2.1.0", | ||
"grunt-eslint": "23.0.0", | ||
"jsdoc": "3.6.4", | ||
"jsdoc": "3.6.5", | ||
"tsd-jsdoc": "2.5.0" | ||
}, | ||
"dependencies": { | ||
"@types/node": "14.0.5", | ||
"@types/node": "14.0.27", | ||
"encoding-japanese": "1.0.30", | ||
"iconv-lite": "0.5.1", | ||
"iconv-lite": "0.6.2", | ||
"libbase64": "1.2.1", | ||
"libmime": "4.2.1", | ||
"libmime": "5.0.0", | ||
"libqp": "1.1.0", | ||
"mailsplit": "5.0.0", | ||
"pino": "6.3.0" | ||
"pino": "6.5.1" | ||
} | ||
} |
@@ -15,2 +15,4 @@ # ImapFlow | ||
### Free, AGPL-licensed version | ||
First install the module from npm: | ||
@@ -28,2 +30,20 @@ | ||
### MIT version | ||
MIT-licensed version is available for [Postal Systems subscribers](https://postalsys.com/). | ||
First install the module from Postal Systems private registry: | ||
``` | ||
$ npm install @postalsys/imapflow | ||
``` | ||
next import the ImapFlow class into your script: | ||
```js | ||
const { ImapFlow } = require('@postalsys/imapflow'); | ||
``` | ||
### Promises | ||
All ImapFlow methods use Promises, so you need to wait using `await` or wait for the `then()` method to fire until you get the response. | ||
@@ -30,0 +50,0 @@ |
@@ -10,1 +10,36 @@ 'use strict'; | ||
}; | ||
module.exports['Create imapflow instance with custom logger'] = async test => { | ||
class CustomLogger { | ||
constructor() {} | ||
debug(obj) { | ||
console.log(JSON.stringify(obj)); | ||
} | ||
info(obj) { | ||
console.log(JSON.stringify(obj)); | ||
} | ||
warn(obj) { | ||
console.log(JSON.stringify(obj)); | ||
} | ||
// eslint-disable-next-line no-unused-vars | ||
error(obj) { | ||
// we don't actually want to log anything here. | ||
} | ||
} | ||
let imapFlow = new ImapFlow({ | ||
logger: new CustomLogger() | ||
}); | ||
test.ok(imapFlow); | ||
try { | ||
await imapFlow.connect(); | ||
} catch (ex) { | ||
// it is PERFECTLY okay to have an exception here. We expect an ECONNREFUSED if an exception occurs. | ||
test.equal(ex.code, 'ECONNREFUSED'); | ||
} | ||
test.done(); | ||
}; |
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
10899
98
515503
64
+ Added@types/node@14.0.27(transitive)
+ Addediconv-lite@0.6.2(transitive)
+ Addedlibmime@5.0.0(transitive)
+ Addedpino@6.5.1(transitive)
- Removed@types/node@14.0.5(transitive)
- Removediconv-lite@0.5.1(transitive)
- Removedpino@6.3.0(transitive)
Updated@types/node@14.0.27
Updatediconv-lite@0.6.2
Updatedlibmime@5.0.0
Updatedpino@6.5.1