browserbox
Advanced tools
Comparing version 0.8.0 to 0.8.1
{ | ||
"name": "browserbox", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"homepage": "https://github.com/whiteout-io/browserbox", | ||
@@ -22,7 +22,6 @@ "description": "IMAP client for browsers.", | ||
"wo-utf7": "~2.0.2", | ||
"wo-imap-handler": "~0.1.11", | ||
"wo-imap-handler": "~0.1.14", | ||
"mimefuncs": "~0.3.4", | ||
"axe-logger": "~0.0.2", | ||
"tcp-socket": "~0.5.0", | ||
"es6-promise": "^2.0.1" | ||
"tcp-socket": "~0.5.0" | ||
}, | ||
@@ -29,0 +28,0 @@ "devDependencies": { |
@@ -373,3 +373,3 @@ // Copyright (c) 2014 Andris Reinman | ||
// inform about the timeout, _onError takes case of the rest | ||
var error = new Error('Socket timed out!'); | ||
var error = new Error(this.options.sessionId + ' Socket timed out!'); | ||
axe.error(DEBUG_TAG, error); | ||
@@ -379,4 +379,2 @@ this._onError(error); | ||
/** | ||
@@ -460,3 +458,3 @@ * More data can be buffered in the socket, `waitDrain` is reset to false | ||
ImapClient.prototype._onOpen = function() { | ||
axe.debug(DEBUG_TAG, 'tcp socket opened'); | ||
axe.debug(DEBUG_TAG, this.options.sessionId + ' tcp socket opened'); | ||
this.socket.ondata = this._onData.bind(this); | ||
@@ -509,6 +507,6 @@ this.socket.onclose = this._onClose.bind(this); | ||
response = imapHandler.parser(data); | ||
axe.debug(DEBUG_TAG, 'received response: ' + response.tag + ' ' + response.command); | ||
axe.debug(DEBUG_TAG, this.options.sessionId + ' S: ' + imapHandler.compiler(response, false, true)); | ||
} | ||
} catch (e) { | ||
axe.error(DEBUG_TAG, 'error parsing imap response: ' + e + '\n' + e.stack + '\nraw:' + data); | ||
axe.error(DEBUG_TAG, this.options.sessionId + ' error parsing imap response: ' + e + '\n' + e.stack + '\nraw:' + data); | ||
return this._onError(e); | ||
@@ -651,3 +649,3 @@ } | ||
// if we're in priority mode (i.e. we ran commands in a precheck), | ||
// queue any commands BEFORE the command that contianed the precheck, | ||
// queue any commands BEFORE the command that contianed the precheck, | ||
// otherwise just queue command as usual | ||
@@ -721,11 +719,13 @@ var index = data.ctx ? this._clientQueue.indexOf(data.ctx) : -1; | ||
this._currentCommand = this._clientQueue.shift(); | ||
var loggedCommand = false; | ||
try { | ||
this._currentCommand.data = imapHandler.compiler(this._currentCommand.request, true); | ||
loggedCommand = imapHandler.compiler(this._currentCommand.request, false, true); | ||
} catch (e) { | ||
axe.error(DEBUG_TAG, 'error compiling imap command: ' + e + '\nstack trace: ' + e.stack + '\nraw:' + this._currentCommand.request); | ||
axe.error(DEBUG_TAG, this.options.sessionId + ' error compiling imap command: ' + e + '\nstack trace: ' + e.stack + '\nraw:' + this._currentCommand.request); | ||
return this._onError(e); | ||
} | ||
axe.debug(DEBUG_TAG, 'sending request: ' + this._currentCommand.request.tag + ' ' + this._currentCommand.request.command); | ||
axe.debug(DEBUG_TAG, this.options.sessionId + ' C: ' + loggedCommand); | ||
var data = this._currentCommand.data.shift(); | ||
@@ -732,0 +732,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
392251
5
8997
- Removedes6-promise@^2.0.1
- Removedes6-promise@2.3.0(transitive)
Updatedwo-imap-handler@~0.1.14