Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

imapflow

Package Overview
Dependencies
Maintainers
1
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imapflow - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

CHANGELOG.md
# CHANGELOG
- v1.0.2 - 2020-01-24
- Allow using emailId and threadId as search parameters
- v1.0.1 - 2020-01-14
- Initial version. Had to use v1.0.1 as v1.0.0 was already taken by template repository.

2

lib/commands/fetch.js

@@ -89,3 +89,3 @@ 'use strict';

// always ask for modseq if possible
if (connection.enabled.has('CONDSTORE') && !query.modseq) {
if (connection.enabled.has('CONDSTORE')) {
queryStructure.push({ type: 'ATOM', value: 'MODSEQ' });

@@ -92,0 +92,0 @@ }

@@ -22,3 +22,3 @@ 'use strict';

// normal query
attributes = searchCompiler(connection.mailbox, query);
attributes = searchCompiler(connection, query);
} else {

@@ -25,0 +25,0 @@ return false;

@@ -40,6 +40,8 @@ 'use strict';

module.exports.searchCompiler = (mailbox, query) => {
let attributes = [];
module.exports.searchCompiler = (connection, query) => {
const attributes = [];
let walk = params => {
const mailbox = connection.mailbox;
const walk = params => {
Object.keys(params || {}).forEach(term => {

@@ -98,2 +100,17 @@ switch (term.toUpperCase()) {

case 'EMAILID':
if (connection.capabilities.has('OBJECTID')) {
setOpt(attributes, 'EMAILID', params[term]);
} else if (connection.capabilities.has('X-GM-EXT-1')) {
setOpt(attributes, 'X-GM-MSGID', params[term]);
}
break;
case 'THREADID':
if (connection.capabilities.has('OBJECTID')) {
setOpt(attributes, 'THREADID', params[term]);
} else if (connection.capabilities.has('X-GM-EXT-1')) {
setOpt(attributes, 'X-GM-THRID', params[term]);
}
break;
case 'BEFORE':

@@ -100,0 +117,0 @@ case 'ON':

{
"name": "imapflow",
"version": "1.0.1",
"version": "1.0.2",
"description": "IMAP Client for Node",

@@ -42,7 +42,7 @@ "main": "./lib/imap-flow.js",

"encoding-japanese": "1.0.30",
"iconv-lite": "0.5.0",
"iconv-lite": "0.5.1",
"libbase64": "1.2.1",
"libmime": "4.2.1",
"libqp": "1.1.0",
"mailsplit": "4.6.3",
"mailsplit": "4.6.4",
"pino": "5.16.0",

@@ -49,0 +49,0 @@ "utf7": "1.0.2"

@@ -46,2 +46,8 @@ # ImapFlow

// list subjects for all messages
// uid value is always included in FETCH response, envelope strings are in unicode.
for await (let message of client.fetch('1:*', { envelope: true })) {
console.log(`${message.uid}: ${message.envelope.subject}`);
}
// log out and close connection

@@ -48,0 +54,0 @@ await client.logout();

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc