incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmue...@apache.org
Subject [4/6] [CB-984] [weinre] weinre broken with node 0.8
Date Fri, 29 Jun 2012 14:42:29 GMT
http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/coffee-script/lib/coffee-script/repl.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/coffee-script/lib/coffee-script/repl.js b/weinre.server/node_modules/coffee-script/lib/coffee-script/repl.js
index 3368d7c..b4a4765 100644
--- a/weinre.server/node_modules/coffee-script/lib/coffee-script/repl.js
+++ b/weinre.server/node_modules/coffee-script/lib/coffee-script/repl.js
@@ -1,5 +1,10 @@
+// Generated by CoffeeScript 1.3.3
 (function() {
-  var ACCESSOR, CoffeeScript, Module, REPL_PROMPT, REPL_PROMPT_CONTINUATION, SIMPLEVAR, Script, autocomplete, backlog, completeAttribute, completeVariable, enableColours, error, getCompletions, inspect, readline, repl, run, stdin, stdout;
+  var ACCESSOR, CoffeeScript, Module, REPL_PROMPT, REPL_PROMPT_CONTINUATION, REPL_PROMPT_MULTILINE, SIMPLEVAR, Script, autocomplete, backlog, completeAttribute, completeVariable, enableColours, error, getCompletions, inspect, multilineMode, pipedInput, readline, repl, run, stdin, stdout;
+
+  stdin = process.openStdin();
+
+  stdout = process.stdout;
 
   CoffeeScript = require('./coffee-script');
 
@@ -13,6 +18,8 @@
 
   REPL_PROMPT = 'coffee> ';
 
+  REPL_PROMPT_MULTILINE = '------> ';
+
   REPL_PROMPT_CONTINUATION = '......> ';
 
   enableColours = false;
@@ -21,55 +28,20 @@
     enableColours = !process.env.NODE_DISABLE_COLORS;
   }
 
-  stdin = process.openStdin();
-
-  stdout = process.stdout;
-
   error = function(err) {
     return stdout.write((err.stack || err.toString()) + '\n');
   };
 
-  backlog = '';
-
-  run = function(buffer) {
-    var code, returnValue, _;
-    if (!buffer.toString().trim() && !backlog) {
-      repl.prompt();
-      return;
-    }
-    code = backlog += buffer;
-    if (code[code.length - 1] === '\\') {
-      backlog = "" + backlog.slice(0, -1) + "\n";
-      repl.setPrompt(REPL_PROMPT_CONTINUATION);
-      repl.prompt();
-      return;
-    }
-    repl.setPrompt(REPL_PROMPT);
-    backlog = '';
-    try {
-      _ = global._;
-      returnValue = CoffeeScript.eval("_=(" + code + "\n)", {
-        filename: 'repl',
-        modulename: 'repl'
-      });
-      if (returnValue === void 0) global._ = _;
-      process.stdout.write(inspect(returnValue, false, 2, enableColours) + '\n');
-    } catch (err) {
-      error(err);
-    }
-    return repl.prompt();
-  };
-
   ACCESSOR = /\s*([\w\.]+)(?:\.(\w*))$/;
 
-  SIMPLEVAR = /\s*(\w*)$/i;
+  SIMPLEVAR = /(\w+)$/i;
 
   autocomplete = function(text) {
     return completeAttribute(text) || completeVariable(text) || [[], text];
   };
 
   completeAttribute = function(text) {
-    var all, completions, match, obj, prefix, val;
+    var all, completions, key, match, obj, possibilities, prefix, val;
     if (match = text.match(ACCESSOR)) {
       all = match[0], obj = match[1], prefix = match[2];
       try {
@@ -77,7 +49,14 @@
       } catch (error) {
         return;
       }
-      completions = getCompletions(prefix, Object.getOwnPropertyNames(val));
+      val = Object(val);
+      possibilities = Object.getOwnPropertyNames(val);
+      for (key in val) {
+        if (~possibilities.indexOf(val)) {
+          possibilities.push(key);
+        }
+      }
+      completions = getCompletions(prefix, possibilities);
       return [completions, prefix];
     }
   };
@@ -85,15 +64,20 @@
   completeVariable = function(text) {
     var completions, free, keywords, possibilities, r, vars, _ref;
     free = (_ref = text.match(SIMPLEVAR)) != null ? _ref[1] : void 0;
+    if (text === "") {
+      free = "";
+    }
     if (free != null) {
-      vars = Script.runInThisContext('Object.getOwnPropertyNames(this)');
+      vars = Script.runInThisContext('Object.getOwnPropertyNames(Object(this))');
       keywords = (function() {
-        var _i, _len, _ref2, _results;
-        _ref2 = CoffeeScript.RESERVED;
+        var _i, _len, _ref1, _results;
+        _ref1 = CoffeeScript.RESERVED;
         _results = [];
-        for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
-          r = _ref2[_i];
-          if (r.slice(0, 2) !== '__') _results.push(r);
+        for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+          r = _ref1[_i];
+          if (r.slice(0, 2) !== '__') {
+            _results.push(r);
+          }
         }
         return _results;
       })();
@@ -108,26 +92,154 @@
     _results = [];
     for (_i = 0, _len = candidates.length; _i < _len; _i++) {
       el = candidates[_i];
-      if (el.indexOf(prefix) === 0) _results.push(el);
+      if (el.indexOf(prefix) === 0) {
+        _results.push(el);
+      }
     }
     return _results;
   };
 
   process.on('uncaughtException', error);
 
-  if (readline.createInterface.length < 3) {
-    repl = readline.createInterface(stdin, autocomplete);
-    stdin.on('data', function(buffer) {
-      return repl.write(buffer);
+  backlog = '';
+
+  run = function(buffer) {
+    var code, returnValue, _;
+    buffer = buffer.replace(/(^|[\r\n]+)(\s*)##?(?:[^#\r\n][^\r\n]*|)($|[\r\n])/, "$1$2$3");
+    buffer = buffer.replace(/[\r\n]+$/, "");
+    if (multilineMode) {
+      backlog += "" + buffer + "\n";
+      repl.setPrompt(REPL_PROMPT_CONTINUATION);
+      repl.prompt();
+      return;
+    }
+    if (!buffer.toString().trim() && !backlog) {
+      repl.prompt();
+      return;
+    }
+    code = backlog += buffer;
+    if (code[code.length - 1] === '\\') {
+      backlog = "" + backlog.slice(0, -1) + "\n";
+      repl.setPrompt(REPL_PROMPT_CONTINUATION);
+      repl.prompt();
+      return;
+    }
+    repl.setPrompt(REPL_PROMPT);
+    backlog = '';
+    try {
+      _ = global._;
+      returnValue = CoffeeScript["eval"]("_=(" + code + "\n)", {
+        filename: 'repl',
+        modulename: 'repl'
+      });
+      if (returnValue === void 0) {
+        global._ = _;
+      }
+      repl.output.write("" + (inspect(returnValue, false, 2, enableColours)) + "\n");
+    } catch (err) {
+      error(err);
+    }
+    return repl.prompt();
+  };
+
+  if (stdin.readable) {
+    pipedInput = '';
+    repl = {
+      prompt: function() {
+        return stdout.write(this._prompt);
+      },
+      setPrompt: function(p) {
+        return this._prompt = p;
+      },
+      input: stdin,
+      output: stdout,
+      on: function() {}
+    };
+    stdin.on('data', function(chunk) {
+      var line, lines, _i, _len, _ref;
+      pipedInput += chunk;
+      if (!/\n/.test(pipedInput)) {
+        return;
+      }
+      lines = pipedInput.split("\n");
+      pipedInput = lines[lines.length - 1];
+      _ref = lines.slice(0, -1);
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        line = _ref[_i];
+        if (!(line)) {
+          continue;
+        }
+        stdout.write("" + line + "\n");
+        run(line);
+      }
+    });
+    stdin.on('end', function() {
+      var line, _i, _len, _ref;
+      _ref = pipedInput.trim().split("\n");
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        line = _ref[_i];
+        if (!(line)) {
+          continue;
+        }
+        stdout.write("" + line + "\n");
+        run(line);
+      }
+      stdout.write('\n');
+      return process.exit(0);
     });
   } else {
-    repl = readline.createInterface(stdin, stdout, autocomplete);
+    if (readline.createInterface.length < 3) {
+      repl = readline.createInterface(stdin, autocomplete);
+      stdin.on('data', function(buffer) {
+        return repl.write(buffer);
+      });
+    } else {
+      repl = readline.createInterface(stdin, stdout, autocomplete);
+    }
   }
 
+  multilineMode = false;
+
+  repl.input.on('keypress', function(char, key) {
+    var cursorPos, newPrompt;
+    if (!(key && key.ctrl && !key.meta && !key.shift && key.name === 'v')) {
+      return;
+    }
+    cursorPos = repl.cursor;
+    repl.output.cursorTo(0);
+    repl.output.clearLine(1);
+    multilineMode = !multilineMode;
+    if (!multilineMode && backlog) {
+      repl._line();
+    }
+    backlog = '';
+    repl.setPrompt((newPrompt = multilineMode ? REPL_PROMPT_MULTILINE : REPL_PROMPT));
+    repl.prompt();
+    return repl.output.cursorTo(newPrompt.length + (repl.cursor = cursorPos));
+  });
+
+  repl.input.on('keypress', function(char, key) {
+    if (!(multilineMode && repl.line)) {
+      return;
+    }
+    if (!(key && key.ctrl && !key.meta && !key.shift && key.name === 'd')) {
+      return;
+    }
+    multilineMode = false;
+    return repl._line();
+  });
+
   repl.on('attemptClose', function() {
+    if (multilineMode) {
+      multilineMode = false;
+      repl.output.cursorTo(0);
+      repl.output.clearLine(1);
+      repl._onLine(repl.line);
+      return;
+    }
     if (backlog) {
       backlog = '';
-      process.stdout.write('\n');
+      repl.output.write('\n');
       repl.setPrompt(REPL_PROMPT);
       return repl.prompt();
     } else {
@@ -136,8 +248,8 @@
   });
 
   repl.on('close', function() {
-    process.stdout.write('\n');
-    return stdin.destroy();
+    repl.output.write('\n');
+    return repl.input.destroy();
   });
 
   repl.on('line', run);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/coffee-script/lib/coffee-script/rewriter.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/coffee-script/lib/coffee-script/rewriter.js b/weinre.server/node_modules/coffee-script/lib/coffee-script/rewriter.js
index b4fdc07..d26133c 100644
--- a/weinre.server/node_modules/coffee-script/lib/coffee-script/rewriter.js
+++ b/weinre.server/node_modules/coffee-script/lib/coffee-script/rewriter.js
@@ -1,7 +1,8 @@
+// Generated by CoffeeScript 1.3.3
 (function() {
   var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_BLOCK, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, left, rite, _i, _len, _ref,
-    __indexOf = Array.prototype.indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
-    __slice = Array.prototype.slice;
+    __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
+    __slice = [].slice;
 
   exports.Rewriter = (function() {
 
@@ -31,17 +32,19 @@
     };
 
     Rewriter.prototype.detectEnd = function(i, condition, action) {
-      var levels, token, tokens, _ref, _ref2;
+      var levels, token, tokens, _ref, _ref1;
       tokens = this.tokens;
       levels = 0;
       while (token = tokens[i]) {
         if (levels === 0 && condition.call(this, token, i)) {
           return action.call(this, token, i);
         }
-        if (!token || levels < 0) return action.call(this, token, i - 1);
+        if (!token || levels < 0) {
+          return action.call(this, token, i - 1);
+        }
         if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) {
           levels += 1;
-        } else if (_ref2 = token[0], __indexOf.call(EXPRESSION_END, _ref2) >= 0) {
+        } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) {
           levels -= 1;
         }
         i += 1;
@@ -50,13 +53,17 @@
     };
 
     Rewriter.prototype.removeLeadingNewlines = function() {
-      var i, tag, _len, _ref;
+      var i, tag, _i, _len, _ref;
       _ref = this.tokens;
-      for (i = 0, _len = _ref.length; i < _len; i++) {
+      for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
         tag = _ref[i][0];
-        if (tag !== 'TERMINATOR') break;
+        if (tag !== 'TERMINATOR') {
+          break;
+        }
+      }
+      if (i) {
+        return this.tokens.splice(0, i);
       }
-      if (i) return this.tokens.splice(0, i);
     };
 
     Rewriter.prototype.removeMidExpressionNewlines = function() {
@@ -80,7 +87,9 @@
         return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END';
       };
       return this.scanTokens(function(token, i) {
-        if (token[0] === 'CALL_START') this.detectEnd(i + 1, condition, action);
+        if (token[0] === 'CALL_START') {
+          this.detectEnd(i + 1, condition, action);
+        }
         return 1;
       });
     };
@@ -95,34 +104,40 @@
         return token[0] = 'INDEX_END';
       };
       return this.scanTokens(function(token, i) {
-        if (token[0] === 'INDEX_START') this.detectEnd(i + 1, condition, action);
+        if (token[0] === 'INDEX_START') {
+          this.detectEnd(i + 1, condition, action);
+        }
         return 1;
       });
     };
 
     Rewriter.prototype.addImplicitBraces = function() {
-      var action, condition, sameLine, stack, start, startIndent, startsLine;
+      var action, condition, sameLine, stack, start, startIndent, startIndex, startsLine;
       stack = [];
       start = null;
       startsLine = null;
       sameLine = true;
       startIndent = 0;
+      startIndex = 0;
       condition = function(token, i) {
-        var one, tag, three, two, _ref, _ref2;
+        var one, tag, three, two, _ref, _ref1;
         _ref = this.tokens.slice(i + 1, (i + 3) + 1 || 9e9), one = _ref[0], two = _ref[1], three = _ref[2];
-        if ('HERECOMMENT' === (one != null ? one[0] : void 0)) return false;
+        if ('HERECOMMENT' === (one != null ? one[0] : void 0)) {
+          return false;
+        }
         tag = token[0];
-        if (__indexOf.call(LINEBREAKS, tag) >= 0) sameLine = false;
-        return (((tag === 'TERMINATOR' || tag === 'OUTDENT') || (__indexOf.call(IMPLICIT_END, tag) >= 0 && sameLine)) && ((!startsLine && this.tag(i - 1) !== ',') || !((two != null ? two[0] : void 0) === ':' || (one != null ? one[0] : void 0) === '@' && (three != null ? three[0] : void 0) === ':'))) || (tag === ',' && one && ((_ref2 = one[0]) !== 'IDENTIFIER' && _ref2 !== 'NUMBER' && _ref2 !== 'STRING' && _ref2 !== '@' && _ref2 !== 'TERMINATOR' && _ref2 !== 'OUTDENT'));
+        if (__indexOf.call(LINEBREAKS, tag) >= 0) {
+          sameLine = false;
+        }
+        return (((tag === 'TERMINATOR' || tag === 'OUTDENT') || (__indexOf.call(IMPLICIT_END, tag) >= 0 && sameLine && !(i - startIndex === 1))) && ((!startsLine && this.tag(i - 1) !== ',') || !((two != null ? two[0] : void 0) === ':' || (one != null ? one[0] : void 0) === '@' && (three != null ? three[0] : void 0) === ':'))) || (tag === ',' && one && ((_ref1 = one[0]) !== 'IDENTIFIER' && _ref1 !== 'NUMBER' && _ref1 !== 'STRING' && _ref1 !== '@' && _ref1 !== 'TERMINATOR' && _ref1 !== 'OUTDENT'));
       };
       action = function(token, i) {
         var tok;
-        tok = ['}', '}', token[2]];
-        tok.generated = true;
+        tok = this.generate('}', '}', token[2]);
         return this.tokens.splice(i, 0, tok);
       };
       return this.scanTokens(function(token, i, tokens) {
-        var ago, idx, prevTag, tag, tok, value, _ref, _ref2;
+        var ago, idx, prevTag, tag, tok, value, _ref, _ref1;
         if (_ref = (tag = token[0]), __indexOf.call(EXPRESSION_START, _ref) >= 0) {
           stack.push([(tag === 'INDENT' && this.tag(i - 1) === '{' ? '{' : tag), i]);
           return 1;
@@ -131,10 +146,11 @@
           start = stack.pop();
           return 1;
         }
-        if (!(tag === ':' && ((ago = this.tag(i - 2)) === ':' || ((_ref2 = stack[stack.length - 1]) != null ? _ref2[0] : void 0) !== '{'))) {
+        if (!(tag === ':' && ((ago = this.tag(i - 2)) === ':' || ((_ref1 = stack[stack.length - 1]) != null ? _ref1[0] : void 0) !== '{'))) {
           return 1;
         }
         sameLine = true;
+        startIndex = i + 1;
         stack.push(['{']);
         idx = ago === '@' ? i - 2 : i - 1;
         while (this.tag(idx - 2) === 'HERECOMMENT') {
@@ -144,8 +160,7 @@
         startsLine = !prevTag || (__indexOf.call(LINEBREAKS, prevTag) >= 0);
         value = new String('{');
         value.generated = true;
-        tok = ['{', value, token[2]];
-        tok.generated = true;
+        tok = this.generate('{', value, token[2]);
         tokens.splice(idx, 0, tok);
         this.detectEnd(i + 2, condition, action);
         return 2;
@@ -156,9 +171,11 @@
       var action, condition, noCall, seenControl, seenSingle;
       noCall = seenSingle = seenControl = false;
       condition = function(token, i) {
-        var post, tag, _ref, _ref2;
+        var post, tag, _ref, _ref1;
         tag = token[0];
-        if (!seenSingle && token.fromThen) return true;
+        if (!seenSingle && token.fromThen) {
+          return true;
+        }
         if (tag === 'IF' || tag === 'ELSE' || tag === 'CATCH' || tag === '->' || tag === '=>' || tag === 'CLASS') {
           seenSingle = true;
         }
@@ -168,28 +185,38 @@
         if ((tag === '.' || tag === '?.' || tag === '::') && this.tag(i - 1) === 'OUTDENT') {
           return true;
         }
-        return !token.generated && this.tag(i - 1) !== ',' && (__indexOf.call(IMPLICIT_END, tag) >= 0 || (tag === 'INDENT' && !seenControl)) && (tag !== 'INDENT' || (((_ref = this.tag(i - 2)) !== 'CLASS' && _ref !== 'EXTENDS') && (_ref2 = this.tag(i - 1), __indexOf.call(IMPLICIT_BLOCK, _ref2) < 0) && !((post = this.tokens[i + 1]) && post.generated && post[0] === '{')));
+        return !token.generated && this.tag(i - 1) !== ',' && (__indexOf.call(IMPLICIT_END, tag) >= 0 || (tag === 'INDENT' && !seenControl)) && (tag !== 'INDENT' || (((_ref = this.tag(i - 2)) !== 'CLASS' && _ref !== 'EXTENDS') && (_ref1 = this.tag(i - 1), __indexOf.call(IMPLICIT_BLOCK, _ref1) < 0) && !((post = this.tokens[i + 1]) && post.generated && post[0] === '{')));
       };
       action = function(token, i) {
-        return this.tokens.splice(i, 0, ['CALL_END', ')', token[2]]);
+        return this.tokens.splice(i, 0, this.generate('CALL_END', ')', token[2]));
       };
       return this.scanTokens(function(token, i, tokens) {
-        var callObject, current, next, prev, tag, _ref, _ref2, _ref3;
+        var callObject, current, next, prev, tag, _ref, _ref1, _ref2;
         tag = token[0];
-        if (tag === 'CLASS' || tag === 'IF') noCall = true;
+        if (tag === 'CLASS' || tag === 'IF' || tag === 'FOR' || tag === 'WHILE') {
+          noCall = true;
+        }
         _ref = tokens.slice(i - 1, (i + 1) + 1 || 9e9), prev = _ref[0], current = _ref[1], next = _ref[2];
-        callObject = !noCall && tag === 'INDENT' && next && next.generated && next[0] === '{' && prev && (_ref2 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref2) >= 0);
+        callObject = !noCall && tag === 'INDENT' && next && next.generated && next[0] === '{' && prev && (_ref1 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref1) >= 0);
         seenSingle = false;
         seenControl = false;
-        if (__indexOf.call(LINEBREAKS, tag) >= 0) noCall = false;
-        if (prev && !prev.spaced && tag === '?') token.call = true;
-        if (token.fromThen) return 1;
-        if (!(callObject || (prev != null ? prev.spaced : void 0) && (prev.call || (_ref3 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref3) >= 0)) && (__indexOf.call(IMPLICIT_CALL, tag) >= 0 || !(token.spaced || token.newLine) && __indexOf.call(IMPLICIT_UNSPACED_CALL, tag) >= 0))) {
+        if (__indexOf.call(LINEBREAKS, tag) >= 0) {
+          noCall = false;
+        }
+        if (prev && !prev.spaced && tag === '?') {
+          token.call = true;
+        }
+        if (token.fromThen) {
+          return 1;
+        }
+        if (!(callObject || (prev != null ? prev.spaced : void 0) && (prev.call || (_ref2 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref2) >= 0)) && (__indexOf.call(IMPLICIT_CALL, tag) >= 0 || !(token.spaced || token.newLine) && __indexOf.call(IMPLICIT_UNSPACED_CALL, tag) >= 0))) {
           return 1;
         }
-        tokens.splice(i, 0, ['CALL_START', '(', token[2]]);
+        tokens.splice(i, 0, this.generate('CALL_START', '(', token[2]));
         this.detectEnd(i + 1, condition, action);
-        if (prev[0] === '?') prev[0] = 'FUNC_EXIST';
+        if (prev[0] === '?') {
+          prev[0] = 'FUNC_EXIST';
+        }
         return 2;
       });
     };
@@ -205,7 +232,7 @@
         return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent);
       };
       return this.scanTokens(function(token, i, tokens) {
-        var tag, _ref, _ref2;
+        var tag, _ref, _ref1;
         tag = token[0];
         if (tag === 'TERMINATOR' && this.tag(i + 1) === 'THEN') {
           tokens.splice(i, 1);
@@ -221,12 +248,15 @@
         }
         if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) {
           starter = tag;
-          _ref2 = this.indentation(token), indent = _ref2[0], outdent = _ref2[1];
-          if (starter === 'THEN') indent.fromThen = true;
-          indent.generated = outdent.generated = true;
+          _ref1 = this.indentation(token, true), indent = _ref1[0], outdent = _ref1[1];
+          if (starter === 'THEN') {
+            indent.fromThen = true;
+          }
           tokens.splice(i + 1, 0, indent);
           this.detectEnd(i + 2, condition, action);
-          if (tag === 'THEN') tokens.splice(i, 1);
+          if (tag === 'THEN') {
+            tokens.splice(i, 1);
+          }
           return 1;
         }
         return 1;
@@ -246,15 +276,33 @@
         }
       };
       return this.scanTokens(function(token, i) {
-        if (token[0] !== 'IF') return 1;
+        if (token[0] !== 'IF') {
+          return 1;
+        }
         original = token;
         this.detectEnd(i + 1, condition, action);
         return 1;
       });
     };
 
-    Rewriter.prototype.indentation = function(token) {
-      return [['INDENT', 2, token[2]], ['OUTDENT', 2, token[2]]];
+    Rewriter.prototype.indentation = function(token, implicit) {
+      var indent, outdent;
+      if (implicit == null) {
+        implicit = false;
+      }
+      indent = ['INDENT', 2, token[2]];
+      outdent = ['OUTDENT', 2, token[2]];
+      if (implicit) {
+        indent.generated = outdent.generated = true;
+      }
+      return [indent, outdent];
+    };
+
+    Rewriter.prototype.generate = function(tag, value, line) {
+      var tok;
+      tok = [tag, value, line];
+      tok.generated = true;
+      return tok;
     };
 
     Rewriter.prototype.tag = function(i) {
@@ -284,7 +332,7 @@
 
   IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS'];
 
-  IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'UNARY', 'SUPER', '@', '->', '=>', '[', '(', '{', '--', '++'];
+  IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', '@', '->', '=>', '[', '(', '{', '--', '++'];
 
   IMPLICIT_UNSPACED_CALL = ['+', '-'];
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/coffee-script/lib/coffee-script/scope.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/coffee-script/lib/coffee-script/scope.js b/weinre.server/node_modules/coffee-script/lib/coffee-script/scope.js
index 2162853..3efc4ed 100644
--- a/weinre.server/node_modules/coffee-script/lib/coffee-script/scope.js
+++ b/weinre.server/node_modules/coffee-script/lib/coffee-script/scope.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.3
 (function() {
   var Scope, extend, last, _ref;
 
@@ -18,11 +19,15 @@
         }
       ];
       this.positions = {};
-      if (!this.parent) Scope.root = this;
+      if (!this.parent) {
+        Scope.root = this;
+      }
     }
 
     Scope.prototype.add = function(name, type, immediate) {
-      if (this.shared && !immediate) return this.parent.add(name, type, immediate);
+      if (this.shared && !immediate) {
+        return this.parent.add(name, type, immediate);
+      }
       if (Object.prototype.hasOwnProperty.call(this.positions, name)) {
         return this.variables[this.positions[name]].type = type;
       } else {
@@ -33,50 +38,65 @@
       }
     };
 
-    Scope.prototype.find = function(name, options) {
-      if (this.check(name, options)) return true;
+    Scope.prototype.namedMethod = function() {
+      if (this.method.name || !this.parent) {
+        return this.method;
+      }
+      return this.parent.namedMethod();
+    };
+
+    Scope.prototype.find = function(name) {
+      if (this.check(name)) {
+        return true;
+      }
       this.add(name, 'var');
       return false;
     };
 
     Scope.prototype.parameter = function(name) {
-      if (this.shared && this.parent.check(name, true)) return;
+      if (this.shared && this.parent.check(name, true)) {
+        return;
+      }
       return this.add(name, 'param');
     };
 
-    Scope.prototype.check = function(name, immediate) {
-      var found, _ref2;
-      found = !!this.type(name);
-      if (found || immediate) return found;
-      return !!((_ref2 = this.parent) != null ? _ref2.check(name) : void 0);
+    Scope.prototype.check = function(name) {
+      var _ref1;
+      return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0));
     };
 
     Scope.prototype.temporary = function(name, index) {
       if (name.length > 1) {
-        return '_' + name + (index > 1 ? index : '');
+        return '_' + name + (index > 1 ? index - 1 : '');
       } else {
         return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a');
       }
     };
 
     Scope.prototype.type = function(name) {
-      var v, _i, _len, _ref2;
-      _ref2 = this.variables;
-      for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
-        v = _ref2[_i];
-        if (v.name === name) return v.type;
+      var v, _i, _len, _ref1;
+      _ref1 = this.variables;
+      for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+        v = _ref1[_i];
+        if (v.name === name) {
+          return v.type;
+        }
       }
       return null;
     };
 
     Scope.prototype.freeVariable = function(name, reserve) {
       var index, temp;
-      if (reserve == null) reserve = true;
+      if (reserve == null) {
+        reserve = true;
+      }
       index = 0;
       while (this.check((temp = this.temporary(name, index)))) {
         index++;
       }
-      if (reserve) this.add(temp, 'var', true);
+      if (reserve) {
+        this.add(temp, 'var', true);
+      }
       return temp;
     };
 
@@ -93,12 +113,12 @@
     };
 
     Scope.prototype.declaredVariables = function() {
-      var realVars, tempVars, v, _i, _len, _ref2;
+      var realVars, tempVars, v, _i, _len, _ref1;
       realVars = [];
       tempVars = [];
-      _ref2 = this.variables;
-      for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
-        v = _ref2[_i];
+      _ref1 = this.variables;
+      for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+        v = _ref1[_i];
         if (v.type === 'var') {
           (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name);
         }
@@ -107,12 +127,14 @@
     };
 
     Scope.prototype.assignedVariables = function() {
-      var v, _i, _len, _ref2, _results;
-      _ref2 = this.variables;
+      var v, _i, _len, _ref1, _results;
+      _ref1 = this.variables;
       _results = [];
-      for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
-        v = _ref2[_i];
-        if (v.type.assigned) _results.push("" + v.name + " = " + v.type.value);
+      for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+        v = _ref1[_i];
+        if (v.type.assigned) {
+          _results.push("" + v.name + " = " + v.type.value);
+        }
       }
       return _results;
     };

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/coffee-script/package.json
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/coffee-script/package.json b/weinre.server/node_modules/coffee-script/package.json
index 2547bdf..a8a9363 100644
--- a/weinre.server/node_modules/coffee-script/package.json
+++ b/weinre.server/node_modules/coffee-script/package.json
@@ -1,31 +1,44 @@
 {
-  "name":         "coffee-script",
-  "description":  "Unfancy JavaScript",
-  "keywords":     ["javascript", "language", "coffeescript", "compiler"],
-  "author":       "Jeremy Ashkenas",
-  "version":      "1.2.0",
-  "licenses":     [{
-    "type":       "MIT",
-    "url":        "http://github.com/jashkenas/coffee-script/raw/master/LICENSE"
-  }],
-  "engines":      {
-    "node":       ">=0.4.0"
+  "name": "coffee-script",
+  "description": "Unfancy JavaScript",
+  "keywords": [
+    "javascript",
+    "language",
+    "coffeescript",
+    "compiler"
+  ],
+  "author": {
+    "name": "Jeremy Ashkenas"
   },
-  "directories" : {
-    "lib" : "./lib/coffee-script"
+  "version": "1.3.3",
+  "licenses": [
+    {
+      "type": "MIT",
+      "url": "https://raw.github.com/jashkenas/coffee-script/master/LICENSE"
+    }
+  ],
+  "engines": {
+    "node": ">=0.4.0"
   },
-  "main" : "./lib/coffee-script/coffee-script",
-  "bin":          {
-    "coffee":     "./bin/coffee",
-    "cake":       "./bin/cake"
+  "directories": {
+    "lib": "./lib/coffee-script"
   },
-  "homepage":     "http://coffeescript.org",
-  "repository":   {
+  "main": "./lib/coffee-script/coffee-script",
+  "bin": {
+    "coffee": "./bin/coffee",
+    "cake": "./bin/cake"
+  },
+  "homepage": "http://coffeescript.org",
+  "bugs": "https://github.com/jashkenas/coffee-script/issues",
+  "repository": {
     "type": "git",
     "url": "git://github.com/jashkenas/coffee-script.git"
   },
   "devDependencies": {
-    "uglify-js":  ">=1.0.0",
-    "jison":      ">=0.2.0"
-  }
+    "uglify-js": ">=1.0.0",
+    "jison": ">=0.2.0"
+  },
+  "readme": "\n            {\n         }   }   {\n        {   {  }  }\n         }   }{  {\n        {  }{  }  }                    _____       __  __\n       ( }{ }{  { )                   / ____|     / _|/ _|\n     .- { { }  { }} -.               | |     ___ | |_| |_ ___  ___\n    (  ( } { } { } }  )              | |    / _ \\|  _|  _/ _ \\/ _ \\\n    |`-..________ ..-'|              | |___| (_) | | | ||  __/  __/\n    |                 |               \\_____\\___/|_| |_| \\___|\\___|\n    |                 ;--.\n    |                (__  \\            _____           _       _\n    |                 | )  )          / ____|         (_)     | |\n    |                 |/  /          | (___   ___ _ __ _ _ __ | |_\n    |                 (  /            \\___ \\ / __| '__| | '_ \\| __|\n    |                 |/              ____) | (__| |  | | |_) | |_\n    |                 |              |_____/ \\___|_|  |_| .__/ \\__|\n     `-.._________..-'                                  | |\n   
                                                      |_|\n\n\n  CoffeeScript is a little language that compiles into JavaScript.\n\n  Install Node.js, and then the CoffeeScript compiler:\n  sudo bin/cake install\n\n  Or, if you have the Node Package Manager installed:\n  npm install -g coffee-script\n  (Leave off the -g if you don't wish to install globally.)\n\n  Execute a script:\n  coffee /path/to/script.coffee\n\n  Compile a script:\n  coffee -c /path/to/script.coffee\n\n  For documentation, usage, and examples, see:\n  http://coffeescript.org/\n\n  To suggest a feature, report a bug, or general discussion:\n  http://github.com/jashkenas/coffee-script/issues/\n\n  If you'd like to chat, drop by #coffeescript on Freenode IRC,\n  or on webchat.freenode.net.\n\n  The source repository:\n  git://github.com/jashkenas/coffee-script.git\n\n  All contributors are listed here:\n  http://github.com/jashkenas/coffee-script/contributors\n",
+  "_id": "coffee-script@1.3.3",
+  "_from": "coffee-script@1.3.x"
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/History.md
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/History.md b/weinre.server/node_modules/express/History.md
index 616ca9d..5aae2d1 100644
--- a/weinre.server/node_modules/express/History.md
+++ b/weinre.server/node_modules/express/History.md
@@ -1,4 +1,22 @@
 
+2.5.10 / 2012-06-15 
+==================
+
+  * Remove annoying engines field from package.json
+  * Backport support for trusting X-Forwarded-Proto
+  * use version of `package.json` for `express` command
+
+2.5.9/ 2012-04-02 
+==================
+
+  * Added support for PURGE request method [pbuyle]
+  * Fixed `express(1)` generated app `app.address()` before `listening` [mmalecki]
+
+2.5.8 / 2012-02-08 
+==================
+
+  * Update mkdirp dep. Closes #991
+
 2.5.7 / 2012-02-06 
 ==================
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/bin/express
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/bin/express b/weinre.server/node_modules/express/bin/express
index f28a0fd..367be59 100755
--- a/weinre.server/node_modules/express/bin/express
+++ b/weinre.server/node_modules/express/bin/express
@@ -10,10 +10,16 @@ var fs = require('fs')
   , mkdirp = require('mkdirp');
 
 /**
+ * Package information.
+ */
+
+var pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json'));
+
+/**
  * Framework version.
  */
 
-var version = '2.5.7';
+var version = pkg.version;
 
 /**
  * Add session support.
@@ -185,8 +191,9 @@ var app = [
   , ''
   , 'app.get(\'/\', routes.index);'
   , ''
-  , 'app.listen(3000);'
-  , 'console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);'
+  , 'app.listen(3000, function(){'
+  , '  console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);'
+  , '});'
   , ''
 ].join(eol);
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/lib/express.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/lib/express.js b/weinre.server/node_modules/express/lib/express.js
index 029dcc9..1bae623 100644
--- a/weinre.server/node_modules/express/lib/express.js
+++ b/weinre.server/node_modules/express/lib/express.js
@@ -28,7 +28,7 @@ var exports = module.exports = connect.middleware;
  * Framework version.
  */
 
-exports.version = '2.5.7';
+exports.version = '2.5.10';
 
 /**
  * Shortcut for `new Server(...)`.

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/lib/request.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/lib/request.js b/weinre.server/node_modules/express/lib/request.js
index 1d5ab40..05ffa66 100644
--- a/weinre.server/node_modules/express/lib/request.js
+++ b/weinre.server/node_modules/express/lib/request.js
@@ -135,8 +135,8 @@ req.accepts = function(type){
   // normalize extensions ".json" -> "json"
   if (type && '.' == type[0]) type = type.substr(1);
 
-  // when Accept does not exist, or is '*/*' return true 
-  if (!accept || '*/*' == accept) {
+  // when Accept does not exist, or contains '*/*' return true
+  if (!accept || ~accept.indexOf('*/*')) {
     return true;
   } else if (type) {
     // allow "html" vs "text/html" etc
@@ -321,3 +321,24 @@ function isxhr() {
 
 req.__defineGetter__('isXMLHttpRequest', isxhr);
 req.__defineGetter__('xhr', isxhr);
+
+/**
+ * Return the protocol string "http" or "https",
+ * when requested with TLS. When the "trust proxy"
+ * setting is enabled the "X-Forwarded-Proto" header
+ * field will be trusted. If you're running behind
+ * a reverse proxy that supplies https for you this
+ * may be enabled.
+ *
+ * @return {String}
+ * @api public
+ */
+
+req.__defineGetter__('protocol', function(trustProxy){
+  var trustProxy = this.app.settings['trust proxy'];
+  return this.secure
+    ? 'https'
+    : trustProxy
+      ? (this.header('X-Forwarded-Proto') || 'http')
+      : 'http';
+});

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/lib/response.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/lib/response.js b/weinre.server/node_modules/express/lib/response.js
index a671771..0174950 100644
--- a/weinre.server/node_modules/express/lib/response.js
+++ b/weinre.server/node_modules/express/lib/response.js
@@ -402,9 +402,8 @@ res.redirect = function(url, status){
     if ('/' != base && 0 != url.indexOf(base)) url = base + url;
 
     // Absolute
-    var host = req.headers.host
-      , tls = req.connection.encrypted;
-    url = 'http' + (tls ? 's' : '') + '://' + host + url;
+    var host = req.headers.host;
+    url = req.protocol + '://' + host + url;
   }
 
   // Support text/{plain,html} by default

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/lib/router/methods.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/lib/router/methods.js b/weinre.server/node_modules/express/lib/router/methods.js
index e19787b..71a969a 100644
--- a/weinre.server/node_modules/express/lib/router/methods.js
+++ b/weinre.server/node_modules/express/lib/router/methods.js
@@ -55,6 +55,14 @@ var RFC5323 = ['SEARCH'];
 var RFC5789 = ['PATCH'];
 
 /**
+ * PURGE Method for caching reverse-proxy
+ * http://wiki.squid-cache.org/SquidFaq/OperatingSquid#How_can_I_purge_an_object_from_my_cache.3F
+ * https://www.varnish-cache.org/docs/trunk/tutorial/purging.html
+ */
+
+var CACHE_PURGE = ['PURGE'];
+
+/**
  * Expose the methods.
  */
 
@@ -65,6 +73,7 @@ module.exports = [].concat(
   , RFC3648
   , RFC3744
   , RFC5323
-  , RFC5789).map(function(method){
+  , RFC5789
+  , CACHE_PURGE).map(function(method){
     return method.toLowerCase();
   });

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/lib/connect.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/lib/connect.js b/weinre.server/node_modules/express/node_modules/connect/lib/connect.js
index 7857023..eb2b0ea 100644
--- a/weinre.server/node_modules/express/node_modules/connect/lib/connect.js
+++ b/weinre.server/node_modules/express/node_modules/connect/lib/connect.js
@@ -26,7 +26,7 @@ exports = module.exports = createServer;
  * Framework version.
  */
 
-exports.version = '1.8.5';
+exports.version = '1.9.1';
 
 /**
  * Initialize a new `connect.HTTPServer` with the middleware

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/lib/http.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/lib/http.js b/weinre.server/node_modules/express/node_modules/connect/lib/http.js
index 09898e2..1d35f12 100644
--- a/weinre.server/node_modules/express/node_modules/connect/lib/http.js
+++ b/weinre.server/node_modules/express/node_modules/connect/lib/http.js
@@ -12,7 +12,8 @@
 
 var http = require('http')
   , parse = require('url').parse
-  , assert = require('assert');
+  , assert = require('assert')
+  , utils = require('./utils');
 
 // environment
 
@@ -169,7 +170,7 @@ Server.prototype.handle = function(req, res, out) {
         res.statusCode = 404;
         res.setHeader('Content-Type', 'text/plain');
         if ('HEAD' == req.method) return res.end();
-        res.end('Cannot ' + req.method + ' ' + req.url);
+        res.end('Cannot ' + req.method + ' ' + utils.escape(req.originalUrl));
       }
       return;
     }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/lib/middleware/compress.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/lib/middleware/compress.js b/weinre.server/node_modules/express/node_modules/connect/lib/middleware/compress.js
new file mode 100644
index 0000000..addc5c9
--- /dev/null
+++ b/weinre.server/node_modules/express/node_modules/connect/lib/middleware/compress.js
@@ -0,0 +1,146 @@
+
+/*!
+ * Connect - compress
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * Copyright(c) 2012 Nebojsa Sabovic
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var zlib = require('zlib');
+
+/**
+ * Supported content-encoding methods.
+ */
+
+exports.methods = {
+    gzip: zlib.createGzip
+  , deflate: zlib.createDeflate
+};
+
+/**
+ * Default filter function.
+ */
+
+exports.filter = function(req, res){
+  var type = res.getHeader('Content-Type') || '';
+  return type.match(/json|text|javascript/);
+};
+
+/**
+ * Compress:
+ *
+ * Compress response data with gzip/deflate.
+ *
+ * Filter:
+ *
+ *  A `filter` callback function may be passed to
+ *  replace the default logic of:
+ *
+ *     exports.filter = function(req, res){
+ *       var type = res.getHeader('Content-Type') || '';
+ *       return type.match(/json|text|javascript/);
+ *     };
+ *
+ * Options:
+ *
+ *  All remaining options are passed to the gzip/deflate
+ *  creation functions. Consult node's docs for additional details.
+ *
+ *   - `chunkSize` (default: 16*1024)
+ *   - `windowBits`
+ *   - `level`: 0-9 where 0 is no compression, and 9 is slow but best compression
+ *   - `memLevel`: 1-9 low is slower but uses less memory, high is fast but uses more
+ *   - `strategy`: compression strategy
+ *
+ * @param {Object} options
+ * @return {Function}
+ * @api public
+ */
+
+module.exports = function compress(options) {
+  var options = options || {}
+    , names = Object.keys(exports.methods)
+    , filter = options.filter || exports.filter;
+
+  return function(req, res, next){
+    var accept = req.headers['accept-encoding']
+      , write = res.write
+      , writeHead = res.writeHead
+      , end = res.end
+      , stream
+      , method;
+
+    // vary
+    res.setHeader('Vary', 'Accept-Encoding');
+
+    // proxy
+
+    res.write = function(chunk, encoding){
+      if (!this._header) this._implicitHeader();
+      return stream
+        ? stream.write(chunk, encoding)
+        : write.call(this, chunk, encoding);
+    };
+
+    res.end = function(chunk, encoding){
+      if (!this._header) {
+        this._implicitHeader();
+      }
+      if (chunk) this.write(chunk, encoding);
+      return stream
+        ? stream.end()
+        : end.call(this);
+    };
+
+    res.writeHead = function(){
+      res.writeHead = writeHead;
+
+      // default request filter, SHOULD use identity, head
+      if (filter(req, res) && accept && 'HEAD' != req.method) {
+        // default to gzip
+        if ('*' == accept.trim()) {
+          method = 'gzip';
+        } else {
+          for (var i = 0, len = names.length; i < len; ++i) {
+            if (~accept.indexOf(names[i])) {
+              method = names[i];
+              break;
+            }
+          }
+        }
+
+        // compression method
+        if (method) {
+          // compression stream
+          stream = exports.methods[method](options);
+
+          // header fields
+          res.setHeader('Content-Encoding', method);
+          res.removeHeader('Content-Length');
+          // WARNING: We do not strip content-length out of passed-in headers
+
+          // compression
+          stream.on('data', function(chunk){
+            write.call(res, chunk);
+          });
+
+          stream.on('end', function(){
+            end.call(res);
+          });
+
+          stream.on('drain', function() {
+            res.emit('drain');
+          });
+        }
+      }
+      return res.writeHead.apply(this, arguments);
+    };
+
+    next();
+  };
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/lib/middleware/limit.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/lib/middleware/limit.js b/weinre.server/node_modules/express/node_modules/connect/lib/middleware/limit.js
index 4dafdd3..a604ffb 100644
--- a/weinre.server/node_modules/express/node_modules/connect/lib/middleware/limit.js
+++ b/weinre.server/node_modules/express/node_modules/connect/lib/middleware/limit.js
@@ -17,8 +17,6 @@
  *       connect.limit('5.5mb')
  *     ).listen(3000);
  *
- * TODO: pause EV_READ
- *
  * @param {Number|String} bytes
  * @return {Function}
  * @api public

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/lib/middleware/session.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/lib/middleware/session.js b/weinre.server/node_modules/express/node_modules/connect/lib/middleware/session.js
index 7fbeb18..6616fad 100644
--- a/weinre.server/node_modules/express/node_modules/connect/lib/middleware/session.js
+++ b/weinre.server/node_modules/express/node_modules/connect/lib/middleware/session.js
@@ -50,8 +50,7 @@ var warning = 'Warning: connection.session() MemoryStore is not\n'
  */
 
 function defaultFingerprint(req) {
-  var ua = req.headers['user-agent'] || '';
-  return ua.replace(/;?\schromeframe\/[\d\.]+/, '');
+  return '';
 };
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md
index 3427514..a5ca104 100644
--- a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md
@@ -1,6 +1,6 @@
 # Formidable
 
-[![Build Status](https://secure.travis-ci.org/felixge/node-formidable.png)](http://travis-ci.org/felixge/node-formidable)
+[![Build Status](https://secure.travis-ci.org/felixge/node-formidable.png?branch=master)](http://travis-ci.org/felixge/node-formidable)
 
 ## Purpose
 
@@ -199,6 +199,10 @@ Limits the amount of memory a field (not file) can allocate in bytes.
 If this value is exceeded, an `'error'` event is emitted. The default
 size is 2MB.
 
+__incomingForm.hash = false__
+
+If you want checksums calculated for incoming files, set this to either `'sha1'` or `'md5'`.
+
 __incomingForm.bytesReceived__
 
 The amount of bytes received for this form so far.
@@ -290,6 +294,10 @@ __file.lastModifiedDate = null__
 A date object (or `null`) containing the time this file was last written to. Mostly
 here for compatibility with the [W3C File API Draft](http://dev.w3.org/2006/webapi/FileAPI/).
 
+__file.hash = null__
+
+If hash calculation was set, you can read the hex digest out of this var.
+
 ## License
 
 Formidable is licensed under the MIT license.

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js
index 6dc8720..dad8d5f 100644
--- a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js
@@ -2,7 +2,8 @@ if (global.GENTLY) require = GENTLY.hijack(require);
 
 var util = require('./util'),
     WriteStream = require('fs').WriteStream,
-    EventEmitter = require('events').EventEmitter;
+    EventEmitter = require('events').EventEmitter,
+    crypto = require('crypto');
 
 function File(properties) {
   EventEmitter.call(this);
@@ -11,14 +12,19 @@ function File(properties) {
   this.path = null;
   this.name = null;
   this.type = null;
+  this.hash = null;
   this.lastModifiedDate = null;
 
   this._writeStream = null;
-
+  
   for (var key in properties) {
     this[key] = properties[key];
   }
 
+  if(typeof this.hash === 'string') {
+    this.hash = crypto.createHash(properties.hash);
+  }
+
   this._backwardsCompatibility();
 }
 module.exports = File;
@@ -45,6 +51,9 @@ File.prototype.open = function() {
 File.prototype.write = function(buffer, cb) {
   var self = this;
   this._writeStream.write(buffer, function() {
+    if(self.hash) {
+      self.hash.update(buffer);
+    }
     self.lastModifiedDate = new Date();
     self.size += buffer.length;
     self.emit('progress', self.size);
@@ -55,6 +64,9 @@ File.prototype.write = function(buffer, cb) {
 File.prototype.end = function(cb) {
   var self = this;
   this._writeStream.end(function() {
+    if(self.hash) {
+      self.hash = self.hash.digest('hex');
+    }
     self.emit('end');
     cb();
   });

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js
index b1e2bfb..060eac2 100644
--- a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js
@@ -7,21 +7,25 @@ var util = require('./util'),
     MultipartParser = require('./multipart_parser').MultipartParser,
     QuerystringParser = require('./querystring_parser').QuerystringParser,
     StringDecoder = require('string_decoder').StringDecoder,
-    EventEmitter = require('events').EventEmitter;
+    EventEmitter = require('events').EventEmitter,
+    Stream = require('stream').Stream;
 
-function IncomingForm() {
+function IncomingForm(opts) {  
   if (!(this instanceof IncomingForm)) return new IncomingForm;
   EventEmitter.call(this);
 
+  opts=opts||{};
+  
   this.error = null;
   this.ended = false;
 
-  this.maxFieldsSize = 2 * 1024 * 1024;
-  this.keepExtensions = false;
-  this.uploadDir = IncomingForm.UPLOAD_DIR;
-  this.encoding = 'utf-8';
+  this.maxFieldsSize = opts.maxFieldsSize || 2 * 1024 * 1024;
+  this.keepExtensions = opts.keepExtensions || false;
+  this.uploadDir = opts.uploadDir || IncomingForm.UPLOAD_DIR;
+  this.encoding = opts.encoding || 'utf-8';
   this.headers = null;
   this.type = null;
+  this.hash = false;
 
   this.bytesReceived = null;
   this.bytesExpected = null;
@@ -187,6 +191,7 @@ IncomingForm.prototype.handlePart = function(part) {
     path: this._uploadPath(part.filename),
     name: part.filename,
     type: part.mime,
+    hash: self.hash
   });
 
   this.emit('fileBegin', part.name, file);
@@ -267,7 +272,8 @@ IncomingForm.prototype._initMultipart = function(boundary) {
   parser.initWithBoundary(boundary);
 
   parser.onPartBegin = function() {
-    part = new EventEmitter();
+    part = new Stream();
+    part.readable = true;
     part.headers = {};
     part.name = null;
     part.filename = null;

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Makefile
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Makefile b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Makefile
new file mode 100644
index 0000000..01f7140
--- /dev/null
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Makefile
@@ -0,0 +1,4 @@
+test:
+	@find test/simple/test-*.js | xargs -n 1 -t node
+
+.PHONY: test
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Readme.md
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Readme.md b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Readme.md
new file mode 100644
index 0000000..f8f0c66
--- /dev/null
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Readme.md
@@ -0,0 +1,167 @@
+# Gently
+
+## Purpose
+
+A node.js module that helps with stubbing and behavior verification. It allows you to test the most remote and nested corners of your code while keeping being fully unobtrusive.
+
+## Features
+
+* Overwrite and stub individual object functions
+* Verify that all expected calls have been made in the expected order
+* Restore stubbed functions to their original behavior
+* Detect object / class names from obj.constructor.name and obj.toString()
+* Hijack any required module function or class constructor
+
+## Installation
+
+Via [npm](http://github.com/isaacs/npm):
+
+    npm install gently@latest
+
+## Example
+
+Make sure your dog is working properly:
+
+    function Dog() {}
+
+    Dog.prototype.seeCat = function() {
+      this.bark('whuf, whuf');
+      this.run();
+    }
+
+    Dog.prototype.bark = function(bark) {
+      require('sys').puts(bark);
+    }
+
+    var gently = new (require('gently'))
+      , assert = require('assert')
+      , dog = new Dog();
+
+    gently.expect(dog, 'bark', function(bark) {
+      assert.equal(bark, 'whuf, whuf');
+    });
+    gently.expect(dog, 'run');
+
+    dog.seeCat();
+
+You can also easily test event emitters with this, for example a simple sequence of 2 events emitted by `fs.WriteStream`:
+
+    var gently = new (require('gently'))
+      , stream = new (require('fs').WriteStream)('my_file.txt');
+
+    gently.expect(stream, 'emit', function(event) {
+      assert.equal(event, 'open');
+    });
+
+    gently.expect(stream, 'emit', function(event) {
+      assert.equal(event, 'drain');
+    });
+
+For a full read world example, check out this test case: [test-incoming-form.js](http://github.com/felixge/node-formidable/blob/master/test/simple/test-incoming-form.js) (in [node-formdiable](http://github.com/felixge/node-formidable)).
+
+## API
+
+### Gently
+
+#### new Gently()
+
+Creates a new gently instance. It listens to the process `'exit'` event to make sure all expectations have been verified.
+
+#### gently.expect(obj, method, [[count], stubFn])
+
+Creates an expectation for an objects method to be called. You can optionally specify the call `count` you are expecting, as well as `stubFn` function that will run instead of the original function.
+
+Returns a reference to the function that is getting overwritten.
+
+#### gently.expect([count], stubFn)
+
+Returns a function that is supposed to be executed `count` times, delegating any calls to the provided `stubFn` function. Naming your stubFn closure will help to properly diagnose errors that are being thrown:
+
+    childProcess.exec('ls', gently.expect(function lsCallback(code) {
+      assert.equal(0, code);
+    }));
+
+#### gently.restore(obj, method)
+
+Restores an object method that has been previously overwritten using `gently.expect()`.
+
+#### gently.hijack(realRequire)
+
+Returns a new require functions that catches a reference to all required modules into `gently.hijacked`.
+
+To use this function, include a line like this in your `'my-module.js'`.
+
+    if (global.GENTLY) require = GENTLY.hijack(require);
+
+    var sys = require('sys');
+    exports.hello = function() {
+      sys.log('world');
+    };
+
+Now you can write a test for the module above:
+
+    var gently = global.GENTLY = new (require('gently'))
+      , myModule = require('./my-module');
+
+    gently.expect(gently.hijacked.sys, 'log', function(str) {
+      assert.equal(str, 'world');
+    });
+
+    myModule.hello();
+
+#### gently.stub(location, [exportsName])
+
+Returns a stub class that will be used instead of the real class from the module at `location` with the given `exportsName`.
+
+This allows to test an OOP version of the previous example, where `'my-module.js'`.
+
+    if (global.GENTLY) require = GENTLY.hijack(require);
+
+    var World = require('./world');
+
+    exports.hello = function() {
+      var world = new World();
+      world.hello();
+    }
+
+And `world.js` looks like this:
+
+    var sys = require('sys');
+
+    function World() {
+
+    }
+    module.exports = World;
+
+    World.prototype.hello = function() {
+      sys.log('world');
+    };
+
+Testing `'my-module.js'` can now easily be accomplished:
+
+    var gently = global.GENTLY = new (require('gently'))
+      , WorldStub = gently.stub('./world')
+      , myModule = require('./my-module')
+      , WORLD;
+
+    gently.expect(WorldStub, 'new', function() {
+      WORLD = this;
+    });
+
+    gently.expect(WORLD, 'hello');
+
+    myModule.hello();
+
+#### gently.hijacked
+
+An object that holds the references to all hijacked modules.
+
+#### gently.verify([msg])
+
+Verifies that all expectations of this gently instance have been satisfied. If not called manually, this method is called when the process `'exit'` event is fired.
+
+If `msg` is given, it will appear in any error that might be thrown.
+
+## License
+
+Gently is licensed under the MIT license.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/dog.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/dog.js b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/dog.js
new file mode 100644
index 0000000..022fae0
--- /dev/null
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/dog.js
@@ -0,0 +1,22 @@
+require('../test/common');
+function Dog() {}
+
+Dog.prototype.seeCat = function() {
+  this.bark('whuf, whuf');
+  this.run();
+}
+
+Dog.prototype.bark = function(bark) {
+  require('sys').puts(bark);
+}
+
+var gently = new (require('gently'))
+  , assert = require('assert')
+  , dog = new Dog();
+
+gently.expect(dog, 'bark', function(bark) {
+  assert.equal(bark, 'whuf, whuf');
+});
+gently.expect(dog, 'run');
+
+dog.seeCat();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/event_emitter.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/event_emitter.js b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/event_emitter.js
new file mode 100644
index 0000000..7def134
--- /dev/null
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/event_emitter.js
@@ -0,0 +1,11 @@
+require('../test/common');
+var gently = new (require('gently'))
+  , stream = new (require('fs').WriteStream)('my_file.txt');
+
+gently.expect(stream, 'emit', function(event) {
+  assert.equal(event, 'open');
+});
+
+gently.expect(stream, 'emit', function(event) {
+  assert.equal(event, 'drain');
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/index.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/index.js b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/index.js
new file mode 100644
index 0000000..69122bd
--- /dev/null
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/index.js
@@ -0,0 +1 @@
+module.exports = require('./lib/gently');
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/gently.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/gently.js b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/gently.js
new file mode 100644
index 0000000..8af0e1e
--- /dev/null
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/gently.js
@@ -0,0 +1,184 @@
+var path = require('path');
+
+function Gently() {
+  this.expectations = [];
+  this.hijacked = {};
+
+  var self = this;
+  process.addListener('exit', function() {
+    self.verify('process exit');
+  });
+};
+module.exports = Gently;
+
+Gently.prototype.stub = function(location, exportsName) {
+  function Stub() {
+    return Stub['new'].apply(this, arguments);
+  };
+
+  Stub['new'] = function () {};
+
+  var stubName = 'require('+JSON.stringify(location)+')';
+  if (exportsName) {
+    stubName += '.'+exportsName;
+  }
+
+  Stub.prototype.toString = Stub.toString = function() {
+    return stubName;
+  };
+
+  var exports = this.hijacked[location] || {};
+  if (exportsName) {
+    exports[exportsName] = Stub;
+  } else {
+    exports = Stub;
+  }
+
+  this.hijacked[location] = exports;
+  return Stub;
+};
+
+Gently.prototype.hijack = function(realRequire) {
+  var self = this;
+  return function(location) {
+    return self.hijacked[location] = (self.hijacked[location])
+      ? self.hijacked[location]
+      : realRequire(location);
+  };
+};
+
+Gently.prototype.expect = function(obj, method, count, stubFn) {
+  if (typeof obj != 'function' && typeof obj != 'object' && typeof obj != 'number') {
+    throw new Error
+      ( 'Bad 1st argument for gently.expect(), '
+      + 'object, function, or number expected, got: '+(typeof obj)
+      );
+  } else if (typeof obj == 'function' && (typeof method != 'string')) {
+    // expect(stubFn) interface
+    stubFn = obj;
+    obj = null;
+    method = null;
+    count = 1;
+  } else if (typeof method == 'function') {
+    // expect(count, stubFn) interface
+    count = obj;
+    stubFn = method;
+    obj = null;
+    method = null;
+  } else if (typeof count == 'function') {
+    // expect(obj, method, stubFn) interface
+    stubFn = count;
+    count = 1;
+  } else if (count === undefined) {
+    // expect(obj, method) interface
+    count = 1;
+  }
+
+  var name = this._name(obj, method, stubFn);
+  this.expectations.push({obj: obj, method: method, stubFn: stubFn, name: name, count: count});
+
+  var self = this;
+  function delegate() {
+    return self._stubFn(this, obj, method, name, Array.prototype.slice.call(arguments));
+  }
+
+  if (!obj) {
+    return delegate;
+  }
+
+  var original = (obj[method])
+    ? obj[method]._original || obj[method]
+    : undefined;
+
+  obj[method] = delegate;
+  return obj[method]._original = original;
+};
+
+Gently.prototype.restore = function(obj, method) {
+  if (!obj[method] || !obj[method]._original) {
+    throw new Error(this._name(obj, method)+' is not gently stubbed');
+  }
+  obj[method] = obj[method]._original;
+};
+
+Gently.prototype.verify = function(msg) {
+  if (!this.expectations.length) {
+    return;
+  }
+
+  var validExpectations = [];
+  for (var i = 0, l = this.expectations.length; i < l; i++) {
+    var expectation = this.expectations[i];
+
+    if (expectation.count > 0) {
+      validExpectations.push(expectation);
+    }
+  }
+
+  this.expectations = []; // reset so that no duplicate verification attempts are made
+
+  if (!validExpectations.length) {
+    return;
+  }
+
+  var expectation = validExpectations[0];
+
+  throw new Error
+    ( 'Expected call to '+expectation.name+' did not happen'
+    + ( (msg)
+        ? ' ('+msg+')'
+        : ''
+      )
+    );
+};
+
+Gently.prototype._stubFn = function(self, obj, method, name, args) {
+  var expectation = this.expectations[0], obj, method;
+
+  if (!expectation) {
+    throw new Error('Unexpected call to '+name+', no call was expected');
+  }
+
+  if (expectation.obj !== obj || expectation.method !== method) {
+    throw new Error('Unexpected call to '+name+', expected call to '+ expectation.name);
+  }
+
+  expectation.count -= 1;
+  if (expectation.count === 0) {
+    this.expectations.shift();
+
+    // autorestore original if its not a closure
+    // and no more expectations on that object
+    var has_more_expectations = this.expectations.reduce(function (memo, expectation) {
+      return memo || (expectation.obj === obj && expectation.method === method);
+    }, false);
+    if (obj !== null && method !== null && !has_more_expectations) {
+      if (typeof obj[method]._original !== 'undefined') {
+        obj[method] = obj[method]._original;
+        delete obj[method]._original;
+      } else {
+        delete obj[method];
+      }
+    }
+  }
+
+  if (expectation.stubFn) {
+    return expectation.stubFn.apply(self, args);
+  }
+};
+
+Gently.prototype._name = function(obj, method, stubFn) {
+  if (obj) {
+    var objectName = obj.toString();
+    if (objectName == '[object Object]' && obj.constructor.name) {
+      objectName = '['+obj.constructor.name+']';
+    }
+    return (objectName)+'.'+method+'()';
+  }
+
+  if (stubFn.name) {
+    return stubFn.name+'()';
+  }
+
+  return '>> '+stubFn.toString()+' <<';
+};

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/index.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/index.js b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/index.js
new file mode 100644
index 0000000..64c1977
--- /dev/null
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/index.js
@@ -0,0 +1 @@
+module.exports = require('./gently');
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/package.json
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/package.json b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/package.json
new file mode 100644
index 0000000..9c1b7a0
--- /dev/null
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/package.json
@@ -0,0 +1,14 @@
+{
+  "name": "gently",
+  "version": "0.9.2",
+  "directories": {
+    "lib": "./lib/gently"
+  },
+  "main": "./lib/gently/index",
+  "dependencies": {},
+  "devDependencies": {},
+  "engines": {
+    "node": "*"
+  },
+  "optionalDependencies": {}
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/common.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/common.js b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/common.js
new file mode 100644
index 0000000..978b5c5
--- /dev/null
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/common.js
@@ -0,0 +1,8 @@
+var path = require('path')
+  , sys = require('sys');
+
+require.paths.unshift(path.dirname(__dirname)+'/lib');
+
+global.puts = sys.puts;
+global.p = function() {sys.error(sys.inspect.apply(null, arguments))};;
+global.assert = require('assert');
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/simple/test-gently.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/simple/test-gently.js b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/simple/test-gently.js
new file mode 100644
index 0000000..4f8fe2d
--- /dev/null
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/simple/test-gently.js
@@ -0,0 +1,348 @@
+require('../common');
+var Gently = require('gently')
+  , gently;
+
+function test(test) {
+  process.removeAllListeners('exit');
+  gently = new Gently();
+  test();
+}
+
+test(function constructor() {
+  assert.deepEqual(gently.expectations, []);
+  assert.deepEqual(gently.hijacked, {});
+  assert.equal(gently.constructor.name, 'Gently');
+});
+
+test(function expectBadArgs() {
+  var BAD_ARG = 'oh no';
+  try {
+    gently.expect(BAD_ARG);
+    assert.ok(false, 'throw needs to happen');
+  } catch (e) {
+    assert.equal(e.message, 'Bad 1st argument for gently.expect(), object, function, or number expected, got: '+(typeof BAD_ARG));
+  }
+});
+
+test(function expectObjMethod() {
+  var OBJ = {}, NAME = 'foobar';
+  OBJ.foo = function(x) {
+    return x;
+  };
+
+  gently._name = function() {
+    return NAME;
+  };
+
+  var original = OBJ.foo
+    , stubFn = function() {};
+
+  (function testAddOne() {
+    assert.strictEqual(gently.expect(OBJ, 'foo', stubFn), original);
+
+    assert.equal(gently.expectations.length, 1);
+    var expectation = gently.expectations[0];
+    assert.strictEqual(expectation.obj, OBJ);
+    assert.strictEqual(expectation.method, 'foo');
+    assert.strictEqual(expectation.stubFn, stubFn);
+    assert.strictEqual(expectation.name, NAME);
+    assert.strictEqual(OBJ.foo._original, original);
+  })();
+
+  (function testAddTwo() {
+    gently.expect(OBJ, 'foo', 2, stubFn);
+    assert.equal(gently.expectations.length, 2);
+    assert.strictEqual(OBJ.foo._original, original);
+  })();
+
+  (function testAddOneWithoutMock() {
+    gently.expect(OBJ, 'foo');
+    assert.equal(gently.expectations.length, 3);
+  })();
+
+  var stubFnCalled = 0, SELF = {};
+  gently._stubFn = function(self, obj, method, name, args) {
+    stubFnCalled++;
+    assert.strictEqual(self, SELF);
+    assert.strictEqual(obj, OBJ);
+    assert.strictEqual(method, 'foo');
+    assert.strictEqual(name, NAME);
+    assert.deepEqual(args, [1, 2]);
+    return 23;
+  };
+  assert.equal(OBJ.foo.apply(SELF, [1, 2]), 23);
+  assert.equal(stubFnCalled, 1);
+});
+
+test(function expectClosure() {
+  var NAME = 'MY CLOSURE';
+  function closureFn() {};
+
+  gently._name = function() {
+    return NAME;
+  };
+
+  var fn = gently.expect(closureFn);
+  assert.equal(gently.expectations.length, 1);
+  var expectation = gently.expectations[0];
+  assert.strictEqual(expectation.obj, null);
+  assert.strictEqual(expectation.method, null);
+  assert.strictEqual(expectation.stubFn, closureFn);
+  assert.strictEqual(expectation.name, NAME);
+
+  var stubFnCalled = 0, SELF = {};
+  gently._stubFn = function(self, obj, method, name, args) {
+    stubFnCalled++;
+    assert.strictEqual(self, SELF);
+    assert.strictEqual(obj, null);
+    assert.strictEqual(method, null);
+    assert.strictEqual(name, NAME);
+    assert.deepEqual(args, [1, 2]);
+    return 23;
+  };
+  assert.equal(fn.apply(SELF, [1, 2]), 23);
+  assert.equal(stubFnCalled, 1);
+});
+
+test(function expectClosureCount() {
+  var stubFnCalled = 0;
+  function closureFn() {stubFnCalled++};
+
+  var fn = gently.expect(2, closureFn);
+  assert.equal(gently.expectations.length, 1);
+  fn();
+  assert.equal(gently.expectations.length, 1);
+  fn();
+  assert.equal(stubFnCalled, 2);
+});
+
+test(function restore() {
+  var OBJ = {}, NAME = '[my object].myFn()';
+  OBJ.foo = function(x) {
+    return x;
+  };
+
+  gently._name = function() {
+    return NAME;
+  };
+
+  var original = OBJ.foo;
+  gently.expect(OBJ, 'foo');
+  gently.restore(OBJ, 'foo');
+  assert.strictEqual(OBJ.foo, original);
+
+  (function testError() {
+    try {
+      gently.restore(OBJ, 'foo');
+      assert.ok(false, 'throw needs to happen');
+    } catch (e) {
+      assert.equal(e.message, NAME+' is not gently stubbed');
+    }
+  })();
+});
+
+test(function _stubFn() {
+  var OBJ1 = {toString: function() {return '[OBJ 1]'}}
+    , OBJ2 = {toString: function() {return '[OBJ 2]'}, foo: function () {return 'bar';}}
+    , SELF = {};
+
+  gently.expect(OBJ1, 'foo', function(x) {
+    assert.strictEqual(this, SELF);
+    return x * 2;
+  });
+
+  assert.equal(gently._stubFn(SELF, OBJ1, 'foo', 'dummy_name', [5]), 10);
+
+  (function testAutorestore() {
+    assert.equal(OBJ2.foo(), 'bar');
+
+    gently.expect(OBJ2, 'foo', function() {
+      return 'stubbed foo';
+    });
+
+    gently.expect(OBJ2, 'foo', function() {
+      return "didn't restore yet";
+    });
+
+    assert.equal(gently._stubFn(SELF, OBJ2, 'foo', 'dummy_name', []), 'stubbed foo');
+    assert.equal(gently._stubFn(SELF, OBJ2, 'foo', 'dummy_name', []), "didn't restore yet");
+    assert.equal(OBJ2.foo(), 'bar');
+    assert.deepEqual(gently.expectations, []);
+  })();
+
+  (function testNoMoreCallExpected() {
+    try {
+      gently._stubFn(SELF, OBJ1, 'foo', 'dummy_name', [5]);
+      assert.ok(false, 'throw needs to happen');
+    } catch (e) {
+      assert.equal(e.message, 'Unexpected call to dummy_name, no call was expected');
+    }
+  })();
+
+  (function testDifferentCallExpected() {
+    gently.expect(OBJ2, 'bar');
+    try {
+      gently._stubFn(SELF, OBJ1, 'foo', 'dummy_name', [5]);
+      assert.ok(false, 'throw needs to happen');
+    } catch (e) {
+      assert.equal(e.message, 'Unexpected call to dummy_name, expected call to '+gently._name(OBJ2, 'bar'));
+    }
+
+    assert.equal(gently.expectations.length, 1);
+  })();
+
+  (function testNoMockCallback() {
+    OBJ2.bar();
+    assert.equal(gently.expectations.length, 0);
+  })();
+});
+
+test(function stub() {
+  var LOCATION = './my_class';
+
+  (function testRegular() {
+    var Stub = gently.stub(LOCATION);
+    assert.ok(Stub instanceof Function);
+    assert.strictEqual(gently.hijacked[LOCATION], Stub);
+    assert.ok(Stub['new'] instanceof Function);
+    assert.equal(Stub.toString(), 'require('+JSON.stringify(LOCATION)+')');
+
+    (function testConstructor() {
+      var newCalled = 0
+        , STUB
+        , ARGS = ['foo', 'bar'];
+
+      Stub['new'] = function(a, b) {
+        assert.equal(a, ARGS[0]);
+        assert.equal(b, ARGS[1]);
+        newCalled++;
+        STUB = this;
+      };
+
+      var stub = new Stub(ARGS[0], ARGS[1]);
+      assert.strictEqual(stub, STUB);
+      assert.equal(newCalled, 1);
+      assert.equal(stub.toString(), 'require('+JSON.stringify(LOCATION)+')');
+    })();
+
+    (function testUseReturnValueAsInstance() {
+      var R = {};
+
+      Stub['new'] = function() {
+        return R;
+      };
+
+      var stub = new Stub();
+      assert.strictEqual(stub, R);
+
+    })();
+  })();
+
+  var EXPORTS_NAME = 'MyClass';
+  test(function testExportsName() {
+    var Stub = gently.stub(LOCATION, EXPORTS_NAME);
+    assert.strictEqual(gently.hijacked[LOCATION][EXPORTS_NAME], Stub);
+    assert.equal(Stub.toString(), 'require('+JSON.stringify(LOCATION)+').'+EXPORTS_NAME);
+
+    (function testConstructor() {
+      var stub = new Stub();
+      assert.equal(Stub.toString(), 'require('+JSON.stringify(LOCATION)+').'+EXPORTS_NAME);
+    })();
+  });
+});
+
+test(function hijack() {
+  var LOCATION = './foo'
+    , REQUIRE_CALLS = 0
+    , EXPORTS = {}
+    , REQUIRE = function() {
+        REQUIRE_CALLS++;
+        return EXPORTS;
+      };
+
+  var hijackedRequire = gently.hijack(REQUIRE);
+  hijackedRequire(LOCATION);
+  assert.strictEqual(gently.hijacked[LOCATION], EXPORTS);
+
+  assert.equal(REQUIRE_CALLS, 1);
+
+  // make sure we are caching the hijacked module
+  hijackedRequire(LOCATION);
+  assert.equal(REQUIRE_CALLS, 1);
+});
+
+test(function verify() {
+  var OBJ = {toString: function() {return '[OBJ]'}};
+  gently.verify();
+
+  gently.expect(OBJ, 'foo');
+  try {
+    gently.verify();
+    assert.ok(false, 'throw needs to happen');
+  } catch (e) {
+    assert.equal(e.message, 'Expected call to [OBJ].foo() did not happen');
+  }
+
+  try {
+    gently.verify('foo');
+    assert.ok(false, 'throw needs to happen');
+  } catch (e) {
+    assert.equal(e.message, 'Expected call to [OBJ].foo() did not happen (foo)');
+  }
+});
+
+test(function processExit() {
+  var verifyCalled = 0;
+  gently.verify = function(msg) {
+    verifyCalled++;
+    assert.equal(msg, 'process exit');
+  };
+
+  process.emit('exit');
+  assert.equal(verifyCalled, 1);
+});
+
+test(function _name() {
+  (function testNamedClass() {
+    function Foo() {};
+    var foo = new Foo();
+    assert.equal(gently._name(foo, 'bar'), '[Foo].bar()');
+  })();
+
+  (function testToStringPreference() {
+    function Foo() {};
+    Foo.prototype.toString = function() {
+      return '[Superman 123]';
+    };
+    var foo = new Foo();
+    assert.equal(gently._name(foo, 'bar'), '[Superman 123].bar()');
+  })();
+
+  (function testUnamedClass() {
+    var Foo = function() {};
+    var foo = new Foo();
+    assert.equal(gently._name(foo, 'bar'), foo.toString()+'.bar()');
+  })();
+
+  (function testNamedClosure() {
+    function myClosure() {};
+    assert.equal(gently._name(null, null, myClosure), myClosure.name+'()');
+  })();
+
+  (function testUnamedClosure() {
+    var myClosure = function() {2+2 == 5};
+    assert.equal(gently._name(null, null, myClosure), '>> '+myClosure.toString()+' <<');
+  })();
+});
+
+test(function verifyExpectNone() {
+  var OBJ = {toString: function() {return '[OBJ]'}};
+  gently.verify();
+
+  gently.expect(OBJ, 'foo', 0);
+  try {
+    gently.verify();
+  } catch (e) {
+    assert.fail('Exception should not have been thrown');
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/package.json
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/package.json b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/package.json
index 4cf5f2d..d2cec1f 100644
--- a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/package.json
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/package.json
@@ -1,6 +1,6 @@
 {
   "name": "formidable",
-  "version": "1.0.9",
+  "version": "1.0.11",
   "dependencies": {},
   "devDependencies": {
     "gently": "0.8.0",
@@ -18,5 +18,8 @@
   },
   "engines": {
     "node": "*"
-  }
-}
\ No newline at end of file
+  },
+  "optionalDependencies": {},
+  "_id": "formidable@1.0.11",
+  "_from": "formidable@1.0.x"
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js
index b64df8b..84de439 100644
--- a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js
@@ -2,6 +2,7 @@ var common = require('../common');
 var MultipartParserStub = GENTLY.stub('./multipart_parser', 'MultipartParser'),
     QuerystringParserStub = GENTLY.stub('./querystring_parser', 'QuerystringParser'),
     EventEmitterStub = GENTLY.stub('events', 'EventEmitter'),
+    StreamStub = GENTLY.stub('stream', 'Stream'),
     FileStub = GENTLY.stub('./file');
 
 var formidable = require(common.lib + '/index'),
@@ -414,7 +415,7 @@ test(function _initMultipart() {
 
   (function testRegularField() {
     var PART;
-    gently.expect(EventEmitterStub, 'new', function() {
+    gently.expect(StreamStub, 'new', function() {
       PART = this;
     });
 
@@ -456,7 +457,7 @@ test(function _initMultipart() {
 
   (function testFileField() {
     var PART;
-    gently.expect(EventEmitterStub, 'new', function() {
+    gently.expect(StreamStub, 'new', function() {
       PART = this;
     });
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js
index fcfdb94..479e46d 100644
--- a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js
@@ -12,6 +12,7 @@ server.on('request', function(req, res) {
       uploads = {};
 
   form.uploadDir = TEST_TMP;
+  form.hash = 'sha1';
   form.parse(req);
 
   form
@@ -41,10 +42,12 @@ server.on('request', function(req, res) {
       assert.ok(uploads['shortest_video.flv']);
       assert.ok(uploads['shortest_video.flv'].ended);
       assert.ok(uploads['shortest_video.flv'].progress.length > 3);
+      assert.equal(uploads['shortest_video.flv'].file.hash, 'd6a17616c7143d1b1438ceeef6836d1a09186b3a');
       assert.equal(uploads['shortest_video.flv'].progress.slice(-1), uploads['shortest_video.flv'].file.length);
       assert.ok(uploads['shortest_video.mp4']);
       assert.ok(uploads['shortest_video.mp4'].ended);
       assert.ok(uploads['shortest_video.mp4'].progress.length > 3);
+      assert.equal(uploads['shortest_video.mp4'].file.hash, '937dfd4db263f4887ceae19341dcc8d63bcd557f');
 
       server.close();
       res.writeHead(200);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js
index bcf61d7..fe2ac1c 100644
--- a/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js
+++ b/weinre.server/node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js
@@ -4,7 +4,7 @@ var assert       = common.assert;
 var IncomingForm = common.require('incoming_form').IncomingForm;
 var path         = require('path');
 
-var from;
+var form;
 test('IncomingForm', {
   before: function() {
     form = new IncomingForm();

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/4d3b995f/weinre.server/node_modules/express/node_modules/connect/package.json
----------------------------------------------------------------------
diff --git a/weinre.server/node_modules/express/node_modules/connect/package.json b/weinre.server/node_modules/express/node_modules/connect/package.json
index f9c43d5..50ef2b3 100644
--- a/weinre.server/node_modules/express/node_modules/connect/package.json
+++ b/weinre.server/node_modules/express/node_modules/connect/package.json
@@ -1,11 +1,23 @@
 {
   "name": "connect",
-  "version": "1.8.5",
+  "version": "1.9.1",
   "description": "High performance middleware framework",
-  "keywords": ["framework", "web", "middleware", "connect", "rack"],
-  "repository": "git://github.com/senchalabs/connect.git",
-  "author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)",
-  "repository": "git://github.com/senchalabs/connect",
+  "keywords": [
+    "framework",
+    "web",
+    "middleware",
+    "connect",
+    "rack"
+  ],
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/senchalabs/connect"
+  },
+  "author": {
+    "name": "TJ Holowaychuk",
+    "email": "tj@vision-media.ca",
+    "url": "http://tjholowaychuk.com"
+  },
   "dependencies": {
     "qs": ">= 0.4.0",
     "mime": ">= 0.0.1",
@@ -20,6 +32,10 @@
     "ejs": "0.4.3",
     "should": "0.3.2"
   },
+  "publishConfig": {
+    "tag": "1.8"
+  },
   "main": "index",
-  "engines": { "node": ">= 0.4.1 < 0.7.0" }
-}
\ No newline at end of file
+  "_id": "connect@1.9.1",
+  "_from": "connect@1.x"
+}


Mime
View raw message