New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

imapflow

Package Overview
Dependencies
Maintainers
1
Versions
172
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.72 to 1.0.73

3

lib/commands/append.js

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

}
}
},
comment: 'Sequence not found from APPEND output'
});

@@ -92,0 +93,0 @@ response.next();

@@ -15,32 +15,22 @@ 'use strict';

let preCheckWaitQueue = [];
try {
connection.idling = true;
let preCheckProcessing = false;
connection.preCheck = () => {
let processor = new Promise((resolve, reject) => {
preCheckWaitQueue.push({ resolve, reject });
});
let idleSent = false;
let doneRequested = false;
let doneSent = false;
if (!preCheckProcessing) {
preCheckProcessing = true;
// small delay to make sure we do not call preCheck before command is actually executed
setImmediate(() => {
if (connection.idling) {
connection.log.debug({ src: 'c', msg: `DONE`, comment: `breaking IDLE` });
connection.write('DONE');
connection.idling = false;
}
connection.preCheck = false; // unset itself
while (preCheckWaitQueue.length) {
console.log('RESOLVING IDLE');
let entry = preCheckWaitQueue.shift();
entry.resolve();
}
});
let preCheck = async () => {
doneRequested = true;
if (connection.idling && idleSent && !doneSent) {
connection.log.debug({ src: 'c', msg: `DONE`, comment: `breaking IDLE` });
connection.write('DONE');
doneSent = true;
}
};
return processor;
connection.preCheck = async () => {
await preCheck();
connection.idling = false;
connection.preCheck = false; // unset itself
};

@@ -51,2 +41,10 @@

connection.log.debug({ msg: `Initiated IDLE, waiting for server input` });
},
onSend: () => {
idleSent = true;
if (doneRequested) {
preCheck().catch(err => {
connection.log.debug({ msg: `preCheck error`, err });
});
}
}

@@ -57,7 +55,2 @@ });

connection.preCheck = false;
while (preCheckWaitQueue.length) {
let entry = preCheckWaitQueue.shift();
let err = new Error('Already processed');
entry.reject(err);
}

@@ -68,7 +61,2 @@ response.next();

connection.preCheck = false;
while (preCheckWaitQueue.length) {
let entry = preCheckWaitQueue.shift();
entry.reject(err);
}
connection.log.warn({ err, cid: connection.id });

@@ -92,3 +80,3 @@ return false;

let idleCheck = async () => {
let response = await connection.exec('NOOP');
let response = await connection.exec('NOOP', false, { comment: 'IDLE not supported' });
response.next();

@@ -95,0 +83,0 @@ };

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

try {
let response = await connection.exec('NOOP');
let response = await connection.exec('NOOP', false, { comment: 'Requested by command' });
response.next();

@@ -9,0 +9,0 @@ return true;

{
"name": "imapflow",
"version": "1.0.72",
"version": "1.0.73",
"description": "IMAP Client for Node",

@@ -5,0 +5,0 @@ "main": "./lib/imap-flow.js",

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