diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..36a1f70 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/coverage +/node_modules +/prod diff --git a/coverage/coverage.json b/coverage/coverage.json deleted file mode 100644 index 21769cc..0000000 --- a/coverage/coverage.json +++ /dev/null @@ -1 +0,0 @@ -{"prod/js/main.js":{"b":{},"branchMap":{},"f":{"1":1,"2":1,"3":1},"fnMap":{"1":{"line":1,"loc":{"end":{"column":12,"line":1},"start":{"column":1,"line":1}},"name":"(anonymous_1)"},"2":{"line":2,"loc":{"end":{"column":13,"line":2},"start":{"column":3,"line":2}},"name":"(anonymous_2)"},"3":{"line":3,"loc":{"end":{"column":25,"line":3},"start":{"column":15,"line":3}},"name":"(anonymous_3)"}},"path":"prod/js/main.js","s":{"1":1,"2":1,"3":1,"4":1},"statementMap":{"1":{"end":{"column":11,"line":7},"start":{"column":0,"line":1}},"2":{"end":{"column":4,"line":6},"start":{"column":1,"line":2}},"3":{"end":{"column":5,"line":5},"start":{"column":2,"line":3}},"4":{"end":{"column":75,"line":4},"start":{"column":3,"line":4}}}}} \ No newline at end of file diff --git a/coverage/lcov-report/index.html b/coverage/lcov-report/index.html deleted file mode 100644 index eea8b52..0000000 --- a/coverage/lcov-report/index.html +++ /dev/null @@ -1,350 +0,0 @@ - - -
-| File | -- | Statements | -- | Branches | -- | Functions | -- | Lines | -- |
|---|---|---|---|---|---|---|---|---|---|
| js/ | -- | 100% | -(4 / 4) | -100% | -(0 / 0) | -100% | -(3 / 3) | -100% | -(4 / 4) | -
| File | -- | Statements | -- | Branches | -- | Functions | -- | Lines | -- |
|---|---|---|---|---|---|---|---|---|---|
| main.js | -- | 100% | -(4 / 4) | -100% | -(0 / 0) | -100% | -(3 / 3) | -100% | -(4 / 4) | -
| 1 -2 -3 -4 -5 -6 -7 | 1 -1 -1 -1 - - - | (function($){
- $(function(){
- $('a').click(function(){
- $('body').append('<div id="jQueryAddedDiv">added through jquery</div>');
- });
- });
-})(jQuery); |
thanks ' + req.body.name + '
'); - res.write('hits: ' + n + '
' - + '' - + ''); -} - -http.createServer(app).listen(3000); -console.log('Server listening on port 3000'); diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/examples/csrf.js b/node_modules/grunt-contrib-connect/node_modules/connect/examples/csrf.js deleted file mode 100644 index 8c54c13..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/examples/csrf.js +++ /dev/null @@ -1,36 +0,0 @@ - -/** - * Module dependencies. - */ - -var connect = require('../') - , http = require('http'); - -var form = '\n\ - \n\ -'; - -var app = connect() - .use(connect.cookieParser()) - .use(connect.session({ secret: 'keyboard cat' })) - .use(connect.bodyParser()) - .use(connect.csrf()) - .use(function(req, res, next){ - if ('POST' != req.method) return next(); - req.session.user = req.body.user; - next(); - }) - .use(function(req, res){ - res.setHeader('Content-Type', 'text/html'); - var body = form - .replace('{token}', req.csrfToken()) - .replace('{user}', req.session.user && req.session.user.name || ''); - res.end(body); - }); - -http.createServer(app).listen(3000); -console.log('Server listening on port 3000'); diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/examples/directory.js b/node_modules/grunt-contrib-connect/node_modules/connect/examples/directory.js deleted file mode 100644 index 2273847..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/examples/directory.js +++ /dev/null @@ -1,12 +0,0 @@ - -/** - * Module dependencies. - */ - -var connect = require('../'); -var app = connect(); -var path = __dirname + '/../'; - -app.use(connect.directory(path, { icons: true })) -app.use(connect.static(path)) -app.listen(3000); diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/examples/error.js b/node_modules/grunt-contrib-connect/node_modules/connect/examples/error.js deleted file mode 100644 index a750c5e..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/examples/error.js +++ /dev/null @@ -1,19 +0,0 @@ - -var connect = require('../') - , http = require('http'); - -// try: -// - viewing in a browser -// - curl http://localhost:3000 -// - curl -H "Accept: application/json" http://localhost:3000 - -var app = connect() - .use(function(req, res, next){ - var err = new Error('oh noes!'); - err.number = 7; - throw err; - }) - .use(connect.errorHandler()); - -http.Server(app).listen(3000); -console.log('Server started on port 3000'); diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/examples/favicon.js b/node_modules/grunt-contrib-connect/node_modules/connect/examples/favicon.js deleted file mode 100644 index 6305b20..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/examples/favicon.js +++ /dev/null @@ -1,12 +0,0 @@ - -/** - * Module dependencies. - */ - -var connect = require('../'); - -// $ curl -i http://localhost:3000/favicon.ico - -connect.createServer( - connect.favicon() -).listen(3000); \ No newline at end of file diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/examples/helloworld.js b/node_modules/grunt-contrib-connect/node_modules/connect/examples/helloworld.js deleted file mode 100644 index 3a0240c..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/examples/helloworld.js +++ /dev/null @@ -1,12 +0,0 @@ - -/** - * Module dependencies. - */ - -var connect = require('../'); - -connect.createServer(function(req, res){ - var body = 'Hello World'; - res.setHeader('Content-Length', body.length); - res.end(body); -}).listen(3000); \ No newline at end of file diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/examples/limit.js b/node_modules/grunt-contrib-connect/node_modules/connect/examples/limit.js deleted file mode 100644 index dfdc593..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/examples/limit.js +++ /dev/null @@ -1,41 +0,0 @@ - -var connect = require('../') - , http = require('http'); - -// visit form.html - -var app = connect() - .use(connect.static(__dirname + '/public')) - .use(connect.limit('5mb')) - .use(connect.bodyParser()) - .use(form) - .use(upload); - -function form(req, res, next){ - if ('GET' != req.method) return next(); - res.statusCode = 302; - res.setHeader('Location', 'form.html'); - res.end(); -} - -function upload(req, res){ - res.setHeader('Content-Type', 'text/html'); - res.write('thanks ' + req.body.name + '
'); - res.write('Expiration: ' + expiration + '
' - + 'Hits: ' + n + '
' - + '' - + (req.session.cookie.maxAge - ? '' - : '')); -} diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/examples/session.js b/node_modules/grunt-contrib-connect/node_modules/connect/examples/session.js deleted file mode 100644 index 3db8a59..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/examples/session.js +++ /dev/null @@ -1,198 +0,0 @@ - -var connect = require('../') - , http = require('http'); - -var year = 31557600000; - -// large max-age, delegate expiry to the session store. -// for example with connect-redis's .ttl option. - -http.createServer(connect() - .use(connect.cookieParser()) - .use(connect.session({ secret: 'keyboard cat', cookie: { maxAge: year }})) - .use(connect.favicon()) - .use(function(req, res, next){ - var sess = req.session; - if (sess.views) { - sess.views++; - res.setHeader('Content-Type', 'text/html'); - res.write('views: ' + sess.views + '
'); - res.write('expires in: ' + (sess.cookie.maxAge / 1000) + 's
'); - res.end(); - } else { - sess.views = 1; - res.end('welcome to the session demo. refresh!'); - } - })).listen(3007); - -console.log('port 3007: 1 minute expiration demo'); - - -// expire sessions within a minute -// /favicon.ico is ignored, and will not -// receive req.session - -http.createServer(connect() - .use(connect.cookieParser()) - .use(connect.session({ secret: 'keyboard cat', cookie: { maxAge: 60000 }})) - .use(connect.favicon()) - .use(function(req, res, next){ - var sess = req.session; - if (sess.views) { - sess.views++; - res.setHeader('Content-Type', 'text/html'); - res.write('views: ' + sess.views + '
'); - res.write('expires in: ' + (sess.cookie.maxAge / 1000) + 's
'); - res.end(); - } else { - sess.views = 1; - res.end('welcome to the session demo. refresh!'); - } - })).listen(3006); - -console.log('port 3006: 1 minute expiration demo'); - -// $ npm install connect-redis - -try { - var RedisStore = require('connect-redis')(connect); - http.createServer(connect() - .use(connect.cookieParser()) - .use(connect.session({ - secret: 'keyboard cat', - cookie: { maxAge: 60000 * 3 } - , store: new RedisStore - })) - .use(connect.favicon()) - .use(function(req, res, next){ - var sess = req.session; - if (sess.views) { - sess.views++; - res.setHeader('Content-Type', 'text/html'); - res.end('views: ' + sess.views + '
'); - } else { - sess.views = 1; - res.end('welcome to the redis demo. refresh!'); - } - })).listen(3001); - - console.log('port 3001: redis example'); -} catch (err) { - console.log('\033[33m'); - console.log('failed to start the Redis example.'); - console.log('to try it install redis, start redis'); - console.log('install connect-redis, and run this'); - console.log('script again.'); - console.log(' $ redis-server'); - console.log(' $ npm install connect-redis'); - console.log('\033[0m'); -} - -// conditional session support by simply -// wrapping middleware with middleware. - -var sess = connect.session({ secret: 'keyboard cat', cookie: { maxAge: 5000 }}); - -http.createServer(connect() - .use(connect.cookieParser()) - .use(function(req, res, next){ - if ('/foo' == req.url || '/bar' == req.url) { - sess(req, res, next); - } else { - next(); - } - }) - .use(connect.favicon()) - .use(function(req, res, next){ - res.end('has session: ' + (req.session ? 'yes' : 'no')); - })).listen(3002); - -console.log('port 3002: conditional sessions'); - -// Session#reload() will update req.session -// without altering .maxAge - -// view the page several times, and see that the -// setInterval can still gain access to new -// session data - -http.createServer(connect() - .use(connect.cookieParser()) - .use(connect.session({ secret: 'keyboard cat', cookie: { maxAge: 60000 }})) - .use(connect.favicon()) - .use(function(req, res, next){ - var sess = req.session - , prev; - - if (sess.views) { - res.setHeader('Content-Type', 'text/html'); - res.write('views: ' + sess.views + '
'); - res.write('expires in: ' + (sess.cookie.maxAge / 1000) + 's
'); - sess.views++; - res.end(); - } else { - sess.views = 1; - setInterval(function(){ - sess.reload(function(){ - console.log(); - if (prev) console.log('previous views %d, now %d', prev, req.session.views); - console.log('time remaining until expiry: %ds', (req.session.cookie.maxAge / 1000)); - prev = req.session.views; - }); - }, 3000); - res.end('welcome to the session demo. refresh!'); - } - })).listen(3003); - -console.log('port 3003: Session#reload() demo'); - -// by default sessions -// last the duration of -// a user-agent's own session, -// aka while the browser is open. - -http.createServer(connect() - .use(connect.cookieParser()) - .use(connect.session({ secret: 'keyboard cat' })) - .use(connect.favicon()) - .use(function(req, res, next){ - var sess = req.session; - if (sess.views) { - res.setHeader('Content-Type', 'text/html'); - res.write('views: ' + sess.views + '
'); - res.end(); - sess.views++; - } else { - sess.views = 1; - res.end('welcome to the browser session demo. refresh!'); - } - })).listen(3004); - -console.log('port 3004: browser-session length sessions'); - -// persistence example, enter your name! - -http.createServer(connect() - .use(connect.bodyParser()) - .use(connect.cookieParser()) - .use(connect.session({ secret: 'keyboard cat' })) - .use(connect.favicon()) - .use(function(req, res, next){ - if ('POST' != req.method) return next(); - req.session.name = req.body.name; - res.statusCode = 302; - res.setHeader('Location', '/'); - res.end(); - }) - .use(function(req, res, next){ - var sess = req.session; - res.setHeader('Content-Type', 'text/html'); - if (sess.name) res.write('Hey ' + sess.name + '!
'); - else res.write('Enter a username:
'); - res.end(''); - })).listen(3005); - -console.log('port 3005: browser-session length sessions persistence example'); diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/examples/static.js b/node_modules/grunt-contrib-connect/node_modules/connect/examples/static.js deleted file mode 100644 index cf5c225..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/examples/static.js +++ /dev/null @@ -1,14 +0,0 @@ - -/** - * Module dependencies. - */ - -var connect = require('../'); - -connect( - connect.static(__dirname + '/public', { maxAge: 0 }) - , function(req, res) { - res.setHeader('Content-Type', 'text/html'); - res.end('
')
- }
-).listen(3000);
\ No newline at end of file
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/examples/upload-stream.js b/node_modules/grunt-contrib-connect/node_modules/connect/examples/upload-stream.js
deleted file mode 100644
index b53db01..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/examples/upload-stream.js
+++ /dev/null
@@ -1,37 +0,0 @@
-
-/**
- * Module dependencies.
- */
-
-var connect = require('../');
-var fs = require('fs');
-
-connect()
- .use(connect.bodyParser({ defer: true }))
- .use(form)
- .use(upload)
- .listen(3000);
-
-function form(req, res, next) {
- if ('GET' !== req.method) return next();
- res.setHeader('Content-Type', 'text/html');
- res.end('');
-}
-
-function upload(req, res, next) {
- if ('POST' !== req.method) return next();
-
- req.form.on('part', function(part){
- // transfer to s3 etc
- console.log('upload %s %s', part.name, part.filename);
- var out = fs.createWriteStream('/tmp/' + part.filename);
- part.pipe(out);
- });
-
- req.form.on('close', function(){
- res.end('uploaded!');
- });
-}
\ No newline at end of file
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/examples/upload.js b/node_modules/grunt-contrib-connect/node_modules/connect/examples/upload.js
deleted file mode 100644
index 4aaff35..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/examples/upload.js
+++ /dev/null
@@ -1,29 +0,0 @@
-
-/**
- * Module dependencies.
- */
-
-var connect = require('../');
-
-connect()
- .use(connect.bodyParser())
- .use(form)
- .use(upload)
- .listen(3000);
-
-function form(req, res, next) {
- if ('GET' !== req.method) return next();
- res.setHeader('Content-Type', 'text/html');
- res.end('');
-}
-
-function upload(req, res, next) {
- if ('POST' !== req.method) return next();
- req.files.images.forEach(function(file){
- console.log(' uploaded : %s %skb : %s', file.originalFilename, file.size / 1024 | 0, file.path);
- });
- res.end('Thanks');
-}
\ No newline at end of file
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/examples/vhost.js b/node_modules/grunt-contrib-connect/node_modules/connect/examples/vhost.js
deleted file mode 100644
index 1f28c56..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/examples/vhost.js
+++ /dev/null
@@ -1,31 +0,0 @@
-
-/**
- * Module dependencies.
- */
-
-var connect = require('../');
-
-var account = connect(function(req, res){
- var location = 'http://localhost:3000/account/' + req.headers.host.split('.localhost')[0];
- res.statusCode = 302;
- res.setHeader('Location', location);
- res.end('Moved to ' + location);
-});
-
-var blog = connect(function(req, res){
- res.end('blog app');
-});
-
-var main = connect(function(req, res){
- if (req.url == '/') return res.end('main app');
- if (0 == req.url.indexOf('/account/')) return res.end('viewing user account for ' + req.url.substring(9));
- res.statusCode = 404;
- res.end();
-});
-
-connect(
- connect.logger()
- , connect.vhost('blog.localhost', blog)
- , connect.vhost('*.localhost', account)
- , main
-).listen(3000);
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/index.js b/node_modules/grunt-contrib-connect/node_modules/connect/index.js
deleted file mode 100644
index 02befb4..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-
-module.exports = require('./lib/connect');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/cache.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/cache.js
deleted file mode 100644
index 052fcdb..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/cache.js
+++ /dev/null
@@ -1,81 +0,0 @@
-
-/*!
- * Connect - Cache
- * Copyright(c) 2011 Sencha Inc.
- * MIT Licensed
- */
-
-/**
- * Expose `Cache`.
- */
-
-module.exports = Cache;
-
-/**
- * LRU cache store.
- *
- * @param {Number} limit
- * @api private
- */
-
-function Cache(limit) {
- this.store = {};
- this.keys = [];
- this.limit = limit;
-}
-
-/**
- * Touch `key`, promoting the object.
- *
- * @param {String} key
- * @param {Number} i
- * @api private
- */
-
-Cache.prototype.touch = function(key, i){
- this.keys.splice(i,1);
- this.keys.push(key);
-};
-
-/**
- * Remove `key`.
- *
- * @param {String} key
- * @api private
- */
-
-Cache.prototype.remove = function(key){
- delete this.store[key];
-};
-
-/**
- * Get the object stored for `key`.
- *
- * @param {String} key
- * @return {Array}
- * @api private
- */
-
-Cache.prototype.get = function(key){
- return this.store[key];
-};
-
-/**
- * Add a cache `key`.
- *
- * @param {String} key
- * @return {Array}
- * @api private
- */
-
-Cache.prototype.add = function(key){
- // initialize store
- var len = this.keys.push(key);
-
- // limit reached, invalidate LRU
- if (len > this.limit) this.remove(this.keys.shift());
-
- var arr = this.store[key] = [];
- arr.createdAt = new Date;
- return arr;
-};
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/connect.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/connect.js
deleted file mode 100644
index e8b8cc6..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/connect.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/*!
- * Connect
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var EventEmitter = require('events').EventEmitter
- , proto = require('./proto')
- , utils = require('./utils')
- , path = require('path')
- , basename = path.basename
- , fs = require('fs');
-
-// node patches
-
-require('./patch');
-
-// expose createServer() as the module
-
-exports = module.exports = createServer;
-
-/**
- * Framework version.
- */
-
-exports.version = require('../package').version;
-
-/**
- * Expose mime module.
- */
-
-exports.mime = require('./middleware/static').mime;
-
-/**
- * Expose the prototype.
- */
-
-exports.proto = proto;
-
-/**
- * Auto-load middleware getters.
- */
-
-exports.middleware = {};
-
-/**
- * Expose utilities.
- */
-
-exports.utils = utils;
-
-/**
- * Create a new connect server.
- *
- * @return {Function}
- * @api public
- */
-
-function createServer() {
- function app(req, res, next){ app.handle(req, res, next); }
- utils.merge(app, proto);
- utils.merge(app, EventEmitter.prototype);
- app.route = '/';
- app.stack = [];
- for (var i = 0; i < arguments.length; ++i) {
- app.use(arguments[i]);
- }
- return app;
-};
-
-/**
- * Support old `.createServer()` method.
- */
-
-createServer.createServer = createServer;
-
-/**
- * Auto-load bundled middleware with getters.
- */
-
-fs.readdirSync(__dirname + '/middleware').forEach(function(filename){
- if (!/\.js$/.test(filename)) return;
- var name = basename(filename, '.js');
- function load(){ return require('./middleware/' + name); }
- exports.middleware.__defineGetter__(name, load);
- exports.__defineGetter__(name, load);
-});
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/index.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/index.js
deleted file mode 100644
index 170212c..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/index.js
+++ /dev/null
@@ -1,50 +0,0 @@
-
-/**
- * Connect is a middleware framework for node,
- * shipping with over 18 bundled middleware and a rich selection of
- * 3rd-party middleware.
- *
- * var app = connect()
- * .use(connect.logger('dev'))
- * .use(connect.static('public'))
- * .use(function(req, res){
- * res.end('hello world\n');
- * })
- *
- * http.createServer(app).listen(3000);
- *
- * Installation:
- *
- * $ npm install connect
- *
- * Middleware:
- *
- * - [basicAuth](https://github.com/expressjs/basic-auth-connect) basic http authentication
- * - [cookieParser](https://github.com/expressjs/cookie-parser) cookie parser
- * - [compress](https://github.com/expressjs/compression) Gzip compression middleware
- * - [csrf](https://github.com/expressjs/csurf) Cross-site request forgery protection
- * - [directory](https://github.com/expressjs/serve-index) directory listing middleware
- * - [errorHandler](https://github.com/expressjs/errorhandler) flexible error handler
- * - [favicon](https://github.com/expressjs/favicon) efficient favicon server (with default icon)
- * - [json](https://github.com/expressjs/body-parser) application/json parser
- * - [logger](https://github.com/expressjs/morgan) request logger with custom format support
- * - [methodOverride](https://github.com/expressjs/method-override) faux HTTP method support
- * - [responseTime](https://github.com/expressjs/response-time) calculates response-time and exposes via X-Response-Time
- * - [session](https://github.com/expressjs/session) session management support with bundled MemoryStore
- * - [static](https://github.com/expressjs/serve-static) streaming static file server supporting `Range` and more
- * - [timeout](https://github.com/expressjs/timeout) request timeouts
- * - [urlencoded](https://github.com/expressjs/body-parser) application/x-www-form-urlencoded parser
- * - [vhost](https://github.com/expressjs/vhost) virtual host sub-domain mapping middleware
- * - [bodyParser](bodyParser.html) extensible request body parser
- * - [multipart](multipart.html) multipart/form-data parser
- * - [cookieSession](cookieSession.html) cookie-based session support
- * - [staticCache](staticCache.html) memory cache layer for the static() middleware
- * - [limit](limit.html) limit the bytesize of request bodies
- * - [query](query.html) automatic querystring parser, populating `req.query`
- *
- * Links:
- *
- * - list of [3rd-party](https://github.com/senchalabs/connect/wiki) middleware
- * - GitHub [repository](http://github.com/senchalabs/connect)
- *
- */
\ No newline at end of file
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/basicAuth.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/basicAuth.js
deleted file mode 100644
index 5fbe33a..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/basicAuth.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*!
- * Connect - basicAuth
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Basic Auth:
- *
- * Enfore basic authentication by providing a `callback(user, pass)`,
- * which must return `true` in order to gain access. Alternatively an async
- * method is provided as well, invoking `callback(user, pass, callback)`. Populates
- * `req.user`. The final alternative is simply passing username / password
- * strings.
- *
- * See [basic-auth-connect](https://github.com/expressjs/basic-auth-connect)
- *
- * @param {Function|String} callback or username
- * @param {String} realm
- * @api public
- */
-
-module.exports = require('basic-auth-connect');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/bodyParser.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/bodyParser.js
deleted file mode 100644
index 14481f5..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/bodyParser.js
+++ /dev/null
@@ -1,68 +0,0 @@
-
-/*!
- * Connect - bodyParser
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var multipart = require('./multipart')
- , urlencoded = require('./urlencoded')
- , json = require('./json');
-
-/**
- * Body parser:
- *
- * Status: the multipart body parser will be removed in Connect 3.
- *
- * Parse request bodies, supports _application/json_,
- * _application/x-www-form-urlencoded_, and _multipart/form-data_.
- *
- * This is equivalent to:
- *
- * app.use(connect.json());
- * app.use(connect.urlencoded());
- * app.use(connect.multipart());
- *
- * Examples:
- *
- * connect()
- * .use(connect.bodyParser())
- * .use(function(req, res) {
- * res.end('viewing user ' + req.body.user.name);
- * });
- *
- * $ curl -d 'user[name]=tj' http://local/
- * $ curl -d '{"user":{"name":"tj"}}' -H "Content-Type: application/json" http://local/
- *
- * View [json](json.html), [urlencoded](urlencoded.html), and [multipart](multipart.html) for more info.
- *
- * If you wish to create your own body parser, you may be interested in:
- *
- * - [raw-body](https://github.com/stream-utils/raw-body)
- * - [body](https://github.com/raynos/body)
- *
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-exports = module.exports = function bodyParser(options){
- var _urlencoded = urlencoded(options)
- , _multipart = multipart(options)
- , _json = json(options);
-
- return function bodyParser(req, res, next) {
- _json(req, res, function(err){
- if (err) return next(err);
- _urlencoded(req, res, function(err){
- if (err) return next(err);
- _multipart(req, res, next);
- });
- });
- }
-};
\ No newline at end of file
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/compress.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/compress.js
deleted file mode 100644
index 5b62e55..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/compress.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*!
- * Connect - compress
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Compress:
- *
- * Compress response data with gzip/deflate.
- *
- * See [compression](https://github.com/expressjs/compression)
- *
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-module.exports = require('compression');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/cookieParser.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/cookieParser.js
deleted file mode 100644
index 80a06e1..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/cookieParser.js
+++ /dev/null
@@ -1,19 +0,0 @@
-
-/*!
- * Connect - cookieParser
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Cookie parser:
- *
- * See [cookie-parser](https://github.com/expressjs/cookie-parser)
- *
- * @param {String} secret
- * @return {Function}
- * @api public
- */
-
-module.exports = require('cookie-parser');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/cookieSession.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/cookieSession.js
deleted file mode 100644
index 16a1f9e..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/cookieSession.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*!
- * Connect - cookieSession
- * Copyright(c) 2011 Sencha Inc.
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var utils = require('./../utils')
- , Cookie = require('express-session').Cookie
- , debug = require('debug')('connect:cookieSession')
- , signature = require('cookie-signature')
- , onHeaders = require('on-headers')
- , url = require('url');
-
-/**
- * Cookie Session:
- *
- * Cookie session middleware.
- *
- * var app = connect();
- * app.use(connect.cookieParser());
- * app.use(connect.cookieSession({ secret: 'tobo!', cookie: { maxAge: 60 * 60 * 1000 }}));
- *
- * Options:
- *
- * - `key` cookie name defaulting to `connect.sess`
- * - `secret` prevents cookie tampering
- * - `cookie` session cookie settings, defaulting to `{ path: '/', httpOnly: true, maxAge: null }`
- * - `proxy` trust the reverse proxy when setting secure cookies (via "x-forwarded-proto")
- *
- * Clearing sessions:
- *
- * To clear the session simply set its value to `null`,
- * `cookieSession()` will then respond with a 1970 Set-Cookie.
- *
- * req.session = null;
- *
- * If you are interested in more sophisticated solutions,
- * you may be interested in:
- *
- * - [client-sessions](https://github.com/mozilla/node-client-sessions)
- *
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-module.exports = function cookieSession(options){
- // TODO: utilize Session/Cookie to unify API
- options = options || {};
- var key = options.key || 'connect.sess'
- , trustProxy = options.proxy;
-
- return function cookieSession(req, res, next) {
-
- // req.secret is for backwards compatibility
- var secret = options.secret || req.secret;
- if (!secret) throw new Error('`secret` option required for cookie sessions');
-
- // default session
- req.session = {};
- var cookie = req.session.cookie = new Cookie(options.cookie);
-
- // pathname mismatch
- var originalPath = url.parse(req.originalUrl).pathname;
- if (0 != originalPath.indexOf(cookie.path)) return next();
-
- // cookieParser secret
- if (!options.secret && req.secret) {
- req.session = req.signedCookies[key] || {};
- req.session.cookie = cookie;
- } else {
- // TODO: refactor
- var rawCookie = req.cookies[key];
- if (rawCookie) {
- var unsigned = utils.parseSignedCookie(rawCookie, secret);
- if (unsigned) {
- var original = unsigned;
- req.session = utils.parseJSONCookie(unsigned) || {};
- req.session.cookie = cookie;
- }
- }
- }
-
- onHeaders(res, function(){
- // removed
- if (!req.session) {
- debug('clear session');
- cookie.expires = new Date(0);
- res.setHeader('Set-Cookie', cookie.serialize(key, ''));
- return;
- }
-
- delete req.session.cookie;
-
- // check security
- var proto = (req.headers['x-forwarded-proto'] || '').toLowerCase()
- , tls = req.connection.encrypted || (trustProxy && 'https' == proto.split(/\s*,\s*/)[0]);
-
- // only send secure cookies via https
- if (cookie.secure && !tls) return debug('not secured');
-
- // serialize
- debug('serializing %j', req.session);
- var val = 'j:' + JSON.stringify(req.session);
-
- // compare data, no need to set-cookie if unchanged
- if (original == val) return debug('unmodified session');
-
- // set-cookie
- val = 's:' + signature.sign(val, secret);
- val = cookie.serialize(key, val);
- debug('set-cookie %j', cookie);
- res.setHeader('Set-Cookie', val);
- });
-
- next();
- };
-};
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/csrf.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/csrf.js
deleted file mode 100644
index 360601f..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/csrf.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/*!
- * Connect - csrf
- * Copyright(c) 2011 Sencha Inc.
- * MIT Licensed
- */
-
-/**
- * Anti CSRF:
- *
- * CSRF protection middleware.
- *
- * See [csurf](https://github.com/expressjs/csurf)
- *
- * @param {Object} options
- * @api public
- */
-
-module.exports = require('csurf');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/directory.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/directory.js
deleted file mode 100644
index 01cc7f5..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/directory.js
+++ /dev/null
@@ -1,20 +0,0 @@
-
-/*!
- * Connect - directory
- * Copyright(c) 2011 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Directory:
- *
- * See [serve-index](https://github.com/expressjs/serve-index)
- *
- * @param {String} root
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-module.exports = require('serve-index');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/errorHandler.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/errorHandler.js
deleted file mode 100644
index 4df43ae..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/errorHandler.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/*!
- * Connect - errorHandler
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Error handler:
- *
- * See [errorHandler](https://github.com/expressjs/errorhandler)
- *
- * @return {Function}
- * @api public
- */
-
-module.exports = require('errorhandler');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/favicon.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/favicon.js
deleted file mode 100644
index 847077c..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/favicon.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/*!
- * Connect - favicon
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var path = require('path');
-var serveFavicon = require('serve-favicon');
-
-var defaultPath = path.join(__dirname, '..', 'public', 'favicon.ico');
-
-/**
- * Favicon:
- *
- * By default serves the connect favicon, or the favicon
- * located by the given `path`.
- *
- * See [serve-favicon](https://github.com/expressjs/serve-favicon)
- *
- * @param {String|Buffer} path
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-module.exports = function favicon(path, options){
- path = path || defaultPath;
- return serveFavicon(path, options);
-};
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/json.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/json.js
deleted file mode 100644
index 7c59535..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/json.js
+++ /dev/null
@@ -1,52 +0,0 @@
-
-/*!
- * Connect - json
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var bodyParser = require('body-parser');
-var utils = require('../utils');
-
-/**
- * JSON:
- *
- * See [body-parser](https://github.com/expressjs/body-parser)
- *
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-module.exports = function json(options) {
- var opts = utils.merge({
- limit: '1mb',
- type: ['application/json', 'application/*+json']
- }, options);
-
- // back-compat verify function
- if (typeof opts.verify === 'function') {
- opts.verify = convertVerify(opts.verify);
- }
-
- return bodyParser.json(opts);
-};
-
-/**
- * Convert old verify signature to body-parser version.
- *
- * @param {Function} verify
- * @return {Function}
- * @api private
- */
-
-function convertVerify(verify) {
- return function (req, res, buf, encoding) {
- verify(req, res, buf.toString(encoding));
- };
-}
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/limit.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/limit.js
deleted file mode 100644
index b308d4c..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/limit.js
+++ /dev/null
@@ -1,89 +0,0 @@
-
-/*!
- * Connect - limit
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var parseBytes = require('bytes');
-var utils = require('../utils');
-var brokenPause = utils.brokenPause;
-
-/**
- * Limit:
- *
- * Status: Deprecated. This middleware will be removed in Connect 3.0.
- * If you still wish to use some type of limit middleware,
- * you may be interested in:
- *
- * - [raw-body](https://github.com/stream-utils/raw-body)
- *
- * Limit request bodies to the given size in `bytes`.
- *
- * A string representation of the bytesize may also be passed,
- * for example "5mb", "200kb", "1gb", etc.
- *
- * connect()
- * .use(connect.limit('5.5mb'))
- * .use(handleImageUpload)
- *
- * @param {Number|String} bytes
- * @return {Function}
- * @api public
- */
-
-module.exports = function limit(bytes){
- if ('string' == typeof bytes) bytes = parseBytes(bytes);
- if ('number' != typeof bytes) throw new Error('limit() bytes required');
-
- return function limit(req, res, next){
- var received = 0
- , len = req.headers['content-length']
- ? parseInt(req.headers['content-length'], 10)
- : null;
-
- // self-awareness
- if (req._limit) return next();
- req._limit = true;
-
- // limit by content-length
- if (len && len > bytes) return next(utils.error(413));
-
- // limit
- if (brokenPause) {
- listen();
- } else {
- req.on('newListener', function handler(event) {
- if (event !== 'data') return;
-
- req.removeListener('newListener', handler);
- // Start listening at the end of the current loop
- // otherwise the request will be consumed too early.
- // Sideaffect is `limit` will miss the first chunk,
- // but that's not a big deal.
- // Unfortunately, the tests don't have large enough
- // request bodies to test this.
- process.nextTick(listen);
- });
- };
-
- next();
-
- function listen() {
- req.on('data', function(chunk) {
- received += Buffer.isBuffer(chunk)
- ? chunk.length :
- Buffer.byteLength(chunk);
-
- if (received > bytes) req.destroy();
- });
- };
- };
-};
-
-module.exports = utils.deprecate(module.exports,
- 'limit: Restrict request size at location of read');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/logger.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/logger.js
deleted file mode 100644
index d304100..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/logger.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*!
- * Connect - logger
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Logger:
- *
- * Log requests with the given `options` or a `format` string.
- *
- * See [morgan](https://github.com/expressjs/morgan)
- *
- * @param {String|Function|Object} format or options
- * @return {Function}
- * @api public
- */
-
-module.exports = require('morgan');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/methodOverride.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/methodOverride.js
deleted file mode 100644
index 9626705..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/methodOverride.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*!
- * Connect - methodOverride
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var methodOverride = require('method-override');
-var utils = require('../utils');
-
-/**
- * Method Override:
- *
- * See [method-override](https://github.com/expressjs/method-override)
- *
- * @param {String} key
- * @return {Function}
- * @api public
- */
-
-module.exports = function(key){
- // this is a shim to keep the interface working with method-override@2
- var opts = { methods: null };
- var prop = key || '_method';
- var _headerOverride = methodOverride('X-HTTP-Method-Override', opts);
- var _bodyOverride = methodOverride(function(req){
- if (req.body && typeof req.body === 'object' && prop in req.body) {
- var method = req.body[prop];
- delete req.body[prop];
- return method;
- }
- }, opts);
-
- return function(req, res, next){
- _bodyOverride(req, res, function(err){
- if (err) return next(err);
- _headerOverride(req, res, next);
- });
- };
-};
-
-module.exports = utils.deprecate(module.exports,
- 'methodOverride: use method-override module directly');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/multipart.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/multipart.js
deleted file mode 100644
index 0589c0f..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/multipart.js
+++ /dev/null
@@ -1,168 +0,0 @@
-/*!
- * Connect - multipart
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var multiparty = require('multiparty')
- , typeis = require('type-is')
- , _limit = require('./limit')
- , utils = require('../utils')
- , qs = require('qs');
-
-/**
- * Multipart:
- *
- * Status: Deprecated. The multipart parser will be removed in Connect 3.0.
- * Please use one of the following parsers/middleware directly:
- *
- * - [formidable](https://github.com/felixge/node-formidable)
- * - [connect-multiparty](https://github.com/superjoe30/connect-multiparty) or [multiparty]
- * - [connect-busboy](https://github.com/mscdex/connect-busboy) or [busboy](https://github.com/mscdex/busboy)
- *
- * Parse multipart/form-data request bodies,
- * providing the parsed object as `req.body`
- * and `req.files`.
- *
- * Configuration:
- *
- * The options passed are merged with [multiparty](https://github.com/superjoe30/node-multiparty)'s
- * `Form` object, allowing you to configure the upload directory,
- * size limits, etc. For example if you wish to change the upload dir do the following.
- *
- * app.use(connect.multipart({ uploadDir: path }));
- *
- * Options:
- *
- * - `limit` byte limit defaulting to [100mb]
- * - `defer` defers processing and exposes the multiparty form object as `req.form`.
- * `next()` is called without waiting for the form's "end" event.
- * This option is useful if you need to bind to the "progress" or "part" events, for example.
- *
- * Temporary Files:
- *
- * By default temporary files are used, stored in `os.tmpDir()`. These
- * are not automatically garbage collected, you are in charge of moving them
- * or deleting them. When `defer` is not used and these files are created you
- * may refernce them via the `req.files` object.
- *
- * req.files.images.forEach(function(file){
- * console.log(' uploaded : %s %skb : %s', file.originalFilename, file.size / 1024 | 0, file.path);
- * });
- *
- * It is highly recommended to monitor and clean up tempfiles in any production
- * environment, you may use tools like [reap](https://github.com/visionmedia/reap)
- * to do so.
- *
- * Streaming:
- *
- * When `defer` is used files are _not_ streamed to tmpfiles, you may
- * access them via the "part" events and stream them accordingly:
- *
- * req.form.on('part', function(part){
- * // transfer to s3 etc
- * console.log('upload %s %s', part.name, part.filename);
- * var out = fs.createWriteStream('/tmp/' + part.filename);
- * part.pipe(out);
- * });
- *
- * req.form.on('close', function(){
- * res.end('uploaded!');
- * });
- *
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-exports = module.exports = function(options){
- options = options || {};
-
- var limit = _limit(options.limit || '100mb');
-
- return function multipart(req, res, next) {
- if (req._body) return next();
- req.body = req.body || {};
- req.files = req.files || {};
-
- // ignore GET
- if ('GET' == req.method || 'HEAD' == req.method) return next();
-
- // check Content-Type
- if (!typeis(req, 'multipart')) return next();
-
- // flag as parsed
- req._body = true;
-
- // parse
- limit(req, res, function(err){
- if (err) return next(err);
-
- var form = new multiparty.Form(options)
- , data = {}
- , files = {}
- , done;
-
- Object.keys(options).forEach(function(key){
- form[key] = options[key];
- });
-
- function ondata(name, val, data){
- if (Array.isArray(data[name])) {
- data[name].push(val);
- } else if (data[name]) {
- data[name] = [data[name], val];
- } else {
- data[name] = val;
- }
- }
-
- form.on('field', function(name, val){
- ondata(name, val, data);
- });
-
- if (!options.defer) {
- form.on('file', function(name, val){
- val.name = val.originalFilename;
- val.type = val.headers['content-type'] || null;
- ondata(name, val, files);
- });
- }
-
- form.on('error', function(err){
- if (!options.defer) {
- err.status = 400;
- next(err);
- }
- done = true;
- });
-
- form.on('close', function(){
- if (done) return;
- try {
- req.body = qs.parse(data);
- req.files = qs.parse(files);
- } catch (err) {
- form.emit('error', err);
- return;
- }
- if (!options.defer) next();
- });
-
- form.parse(req);
-
- if (options.defer) {
- req.form = form;
- next();
- }
- });
- }
-};
-
-module.exports = utils.deprecate(module.exports,
- 'multipart: use parser (multiparty, busboy, formidable) directly');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/query.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/query.js
deleted file mode 100644
index c6c8391..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/query.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*!
- * Connect - query
- * Copyright(c) 2011 TJ Holowaychuk
- * Copyright(c) 2011 Sencha Inc.
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var qs = require('qs')
- , parseurl = require('parseurl');
-
-/**
- * Query:
- *
- * Automatically parse the query-string when available,
- * populating the `req.query` object using
- * [qs](https://github.com/visionmedia/node-querystring).
- *
- * Examples:
- *
- * connect()
- * .use(connect.query())
- * .use(function(req, res){
- * res.end(JSON.stringify(req.query));
- * });
- *
- * The `options` passed are provided to qs.parse function.
- *
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-module.exports = function query(options){
- return function query(req, res, next){
- if (!req.query) {
- req.query = ~req.url.indexOf('?')
- ? qs.parse(parseurl(req).query, options)
- : {};
- }
-
- next();
- };
-};
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/responseTime.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/responseTime.js
deleted file mode 100644
index c8168cc..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/responseTime.js
+++ /dev/null
@@ -1,17 +0,0 @@
-
-/*!
- * Connect - responseTime
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Reponse time:
- *
- * See [response-time](https://github.com/expressjs/response-time)
- *
- * @return {Function}
- * @api public
- */
-
-module.exports = require('response-time');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/session.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/session.js
deleted file mode 100644
index a3c6331..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/session.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*!
- * Connect - session
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Session:
- *
- * Setup session store with the given `options`.
- *
- * See [express-session](https://github.com/expressjs/session)
- *
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-module.exports = require('express-session');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/static.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/static.js
deleted file mode 100644
index aef56ae..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/static.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*!
- * Connect - static
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Static:
- *
- * See [serve-static](https://github.com/expressjs/serve-static)
- *
- * @param {String} root
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-module.exports = require('serve-static');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/staticCache.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/staticCache.js
deleted file mode 100644
index bcf3c25..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/staticCache.js
+++ /dev/null
@@ -1,237 +0,0 @@
-
-/*!
- * Connect - staticCache
- * Copyright(c) 2011 Sencha Inc.
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var utils = require('../utils')
- , parseurl = require('parseurl')
- , Cache = require('../cache')
- , fresh = require('fresh');
-
-/**
- * Static cache:
- *
- * Status: Deprecated. This middleware will be removed in
- * Connect 3.0. You may be interested in:
- *
- * - [st](https://github.com/isaacs/st)
- *
- * Enables a memory cache layer on top of
- * the `static()` middleware, serving popular
- * static files.
- *
- * By default a maximum of 128 objects are
- * held in cache, with a max of 256k each,
- * totalling ~32mb.
- *
- * A Least-Recently-Used (LRU) cache algo
- * is implemented through the `Cache` object,
- * simply rotating cache objects as they are
- * hit. This means that increasingly popular
- * objects maintain their positions while
- * others get shoved out of the stack and
- * garbage collected.
- *
- * Benchmarks:
- *
- * static(): 2700 rps
- * node-static: 5300 rps
- * static() + staticCache(): 7500 rps
- *
- * Options:
- *
- * - `maxObjects` max cache objects [128]
- * - `maxLength` max cache object length 256kb
- *
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-module.exports = function staticCache(options){
- var options = options || {}
- , cache = new Cache(options.maxObjects || 128)
- , maxlen = options.maxLength || 1024 * 256;
-
- return function staticCache(req, res, next){
- var key = cacheKey(req)
- , ranges = req.headers.range
- , hasCookies = req.headers.cookie
- , hit = cache.get(key);
-
- // cache static
- // TODO: change from staticCache() -> cache()
- // and make this work for any request
- req.on('static', function(stream){
- var headers = res._headers
- , cc = utils.parseCacheControl(headers['cache-control'] || '')
- , contentLength = headers['content-length']
- , hit;
-
- // dont cache set-cookie responses
- if (headers['set-cookie']) return hasCookies = true;
-
- // dont cache when cookies are present
- if (hasCookies) return;
-
- // ignore larger files
- if (!contentLength || contentLength > maxlen) return;
-
- // don't cache partial files
- if (headers['content-range']) return;
-
- // dont cache items we shouldn't be
- // TODO: real support for must-revalidate / no-cache
- if ( cc['no-cache']
- || cc['no-store']
- || cc['private']
- || cc['must-revalidate']) return;
-
- // if already in cache then validate
- if (hit = cache.get(key)){
- if (headers.etag == hit[0].etag) {
- hit[0].date = new Date;
- return;
- } else {
- cache.remove(key);
- }
- }
-
- // validation notifiactions don't contain a steam
- if (null == stream) return;
-
- // add the cache object
- var arr = [];
-
- // store the chunks
- stream.on('data', function(chunk){
- arr.push(chunk);
- });
-
- // flag it as complete
- stream.on('end', function(){
- var cacheEntry = cache.add(key);
- delete headers['x-cache']; // Clean up (TODO: others)
- cacheEntry.push(200);
- cacheEntry.push(headers);
- cacheEntry.push.apply(cacheEntry, arr);
- });
- });
-
- if (req.method == 'GET' || req.method == 'HEAD') {
- if (ranges) {
- next();
- } else if (!hasCookies && hit && !mustRevalidate(req, hit)) {
- res.setHeader('X-Cache', 'HIT');
- respondFromCache(req, res, hit);
- } else {
- res.setHeader('X-Cache', 'MISS');
- next();
- }
- } else {
- next();
- }
- }
-};
-
-module.exports = utils.deprecate(module.exports,
- 'staticCache: use varnish or similar reverse proxy caches');
-
-/**
- * Respond with the provided cached value.
- * TODO: Assume 200 code, that's iffy.
- *
- * @param {Object} req
- * @param {Object} res
- * @param {Object} cacheEntry
- * @return {String}
- * @api private
- */
-
-function respondFromCache(req, res, cacheEntry) {
- var status = cacheEntry[0]
- , headers = utils.merge({}, cacheEntry[1])
- , content = cacheEntry.slice(2);
-
- headers.age = (new Date - new Date(headers.date)) / 1000 || 0;
-
- switch (req.method) {
- case 'HEAD':
- res.writeHead(status, headers);
- res.end();
- break;
- case 'GET':
- if (fresh(req.headers, headers)) {
- headers['content-length'] = 0;
- res.writeHead(304, headers);
- res.end();
- } else {
- res.writeHead(status, headers);
-
- function write() {
- while (content.length) {
- if (false === res.write(content.shift())) {
- res.once('drain', write);
- return;
- }
- }
- res.end();
- }
-
- write();
- }
- break;
- default:
- // This should never happen.
- res.writeHead(500, '');
- res.end();
- }
-}
-
-/**
- * Determine whether or not a cached value must be revalidated.
- *
- * @param {Object} req
- * @param {Object} cacheEntry
- * @return {String}
- * @api private
- */
-
-function mustRevalidate(req, cacheEntry) {
- var cacheHeaders = cacheEntry[1]
- , reqCC = utils.parseCacheControl(req.headers['cache-control'] || '')
- , cacheCC = utils.parseCacheControl(cacheHeaders['cache-control'] || '')
- , cacheAge = (new Date - new Date(cacheHeaders.date)) / 1000 || 0;
-
- if ( cacheCC['no-cache']
- || cacheCC['must-revalidate']
- || cacheCC['proxy-revalidate']) return true;
-
- if (reqCC['no-cache']) return true;
-
- if (null != reqCC['max-age']) return reqCC['max-age'] < cacheAge;
-
- if (null != cacheCC['max-age']) return cacheCC['max-age'] < cacheAge;
-
- return false;
-}
-
-/**
- * The key to use in the cache. For now, this is the URL path and query.
- *
- * 'http://example.com?key=value' -> '/?key=value'
- *
- * @param {Object} req
- * @return {String}
- * @api private
- */
-
-function cacheKey(req) {
- return parseurl(req).path;
-}
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/timeout.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/timeout.js
deleted file mode 100644
index ec5edc3..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/timeout.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/*!
- * Connect - timeout
- * Ported from https://github.com/LearnBoost/connect-timeout
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var debug = require('debug')('connect:timeout');
-
-/**
- * Timeout:
- *
- * See [connect-timeout](https://github.com/expressjs/timeout)
- *
- * @param {Number} ms
- * @return {Function}
- * @api public
- */
-
-module.exports = require('connect-timeout');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/urlencoded.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/urlencoded.js
deleted file mode 100644
index cf6dd79..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/urlencoded.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*!
- * Connect - urlencoded
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var bodyParser = require('body-parser');
-var utils = require('../utils');
-
-/**
- * Urlencoded:
- *
- * See [body-parser](https://github.com/expressjs/body-parser)
- *
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-module.exports = function urlencoded(options) {
- var opts = utils.merge({
- limit: '1mb'
- }, options);
-
- // back-compat verify function
- if (typeof opts.verify === 'function') {
- opts.verify = convertVerify(opts.verify);
- }
-
- return bodyParser.urlencoded(opts);
-};
-
-/**
- * Convert old verify signature to body-parser version.
- *
- * @param {Function} verify
- * @return {Function}
- * @api private
- */
-
-function convertVerify(verify) {
- return function (req, res, buf, encoding) {
- verify(req, res, buf.toString(encoding));
- };
-}
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/vhost.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/vhost.js
deleted file mode 100644
index e193bd6..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/vhost.js
+++ /dev/null
@@ -1,20 +0,0 @@
-
-/*!
- * Connect - vhost
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Vhost:
- *
- * See [vhost](https://github.com/expressjs/vhost)
- *
- * @param {String} hostname
- * @param {Server} server
- * @return {Function}
- * @api public
- */
-
-module.exports = require('vhost');
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/patch.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/patch.js
deleted file mode 100644
index f4179d9..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/patch.js
+++ /dev/null
@@ -1,157 +0,0 @@
-
-/*!
- * Connect
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var cookie = require('cookie');
-var http = require('http');
-var onHeaders = require('on-headers');
-var utils = require('./utils')
- , res = http.ServerResponse.prototype
- , addListener = res.addListener
- , setHeader = res.setHeader;
-
-/**
- * Deprecated proxy for .on('header', ...)
- */
-
-var attachHeaderListener = utils.deprecate(onHeaders,
- 'res.on("header"): use on-headers module directly');
-
-// apply only once
-
-if (!res._hasConnectPatch) {
-
- /**
- * Provide a public "header sent" flag
- * until node does.
- *
- * @return {Boolean}
- * @api public
- */
-
- Object.defineProperty(res, 'headerSent', {
- configurable: true,
- enumerable: true,
- get: utils.deprecate(headersSent, 'res.headerSent: use standard res.headersSent')
- });
-
- if (!('headersSent' in res)) {
-
- /**
- * Provide the public "header sent" flag
- * added in node.js 0.10.
- *
- * @return {Boolean}
- * @api public
- */
-
- Object.defineProperty(res, 'headersSent', {
- configurable: true,
- enumerable: true,
- get: headersSent
- });
-
- }
-
- /**
- * Set cookie `name` to `val`, with the given `options`.
- *
- * Options:
- *
- * - `maxAge` max-age in milliseconds, converted to `expires`
- * - `path` defaults to "/"
- *
- * @param {String} name
- * @param {String} val
- * @param {Object} options
- * @api public
- */
-
- res.cookie = function(name, val, options){
- options = utils.merge({}, options);
- if ('maxAge' in options) {
- options.expires = new Date(Date.now() + options.maxAge);
- options.maxAge /= 1000;
- }
- if (null == options.path) options.path = '/';
- this.setHeader('Set-Cookie', cookie.serialize(name, String(val), options));
- };
-
- /**
- * Append additional header `field` with value `val`.
- *
- * @param {String} field
- * @param {String} val
- * @api public
- */
-
- res.appendHeader = function appendHeader(field, val){
- var prev = this.getHeader(field);
-
- if (!prev) return setHeader.call(this, field, val);
-
- // concat the new and prev vals
- val = Array.isArray(prev) ? prev.concat(val)
- : Array.isArray(val) ? [prev].concat(val)
- : [prev, val];
-
- return setHeader.call(this, field, val);
- };
-
- /**
- * Set header `field` to `val`, special-casing
- * the `Set-Cookie` field for multiple support.
- *
- * @param {String} field
- * @param {String} val
- * @api public
- */
-
- res.setHeader = function(field, val){
- var key = field.toLowerCase()
- , prev;
-
- // special-case Set-Cookie
- if ('set-cookie' == key) return this.appendHeader(field, val);
-
- // charset
- if ('content-type' == key && this.charset) {
- val = utils.setCharset(val, this.charset, true);
- }
-
- return setHeader.call(this, field, val);
- };
-
- /**
- * Proxy to emit "header" event.
- */
-
- res.on = function(type, listener){
- if (type === 'header') {
- attachHeaderListener(this, listener);
- return this;
- }
-
- return addListener.apply(this, arguments);
- };
-
- res._hasConnectPatch = true;
-}
-
-/**
- * Determine if headers sent.
- *
- * @return {Boolean}
- * @api private
- */
-
-function headersSent(){
- return Boolean(this._header);
-}
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/proto.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/proto.js
deleted file mode 100644
index cd0ee57..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/proto.js
+++ /dev/null
@@ -1,234 +0,0 @@
-/*!
- * Connect - HTTPServer
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var escapeHtml = require('escape-html');
-var http = require('http')
- , parseurl = require('parseurl')
- , debug = require('debug')('connect:dispatcher');
-
-// prototype
-
-var app = module.exports = {};
-
-// environment
-
-var env = process.env.NODE_ENV || 'development';
-
-/**
- * Utilize the given middleware `handle` to the given `route`,
- * defaulting to _/_. This "route" is the mount-point for the
- * middleware, when given a value other than _/_ the middleware
- * is only effective when that segment is present in the request's
- * pathname.
- *
- * For example if we were to mount a function at _/admin_, it would
- * be invoked on _/admin_, and _/admin/settings_, however it would
- * not be invoked for _/_, or _/posts_.
- *
- * Examples:
- *
- * var app = connect();
- * app.use(connect.favicon());
- * app.use(connect.logger());
- * app.use(connect.static(__dirname + '/public'));
- *
- * If we wanted to prefix static files with _/public_, we could
- * "mount" the `static()` middleware:
- *
- * app.use('/public', connect.static(__dirname + '/public'));
- *
- * This api is chainable, so the following is valid:
- *
- * connect()
- * .use(connect.favicon())
- * .use(connect.logger())
- * .use(connect.static(__dirname + '/public'))
- * .listen(3000);
- *
- * @param {String|Function|Server} route, callback or server
- * @param {Function|Server} callback or server
- * @return {Server} for chaining
- * @api public
- */
-
-app.use = function(route, fn){
- // default route to '/'
- if ('string' != typeof route) {
- fn = route;
- route = '/';
- }
-
- // wrap sub-apps
- if ('function' == typeof fn.handle) {
- var server = fn;
- fn.route = route;
- fn = function(req, res, next){
- server.handle(req, res, next);
- };
- }
-
- // wrap vanilla http.Servers
- if (fn instanceof http.Server) {
- fn = fn.listeners('request')[0];
- }
-
- // strip trailing slash
- if ('/' == route[route.length - 1]) {
- route = route.slice(0, -1);
- }
-
- // add the middleware
- debug('use %s %s', route || '/', fn.name || 'anonymous');
- this.stack.push({ route: route, handle: fn });
-
- return this;
-};
-
-/**
- * Handle server requests, punting them down
- * the middleware stack.
- *
- * @api private
- */
-
-app.handle = function(req, res, out) {
- var stack = this.stack
- , search = 1 + req.url.indexOf('?')
- , pathlength = search ? search - 1 : req.url.length
- , fqdn = 1 + req.url.substr(0, pathlength).indexOf('://')
- , protohost = fqdn ? req.url.substr(0, req.url.indexOf('/', 2 + fqdn)) : ''
- , removed = ''
- , slashAdded = false
- , index = 0;
-
- function next(err) {
- var layer, path, c;
-
- if (slashAdded) {
- req.url = req.url.substr(1);
- slashAdded = false;
- }
-
- req.url = protohost + removed + req.url.substr(protohost.length);
- req.originalUrl = req.originalUrl || req.url;
- removed = '';
-
- // next callback
- layer = stack[index++];
-
- // all done
- if (!layer) {
- // delegate to parent
- if (out) return out(err);
-
- // unhandled error
- if (err) {
- // default to 500
- if (res.statusCode < 400) res.statusCode = 500;
- debug('default %s', res.statusCode);
-
- // respect err.status
- if (err.status) res.statusCode = err.status;
-
- // production gets a basic error message
- var msg = 'production' == env
- ? http.STATUS_CODES[res.statusCode]
- : err.stack || err.toString();
- msg = escapeHtml(msg);
-
- // log to stderr in a non-test env
- if ('test' != env) console.error(err.stack || err.toString());
- if (res.headersSent) return req.socket.destroy();
- res.setHeader('Content-Type', 'text/html');
- res.setHeader('Content-Length', Buffer.byteLength(msg));
- if ('HEAD' == req.method) return res.end();
- res.end(msg);
- } else if (!res.headersSent) {
- debug('default 404');
- res.statusCode = 404;
- res.setHeader('Content-Type', 'text/html');
- if ('HEAD' == req.method) return res.end();
- res.end('Cannot ' + escapeHtml(req.method) + ' ' + escapeHtml(req.originalUrl) + '\n');
- }
- return;
- }
-
- try {
- path = parseurl(req).pathname;
- if (undefined == path) path = '/';
-
- // skip this layer if the route doesn't match.
- if (0 != path.toLowerCase().indexOf(layer.route.toLowerCase())) return next(err);
-
- c = path[layer.route.length];
- if (c && '/' != c && '.' != c) return next(err);
-
- // Call the layer handler
- // Trim off the part of the url that matches the route
- removed = layer.route;
- req.url = protohost + req.url.substr(protohost.length + removed.length);
-
- // Ensure leading slash
- if (!fqdn && '/' != req.url[0]) {
- req.url = '/' + req.url;
- slashAdded = true;
- }
-
- debug('%s %s : %s', layer.handle.name || 'anonymous', layer.route, req.originalUrl);
- var arity = layer.handle.length;
- if (err) {
- if (arity === 4) {
- layer.handle(err, req, res, next);
- } else {
- next(err);
- }
- } else if (arity < 4) {
- layer.handle(req, res, next);
- } else {
- next();
- }
- } catch (e) {
- next(e);
- }
- }
- next();
-};
-
-/**
- * Listen for connections.
- *
- * This method takes the same arguments
- * as node's `http.Server#listen()`.
- *
- * HTTP and HTTPS:
- *
- * If you run your application both as HTTP
- * and HTTPS you may wrap them individually,
- * since your Connect "server" is really just
- * a JavaScript `Function`.
- *
- * var connect = require('connect')
- * , http = require('http')
- * , https = require('https');
- *
- * var app = connect();
- *
- * http.createServer(app).listen(80);
- * https.createServer(options, app).listen(443);
- *
- * @return {http.Server}
- * @api public
- */
-
-app.listen = function(){
- var server = http.createServer(this);
- return server.listen.apply(server, arguments);
-};
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/public/favicon.ico b/node_modules/grunt-contrib-connect/node_modules/connect/lib/public/favicon.ico
deleted file mode 100644
index 895fc96..0000000
Binary files a/node_modules/grunt-contrib-connect/node_modules/connect/lib/public/favicon.ico and /dev/null differ
diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/lib/utils.js b/node_modules/grunt-contrib-connect/node_modules/connect/lib/utils.js
deleted file mode 100644
index b16c45c..0000000
--- a/node_modules/grunt-contrib-connect/node_modules/connect/lib/utils.js
+++ /dev/null
@@ -1,474 +0,0 @@
-
-/*!
- * Connect - utils
- * Copyright(c) 2010 Sencha Inc.
- * Copyright(c) 2011 TJ Holowaychuk
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var http = require('http')
- , crypto = require('crypto')
- , parseurl = require('parseurl')
- , sep = require('path').sep
- , signature = require('cookie-signature')
- , typeis = require('type-is')
- , deprecate = require('util').deprecate
- , nodeVersion = process.versions.node.split('.');
-
-/**
- * Simple detection of charset parameter in content-type
- */
-var charsetRegExp = /;\s*charset\s*=/;
-
-/**
- * pause is broken in node < 0.10
- */
-exports.brokenPause = parseInt(nodeVersion[0], 10) === 0
- && parseInt(nodeVersion[1], 10) < 10;
-
-
-/**
- * Deprecate function, like core `util.deprecate`,
- * but with NODE_ENV and color support.
- *
- * @param {Function} fn
- * @param {String} msg
- * @return {Function}
- * @api private
- */
-
-exports.deprecate = function(fn, msg){
- if (process.env.NODE_ENV === 'test') return fn;
-
- // prepend module name
- msg = 'connect: ' + msg;
-
- if (process.stderr.isTTY) {
- // colorize
- msg = '\x1b[31;1m' + msg + '\x1b[0m';
- }
-
- return deprecate(fn, msg);
-};
-
-/**
- * Return `true` if the request has a body, otherwise return `false`.
- *
- * @param {IncomingMessage} req
- * @return {Boolean}
- * @api private
- */
-
-exports.hasBody = exports.deprecate(typeis.hasBody,
- 'utils.hasBody: use type-is module directly');
-
-/**
- * Extract the mime type from the given request's
- * _Content-Type_ header.
- *
- * @param {IncomingMessage} req
- * @return {String}
- * @api private
- */
-
-exports.mime = function(req) {
- var str = req.headers['content-type'] || ''
- , i = str.indexOf(';');
- return ~i ? str.slice(0, i) : str;
-};
-
-exports.mime = exports.deprecate(exports.mime,
- 'utils.mime: use type-is directly for mime comparisons');
-
-/**
- * Generate an `Error` from the given status `code`
- * and optional `msg`.
- *
- * @param {Number} code
- * @param {String} msg
- * @return {Error}
- * @api private
- */
-
-exports.error = function(code, msg){
- var err = new Error(msg || http.STATUS_CODES[code]);
- err.status = code;
- return err;
-};
-
-/**
- * Return md5 hash of the given string and optional encoding,
- * defaulting to hex.
- *
- * utils.md5('wahoo');
- * // => "e493298061761236c96b02ea6aa8a2ad"
- *
- * @param {String} str
- * @param {String} encoding
- * @return {String}
- * @api private
- */
-
-exports.md5 = function(str, encoding){
- return crypto
- .createHash('md5')
- .update(str, 'utf8')
- .digest(encoding || 'hex');
-};
-
-exports.md5 = exports.deprecate(exports.md5,
- 'utils.md5: use crypto directly for hashing');
-
-/**
- * Merge object b with object a.
- *
- * var a = { foo: 'bar' }
- * , b = { bar: 'baz' };
- *
- * utils.merge(a, b);
- * // => { foo: 'bar', bar: 'baz' }
- *
- * @param {Object} a
- * @param {Object} b
- * @return {Object}
- * @api private
- */
-
-exports.merge = function(a, b){
- if (a && b) {
- for (var key in b) {
- a[key] = b[key];
- }
- }
- return a;
-};
-
-/**
- * Escape the given string of `html`.
- *
- * @param {String} html
- * @return {String}
- * @api private
- */
-
-exports.escape = function(html){
- return String(html)
- .replace(/&(?!\w+;)/g, '&')
- .replace(//g, '>')
- .replace(/"/g, '"');
-};
-
-exports.escape = exports.deprecate(exports.escape,
- 'utils.escape: use escape-html module directly');
-
-/**
- * Sign the given `val` with `secret`.
- *
- * @param {String} val
- * @param {String} secret
- * @return {String}
- * @api private
- */
-
-exports.sign = exports.deprecate(signature.sign,
- 'utils.sign: use cookie-signature module directly');
-
-/**
- * Unsign and decode the given `val` with `secret`,
- * returning `false` if the signature is invalid.
- *
- * @param {String} val
- * @param {String} secret
- * @return {String|Boolean}
- * @api private
- */
-
-exports.unsign = exports.deprecate(signature.unsign,
- 'utils.unsign: use cookie-signature module directly');
-
-/**
- * Parse signed cookies, returning an object
- * containing the decoded key/value pairs,
- * while removing the signed key from `obj`.
- *
- * @param {Object} obj
- * @return {Object}
- * @api private
- */
-
-exports.parseSignedCookies = function(obj, secret){
- var ret = {};
- Object.keys(obj).forEach(function(key){
- var val = obj[key];
- if (0 == val.indexOf('s:')) {
- val = signature.unsign(val.slice(2), secret);
- if (val) {
- ret[key] = val;
- delete obj[key];
- }
- }
- });
- return ret;
-};
-
-exports.parseSignedCookies = exports.deprecate(exports.parseSignedCookies,
- 'utils.parseSignedCookies: this private api moved with cookie-parser');
-
-/**
- * Parse a signed cookie string, return the decoded value
- *
- * @param {String} str signed cookie string
- * @param {String} secret
- * @return {String} decoded value
- * @api private
- */
-
-exports.parseSignedCookie = function(str, secret){
- return 0 == str.indexOf('s:')
- ? signature.unsign(str.slice(2), secret)
- : str;
-};
-
-/**
- * Parse JSON cookies.
- *
- * @param {Object} obj
- * @return {Object}
- * @api private
- */
-
-exports.parseJSONCookies = function(obj){
- Object.keys(obj).forEach(function(key){
- var val = obj[key];
- var res = exports.parseJSONCookie(val);
- if (res) obj[key] = res;
- });
- return obj;
-};
-
-exports.parseJSONCookies = exports.deprecate(exports.parseJSONCookies,
- 'utils.parseJSONCookies: this private api moved with cookie-parser');
-
-/**
- * Parse JSON cookie string
- *
- * @param {String} str
- * @return {Object} Parsed object or null if not json cookie
- * @api private
- */
-
-exports.parseJSONCookie = function(str) {
- if (0 == str.indexOf('j:')) {
- try {
- return JSON.parse(str.slice(2));
- } catch (err) {
- // no op
- }
- }
-};
-
-/**
- * Pause `data` and `end` events on the given `obj`.
- * Middleware performing async tasks _should_ utilize
- * this utility (or similar), to re-emit data once
- * the async operation has completed, otherwise these
- * events may be lost. Pause is only required for
- * node versions less than 10, and is replaced with
- * noop's otherwise.
- *
- * var pause = utils.pause(req);
- * fs.readFile(path, function(){
- * next();
- * pause.resume();
- * });
- *
- * @param {Object} obj
- * @return {Object}
- * @api private
- */
-
-exports.pause = exports.brokenPause
- ? require('pause')
- : function () {
- return {
- end: noop,
- resume: noop
- }
- }
-
-/**
- * Strip `Content-*` headers from `res`.
- *
- * @param {ServerResponse} res
- * @api private
- */
-
-exports.removeContentHeaders = function(res){
- if (!res._headers) return;
- Object.keys(res._headers).forEach(function(field){
- if (0 == field.indexOf('content')) {
- res.removeHeader(field);
- }
- });
-};
-
-exports.removeContentHeaders = exports.deprecate(exports.removeContentHeaders,
- 'utils.removeContentHeaders: this private api moved with serve-static');
-
-/**
- * Check if `req` is a conditional GET request.
- *
- * @param {IncomingMessage} req
- * @return {Boolean}
- * @api private
- */
-
-exports.conditionalGET = function(req) {
- return req.headers['if-modified-since']
- || req.headers['if-none-match'];
-};
-
-exports.conditionalGET = exports.deprecate(exports.conditionalGET,
- 'utils.conditionalGET: use fresh module directly');
-
-/**
- * Respond with 401 "Unauthorized".
- *
- * @param {ServerResponse} res
- * @param {String} realm
- * @api private
- */
-
-exports.unauthorized = function(res, realm) {
- res.statusCode = 401;
- res.setHeader('WWW-Authenticate', 'Basic realm="' + realm + '"');
- res.end('Unauthorized');
-};
-
-exports.unauthorized = exports.deprecate(exports.unauthorized,
- 'utils.unauthorized: this private api moved with basic-auth-connect');
-
-/**
- * Respond with 304 "Not Modified".
- *
- * @param {ServerResponse} res
- * @param {Object} headers
- * @api private
- */
-
-exports.notModified = function(res) {
- exports.removeContentHeaders(res);
- res.statusCode = 304;
- res.end();
-};
-
-exports.notModified = exports.deprecate(exports.notModified,
- 'utils.notModified: this private api moved with serve-static');
-
-/**
- * Return an ETag in the form of `"views: ' + sess.views + '
') - res.write('expires in: ' + (sess.cookie.maxAge / 1000) + 's
') - res.end() - } else { - sess.views = 1 - res.end('welcome to the session demo. refresh!') - } -}) -``` - -#### Session.regenerate() - -To regenerate the session simply invoke the method, once complete -a new SID and `Session` instance will be initialized at `req.session`. - -```js -req.session.regenerate(function(err) { - // will have a new session here -}) -``` - -#### Session.destroy() - -Destroys the session, removing `req.session`, will be re-generated next request. - -```js -req.session.destroy(function(err) { - // cannot access session here -}) -``` - -#### Session.reload() - -Reloads the session data. - -```js -req.session.reload(function(err) { - // session updated -}) -``` - -#### Session.save() - -```js -req.session.save(function(err) { - // session saved -}) -``` - -#### Session.touch() - -Updates the `.maxAge` property. Typically this is -not necessary to call, as the session middleware does this for you. - -### req.session.cookie - -Each session has a unique cookie object accompany it. This allows -you to alter the session cookie per visitor. For example we can -set `req.session.cookie.expires` to `false` to enable the cookie -to remain for only the duration of the user-agent. - -#### Cookie.maxAge - -Alternatively `req.session.cookie.maxAge` will return the time -remaining in milliseconds, which we may also re-assign a new value -to adjust the `.expires` property appropriately. The following -are essentially equivalent - -```js -var hour = 3600000 -req.session.cookie.expires = new Date(Date.now() + hour) -req.session.cookie.maxAge = hour -``` - -For example when `maxAge` is set to `60000` (one minute), and 30 seconds -has elapsed it will return `30000` until the current request has completed, -at which time `req.session.touch()` is called to reset `req.session.maxAge` -to its original value. - -```js -req.session.cookie.maxAge // => 30000 -``` - -## Session Store Implementation - -Every session store _must_ implement the following methods - - - `.get(sid, callback)` - - `.set(sid, session, callback)` - - `.destroy(sid, callback)` - -Recommended methods include, but are not limited to: - - - `.length(callback)` - - `.clear(callback)` - -For an example implementation view the [connect-redis](http://github.com/visionmedia/connect-redis) repo. diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/index.js b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/index.js deleted file mode 100644 index bf311a7..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/index.js +++ /dev/null @@ -1,254 +0,0 @@ -/*! - * Connect - session - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var uid = require('uid2') - , onHeaders = require('on-headers') - , crc32 = require('buffer-crc32') - , parse = require('url').parse - , signature = require('cookie-signature') - , debug = require('debug')('session') - -var Session = require('./session/session') - , MemoryStore = require('./session/memory') - , Cookie = require('./session/cookie') - , Store = require('./session/store') - -// environment - -var env = process.env.NODE_ENV; - -/** - * Expose the middleware. - */ - -exports = module.exports = session; - -/** - * Expose constructors. - */ - -exports.Store = Store; -exports.Cookie = Cookie; -exports.Session = Session; -exports.MemoryStore = MemoryStore; - -/** - * Warning message for `MemoryStore` usage in production. - */ - -var warning = 'Warning: connect.session() MemoryStore is not\n' - + 'designed for a production environment, as it will leak\n' - + 'memory, and will not scale past a single process.'; - -/** - * Setup session store with the given `options`. - * - * See README.md for documentation of options and formatting. - * - * Session data is _not_ saved in the cookie itself, however cookies are used, - * so you must use the cookie-parser middleware _before_ `session()`. - * [https://github.com/expressjs/cookie-parser] - * - * @param {Object} options - * @return {Function} middleware - * @api public - */ - -function session(options){ - var options = options || {} - // name - previously "options.key" - , name = options.name || options.key || 'connect.sid' - , store = options.store || new MemoryStore - , cookie = options.cookie || {} - , trustProxy = options.proxy || false - , storeReady = true - , rollingSessions = options.rolling || false; - - // TODO: switch default to false on next major - var resaveSession = options.resave === undefined - ? true - : options.resave; - - // notify user that this store is not - // meant for a production environment - if ('production' == env && store instanceof MemoryStore) { - console.warn(warning); - } - - // generates the new session - store.generate = function(req){ - req.sessionID = uid(24); - req.session = new Session(req); - req.session.cookie = new Cookie(cookie); - }; - - store.on('disconnect', function(){ storeReady = false; }); - store.on('connect', function(){ storeReady = true; }); - - return function session(req, res, next) { - // self-awareness - if (req.session) return next(); - - // Handle connection as if there is no session if - // the store has temporarily disconnected etc - if (!storeReady) return debug('store is disconnected'), next(); - - // pathname mismatch - var originalPath = parse(req.originalUrl).pathname; - if (0 != originalPath.indexOf(cookie.path || '/')) return next(); - - // backwards compatibility for signed cookies - // req.secret is passed from the cookie parser middleware - var secret = options.secret || req.secret; - - // ensure secret is available or bail - if (!secret) throw new Error('`secret` option required for sessions'); - - var originalHash - , originalId; - - // expose store - req.sessionStore = store; - - // grab the session cookie value and check the signature - var rawCookie = req.cookies[name]; - - // get signedCookies for backwards compat with signed cookies - var unsignedCookie = req.signedCookies[name]; - - if (!unsignedCookie && rawCookie) { - unsignedCookie = (0 == rawCookie.indexOf('s:')) - ? signature.unsign(rawCookie.slice(2), secret) - : rawCookie; - } - - // set-cookie - onHeaders(res, function(){ - if (!req.session) { - debug('no session'); - return; - } - - var cookie = req.session.cookie - , proto = (req.headers['x-forwarded-proto'] || '').split(',')[0].toLowerCase().trim() - , tls = req.connection.encrypted || (trustProxy && 'https' == proto) - , isNew = unsignedCookie != req.sessionID; - - // only send secure cookies via https - if (cookie.secure && !tls) { - debug('not secured'); - return; - } - - // in case of rolling session, always reset the cookie - if (!rollingSessions) { - - // browser-session length cookie - if (null == cookie.expires) { - if (!isNew) { - debug('already set browser-session cookie'); - return - } - // compare hashes and ids - } else if (!isModified(req.session)) { - debug('unmodified session'); - return - } - - } - - var val = 's:' + signature.sign(req.sessionID, secret); - debug('set-cookie %s', val); - res.cookie(name, val, cookie.data); - }); - - // proxy end() to commit the session - var end = res.end; - res.end = function(data, encoding){ - res.end = end; - if (!req.session) return res.end(data, encoding); - req.session.resetMaxAge(); - - if (resaveSession || isModified(req.session)) { - debug('saving'); - return req.session.save(function(err){ - if (err) console.error(err.stack); - debug('saved'); - res.end(data, encoding); - }); - } - - res.end(data, encoding); - }; - - // generate the session - function generate() { - store.generate(req); - } - - // check if session has been modified - function isModified(sess) { - return originalHash != hash(sess) || originalId != sess.id; - } - - // get the sessionID from the cookie - req.sessionID = unsignedCookie; - - // generate a session if the browser doesn't send a sessionID - if (!req.sessionID) { - debug('no SID sent, generating session'); - generate(); - next(); - return; - } - - // generate the session object - debug('fetching %s', req.sessionID); - store.get(req.sessionID, function(err, sess){ - // error handling - if (err) { - debug('error %j', err); - if ('ENOENT' == err.code) { - generate(); - next(); - } else { - next(err); - } - // no session - } else if (!sess) { - debug('no session found'); - generate(); - next(); - // populate req.session - } else { - debug('session found'); - store.createSession(req, sess); - originalId = req.sessionID; - originalHash = hash(sess); - next(); - } - }); - }; -}; - -/** - * Hash the given `sess` object omitting changes to `.cookie`. - * - * @param {Object} sess - * @return {String} - * @api private - */ - -function hash(sess) { - return crc32.signed(JSON.stringify(sess, function(key, val){ - if ('cookie' != key) return val; - })); -} diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/node_modules/buffer-crc32/.npmignore b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/node_modules/buffer-crc32/.npmignore deleted file mode 100644 index b512c09..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/node_modules/buffer-crc32/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/node_modules/buffer-crc32/.travis.yml b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/node_modules/buffer-crc32/.travis.yml deleted file mode 100644 index 7a902e8..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/node_modules/buffer-crc32/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 -notifications: - email: - recipients: - - brianloveswords@gmail.com \ No newline at end of file diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/node_modules/buffer-crc32/README.md b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/node_modules/buffer-crc32/README.md deleted file mode 100644 index 0d9d8b8..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/node_modules/buffer-crc32/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# buffer-crc32 - -[](http://travis-ci.org/brianloveswords/buffer-crc32) - -crc32 that works with binary data and fancy character sets, outputs -buffer, signed or unsigned data and has tests. - -Derived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix - -# install -``` -npm install buffer-crc32 -``` - -# example -```js -var crc32 = require('buffer-crc32'); -// works with buffers -var buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]) -crc32(buf) // ->views: ' + sess.views + '
')\n res.write('expires in: ' + (sess.cookie.maxAge / 1000) + 's
')\n res.end()\n } else {\n sess.views = 1\n res.end('welcome to the session demo. refresh!')\n }\n})\n```\n\n#### Session.regenerate()\n\nTo regenerate the session simply invoke the method, once complete\na new SID and `Session` instance will be initialized at `req.session`.\n\n```js\nreq.session.regenerate(function(err) {\n // will have a new session here\n})\n```\n\n#### Session.destroy()\n\nDestroys the session, removing `req.session`, will be re-generated next request.\n\n```js\nreq.session.destroy(function(err) {\n // cannot access session here\n})\n```\n\n#### Session.reload()\n\nReloads the session data.\n\n```js\nreq.session.reload(function(err) {\n // session updated\n})\n```\n\n#### Session.save()\n\n```js\nreq.session.save(function(err) {\n // session saved\n})\n```\n\n#### Session.touch()\n\nUpdates the `.maxAge` property. Typically this is\nnot necessary to call, as the session middleware does this for you.\n\n### req.session.cookie\n\nEach session has a unique cookie object accompany it. This allows\nyou to alter the session cookie per visitor. For example we can\nset `req.session.cookie.expires` to `false` to enable the cookie\nto remain for only the duration of the user-agent.\n\n#### Cookie.maxAge\n\nAlternatively `req.session.cookie.maxAge` will return the time\nremaining in milliseconds, which we may also re-assign a new value\nto adjust the `.expires` property appropriately. The following\nare essentially equivalent\n\n```js\nvar hour = 3600000\nreq.session.cookie.expires = new Date(Date.now() + hour)\nreq.session.cookie.maxAge = hour\n```\n\nFor example when `maxAge` is set to `60000` (one minute), and 30 seconds\nhas elapsed it will return `30000` until the current request has completed,\nat which time `req.session.touch()` is called to reset `req.session.maxAge`\nto its original value.\n\n```js\nreq.session.cookie.maxAge // => 30000\n```\n\n## Session Store Implementation\n\nEvery session store _must_ implement the following methods\n\n - `.get(sid, callback)`\n - `.set(sid, session, callback)`\n - `.destroy(sid, callback)`\n\nRecommended methods include, but are not limited to:\n\n - `.length(callback)`\n - `.clear(callback)`\n\nFor an example implementation view the [connect-redis](http://github.com/visionmedia/connect-redis) repo.\n", - "readmeFilename": "README.md", - "description": "THIS REPOSITORY NEEDS A MAINTAINER. IF YOU'RE INTERESTED IN MAINTAINING THIS REPOSITORY, PLEASE LET US KNOW!", - "bugs": { - "url": "https://github.com/expressjs/session/issues" - }, - "homepage": "https://github.com/expressjs/session", - "_id": "express-session@1.2.1", - "_shasum": "2741a1661eb3a4a17a7db0a48049fbf05574e465", - "_from": "express-session@1.2.1", - "_resolved": "https://registry.npmjs.org/express-session/-/express-session-1.2.1.tgz" -} diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/session/cookie.js b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/session/cookie.js deleted file mode 100644 index 86591de..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/session/cookie.js +++ /dev/null @@ -1,128 +0,0 @@ - -/*! - * Connect - session - Cookie - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var merge = require('utils-merge') - , cookie = require('cookie'); - -/** - * Initialize a new `Cookie` with the given `options`. - * - * @param {IncomingMessage} req - * @param {Object} options - * @api private - */ - -var Cookie = module.exports = function Cookie(options) { - this.path = '/'; - this.maxAge = null; - this.httpOnly = true; - if (options) merge(this, options); - this.originalMaxAge = undefined == this.originalMaxAge - ? this.maxAge - : this.originalMaxAge; -}; - -/*! - * Prototype. - */ - -Cookie.prototype = { - - /** - * Set expires `date`. - * - * @param {Date} date - * @api public - */ - - set expires(date) { - this._expires = date; - this.originalMaxAge = this.maxAge; - }, - - /** - * Get expires `date`. - * - * @return {Date} - * @api public - */ - - get expires() { - return this._expires; - }, - - /** - * Set expires via max-age in `ms`. - * - * @param {Number} ms - * @api public - */ - - set maxAge(ms) { - this.expires = 'number' == typeof ms - ? new Date(Date.now() + ms) - : ms; - }, - - /** - * Get expires max-age in `ms`. - * - * @return {Number} - * @api public - */ - - get maxAge() { - return this.expires instanceof Date - ? this.expires.valueOf() - Date.now() - : this.expires; - }, - - /** - * Return cookie data object. - * - * @return {Object} - * @api private - */ - - get data() { - return { - originalMaxAge: this.originalMaxAge - , expires: this._expires - , secure: this.secure - , httpOnly: this.httpOnly - , domain: this.domain - , path: this.path - } - }, - - /** - * Return a serialized cookie string. - * - * @return {String} - * @api public - */ - - serialize: function(name, val){ - return cookie.serialize(name, val, this.data); - }, - - /** - * Return JSON representation of this cookie. - * - * @return {Object} - * @api private - */ - - toJSON: function(){ - return this.data; - } -}; diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/session/memory.js b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/session/memory.js deleted file mode 100644 index 9720b06..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/session/memory.js +++ /dev/null @@ -1,137 +0,0 @@ - -/*! - * Connect - session - MemoryStore - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Store = require('./store'); - -/** - * Shim setImmediate for node.js < 0.10 - */ - -var asyncTick = typeof setImmediate === 'function' - ? setImmediate - : process.nextTick; - -/** - * Initialize a new `MemoryStore`. - * - * @api public - */ - -var MemoryStore = module.exports = function MemoryStore() { - this.sessions = {}; -}; - -/** - * Inherit from `Store.prototype`. - */ - -MemoryStore.prototype.__proto__ = Store.prototype; - -/** - * Attempt to fetch session by the given `sid`. - * - * @param {String} sid - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.get = function(sid, fn){ - var self = this; - asyncTick(function(){ - var expires - , sess = self.sessions[sid]; - if (sess) { - sess = JSON.parse(sess); - expires = 'string' == typeof sess.cookie.expires - ? new Date(sess.cookie.expires) - : sess.cookie.expires; - if (!expires || new Date < expires) { - fn(null, sess); - } else { - self.destroy(sid, fn); - } - } else { - fn(); - } - }); -}; - -/** - * Commit the given `sess` object associated with the given `sid`. - * - * @param {String} sid - * @param {Session} sess - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.set = function(sid, sess, fn){ - var self = this; - asyncTick(function(){ - self.sessions[sid] = JSON.stringify(sess); - fn && fn(); - }); -}; - -/** - * Destroy the session associated with the given `sid`. - * - * @param {String} sid - * @api public - */ - -MemoryStore.prototype.destroy = function(sid, fn){ - var self = this; - asyncTick(function(){ - delete self.sessions[sid]; - fn && fn(); - }); -}; - -/** - * Invoke the given callback `fn` with all active sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.all = function(fn){ - var arr = [] - , keys = Object.keys(this.sessions); - for (var i = 0, len = keys.length; i < len; ++i) { - arr.push(this.sessions[keys[i]]); - } - fn(null, arr); -}; - -/** - * Clear all sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.clear = function(fn){ - this.sessions = {}; - fn && fn(); -}; - -/** - * Fetch number of sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.length = function(fn){ - fn(null, Object.keys(this.sessions).length); -}; diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/session/session.js b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/session/session.js deleted file mode 100644 index 891f31c..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/session/session.js +++ /dev/null @@ -1,116 +0,0 @@ - -/*! - * Connect - session - Session - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var merge = require('utils-merge') - -/** - * Create a new `Session` with the given request and `data`. - * - * @param {IncomingRequest} req - * @param {Object} data - * @api private - */ - -var Session = module.exports = function Session(req, data) { - Object.defineProperty(this, 'req', { value: req }); - Object.defineProperty(this, 'id', { value: req.sessionID }); - if ('object' == typeof data) merge(this, data); -}; - -/** - * Update reset `.cookie.maxAge` to prevent - * the cookie from expiring when the - * session is still active. - * - * @return {Session} for chaining - * @api public - */ - -Session.prototype.touch = function(){ - return this.resetMaxAge(); -}; - -/** - * Reset `.maxAge` to `.originalMaxAge`. - * - * @return {Session} for chaining - * @api public - */ - -Session.prototype.resetMaxAge = function(){ - this.cookie.maxAge = this.cookie.originalMaxAge; - return this; -}; - -/** - * Save the session data with optional callback `fn(err)`. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.save = function(fn){ - this.req.sessionStore.set(this.id, this, fn || function(){}); - return this; -}; - -/** - * Re-loads the session data _without_ altering - * the maxAge properties. Invokes the callback `fn(err)`, - * after which time if no exception has occurred the - * `req.session` property will be a new `Session` object, - * although representing the same session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.reload = function(fn){ - var req = this.req - , store = this.req.sessionStore; - store.get(this.id, function(err, sess){ - if (err) return fn(err); - if (!sess) return fn(new Error('failed to load session')); - store.createSession(req, sess); - fn(); - }); - return this; -}; - -/** - * Destroy `this` session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.destroy = function(fn){ - delete this.req.session; - this.req.sessionStore.destroy(this.id, fn); - return this; -}; - -/** - * Regenerate this request's session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.regenerate = function(fn){ - this.req.sessionStore.regenerate(this.req, fn); - return this; -}; diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/session/store.js b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/session/store.js deleted file mode 100644 index 54294cb..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/express-session/session/store.js +++ /dev/null @@ -1,84 +0,0 @@ - -/*! - * Connect - session - Store - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , Session = require('./session') - , Cookie = require('./cookie'); - -/** - * Initialize abstract `Store`. - * - * @api private - */ - -var Store = module.exports = function Store(options){}; - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Store.prototype.__proto__ = EventEmitter.prototype; - -/** - * Re-generate the given requests's session. - * - * @param {IncomingRequest} req - * @return {Function} fn - * @api public - */ - -Store.prototype.regenerate = function(req, fn){ - var self = this; - this.destroy(req.sessionID, function(err){ - self.generate(req); - fn(err); - }); -}; - -/** - * Load a `Session` instance via the given `sid` - * and invoke the callback `fn(err, sess)`. - * - * @param {String} sid - * @param {Function} fn - * @api public - */ - -Store.prototype.load = function(sid, fn){ - var self = this; - this.get(sid, function(err, sess){ - if (err) return fn(err); - if (!sess) return fn(); - var req = { sessionID: sid, sessionStore: self }; - sess = self.createSession(req, sess); - fn(null, sess); - }); -}; - -/** - * Create session from JSON `sess` data. - * - * @param {IncomingRequest} req - * @param {Object} sess - * @return {Session} - * @api private - */ - -Store.prototype.createSession = function(req, sess){ - var expires = sess.cookie.expires - , orig = sess.cookie.originalMaxAge; - sess.cookie = new Cookie(sess.cookie); - if ('string' == typeof expires) sess.cookie.expires = new Date(expires); - sess.cookie.originalMaxAge = orig; - req.session = new Session(req, sess); - return req.session; -}; diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/.npmignore b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/.npmignore deleted file mode 100644 index 9daeafb..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/History.md b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/History.md deleted file mode 100644 index 12e1b3e..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/History.md +++ /dev/null @@ -1,10 +0,0 @@ - -0.2.1 / 2014-01-29 -================== - - * fix: support max-age=0 for end-to-end revalidation - -0.2.0 / 2013-08-11 -================== - - * fix: return false for no-cache diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/Makefile b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/Makefile deleted file mode 100644 index 8e8640f..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --require should - -.PHONY: test \ No newline at end of file diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/Readme.md b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/Readme.md deleted file mode 100644 index 61366c5..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/Readme.md +++ /dev/null @@ -1,57 +0,0 @@ - -# node-fresh - - HTTP response freshness testing - -## fresh(req, res) - - Check freshness of `req` and `res` headers. - - When the cache is "fresh" __true__ is returned, - otherwise __false__ is returned to indicate that - the cache is now stale. - -## Example: - -```js -var req = { 'if-none-match': 'tobi' }; -var res = { 'etag': 'luna' }; -fresh(req, res); -// => false - -var req = { 'if-none-match': 'tobi' }; -var res = { 'etag': 'tobi' }; -fresh(req, res); -// => true -``` - -## Installation - -``` -$ npm install fresh -``` - -## License - -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/index.js b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/index.js deleted file mode 100644 index 9c3f47d..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/index.js +++ /dev/null @@ -1,53 +0,0 @@ - -/** - * Expose `fresh()`. - */ - -module.exports = fresh; - -/** - * Check freshness of `req` and `res` headers. - * - * When the cache is "fresh" __true__ is returned, - * otherwise __false__ is returned to indicate that - * the cache is now stale. - * - * @param {Object} req - * @param {Object} res - * @return {Boolean} - * @api public - */ - -function fresh(req, res) { - // defaults - var etagMatches = true; - var notModified = true; - - // fields - var modifiedSince = req['if-modified-since']; - var noneMatch = req['if-none-match']; - var lastModified = res['last-modified']; - var etag = res['etag']; - var cc = req['cache-control']; - - // unconditional request - if (!modifiedSince && !noneMatch) return false; - - // check for no-cache cache request directive - if (cc && cc.indexOf('no-cache') !== -1) return false; - - // parse if-none-match - if (noneMatch) noneMatch = noneMatch.split(/ *, */); - - // if-none-match - if (noneMatch) etagMatches = ~noneMatch.indexOf(etag) || '*' == noneMatch[0]; - - // if-modified-since - if (modifiedSince) { - modifiedSince = new Date(modifiedSince); - lastModified = new Date(lastModified); - notModified = lastModified <= modifiedSince; - } - - return !! (etagMatches && notModified); -} \ No newline at end of file diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/package.json b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/package.json deleted file mode 100644 index be323a9..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/fresh/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "fresh", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "description": "HTTP response freshness testing", - "version": "0.2.2", - "main": "index.js", - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/node-fresh.git" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/visionmedia/node-fresh/blob/master/Readme.md#license" - } - ], - "readme": "\n# node-fresh\n\n HTTP response freshness testing\n\n## fresh(req, res)\n\n Check freshness of `req` and `res` headers.\n\n When the cache is \"fresh\" __true__ is returned,\n otherwise __false__ is returned to indicate that\n the cache is now stale.\n\n## Example:\n\n```js\nvar req = { 'if-none-match': 'tobi' };\nvar res = { 'etag': 'luna' };\nfresh(req, res);\n// => false\n\nvar req = { 'if-none-match': 'tobi' };\nvar res = { 'etag': 'tobi' };\nfresh(req, res);\n// => true\n```\n\n## Installation\n\n```\n$ npm install fresh\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/node-fresh/issues" - }, - "homepage": "https://github.com/visionmedia/node-fresh", - "_id": "fresh@0.2.2", - "_shasum": "9731dcf5678c7faeb44fb903c4f72df55187fa77", - "_from": "fresh@0.2.2", - "_resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.2.tgz" -} diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/.npmignore b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/.npmignore deleted file mode 100644 index cd39b77..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -coverage/ -test/ -.travis.yml diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/History.md b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/History.md deleted file mode 100644 index c61f2cf..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/History.md +++ /dev/null @@ -1,37 +0,0 @@ -2.0.2 / 2014-06-05 -================== - - * use vary module for better `Vary` behavior - -2.0.1 / 2014-06-02 -================== - - * deps: methods@1.0.1 - -2.0.0 / 2014-06-01 -================== - - * Default behavior only checks `X-HTTP-Method-Override` header - * New interface, less magic - - Can specify what header to look for override in, if wanted - - Can specify custom function to get method from request - * Only `POST` requests are examined by default - * Remove `req.body` support for more standard query param support - - Use custom `getter` function if `req.body` support is needed - * Set `Vary` header when using built-in header checking - -1.0.2 / 2014-05-22 -================== - - * Handle `req.body` key referencing array or object - * Handle multiple HTTP headers - -1.0.1 / 2014-05-17 -================== - - * deps: pin dependency versions - -1.0.0 / 2014-03-03 -================== - - * Genesis from `connect` diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/README.md b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/README.md deleted file mode 100644 index cb8e37d..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/README.md +++ /dev/null @@ -1,161 +0,0 @@ -# method-override - -[](http://badge.fury.io/js/method-override) -[](https://travis-ci.org/expressjs/method-override) -[](https://coveralls.io/r/expressjs/method-override) - -Lets you use HTTP verbs such as PUT or DELETE in places where the client doesn't support it. - -## Install - -```sh -$ npm install method-override -``` - -## API - -**NOTE** It is very important that this module is used **before** any module that -needs to know the method of the request (for example, it _must_ be used prior to -the `csurf` module). - -### methodOverride(getter, options) - -Create a new middleware function to override the `req.method` property with a new -value. This value will be pulled from the provided `getter`. - -- `getter` - The getter to use to look up the overridden request method for the request. (default: `X-HTTP-Method-Override`) -- `options.methods` - The allowed methods the original request must be in to check for a method override value. (default: `['POST']`) - -If the found method is supported by node.js core, then `req.method` will be set to -this value, as if it has originally been that value. The previous `req.method` -value will be stored in `req.originalMethod`. - -#### getter - -This is the method of getting the override value from the request. If a function is provided, -the `req` is passed as the first argument, the `res as the second argument and the method is -expected to be returned. If a string is provided, the string is used to look up the method -with the following rules: - -- If the string starts with `X-`, then it is treated as the name of a header and that header - is used for the method override. If the request contains the same header multiple times, the - first occurrence is used. -- All other strings are treated as a key in the URL query string. - -#### options.methods - -This allows the specification of what methods(s) the request *MUST* be in in order to check for -the method override value. This defaults to only `POST` methods, which is the only method the -override should arrive in. More methods may be specified here, but it may introduce security -issues and cause weird behavior when requests travel through caches. This value is an array -of methods in upper-case. `null` can be specified to allow all methods. - -## Examples - -### override using a header - -To use a header to override the method, specify the header name -as a string argument to the `methodOverride` function. To then make -the call, send a `POST` request to a URL with the overridden method -as the value of that header. - -```js -var connect = require('connect') -var methodOverride = require('method-override') - -// override with the X-HTTP-Method-Override header in the request -app.use(methodOverride('X-HTTP-Method-Override')) -``` - -Example call with header override using `curl`: - -``` -curl -XPOST -H'X-HTTP-Method-Override: DELETE' --verbose http://localhost:3000/resource -> POST /resource HTTP/1.1 -> Host: localhost:3000 -> X-HTTP-Method-Override: DELETE -> -Cannot DELETE /resource -``` - -### override using a query value - -To use a query string value to override the method, specify the query -string key as a string argument to the `methodOverride` function. To -then make the call, send a `POST` request to a URL with the overridden -method as the value of that query string key. - -```js -var connect = require('connect') -var methodOverride = require('method-override') - -// override with POST having ?_method=DELETE -app.use(methodOverride('_method')) -``` - -Example call with query override using `curl`: - -``` -curl -XPOST --verbose http://localhost:3000/resource?_method=DELETE -> POST /resource?_method=DELETE HTTP/1.1 -> Host: localhost:3000 -> -Cannot DELETE /resource?_method=DELETE -``` - -### multiple format support - -```js -var connect = require('connect') -var methodOverride = require('method-override') - -// override with different headers; last one takes precedence -app.use(methodOverride('X-HTTP-Method')) // Microsoft -app.use(methodOverride('X-HTTP-Method-Override')) // Google/GData -app.use(methodOverride('X-Method-Override')) // IBM -``` - -### custom logic - -You can implement any kind of custom logic with a function for the `getter`. The following -implements the logic for looking in `req.body` that was in `method-override` 1: - -```js -var bodyParser = require('body-parser') -var connect = require('connect') -var methodOverride = require('method-override') - -app.use(bodyParser.urlencoded()) -app.use(methodOverride(function(req, res){ - if (req.body && typeof req.body === 'object' && '_method' in req.body) { - // look in urlencoded POST bodies and delete it - var method = req.body._method - delete req.body._method - return method - } -})) -``` - -## License - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/index.js b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/index.js deleted file mode 100644 index 0079857..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/index.js +++ /dev/null @@ -1,128 +0,0 @@ -/*! - * method-override - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var methods = require('methods'); -var parseurl = require('parseurl'); -var querystring = require('querystring'); -var vary = require('vary'); - -/** - * Method Override: - * - * Provides faux HTTP method support. - * - * Pass an optional `getter` to use when checking for - * a method override. - * - * A string is converted to a getter that will look for - * the method in `req.body[getter]` and a function will be - * called with `req` and expects the method to be returned. - * If the string starts with `X-` then it will look in - * `req.headers[getter]` instead. - * - * The original method is available via `req.originalMethod`. - * - * @param {string|function} [getter=X-HTTP-Method-Override] - * @param {object} [options] - * @return {function} - * @api public - */ - -module.exports = function methodOverride(getter, options){ - options = options || {} - - // get the getter fn - var get = typeof getter === 'function' - ? getter - : createGetter(getter || 'X-HTTP-Method-Override') - - // get allowed request methods to examine - var methods = options.methods === undefined - ? ['POST'] - : options.methods - - return function methodOverride(req, res, next) { - var method - var val - - req.originalMethod = req.originalMethod || req.method - - // validate request is on allowed method - if (methods && methods.indexOf(req.originalMethod) === -1) { - return next() - } - - val = get(req, res) - method = Array.isArray(val) - ? val[0] - : val - - // replace - if (method !== undefined && supports(method)) { - req.method = method.toUpperCase() - } - - next() - } -} - -/** - * Create a getter for the given string. - */ - -function createGetter(str) { - if (str.substr(0, 2).toUpperCase() === 'X-') { - // header getter - return createHeaderGetter(str) - } - - return createQueryGetter(str) -} - -/** - * Create a getter for the given query key name. - */ - -function createQueryGetter(key) { - return function(req, res) { - var url = parseurl(req) - var query = querystring.parse(url.query || '') - return query[key] - } -} - -/** - * Create a getter for the given header name. - */ - -function createHeaderGetter(str) { - var header = str.toLowerCase() - - return function(req, res) { - // set appropriate Vary header - vary(res, str) - - // multiple headers get joined with comma by node.js core - return (req.headers[header] || '').split(/ *, */) - } -} - -/** - * Check if node supports `method`. - */ - -function supports(method) { - return method - && typeof method === 'string' - && methods.indexOf(method.toLowerCase()) !== -1 -} diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/node_modules/methods/.npmignore b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/node_modules/methods/.npmignore deleted file mode 100644 index c2658d7..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/node_modules/methods/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/node_modules/methods/History.md b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/node_modules/methods/History.md deleted file mode 100644 index 12ab8c3..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/node_modules/methods/History.md +++ /dev/null @@ -1,15 +0,0 @@ - -1.0.1 / 2014-06-02 -================== - - * fix index.js to work with harmony transform - -1.0.0 / 2014-05-08 -================== - - * add PURGE. Closes #9 - -0.1.0 / 2013-10-28 -================== - - * add http.METHODS support diff --git a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/node_modules/methods/LICENSE b/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/node_modules/methods/LICENSE deleted file mode 100644 index 8bce401..0000000 --- a/node_modules/grunt-contrib-connect/node_modules/connect/node_modules/method-override/node_modules/methods/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2013-2014 TJ Holowaychuk| v0.2.11 | Allow source map generation, thanks to @jason0x43 | -
| v0.2.10 | Add flag to handle sigints and dump coverage, thanks to @samccone | -
| v0.2.9 | Fix #202 | -
| v0.2.8 | Upgrade esprima | -
| v0.2.7 |
|
-
| v0.2.6 |
|
-
| v0.2.5 |
|
-
| v0.2.4 |
|
-
| v0.2.3 |
|
-
| v0.2.2 | update escodegen, handlebars and resolve dependency versions |
| v0.2.1 |
|
-
| v0.2.0 |
|
| v0.1.46 | Fix #114 |
| v0.1.45 | Add teamcity reporter, thanks to @chrisgladd |
| v0.1.44 | Fix inconsistency in processing empty switch with latest esprima, up deps |
| v0.1.43 | Add colors to text report thanks to @runk |
| v0.1.42 | fix #78: embed source regression introduced in v0.1.38. Fix broken test for this |
| v0.1.41 | add json report to dump coverage object for certain use cases |
| v0.1.40 | forward sourceStore from lcov to html report, pull request by @vojtajina |
| v0.1.39 | add |
| v0.1.38 |
|
| v0.1.37 | --complete-copy flag contrib from @kami, correct strict mode semantics for instrumented functions |
| v0.1.36 | real quiet when --print=none specified, add repo URL to package.json, add contributors |
| v0.1.35 | accept cobertura contrib from @nbrownus, fix #52 |
| v0.1.34 | fix async reporting, update dependencies, accept html cleanup contrib from @mathiasbynens |
| v0.1.33 | initialize global coverage object before running tests to workaround mocha leak detection |
| v0.1.32 | Fix for null nodes in array expressions, add @unindented as contributor |
| v0.1.31 | Misc internal fixes and test changes |
| v0.1.30 | Write standard blurbs ("writing coverage object..." etc.) to stderr rather than stdout |
| v0.1.29 | Allow --post-require-hook to be a module that can be `require`-d |
| v0.1.28 | Add --post-require-hook switch to support use-cases similar to the YUI loader |
| v0.1.27 | Add --hook-run-in-context switch to support RequireJS modules. Thanks to @millermedeiros for the pull request |
| v0.1.26 | Add support for minimum uncovered unit for check-coverage. Fixes #25 |
| v0.1.25 | Allow for relative paths in the YUI loader hook |
| v0.1.24 | Add lcov summaries. Fixes issue #20 |
| v0.1.23 | Add ability to save a baseline coverage file for the instrument command. Fixes issue #19 |
| v0.1.22 | Add signature attribute to cobertura method tags to fix NPE by the Hudson publisher |
| v0.1.21 | Add cobertura XML report format; exprimental for now |
| v0.1.20 | Fix HTML/ lcov report interface to be more customizable for middleware needs |
| v0.1.19 | make all hooking non-destructive in that already loaded modules are never reloaded. Add self-test mode so that already loaded istanbul modules can be unloaded prior to hooking. |
| v0.1.18 | Add option to hook in non-destructive mode; i.e. the require cache is not unloaded when hooking |
| v0.1.17 | Export some more objects; undocumented for now |
| v0.1.16 | Fix npm keywords for istanbul which expects an array of strings but was being fed a single string with keywords instead |
| v0.1.15 | Add the 'check-coverage' command so that Istanbul can be used as a posttest script to enforce minimum coverage |
| v0.1.14 | Expose the experimental YUI load hook in the interface |
| v0.1.13 | Internal jshint cleanup, no features or fixes |
| v0.1.12 | Give npm the README that was getting inadvertently excluded |
| v0.1.11 | Merge pull request #14 for HTML tweaks. Thanks @davglass. Add @davglass and @nowamasa as contributors in `package.json` |
| v0.1.10 | Fix to issue #12. Do not install `uncaughtException` handler and pass input error back to CLI using a callback as opposed to throwing. |
| v0.1.9 | Attempt to create reporting directory again just before writing coverage in addition to initial creation |
| v0.1.8 | Fix issue #11. |
| v0.1.7 | Add text summary and detailed reporting available as --print [summary|detail|both|none]. summary is the default if nothing specified. |
| v0.1.6 | Handle backslashes in the file path correctly in emitted code. Fixes #9. Thanks to @nowamasa for bug report and fix |
| v0.1.5 | make object-utils.js work on a browser as-is |
| v0.1.4 | partial fix for issue #4; add titles to missing coverage spans, remove negative margin for missing if/else indicators |
| v0.1.3 | Set the environment variable running_under_istanbul to 1 when that is the case. This allows test runners that use istanbul as a library to back off on using it when set. |
| v0.1.2 | HTML reporting cosmetics. Reports now show syntax-colored JS using `prettify`. Summary tables no longer wrap in awkward places. |
| v0.1.1 | Fixes issue #1. HTML reports use sources embedded inside the file coverage objects if found rather than reading from the filesystem |
| v0.1.0 | Initial version |
npm test script for conditional coverage
-* instrumentation of files in batch mode for browser tests (using yeti for example)
-* Server side code coverage for nodejs by embedding it as custom middleware
-
-
-Ignoring code for coverage
---------------------------
-
-* Skip an `if` or `else` path with `/* istanbul ignore if */` or `/* istanbul ignore else */` respectively.
-* For all other cases, skip the next 'thing' in the source with: `/* istanbul ignore next */`
-
-See [ignoring-code-for-coverage.md](ignoring-code-for-coverage.md) for the spec.
-
-The command line
-----------------
-
- $ istanbul help
-
-gives you detailed help on all commands.
-
-Usage: istanbul help {{#show_code structured}}{{/show_code}}| File | ', - '', - ' | Statements | ', - '', - ' | Branches | ', - '', - ' | Functions | ', - '', - ' | Lines | ', - '', - ' |
|---|---|---|---|---|---|---|---|---|---|
| {{file}} | ', - '{{#show_picture}}{{metrics.statements.pct}}{{/show_picture}} | ', - '{{metrics.statements.pct}}% | ', - '({{metrics.statements.covered}} / {{metrics.statements.total}}) | ', - '{{metrics.branches.pct}}% | ', - '({{metrics.branches.covered}} / {{metrics.branches.total}}) | ', - '{{metrics.functions.pct}}% | ', - '({{metrics.functions.covered}} / {{metrics.functions.total}}) | ', - '{{metrics.lines.pct}}% | ', - '({{metrics.lines.covered}} / {{metrics.lines.total}}) | ', - '