From 881457f373a61feb21b5b3e33cadd5b6a3e06cbf Mon Sep 17 00:00:00 2001 From: Hatem Nassrat Date: Thu, 15 Nov 2012 08:22:49 -0400 Subject: [PATCH 1/4] Updating to latest node, npm and ejs versions. --- package.json | 10 ++++--- web.js | 74 +++++++++++++++++++++++++++------------------------- 2 files changed, 44 insertions(+), 40 deletions(-) diff --git a/package.json b/package.json index 827d5ae..47f46fa 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,14 @@ "dependencies": { "async": "0.1.18", - "ejs": "0.4.3", - "express": "2.4.6", - "faceplate": "0.0.4" + "express": "3.0.2", + "ejs": "0.8.3", + "faceplate": "0.0.4", + "socket.io": "*" }, "engines": { - "node": "0.6.x" + "node": "0.8.x", + "npm": "1.1.x" } } diff --git a/web.js b/web.js index 60ac004..873a4ee 100644 --- a/web.js +++ b/web.js @@ -1,46 +1,49 @@ -var async = require('async'); -var express = require('express'); -var util = require('util'); +var async = require('async') + , express = require('express') + , util = require('util') + , path = require('path') + , http = require('http'); + // create an express webserver -var app = express.createServer( - express.logger(), - express.static(__dirname + '/public'), - express.bodyParser(), - express.cookieParser(), +var app = express(); +app.configure(function(){ + app.set('port', process.env.PORT || 3000); + app.use(express.logger('dev')); + app.use(express.bodyParser()); + app.use(express.cookieParser()); + app.use(express.static(path.join(__dirname, 'public'))); // set this to a secret value to encrypt session cookies - express.session({ secret: process.env.SESSION_SECRET || 'secret123' }), - require('faceplate').middleware({ + app.use(express.session({ secret: process.env.SESSION_SECRET || 'secret123' })); + app.use(require('faceplate').middleware({ app_id: process.env.FACEBOOK_APP_ID, secret: process.env.FACEBOOK_SECRET, scope: 'user_likes,user_photos,user_photo_video_tags' - }) -); - -// listen to the PORT given to us in the environment -var port = process.env.PORT || 3000; - -app.listen(port, function() { - console.log("Listening on " + port); + })); + app.use(function(req, res, next) { + res.locals.host = req.headers['host']; + next(); + }); + app.use(function(req, res, next) { + res.locals.scheme = req.headers['x-forwarded-proto'] || 'http'; + next(); + }); + app.use(function(req, res, next) { + res.locals.url = function(path) { + return res.locals.scheme + res.locals.url_no_scheme(path); + }; + next(); + }); + app.use(function(req, res, next) { + res.locals.url_no_scheme = function(path) { + return '://' + res.locals.host + (path || ''); + }; + next(); + }); }); -app.dynamicHelpers({ - 'host': function(req, res) { - return req.headers['host']; - }, - 'scheme': function(req, res) { - return req.headers['x-forwarded-proto'] || 'http'; - }, - 'url': function(req, res) { - return function(path) { - return app.dynamicViewHelpers.scheme(req, res) + app.dynamicViewHelpers.url_no_scheme(req, res)(path); - } - }, - 'url_no_scheme': function(req, res) { - return function(path) { - return '://' + app.dynamicViewHelpers.host(req, res) + (path || ''); - } - }, +http.createServer(app).listen(app.get('port'), function(){ + console.log("Express server listening on port " + app.get('port')); }); function render_page(req, res) { @@ -57,7 +60,6 @@ function render_page(req, res) { } function handle_facebook_request(req, res) { - // if the user is logged in if (req.facebook.token) { From e4cae6be2743a6ec774887159ee31ebd9ed483b0 Mon Sep 17 00:00:00 2001 From: Hatem Nassrat Date: Thu, 15 Nov 2012 08:24:54 -0400 Subject: [PATCH 2/4] Removing node_modules directory. This is an `npm` dump ... a version control repo is no place for it. --- .gitignore | 1 + node_modules/.bin/express | 1 - node_modules/async/.gitmodules | 9 - node_modules/async/.npmignore | 4 - node_modules/async/LICENSE | 19 - node_modules/async/Makefile | 25 - node_modules/async/README.md | 1022 ----------- node_modules/async/index.js | 3 - node_modules/async/lib/async.js | 692 -------- node_modules/async/package.json | 21 - node_modules/ejs/.gitignore | 3 - node_modules/ejs/.gitmodules | 3 - node_modules/ejs/History.md | 70 - node_modules/ejs/Makefile | 19 - node_modules/ejs/Readme.md | 142 -- node_modules/ejs/benchmark.js | 14 - node_modules/ejs/examples/client.html | 5 - node_modules/ejs/examples/list.ejs | 7 - node_modules/ejs/examples/list.js | 16 - node_modules/ejs/index.js | 2 - node_modules/ejs/lib/ejs.js | 251 --- node_modules/ejs/lib/filters.js | 198 --- node_modules/ejs/lib/utils.js | 23 - node_modules/ejs/package.json | 8 - node_modules/ejs/support/compile.js | 173 -- node_modules/ejs/support/expresso/.gitignore | 3 - node_modules/ejs/support/expresso/.gitmodules | 3 - node_modules/ejs/support/expresso/History.md | 87 - node_modules/ejs/support/expresso/Makefile | 50 - node_modules/ejs/support/expresso/Readme.md | 39 - .../ejs/support/expresso/bin/expresso | 775 --------- .../ejs/support/expresso/docs/api.html | 989 ----------- .../ejs/support/expresso/docs/index.html | 380 ----- .../ejs/support/expresso/docs/index.md | 292 ---- .../support/expresso/docs/layout/foot.html | 3 - .../support/expresso/docs/layout/head.html | 47 - node_modules/ejs/support/expresso/lib/bar.js | 4 - node_modules/ejs/support/expresso/lib/foo.js | 16 - .../ejs/support/expresso/package.json | 9 - .../ejs/support/expresso/test/assert.test.js | 84 - .../ejs/support/expresso/test/async.test.js | 6 - .../ejs/support/expresso/test/bar.test.js | 12 - .../ejs/support/expresso/test/foo.test.js | 13 - .../ejs/support/expresso/test/http.test.js | 76 - node_modules/ejs/test/ejs.test.js | 268 --- node_modules/express/.npmignore | 7 - node_modules/express/History.md | 743 -------- node_modules/express/LICENSE | 22 - node_modules/express/Makefile | 35 - node_modules/express/Readme.md | 143 -- node_modules/express/bin/express | 417 ----- node_modules/express/index.js | 2 - node_modules/express/lib/express.js | 79 - node_modules/express/lib/http.js | 583 ------- node_modules/express/lib/https.js | 52 - node_modules/express/lib/request.js | 309 ---- node_modules/express/lib/response.js | 459 ----- node_modules/express/lib/router/collection.js | 53 - node_modules/express/lib/router/index.js | 398 ----- node_modules/express/lib/router/methods.js | 70 - node_modules/express/lib/router/route.js | 88 - node_modules/express/lib/utils.js | 139 -- node_modules/express/lib/view.js | 457 ----- node_modules/express/lib/view/partial.js | 40 - node_modules/express/lib/view/view.js | 209 --- .../express/node_modules/connect/.npmignore | 11 - .../express/node_modules/connect/LICENSE | 24 - .../express/node_modules/connect/index.js | 2 - .../express/node_modules/connect/lib/cache.js | 81 - .../node_modules/connect/lib/connect.js | 106 -- .../express/node_modules/connect/lib/http.js | 217 --- .../express/node_modules/connect/lib/https.js | 47 - .../express/node_modules/connect/lib/index.js | 46 - .../connect/lib/middleware/basicAuth.js | 93 - .../connect/lib/middleware/bodyParser.js | 196 --- .../connect/lib/middleware/compiler.js | 163 -- .../connect/lib/middleware/cookieParser.js | 46 - .../connect/lib/middleware/csrf.js | 105 -- .../connect/lib/middleware/directory.js | 222 --- .../connect/lib/middleware/errorHandler.js | 100 -- .../connect/lib/middleware/favicon.js | 76 - .../connect/lib/middleware/limit.js | 82 - .../connect/lib/middleware/logger.js | 299 ---- .../connect/lib/middleware/methodOverride.js | 38 - .../connect/lib/middleware/profiler.js | 100 -- .../connect/lib/middleware/query.js | 40 - .../connect/lib/middleware/responseTime.js | 34 - .../connect/lib/middleware/router.js | 379 ----- .../connect/lib/middleware/session.js | 346 ---- .../connect/lib/middleware/session/cookie.js | 126 -- .../connect/lib/middleware/session/memory.js | 131 -- .../connect/lib/middleware/session/session.js | 137 -- .../connect/lib/middleware/session/store.js | 87 - .../connect/lib/middleware/static.js | 225 --- .../connect/lib/middleware/staticCache.js | 175 -- .../connect/lib/middleware/vhost.js | 44 - .../express/node_modules/connect/lib/patch.js | 79 - .../connect/lib/public/directory.html | 75 - .../connect/lib/public/error.html | 13 - .../connect/lib/public/favicon.ico | Bin 1406 -> 0 bytes .../connect/lib/public/icons/page.png | Bin 635 -> 0 bytes .../connect/lib/public/icons/page_add.png | Bin 739 -> 0 bytes .../connect/lib/public/icons/page_attach.png | Bin 794 -> 0 bytes .../connect/lib/public/icons/page_code.png | Bin 818 -> 0 bytes .../connect/lib/public/icons/page_copy.png | Bin 663 -> 0 bytes .../connect/lib/public/icons/page_delete.png | Bin 740 -> 0 bytes .../connect/lib/public/icons/page_edit.png | Bin 807 -> 0 bytes .../connect/lib/public/icons/page_error.png | Bin 793 -> 0 bytes .../connect/lib/public/icons/page_excel.png | Bin 817 -> 0 bytes .../connect/lib/public/icons/page_find.png | Bin 879 -> 0 bytes .../connect/lib/public/icons/page_gear.png | Bin 833 -> 0 bytes .../connect/lib/public/icons/page_go.png | Bin 779 -> 0 bytes .../connect/lib/public/icons/page_green.png | Bin 621 -> 0 bytes .../connect/lib/public/icons/page_key.png | Bin 801 -> 0 bytes .../lib/public/icons/page_lightning.png | Bin 839 -> 0 bytes .../connect/lib/public/icons/page_link.png | Bin 830 -> 0 bytes .../lib/public/icons/page_paintbrush.png | Bin 813 -> 0 bytes .../connect/lib/public/icons/page_paste.png | Bin 703 -> 0 bytes .../connect/lib/public/icons/page_red.png | Bin 641 -> 0 bytes .../connect/lib/public/icons/page_refresh.png | Bin 858 -> 0 bytes .../connect/lib/public/icons/page_save.png | Bin 774 -> 0 bytes .../connect/lib/public/icons/page_white.png | Bin 294 -> 0 bytes .../lib/public/icons/page_white_acrobat.png | Bin 591 -> 0 bytes .../public/icons/page_white_actionscript.png | Bin 664 -> 0 bytes .../lib/public/icons/page_white_add.png | Bin 512 -> 0 bytes .../connect/lib/public/icons/page_white_c.png | Bin 587 -> 0 bytes .../lib/public/icons/page_white_camera.png | Bin 656 -> 0 bytes .../lib/public/icons/page_white_cd.png | Bin 666 -> 0 bytes .../lib/public/icons/page_white_code.png | Bin 603 -> 0 bytes .../lib/public/icons/page_white_code_red.png | Bin 587 -> 0 bytes .../public/icons/page_white_coldfusion.png | Bin 592 -> 0 bytes .../public/icons/page_white_compressed.png | Bin 724 -> 0 bytes .../lib/public/icons/page_white_copy.png | Bin 309 -> 0 bytes .../lib/public/icons/page_white_cplusplus.png | Bin 621 -> 0 bytes .../lib/public/icons/page_white_csharp.png | Bin 700 -> 0 bytes .../lib/public/icons/page_white_cup.png | Bin 639 -> 0 bytes .../lib/public/icons/page_white_database.png | Bin 579 -> 0 bytes .../lib/public/icons/page_white_delete.png | Bin 536 -> 0 bytes .../lib/public/icons/page_white_dvd.png | Bin 638 -> 0 bytes .../lib/public/icons/page_white_edit.png | Bin 618 -> 0 bytes .../lib/public/icons/page_white_error.png | Bin 623 -> 0 bytes .../lib/public/icons/page_white_excel.png | Bin 663 -> 0 bytes .../lib/public/icons/page_white_find.png | Bin 676 -> 0 bytes .../lib/public/icons/page_white_flash.png | Bin 582 -> 0 bytes .../lib/public/icons/page_white_freehand.png | Bin 639 -> 0 bytes .../lib/public/icons/page_white_gear.png | Bin 402 -> 0 bytes .../lib/public/icons/page_white_get.png | Bin 516 -> 0 bytes .../lib/public/icons/page_white_go.png | Bin 612 -> 0 bytes .../connect/lib/public/icons/page_white_h.png | Bin 603 -> 0 bytes .../public/icons/page_white_horizontal.png | Bin 296 -> 0 bytes .../lib/public/icons/page_white_key.png | Bin 616 -> 0 bytes .../lib/public/icons/page_white_lightning.png | Bin 669 -> 0 bytes .../lib/public/icons/page_white_link.png | Bin 614 -> 0 bytes .../lib/public/icons/page_white_magnify.png | Bin 554 -> 0 bytes .../lib/public/icons/page_white_medal.png | Bin 706 -> 0 bytes .../lib/public/icons/page_white_office.png | Bin 779 -> 0 bytes .../lib/public/icons/page_white_paint.png | Bin 688 -> 0 bytes .../public/icons/page_white_paintbrush.png | Bin 618 -> 0 bytes .../lib/public/icons/page_white_paste.png | Bin 620 -> 0 bytes .../lib/public/icons/page_white_php.png | Bin 538 -> 0 bytes .../lib/public/icons/page_white_picture.png | Bin 650 -> 0 bytes .../public/icons/page_white_powerpoint.png | Bin 588 -> 0 bytes .../lib/public/icons/page_white_put.png | Bin 523 -> 0 bytes .../lib/public/icons/page_white_ruby.png | Bin 626 -> 0 bytes .../lib/public/icons/page_white_stack.png | Bin 317 -> 0 bytes .../lib/public/icons/page_white_star.png | Bin 565 -> 0 bytes .../lib/public/icons/page_white_swoosh.png | Bin 634 -> 0 bytes .../lib/public/icons/page_white_text.png | Bin 342 -> 0 bytes .../public/icons/page_white_text_width.png | Bin 315 -> 0 bytes .../lib/public/icons/page_white_tux.png | Bin 668 -> 0 bytes .../lib/public/icons/page_white_vector.png | Bin 644 -> 0 bytes .../public/icons/page_white_visualstudio.png | Bin 702 -> 0 bytes .../lib/public/icons/page_white_width.png | Bin 309 -> 0 bytes .../lib/public/icons/page_white_word.png | Bin 651 -> 0 bytes .../lib/public/icons/page_white_world.png | Bin 734 -> 0 bytes .../lib/public/icons/page_white_wrench.png | Bin 613 -> 0 bytes .../lib/public/icons/page_white_zip.png | Bin 386 -> 0 bytes .../connect/lib/public/icons/page_word.png | Bin 777 -> 0 bytes .../connect/lib/public/icons/page_world.png | Bin 903 -> 0 bytes .../node_modules/connect/lib/public/style.css | 141 -- .../express/node_modules/connect/lib/utils.js | 451 ----- .../node_modules/formidable/..travis.yml.un~ | Bin 953 -> 0 bytes .../node_modules/formidable/.Readme.md.un~ | Bin 6414 -> 0 bytes .../node_modules/formidable/.npmignore | 4 - .../node_modules/formidable/.package.json.un~ | Bin 542 -> 0 bytes .../node_modules/formidable/.travis.yml | 4 - .../connect/node_modules/formidable/Makefile | 14 - .../connect/node_modules/formidable/Readme.md | 303 ---- .../connect/node_modules/formidable/TODO | 3 - .../benchmark/bench-multipart-parser.js | 70 - .../node_modules/formidable/example/post.js | 43 - .../node_modules/formidable/example/upload.js | 48 - .../connect/node_modules/formidable/index.js | 1 - .../formidable/lib/.incoming_form.js.un~ | Bin 12289 -> 0 bytes .../node_modules/formidable/lib/file.js | 61 - .../formidable/lib/incoming_form.js | 378 ----- .../node_modules/formidable/lib/index.js | 3 - .../formidable/lib/multipart_parser.js | 312 ---- .../formidable/lib/querystring_parser.js | 25 - .../node_modules/formidable/lib/util.js | 6 - .../node_modules/formidable/package.json | 22 - .../formidable/test/.common.js.un~ | Bin 1666 -> 0 bytes .../node_modules/formidable/test/.run.js.un~ | Bin 541 -> 0 bytes .../node_modules/formidable/test/common.js | 19 - .../test/fixture/file/funkyfilename.txt | 1 - .../formidable/test/fixture/file/plain.txt | 1 - .../http/no-filename/.generic.http.un~ | Bin 641 -> 0 bytes .../http/special-chars-in-filename/info.md | 3 - .../test/fixture/js/.no-filename.js.un~ | Bin 1147 -> 0 bytes .../js/.special-chars-in-filename.js.un~ | Bin 2129 -> 0 bytes .../formidable/test/fixture/js/no-filename.js | 3 - .../fixture/js/special-chars-in-filename.js | 21 - .../formidable/test/fixture/multipart.js | 72 - .../test/integration/.test-fixtures.js.un~ | Bin 30260 -> 0 bytes .../test/integration/test-fixtures.js | 89 - .../formidable/test/legacy/common.js | 24 - .../integration/test-multipart-parser.js | 80 - .../test/legacy/simple/test-file.js | 104 -- .../test/legacy/simple/test-incoming-form.js | 726 -------- .../legacy/simple/test-multipart-parser.js | 50 - .../legacy/simple/test-querystring-parser.js | 45 - .../legacy/system/test-multi-video-upload.js | 72 - .../node_modules/formidable/test/run.js | 2 - .../node_modules/formidable/test/tmp/.empty | 0 .../test/unit/.test-incoming-form.js.un~ | Bin 61302 -> 0 bytes .../test/unit/test-incoming-form.js | 63 - .../node_modules/formidable/tool/record.js | 47 - .../express/node_modules/connect/package.json | 25 - .../express/node_modules/connect/test.js | 52 - .../express/node_modules/mime/LICENSE | 19 - .../express/node_modules/mime/README.md | 63 - .../express/node_modules/mime/mime.js | 93 - .../express/node_modules/mime/package.json | 22 - .../express/node_modules/mime/test.js | 53 - .../node_modules/mime/types/mime.types | 1510 ----------------- .../node_modules/mime/types/node.types | 48 - .../express/node_modules/qs/.gitignore | 1 - .../express/node_modules/qs/.gitmodules | 6 - .../express/node_modules/qs/.travis.yml | 4 - .../express/node_modules/qs/History.md | 73 - node_modules/express/node_modules/qs/Makefile | 5 - .../express/node_modules/qs/Readme.md | 54 - .../express/node_modules/qs/benchmark.js | 17 - .../express/node_modules/qs/examples.js | 51 - node_modules/express/node_modules/qs/index.js | 2 - .../node_modules/qs/lib/querystring.js | 264 --- .../express/node_modules/qs/package.json | 16 - .../express/node_modules/qs/test/mocha.opts | 2 - .../express/node_modules/qs/test/parse.js | 167 -- .../express/node_modules/qs/test/stringify.js | 103 -- node_modules/express/package.json | 38 - node_modules/faceplate/.npmignore | 1 - node_modules/faceplate/README.md | 38 - node_modules/faceplate/index.js | 135 -- .../node_modules/b64url/lib/b64url.js | 26 - .../node_modules/b64url/package.json | 17 - .../faceplate/node_modules/b64url/readme.md | 10 - .../faceplate/node_modules/restler/.npmignore | 3 - .../node_modules/restler/MIT-LICENSE | 20 - .../faceplate/node_modules/restler/README.md | 210 --- .../node_modules/restler/bin/restler | 23 - .../faceplate/node_modules/restler/index.js | 1 - .../node_modules/restler/lib/multipartform.js | 203 --- .../node_modules/restler/lib/restler.js | 488 ------ .../node_modules/restler/package.json | 18 - .../node_modules/restler/test/all.js | 6 - .../node_modules/restler/test/restler.js | 672 -------- node_modules/faceplate/package.json | 18 - node_modules/socket_manager/index.js | 66 - 269 files changed, 1 insertion(+), 22090 deletions(-) delete mode 120000 node_modules/.bin/express delete mode 100644 node_modules/async/.gitmodules delete mode 100644 node_modules/async/.npmignore delete mode 100644 node_modules/async/LICENSE delete mode 100644 node_modules/async/Makefile delete mode 100644 node_modules/async/README.md delete mode 100644 node_modules/async/index.js delete mode 100644 node_modules/async/lib/async.js delete mode 100644 node_modules/async/package.json delete mode 100644 node_modules/ejs/.gitignore delete mode 100644 node_modules/ejs/.gitmodules delete mode 100644 node_modules/ejs/History.md delete mode 100644 node_modules/ejs/Makefile delete mode 100644 node_modules/ejs/Readme.md delete mode 100644 node_modules/ejs/benchmark.js delete mode 100644 node_modules/ejs/examples/client.html delete mode 100644 node_modules/ejs/examples/list.ejs delete mode 100644 node_modules/ejs/examples/list.js delete mode 100644 node_modules/ejs/index.js delete mode 100644 node_modules/ejs/lib/ejs.js delete mode 100644 node_modules/ejs/lib/filters.js delete mode 100644 node_modules/ejs/lib/utils.js delete mode 100644 node_modules/ejs/package.json delete mode 100644 node_modules/ejs/support/compile.js delete mode 100644 node_modules/ejs/support/expresso/.gitignore delete mode 100644 node_modules/ejs/support/expresso/.gitmodules delete mode 100644 node_modules/ejs/support/expresso/History.md delete mode 100644 node_modules/ejs/support/expresso/Makefile delete mode 100644 node_modules/ejs/support/expresso/Readme.md delete mode 100755 node_modules/ejs/support/expresso/bin/expresso delete mode 100644 node_modules/ejs/support/expresso/docs/api.html delete mode 100644 node_modules/ejs/support/expresso/docs/index.html delete mode 100644 node_modules/ejs/support/expresso/docs/index.md delete mode 100644 node_modules/ejs/support/expresso/docs/layout/foot.html delete mode 100644 node_modules/ejs/support/expresso/docs/layout/head.html delete mode 100644 node_modules/ejs/support/expresso/lib/bar.js delete mode 100644 node_modules/ejs/support/expresso/lib/foo.js delete mode 100644 node_modules/ejs/support/expresso/package.json delete mode 100644 node_modules/ejs/support/expresso/test/assert.test.js delete mode 100644 node_modules/ejs/support/expresso/test/async.test.js delete mode 100644 node_modules/ejs/support/expresso/test/bar.test.js delete mode 100644 node_modules/ejs/support/expresso/test/foo.test.js delete mode 100644 node_modules/ejs/support/expresso/test/http.test.js delete mode 100644 node_modules/ejs/test/ejs.test.js delete mode 100644 node_modules/express/.npmignore delete mode 100644 node_modules/express/History.md delete mode 100644 node_modules/express/LICENSE delete mode 100644 node_modules/express/Makefile delete mode 100644 node_modules/express/Readme.md delete mode 100755 node_modules/express/bin/express delete mode 100644 node_modules/express/index.js delete mode 100644 node_modules/express/lib/express.js delete mode 100644 node_modules/express/lib/http.js delete mode 100644 node_modules/express/lib/https.js delete mode 100644 node_modules/express/lib/request.js delete mode 100644 node_modules/express/lib/response.js delete mode 100644 node_modules/express/lib/router/collection.js delete mode 100644 node_modules/express/lib/router/index.js delete mode 100644 node_modules/express/lib/router/methods.js delete mode 100644 node_modules/express/lib/router/route.js delete mode 100644 node_modules/express/lib/utils.js delete mode 100644 node_modules/express/lib/view.js delete mode 100644 node_modules/express/lib/view/partial.js delete mode 100644 node_modules/express/lib/view/view.js delete mode 100644 node_modules/express/node_modules/connect/.npmignore delete mode 100644 node_modules/express/node_modules/connect/LICENSE delete mode 100644 node_modules/express/node_modules/connect/index.js delete mode 100644 node_modules/express/node_modules/connect/lib/cache.js delete mode 100644 node_modules/express/node_modules/connect/lib/connect.js delete mode 100644 node_modules/express/node_modules/connect/lib/http.js delete mode 100644 node_modules/express/node_modules/connect/lib/https.js delete mode 100644 node_modules/express/node_modules/connect/lib/index.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/basicAuth.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/bodyParser.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/compiler.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/cookieParser.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/csrf.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/directory.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/errorHandler.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/favicon.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/limit.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/logger.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/methodOverride.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/profiler.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/query.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/responseTime.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/router.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/session.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/session/cookie.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/session/memory.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/session/session.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/session/store.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/static.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/staticCache.js delete mode 100644 node_modules/express/node_modules/connect/lib/middleware/vhost.js delete mode 100644 node_modules/express/node_modules/connect/lib/patch.js delete mode 100644 node_modules/express/node_modules/connect/lib/public/directory.html delete mode 100644 node_modules/express/node_modules/connect/lib/public/error.html delete mode 100644 node_modules/express/node_modules/connect/lib/public/favicon.ico delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_add.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_attach.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_code.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_copy.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_delete.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_edit.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_error.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_excel.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_find.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_gear.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_go.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_green.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_key.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_link.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_paste.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_red.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_save.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_add.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_c.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_camera.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_cd.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_compressed.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_csharp.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_cup.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_database.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_delete.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_dvd.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_error.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_flash.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_go.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_h.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_horizontal.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_lightning.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_medal.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_paste.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_php.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_put.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_text.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_text_width.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_tux.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_vector.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_word.png delete mode 100755 node_modules/express/node_modules/connect/lib/public/icons/page_world.png delete mode 100644 node_modules/express/node_modules/connect/lib/public/style.css delete mode 100644 node_modules/express/node_modules/connect/lib/utils.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/..travis.yml.un~ delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/.Readme.md.un~ delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/.npmignore delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/.package.json.un~ delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/.travis.yml delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/Makefile delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/Readme.md delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/TODO delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/example/post.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/example/upload.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/index.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/lib/.incoming_form.js.un~ delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/lib/index.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/lib/util.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/package.json delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/.common.js.un~ delete mode 100755 node_modules/express/node_modules/connect/node_modules/formidable/test/.run.js.un~ delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/common.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/no-filename/.generic.http.un~ delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/.no-filename.js.un~ delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/.special-chars-in-filename.js.un~ delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/integration/.test-fixtures.js.un~ delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/common.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js delete mode 100755 node_modules/express/node_modules/connect/node_modules/formidable/test/run.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/tmp/.empty delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/unit/.test-incoming-form.js.un~ delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js delete mode 100644 node_modules/express/node_modules/connect/node_modules/formidable/tool/record.js delete mode 100644 node_modules/express/node_modules/connect/package.json delete mode 100644 node_modules/express/node_modules/connect/test.js delete mode 100644 node_modules/express/node_modules/mime/LICENSE delete mode 100644 node_modules/express/node_modules/mime/README.md delete mode 100644 node_modules/express/node_modules/mime/mime.js delete mode 100644 node_modules/express/node_modules/mime/package.json delete mode 100644 node_modules/express/node_modules/mime/test.js delete mode 100644 node_modules/express/node_modules/mime/types/mime.types delete mode 100644 node_modules/express/node_modules/mime/types/node.types delete mode 100644 node_modules/express/node_modules/qs/.gitignore delete mode 100644 node_modules/express/node_modules/qs/.gitmodules delete mode 100644 node_modules/express/node_modules/qs/.travis.yml delete mode 100644 node_modules/express/node_modules/qs/History.md delete mode 100644 node_modules/express/node_modules/qs/Makefile delete mode 100644 node_modules/express/node_modules/qs/Readme.md delete mode 100644 node_modules/express/node_modules/qs/benchmark.js delete mode 100644 node_modules/express/node_modules/qs/examples.js delete mode 100644 node_modules/express/node_modules/qs/index.js delete mode 100644 node_modules/express/node_modules/qs/lib/querystring.js delete mode 100644 node_modules/express/node_modules/qs/package.json delete mode 100644 node_modules/express/node_modules/qs/test/mocha.opts delete mode 100644 node_modules/express/node_modules/qs/test/parse.js delete mode 100644 node_modules/express/node_modules/qs/test/stringify.js delete mode 100644 node_modules/express/package.json delete mode 100644 node_modules/faceplate/.npmignore delete mode 100644 node_modules/faceplate/README.md delete mode 100644 node_modules/faceplate/index.js delete mode 100644 node_modules/faceplate/node_modules/b64url/lib/b64url.js delete mode 100644 node_modules/faceplate/node_modules/b64url/package.json delete mode 100644 node_modules/faceplate/node_modules/b64url/readme.md delete mode 100644 node_modules/faceplate/node_modules/restler/.npmignore delete mode 100644 node_modules/faceplate/node_modules/restler/MIT-LICENSE delete mode 100644 node_modules/faceplate/node_modules/restler/README.md delete mode 100755 node_modules/faceplate/node_modules/restler/bin/restler delete mode 100644 node_modules/faceplate/node_modules/restler/index.js delete mode 100644 node_modules/faceplate/node_modules/restler/lib/multipartform.js delete mode 100644 node_modules/faceplate/node_modules/restler/lib/restler.js delete mode 100644 node_modules/faceplate/node_modules/restler/package.json delete mode 100644 node_modules/faceplate/node_modules/restler/test/all.js delete mode 100644 node_modules/faceplate/node_modules/restler/test/restler.js delete mode 100644 node_modules/faceplate/package.json delete mode 100644 node_modules/socket_manager/index.js diff --git a/.gitignore b/.gitignore index 4c49bd7..2d7ec5c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .env +node_modules/ diff --git a/node_modules/.bin/express b/node_modules/.bin/express deleted file mode 120000 index b741d99..0000000 --- a/node_modules/.bin/express +++ /dev/null @@ -1 +0,0 @@ -../express/bin/express \ No newline at end of file diff --git a/node_modules/async/.gitmodules b/node_modules/async/.gitmodules deleted file mode 100644 index a9aae98..0000000 --- a/node_modules/async/.gitmodules +++ /dev/null @@ -1,9 +0,0 @@ -[submodule "deps/nodeunit"] - path = deps/nodeunit - url = git://github.com/caolan/nodeunit.git -[submodule "deps/UglifyJS"] - path = deps/UglifyJS - url = https://github.com/mishoo/UglifyJS.git -[submodule "deps/nodelint"] - path = deps/nodelint - url = https://github.com/tav/nodelint.git diff --git a/node_modules/async/.npmignore b/node_modules/async/.npmignore deleted file mode 100644 index 9bdfc97..0000000 --- a/node_modules/async/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -deps -dist -test -nodelint.cfg \ No newline at end of file diff --git a/node_modules/async/LICENSE b/node_modules/async/LICENSE deleted file mode 100644 index b7f9d50..0000000 --- a/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Caolan McMahon - -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/async/Makefile b/node_modules/async/Makefile deleted file mode 100644 index bad647c..0000000 --- a/node_modules/async/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -PACKAGE = asyncjs -NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node) -CWD := $(shell pwd) -NODEUNIT = $(CWD)/node_modules/nodeunit/bin/nodeunit -UGLIFY = $(CWD)/node_modules/uglify-js/bin/uglifyjs -NODELINT = $(CWD)/node_modules/nodelint/nodelint - -BUILDDIR = dist - -all: clean test build - -build: $(wildcard lib/*.js) - mkdir -p $(BUILDDIR) - $(UGLIFY) lib/async.js > $(BUILDDIR)/async.min.js - -test: - $(NODEUNIT) test - -clean: - rm -rf $(BUILDDIR) - -lint: - $(NODELINT) --config nodelint.cfg lib/async.js - -.PHONY: test build all diff --git a/node_modules/async/README.md b/node_modules/async/README.md deleted file mode 100644 index 0cf7fc9..0000000 --- a/node_modules/async/README.md +++ /dev/null @@ -1,1022 +0,0 @@ -# Async.js - -Async is a utility module which provides straight-forward, powerful functions -for working with asynchronous JavaScript. Although originally designed for -use with [node.js](http://nodejs.org), it can also be used directly in the -browser. - -Async provides around 20 functions that include the usual 'functional' -suspects (map, reduce, filter, forEach…) as well as some common patterns -for asynchronous control flow (parallel, series, waterfall…). All these -functions assume you follow the node.js convention of providing a single -callback as the last argument of your async function. - - -## Quick Examples - - async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file - }); - - async.filter(['file1','file2','file3'], path.exists, function(results){ - // results now equals an array of the existing files - }); - - async.parallel([ - function(){ ... }, - function(){ ... } - ], callback); - - async.series([ - function(){ ... }, - function(){ ... } - ]); - -There are many more functions available so take a look at the docs below for a -full list. This module aims to be comprehensive, so if you feel anything is -missing please create a GitHub issue for it. - - -## Download - -Releases are available for download from -[GitHub](http://github.com/caolan/async/downloads). -Alternatively, you can install using Node Package Manager (npm): - - npm install async - - -__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed - -__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped - - -## In the Browser - -So far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: - - - - - -## Documentation - -### Collections - -* [forEach](#forEach) -* [map](#map) -* [filter](#filter) -* [reject](#reject) -* [reduce](#reduce) -* [detect](#detect) -* [sortBy](#sortBy) -* [some](#some) -* [every](#every) -* [concat](#concat) - -### Control Flow - -* [series](#series) -* [parallel](#parallel) -* [whilst](#whilst) -* [until](#until) -* [waterfall](#waterfall) -* [queue](#queue) -* [auto](#auto) -* [iterator](#iterator) -* [apply](#apply) -* [nextTick](#nextTick) - -### Utils - -* [memoize](#memoize) -* [unmemoize](#unmemoize) -* [log](#log) -* [dir](#dir) -* [noConflict](#noConflict) - - -## Collections - - -### forEach(arr, iterator, callback) - -Applies an iterator function to each item in an array, in parallel. -The iterator is called with an item from the list and a callback for when it -has finished. If the iterator passes an error to this callback, the main -callback for the forEach function is immediately called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - - // assuming openFiles is an array of file names and saveFile is a function - // to save the modified contents of that file: - - async.forEach(openFiles, saveFile, function(err){ - // if any of the saves produced an error, err would equal that error - }); - ---------------------------------------- - - -### forEachSeries(arr, iterator, callback) - -The same as forEach only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. This means the iterator functions will complete in order. - - ---------------------------------------- - - -### forEachLimit(arr, limit, iterator, callback) - -The same as forEach only the iterator is applied to batches of items in the -array, in series. The next batch of iterators is only called once the current -one has completed processing. - -__Arguments__ - -* arr - An array to iterate over. -* limit - How many items should be in each batch. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - - // Assume documents is an array of JSON objects and requestApi is a - // function that interacts with a rate-limited REST api. - - async.forEachLimit(documents, 20, requestApi, function(err){ - // if any of the saves produced an error, err would equal that error - }); ---------------------------------------- - - -### map(arr, iterator, callback) - -Produces a new array of values by mapping each value in the given array through -the iterator function. The iterator is called with an item from the array and a -callback for when it has finished processing. The callback takes 2 arguments, -an error and the transformed item from the array. If the iterator passes an -error to this callback, the main callback for the map function is immediately -called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order, however -the results array will be in the same order as the original array. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and a transformed item. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array of the - transformed items from the original array. - -__Example__ - - async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file - }); - ---------------------------------------- - - -### mapSeries(arr, iterator, callback) - -The same as map only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - - ---------------------------------------- - - -### filter(arr, iterator, callback) - -__Alias:__ select - -Returns a new array of all the values which pass an async truth test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. This operation is -performed in parallel, but the results array will be in the same order as the -original. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(results) - A callback which is called after all the iterator - functions have finished. - -__Example__ - - async.filter(['file1','file2','file3'], path.exists, function(results){ - // results now equals an array of the existing files - }); - ---------------------------------------- - - -### filterSeries(arr, iterator, callback) - -__alias:__ selectSeries - -The same as filter only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - ---------------------------------------- - - -### reject(arr, iterator, callback) - -The opposite of filter. Removes values that pass an async truth test. - ---------------------------------------- - - -### rejectSeries(arr, iterator, callback) - -The same as filter, only the iterator is applied to each item in the array -in series. - - ---------------------------------------- - - -### reduce(arr, memo, iterator, callback) - -__aliases:__ inject, foldl - -Reduces a list of values into a single value using an async iterator to return -each successive step. Memo is the initial state of the reduction. This -function only operates in series. For performance reasons, it may make sense to -split a call to this function into a parallel map, then use the normal -Array.prototype.reduce on the results. This function is for situations where -each step in the reduction needs to be async, if you can get the data before -reducing it then its probably a good idea to do so. - -__Arguments__ - -* arr - An array to iterate over. -* memo - The initial state of the reduction. -* iterator(memo, item, callback) - A function applied to each item in the - array to produce the next step in the reduction. The iterator is passed a - callback which accepts an optional error as its first argument, and the state - of the reduction as the second. If an error is passed to the callback, the - reduction is stopped and the main callback is immediately called with the - error. -* callback(err, result) - A callback which is called after all the iterator - functions have finished. Result is the reduced value. - -__Example__ - - async.reduce([1,2,3], 0, function(memo, item, callback){ - // pointless async: - process.nextTick(function(){ - callback(null, memo + item) - }); - }, function(err, result){ - // result is now equal to the last value of memo, which is 6 - }); - ---------------------------------------- - - -### reduceRight(arr, memo, iterator, callback) - -__Alias:__ foldr - -Same as reduce, only operates on the items in the array in reverse order. - - ---------------------------------------- - - -### detect(arr, iterator, callback) - -Returns the first value in a list that passes an async truth test. The -iterator is applied in parallel, meaning the first iterator to return true will -fire the detect callback with that result. That means the result might not be -the first item in the original array (in terms of order) that passes the test. - -If order within the original array is important then look at detectSeries. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - the first item in the array that passes the truth test (iterator) or the - value undefined if none passed. - -__Example__ - - async.detect(['file1','file2','file3'], path.exists, function(result){ - // result now equals the first file in the list that exists - }); - ---------------------------------------- - - -### detectSeries(arr, iterator, callback) - -The same as detect, only the iterator is applied to each item in the array -in series. This means the result is always the first in the original array (in -terms of array order) that passes the truth test. - - ---------------------------------------- - - -### sortBy(arr, iterator, callback) - -Sorts a list by the results of running each value through an async iterator. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and a value to use as the sort criteria. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is the items from - the original array sorted by the values returned by the iterator calls. - -__Example__ - - async.sortBy(['file1','file2','file3'], function(file, callback){ - fs.stat(file, function(err, stats){ - callback(err, stats.mtime); - }); - }, function(err, results){ - // results is now the original array of files sorted by - // modified date - }); - - ---------------------------------------- - - -### some(arr, iterator, callback) - -__Alias:__ any - -Returns true if at least one element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. Once any iterator -call returns true, the main callback is immediately called. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - either true or false depending on the values of the async tests. - -__Example__ - - async.some(['file1','file2','file3'], path.exists, function(result){ - // if result is true then at least one of the files exists - }); - ---------------------------------------- - - -### every(arr, iterator, callback) - -__Alias:__ all - -Returns true if every element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called after all the iterator - functions have finished. Result will be either true or false depending on - the values of the async tests. - -__Example__ - - async.every(['file1','file2','file3'], path.exists, function(result){ - // if result is true then every file exists - }); - ---------------------------------------- - - -### concat(arr, iterator, callback) - -Applies an iterator to each item in a list, concatenating the results. Returns the -concatenated list. The iterators are called in parallel, and the results are -concatenated as they return. There is no guarantee that the results array will -be returned in the original order of the arguments passed to the iterator function. - -__Arguments__ - -* arr - An array to iterate over -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and an array of results. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array containing - the concatenated results of the iterator function. - -__Example__ - - async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ - // files is now a list of filenames that exist in the 3 directories - }); - ---------------------------------------- - - -### concatSeries(arr, iterator, callback) - -Same as async.concat, but executes in series instead of parallel. - - -## Control Flow - - -### series(tasks, [callback]) - -Run an array of functions in series, each one running once the previous -function has completed. If any functions in the series pass an error to its -callback, no more functions are run and the callback for the series is -immediately called with the value of the error. Once the tasks have completed, -the results are passed to the final callback as an array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.series. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback it must call on completion. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets an array of all the arguments passed to - the callbacks used in the array. - -__Example__ - - async.series([ - function(callback){ - // do some stuff ... - callback(null, 'one'); - }, - function(callback){ - // do some more stuff ... - callback(null, 'two'); - }, - ], - // optional callback - function(err, results){ - // results is now equal to ['one', 'two'] - }); - - - // an example using an object instead of an array - async.series({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - }, - }, - function(err, results) { - // results is now equal to: {one: 1, two: 2} - }); - - ---------------------------------------- - - -### parallel(tasks, [callback]) - -Run an array of functions in parallel, without waiting until the previous -function has completed. If any of the functions pass an error to its -callback, the main callback is immediately called with the value of the error. -Once the tasks have completed, the results are passed to the final callback as an -array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.parallel. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed a - callback it must call on completion. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets an array of all the arguments passed to - the callbacks used in the array. - -__Example__ - - async.parallel([ - function(callback){ - setTimeout(function(){ - callback(null, 'one'); - }, 200); - }, - function(callback){ - setTimeout(function(){ - callback(null, 'two'); - }, 100); - }, - ], - // optional callback - function(err, results){ - // in this case, the results array will equal ['two','one'] - // because the functions were run in parallel and the second - // function had a shorter timeout before calling the callback. - }); - - - // an example using an object instead of an array - async.parallel({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - }, - }, - function(err, results) { - // results is now equals to: {one: 1, two: 2} - }); - - ---------------------------------------- - - -### whilst(test, fn, callback) - -Repeatedly call fn, while test returns true. Calls the callback when stopped, -or an error occurs. - -__Arguments__ - -* test() - synchronous truth test to perform before each execution of fn. -* fn(callback) - A function to call each time the test passes. The function is - passed a callback which must be called once it has completed with an optional - error as the first argument. -* callback(err) - A callback which is called after the test fails and repeated - execution of fn has stopped. - -__Example__ - - var count = 0; - - async.whilst( - function () { return count < 5; }, - function (callback) { - count++; - setTimeout(callback, 1000); - }, - function (err) { - // 5 seconds have passed - } - ); - - ---------------------------------------- - - -### until(test, fn, callback) - -Repeatedly call fn, until test returns true. Calls the callback when stopped, -or an error occurs. - -The inverse of async.whilst. - - ---------------------------------------- - - -### waterfall(tasks, [callback]) - -Runs an array of functions in series, each passing their results to the next in -the array. However, if any of the functions pass an error to the callback, the -next function is not executed and the main callback is immediately called with -the error. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a callback it - must call on completion. -* callback(err, [results]) - An optional callback to run once all the functions - have completed. This will be passed the results of the last task's callback. - - - -__Example__ - - async.waterfall([ - function(callback){ - callback(null, 'one', 'two'); - }, - function(arg1, arg2, callback){ - callback(null, 'three'); - }, - function(arg1, callback){ - // arg1 now equals 'three' - callback(null, 'done'); - } - ], function (err, result) { - // result now equals 'done' - }); - - ---------------------------------------- - - -### queue(worker, concurrency) - -Creates a queue object with the specified concurrency. Tasks added to the -queue will be processed in parallel (up to the concurrency limit). If all -workers are in progress, the task is queued until one is available. Once -a worker has completed a task, the task's callback is called. - -__Arguments__ - -* worker(task, callback) - An asynchronous function for processing a queued - task. -* concurrency - An integer for determining how many worker functions should be - run in parallel. - -__Queue objects__ - -The queue object returned by this function has the following properties and -methods: - -* length() - a function returning the number of items waiting to be processed. -* concurrency - an integer for determining how many worker functions should be - run in parallel. This property can be changed after a queue is created to - alter the concurrency on-the-fly. -* push(task, [callback]) - add a new task to the queue, the callback is called - once the worker has finished processing the task. - instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. -* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued -* empty - a callback that is called when the last item from the queue is given to a worker -* drain - a callback that is called when the last item from the queue has returned from the worker - -__Example__ - - // create a queue object with concurrency 2 - - var q = async.queue(function (task, callback) { - console.log('hello ' + task.name); - callback(); - }, 2); - - - // assign a callback - q.drain = function() { - console.log('all items have been processed'); - } - - // add some items to the queue - - q.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); - }); - q.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); - }); - - // add some items to the queue (batch-wise) - - q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { - console.log('finished processing bar'); - }); - - ---------------------------------------- - - -### auto(tasks, [callback]) - -Determines the best order for running functions based on their requirements. -Each function can optionally depend on other functions being completed first, -and each function is run as soon as its requirements are satisfied. If any of -the functions pass an error to their callback, that function will not complete -(so any other functions depending on it will not run) and the main callback -will be called immediately with the error. Functions also receive an object -containing the results of functions which have completed so far. - -__Arguments__ - -* tasks - An object literal containing named functions or an array of - requirements, with the function itself the last item in the array. The key - used for each function or array is used when specifying requirements. The - syntax is easier to understand by looking at the example. -* callback(err, results) - An optional callback which is called when all the - tasks have been completed. The callback will receive an error as an argument - if any tasks pass an error to their callback. If all tasks complete - successfully, it will receive an object containing their results. - -__Example__ - - async.auto({ - get_data: function(callback){ - // async code to get some data - }, - make_folder: function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - }, - write_file: ['get_data', 'make_folder', function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - callback(null, filename); - }], - email_link: ['write_file', function(callback, results){ - // once the file is written let's email a link to it... - // results.write_file contains the filename returned by write_file. - }] - }); - -This is a fairly trivial example, but to do this using the basic parallel and -series functions would look like this: - - async.parallel([ - function(callback){ - // async code to get some data - }, - function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - } - ], - function(results){ - async.series([ - function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - }, - email_link: function(callback){ - // once the file is written let's email a link to it... - } - ]); - }); - -For a complicated series of async tasks using the auto function makes adding -new tasks much easier and makes the code more readable. - - ---------------------------------------- - - -### iterator(tasks) - -Creates an iterator function which calls the next function in the array, -returning a continuation to call the next one after that. Its also possible to -'peek' the next iterator by doing iterator.next(). - -This function is used internally by the async module but can be useful when -you want to manually control the flow of functions in series. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a callback it - must call on completion. - -__Example__ - - var iterator = async.iterator([ - function(){ sys.p('one'); }, - function(){ sys.p('two'); }, - function(){ sys.p('three'); } - ]); - - node> var iterator2 = iterator(); - 'one' - node> var iterator3 = iterator2(); - 'two' - node> iterator3(); - 'three' - node> var nextfn = iterator2.next(); - node> nextfn(); - 'three' - - ---------------------------------------- - - -### apply(function, arguments..) - -Creates a continuation function with some arguments already applied, a useful -shorthand when combined with other control flow functions. Any arguments -passed to the returned function are added to the arguments originally passed -to apply. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to automatically apply when the - continuation is called. - -__Example__ - - // using apply - - async.parallel([ - async.apply(fs.writeFile, 'testfile1', 'test1'), - async.apply(fs.writeFile, 'testfile2', 'test2'), - ]); - - - // the same process without using apply - - async.parallel([ - function(callback){ - fs.writeFile('testfile1', 'test1', callback); - }, - function(callback){ - fs.writeFile('testfile2', 'test2', callback); - }, - ]); - -It's possible to pass any number of additional arguments when calling the -continuation: - - node> var fn = async.apply(sys.puts, 'one'); - node> fn('two', 'three'); - one - two - three - ---------------------------------------- - - -### nextTick(callback) - -Calls the callback on a later loop around the event loop. In node.js this just -calls process.nextTick, in the browser it falls back to setTimeout(callback, 0), -which means other higher priority events may precede the execution of the callback. - -This is used internally for browser-compatibility purposes. - -__Arguments__ - -* callback - The function to call on a later loop around the event loop. - -__Example__ - - var call_order = []; - async.nextTick(function(){ - call_order.push('two'); - // call_order now equals ['one','two] - }); - call_order.push('one') - - -## Utils - - -### memoize(fn, [hasher]) - -Caches the results of an async function. When creating a hash to store function -results against, the callback is omitted from the hash and an optional hash -function can be used. - -__Arguments__ - -* fn - the function you to proxy and cache results from. -* hasher - an optional function for generating a custom hash for storing - results, it has all the arguments applied to it apart from the callback, and - must be synchronous. - -__Example__ - - var slow_fn = function (name, callback) { - // do something - callback(null, result); - }; - var fn = async.memoize(slow_fn); - - // fn can now be used as if it were slow_fn - fn('some name', function () { - // callback - }); - - -### unmemoize(fn) - -Undoes a memoized function, reverting it to the original, unmemoized -form. Comes handy in tests. - -__Arguments__ - -* fn - the memoized function - - -### log(function, arguments) - -Logs the result of an async function to the console. Only works in node.js or -in browsers that support console.log and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.log is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - - var hello = function(name, callback){ - setTimeout(function(){ - callback(null, 'hello ' + name); - }, 1000); - }; - - node> async.log(hello, 'world'); - 'hello world' - - ---------------------------------------- - - -### dir(function, arguments) - -Logs the result of an async function to the console using console.dir to -display the properties of the resulting object. Only works in node.js or -in browsers that support console.dir and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.dir is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - - var hello = function(name, callback){ - setTimeout(function(){ - callback(null, {hello: name}); - }, 1000); - }; - - node> async.dir(hello, 'world'); - {hello: 'world'} - - ---------------------------------------- - - -### noConflict() - -Changes the value of async back to its original value, returning a reference to the -async object. diff --git a/node_modules/async/index.js b/node_modules/async/index.js deleted file mode 100644 index 8e23845..0000000 --- a/node_modules/async/index.js +++ /dev/null @@ -1,3 +0,0 @@ -// This file is just added for convenience so this repository can be -// directly checked out into a project's deps folder -module.exports = require('./lib/async'); diff --git a/node_modules/async/lib/async.js b/node_modules/async/lib/async.js deleted file mode 100644 index 52276d6..0000000 --- a/node_modules/async/lib/async.js +++ /dev/null @@ -1,692 +0,0 @@ -/*global setTimeout: false, console: false */ -(function () { - - var async = {}; - - // global on the server, window in the browser - var root = this, - previous_async = root.async; - - if (typeof module !== 'undefined' && module.exports) { - module.exports = async; - } - else { - root.async = async; - } - - async.noConflict = function () { - root.async = previous_async; - return async; - }; - - //// cross-browser compatiblity functions //// - - var _forEach = function (arr, iterator) { - if (arr.forEach) { - return arr.forEach(iterator); - } - for (var i = 0; i < arr.length; i += 1) { - iterator(arr[i], i, arr); - } - }; - - var _map = function (arr, iterator) { - if (arr.map) { - return arr.map(iterator); - } - var results = []; - _forEach(arr, function (x, i, a) { - results.push(iterator(x, i, a)); - }); - return results; - }; - - var _reduce = function (arr, iterator, memo) { - if (arr.reduce) { - return arr.reduce(iterator, memo); - } - _forEach(arr, function (x, i, a) { - memo = iterator(memo, x, i, a); - }); - return memo; - }; - - var _keys = function (obj) { - if (Object.keys) { - return Object.keys(obj); - } - var keys = []; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - keys.push(k); - } - } - return keys; - }; - - //// exported async module functions //// - - //// nextTick implementation with browser-compatible fallback //// - if (typeof process === 'undefined' || !(process.nextTick)) { - async.nextTick = function (fn) { - setTimeout(fn, 0); - }; - } - else { - async.nextTick = process.nextTick; - } - - async.forEach = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - _forEach(arr, function (x) { - iterator(x, function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed === arr.length) { - callback(); - } - } - }); - }); - }; - - async.forEachSeries = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - var iterate = function () { - iterator(arr[completed], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed === arr.length) { - callback(); - } - else { - iterate(); - } - } - }); - }; - iterate(); - }; - - async.forEachLimit = function (arr, limit, iterator, callback) { - callback = callback || function () {}; - if (!arr.length || limit <= 0) { - return callback(); - } - var completed = 0; - var started = 0; - var running = 0; - - (function replenish () { - if (completed === arr.length) { - return callback(); - } - - while (running < limit && started < arr.length) { - iterator(arr[started], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - running -= 1; - if (completed === arr.length) { - callback(); - } - else { - replenish(); - } - } - }); - started += 1; - running += 1; - } - })(); - }; - - - var doParallel = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.forEach].concat(args)); - }; - }; - var doSeries = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.forEachSeries].concat(args)); - }; - }; - - - var _asyncMap = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (err, v) { - results[x.index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - }; - async.map = doParallel(_asyncMap); - async.mapSeries = doSeries(_asyncMap); - - - // reduce only has a series version, as doing reduce in parallel won't - // work in many situations. - async.reduce = function (arr, memo, iterator, callback) { - async.forEachSeries(arr, function (x, callback) { - iterator(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); - }; - // inject alias - async.inject = async.reduce; - // foldl alias - async.foldl = async.reduce; - - async.reduceRight = function (arr, memo, iterator, callback) { - var reversed = _map(arr, function (x) { - return x; - }).reverse(); - async.reduce(reversed, memo, iterator, callback); - }; - // foldr alias - async.foldr = async.reduceRight; - - var _filter = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.filter = doParallel(_filter); - async.filterSeries = doSeries(_filter); - // select alias - async.select = async.filter; - async.selectSeries = async.filterSeries; - - var _reject = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (!v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.reject = doParallel(_reject); - async.rejectSeries = doSeries(_reject); - - var _detect = function (eachfn, arr, iterator, main_callback) { - eachfn(arr, function (x, callback) { - iterator(x, function (result) { - if (result) { - main_callback(x); - main_callback = function () {}; - } - else { - callback(); - } - }); - }, function (err) { - main_callback(); - }); - }; - async.detect = doParallel(_detect); - async.detectSeries = doSeries(_detect); - - async.some = function (arr, iterator, main_callback) { - async.forEach(arr, function (x, callback) { - iterator(x, function (v) { - if (v) { - main_callback(true); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(false); - }); - }; - // any alias - async.any = async.some; - - async.every = function (arr, iterator, main_callback) { - async.forEach(arr, function (x, callback) { - iterator(x, function (v) { - if (!v) { - main_callback(false); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(true); - }); - }; - // all alias - async.all = async.every; - - async.sortBy = function (arr, iterator, callback) { - async.map(arr, function (x, callback) { - iterator(x, function (err, criteria) { - if (err) { - callback(err); - } - else { - callback(null, {value: x, criteria: criteria}); - } - }); - }, function (err, results) { - if (err) { - return callback(err); - } - else { - var fn = function (left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }; - callback(null, _map(results.sort(fn), function (x) { - return x.value; - })); - } - }); - }; - - async.auto = function (tasks, callback) { - callback = callback || function () {}; - var keys = _keys(tasks); - if (!keys.length) { - return callback(null); - } - - var results = {}; - - var listeners = []; - var addListener = function (fn) { - listeners.unshift(fn); - }; - var removeListener = function (fn) { - for (var i = 0; i < listeners.length; i += 1) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - return; - } - } - }; - var taskComplete = function () { - _forEach(listeners.slice(0), function (fn) { - fn(); - }); - }; - - addListener(function () { - if (_keys(results).length === keys.length) { - callback(null, results); - callback = function () {}; - } - }); - - _forEach(keys, function (k) { - var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; - var taskCallback = function (err) { - if (err) { - callback(err); - // stop subsequent errors hitting callback multiple times - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - taskComplete(); - } - }; - var requires = task.slice(0, Math.abs(task.length - 1)) || []; - var ready = function () { - return _reduce(requires, function (a, x) { - return (a && results.hasOwnProperty(x)); - }, true); - }; - if (ready()) { - task[task.length - 1](taskCallback, results); - } - else { - var listener = function () { - if (ready()) { - removeListener(listener); - task[task.length - 1](taskCallback, results); - } - }; - addListener(listener); - } - }); - }; - - async.waterfall = function (tasks, callback) { - callback = callback || function () {}; - if (!tasks.length) { - return callback(); - } - var wrapIterator = function (iterator) { - return function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - async.nextTick(function () { - iterator.apply(null, args); - }); - } - }; - }; - wrapIterator(async.iterator(tasks))(); - }; - - async.parallel = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.map(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.forEach(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.series = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.mapSeries(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.forEachSeries(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.iterator = function (tasks) { - var makeCallback = function (index) { - var fn = function () { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - }; - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - }; - return makeCallback(0); - }; - - async.apply = function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - return function () { - return fn.apply( - null, args.concat(Array.prototype.slice.call(arguments)) - ); - }; - }; - - var _concat = function (eachfn, arr, fn, callback) { - var r = []; - eachfn(arr, function (x, cb) { - fn(x, function (err, y) { - r = r.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, r); - }); - }; - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - if (test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.whilst(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.until = function (test, iterator, callback) { - if (!test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.until(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.queue = function (worker, concurrency) { - var workers = 0; - var q = { - tasks: [], - concurrency: concurrency, - saturated: null, - empty: null, - drain: null, - push: function (data, callback) { - if(data.constructor !== Array) { - data = [data]; - } - _forEach(data, function(task) { - q.tasks.push({ - data: task, - callback: typeof callback === 'function' ? callback : null - }); - if (q.saturated && q.tasks.length == concurrency) { - q.saturated(); - } - async.nextTick(q.process); - }); - }, - process: function () { - if (workers < q.concurrency && q.tasks.length) { - var task = q.tasks.shift(); - if(q.empty && q.tasks.length == 0) q.empty(); - workers += 1; - worker(task.data, function () { - workers -= 1; - if (task.callback) { - task.callback.apply(task, arguments); - } - if(q.drain && q.tasks.length + workers == 0) q.drain(); - q.process(); - }); - } - }, - length: function () { - return q.tasks.length; - }, - running: function () { - return workers; - } - }; - return q; - }; - - var _console_fn = function (name) { - return function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - fn.apply(null, args.concat([function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (typeof console !== 'undefined') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _forEach(args, function (x) { - console[name](x); - }); - } - } - }])); - }; - }; - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - - async.memoize = function (fn, hasher) { - var memo = {}; - var queues = {}; - hasher = hasher || function (x) { - return x; - }; - var memoized = function () { - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - var key = hasher.apply(null, args); - if (key in memo) { - callback.apply(null, memo[key]); - } - else if (key in queues) { - queues[key].push(callback); - } - else { - queues[key] = [callback]; - fn.apply(null, args.concat([function () { - memo[key] = arguments; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, arguments); - } - }])); - } - }; - memoized.unmemoized = fn; - return memoized; - }; - - async.unmemoize = function (fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - } - }; - -}()); diff --git a/node_modules/async/package.json b/node_modules/async/package.json deleted file mode 100644 index 5679bec..0000000 --- a/node_modules/async/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ "name": "async" -, "description": "Higher-order functions and common patterns for asynchronous code" -, "main": "./index" -, "author": "Caolan McMahon" -, "version": "0.1.18" -, "repository" : - { "type" : "git" - , "url" : "http://github.com/caolan/async.git" - } -, "bugs" : { "url" : "http://github.com/caolan/async/issues" } -, "licenses" : - [ { "type" : "MIT" - , "url" : "http://github.com/caolan/async/raw/master/LICENSE" - } - ] -, "devDependencies": - { "nodeunit": ">0.0.0" - , "uglify-js": "1.2.x" - , "nodelint": ">0.0.0" - } -} diff --git a/node_modules/ejs/.gitignore b/node_modules/ejs/.gitignore deleted file mode 100644 index 99a4d6e..0000000 --- a/node_modules/ejs/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# ignore any vim files: -*.sw[a-z] -vim/.netrwhist diff --git a/node_modules/ejs/.gitmodules b/node_modules/ejs/.gitmodules deleted file mode 100644 index 51ea138..0000000 --- a/node_modules/ejs/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "support/expresso"] - path = support/expresso - url = http://github.com/visionmedia/expresso.git diff --git a/node_modules/ejs/History.md b/node_modules/ejs/History.md deleted file mode 100644 index 00d2b5b..0000000 --- a/node_modules/ejs/History.md +++ /dev/null @@ -1,70 +0,0 @@ - -0.4.3 / 2011-06-20 -================== - - * Fixed stacktraces line number when used multiline js expressions [Octave] - -0.4.2 / 2011-05-11 -================== - - * Added client side support - -0.4.1 / 2011-04-21 -================== - - * Fixed error context - -0.4.0 / 2011-04-21 -================== - - * Added; ported jade's error reporting to ejs. [slaskis] - -0.3.1 / 2011-02-23 -================== - - * Fixed optional `compile()` options - -0.3.0 / 2011-02-14 -================== - - * Added 'json' filter [Yuriy Bogdanov] - * Use exported version of parse function to allow monkey-patching [Anatoliy Chakkaev] - -0.2.1 / 2010-10-07 -================== - - * Added filter support - * Fixed _cache_ option. ~4x performance increase - -0.2.0 / 2010-08-05 -================== - - * Added support for global tag config - * Added custom tag support. Closes #5 - * Fixed whitespace bug. Closes #4 - -0.1.0 / 2010-08-04 -================== - - * Faster implementation [ashleydev] - -0.0.4 / 2010-08-02 -================== - - * Fixed single quotes for content outside of template tags. [aniero] - * Changed; `exports.compile()` now expects only "locals" - -0.0.3 / 2010-07-15 -================== - - * Fixed single quotes - -0.0.2 / 2010-07-09 -================== - - * Fixed newline preservation - -0.0.1 / 2010-07-09 -================== - - * Initial release diff --git a/node_modules/ejs/Makefile b/node_modules/ejs/Makefile deleted file mode 100644 index 13c92d2..0000000 --- a/node_modules/ejs/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -SRC = $(shell find lib -name "*.js" -type f) -UGLIFY_FLAGS = --no-mangle - -test: - @./support/expresso/bin/expresso -I lib test/*.test.js - -ejs.js: $(SRC) - @node support/compile.js $^ - -ejs.min.js: ejs.js - @uglifyjs $(UGLIFY_FLAGS) $< > $@ \ - && du ejs.min.js \ - && du ejs.js - -clean: - rm -f ejs.js - rm -f ejs.min.js - -.PHONY: test \ No newline at end of file diff --git a/node_modules/ejs/Readme.md b/node_modules/ejs/Readme.md deleted file mode 100644 index 0577dfe..0000000 --- a/node_modules/ejs/Readme.md +++ /dev/null @@ -1,142 +0,0 @@ - -# EJS - -Embedded JavaScript templates. - -## Installation - - $ npm install ejs - -## Features - - * Complies with the [Express](http://expressjs.com) view system - * Static caching of intermediate JavaScript - * Unbuffered code for conditionals etc `<% code %>` - * Escapes html by default with `<%= code %>` - * Unescaped buffering with `<%- code %>` - * Supports tag customization - * Filter support for designer-friendly templates - * Client-side support - -## Example - - <% if (user) { %> -

<%= user.name %>

- <% } %> - -## Usage - - ejs.compile(str, options); - // => Function - - ejs.render(str, options); - // => str - -## Options - - - `locals` Local variables object - - `cache` Compiled functions are cached, requires `filename` - - `filename` Used by `cache` to key caches - - `scope` Function execution context - - `debug` Output generated function body - - `open` Open tag, defaulting to "<%" - - `close` Closing tag, defaulting to "%>" - -## Custom Tags - -Custom tags can also be applied globally: - - var ejs = require('ejs'); - ejs.open = '{{'; - ejs.close = '}}'; - -Which would make the following a valid template: - -

{{= title }}

- -## Filters - -EJS conditionally supports the concept of "filters". A "filter chain" -is a designer friendly api for manipulating data, without writing JavaScript. - -Filters can be applied by supplying the _:_ modifier, so for example if we wish to take the array `[{ name: 'tj' }, { name: 'mape' }, { name: 'guillermo' }]` and output a list of names we can do this simply with filters: - -Template: - -

<%=: users | map:'name' | join %>

- -Output: - -

Tj, Mape, Guillermo

- -Render call: - - ejs.render(str, { - locals: { - users: [ - { name: 'tj' }, - { name: 'mape' }, - { name: 'guillermo' } - ] - } - }); - -Or perhaps capitalize the first user's name for display: - -

<%=: users | first | capitalize %>

- -## Filter List - -Currently these filters are available: - - - first - - last - - capitalize - - downcase - - upcase - - sort - - sort_by:'prop' - - size - - length - - plus:n - - minus:n - - times:n - - divided_by:n - - join:'val' - - truncate:n - - truncate_words:n - - replace:pattern,substitution - - prepend:val - - append:val - - map:'prop' - - reverse - - get:'prop' - -## client-side support - - include `./ejs.js` or `./ejs.min.js` and `require("ejs").compile(str)`. - -## License - -(The MIT License) - -Copyright (c) 2009-2010 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. diff --git a/node_modules/ejs/benchmark.js b/node_modules/ejs/benchmark.js deleted file mode 100644 index 7b267e1..0000000 --- a/node_modules/ejs/benchmark.js +++ /dev/null @@ -1,14 +0,0 @@ - - -var ejs = require('./lib/ejs'), - str = '<% if (foo) { %>

<%= foo %>

<% } %>', - times = 50000; - -console.log('rendering ' + times + ' times'); - -var start = new Date; -while (times--) { - ejs.render(str, { cache: true, filename: 'test', locals: { foo: 'bar' }}); -} - -console.log('took ' + (new Date - start) + 'ms'); \ No newline at end of file diff --git a/node_modules/ejs/examples/client.html b/node_modules/ejs/examples/client.html deleted file mode 100644 index 7081a04..0000000 --- a/node_modules/ejs/examples/client.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/node_modules/ejs/examples/list.ejs b/node_modules/ejs/examples/list.ejs deleted file mode 100644 index d571330..0000000 --- a/node_modules/ejs/examples/list.ejs +++ /dev/null @@ -1,7 +0,0 @@ -<% if (names.length) { %> -
    - <% names.forEach(function(name){ %> -
  • <%= name %>
  • - <% }) %> -
-<% } %> \ No newline at end of file diff --git a/node_modules/ejs/examples/list.js b/node_modules/ejs/examples/list.js deleted file mode 100644 index 9cd7168..0000000 --- a/node_modules/ejs/examples/list.js +++ /dev/null @@ -1,16 +0,0 @@ - -/** - * Module dependencies. - */ - -var ejs = require('../') - , fs = require('fs') - , str = fs.readFileSync(__dirname + '/list.ejs', 'utf8'); - -var ret = ejs.render(str, { - locals: { - names: ['foo', 'bar', 'baz'] - } -}); - -console.log(ret); \ No newline at end of file diff --git a/node_modules/ejs/index.js b/node_modules/ejs/index.js deleted file mode 100644 index 20bf71a..0000000 --- a/node_modules/ejs/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/ejs'); \ No newline at end of file diff --git a/node_modules/ejs/lib/ejs.js b/node_modules/ejs/lib/ejs.js deleted file mode 100644 index 5b9b9b8..0000000 --- a/node_modules/ejs/lib/ejs.js +++ /dev/null @@ -1,251 +0,0 @@ - -/*! - * EJS - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('./utils'); - -/** - * Library version. - */ - -exports.version = '0.4.3'; - -/** - * Filters. - * - * @type Object - */ - -var filters = exports.filters = require('./filters'); - -/** - * Intermediate js cache. - * - * @type Object - */ - -var cache = {}; - -/** - * Clear intermediate js cache. - * - * @api public - */ - -exports.clearCache = function(){ - cache = {}; -}; - -/** - * Translate filtered code into function calls. - * - * @param {String} js - * @return {String} - * @api private - */ - -function filtered(js) { - return js.substr(1).split('|').reduce(function(js, filter){ - var parts = filter.split(':') - , name = parts.shift() - , args = parts.shift() || ''; - if (args) args = ', ' + args; - return 'filters.' + name + '(' + js + args + ')'; - }); -}; - -/** - * Re-throw the given `err` in context to the - * `str` of ejs, `filename`, and `lineno`. - * - * @param {Error} err - * @param {String} str - * @param {String} filename - * @param {String} lineno - * @api private - */ - -function rethrow(err, str, filename, lineno){ - var lines = str.split('\n') - , start = Math.max(lineno - 3, 0) - , end = Math.min(lines.length, lineno + 3); - - // Error context - var context = lines.slice(start, end).map(function(line, i){ - var curr = i + start + 1; - return (curr == lineno ? ' >> ' : ' ') - + curr - + '| ' - + line; - }).join('\n'); - - // Alter exception message - err.path = filename; - err.message = (filename || 'ejs') + ':' - + lineno + '\n' - + context + '\n\n' - + err.message; - - throw err; -} - -/** - * Parse the given `str` of ejs, returning the function body. - * - * @param {String} str - * @return {String} - * @api public - */ - -var parse = exports.parse = function(str, options){ - var options = options || {} - , open = options.open || exports.open || '<%' - , close = options.close || exports.close || '%>'; - - var buf = [ - "var buf = [];" - , "\nwith (locals) {" - , "\n buf.push('" - ]; - - var lineno = 1; - - for (var i = 0, len = str.length; i < len; ++i) { - if (str.slice(i, open.length + i) == open) { - i += open.length - - var prefix, postfix, line = '__stack.lineno=' + lineno; - switch (str[i]) { - case '=': - prefix = "', escape((" + line + ', '; - postfix = ")), '"; - ++i; - break; - case '-': - prefix = "', (" + line + ', '; - postfix = "), '"; - ++i; - break; - default: - prefix = "');" + line + ';'; - postfix = "; buf.push('"; - } - - var end = str.indexOf(close, i) - , js = str.substring(i, end) - , start = i - , n = 0; - - while (~(n = js.indexOf("\n", n))) n++, lineno++; - if (js[0] == ':') js = filtered(js); - buf.push(prefix, js, postfix); - i += end - start + close.length - 1; - - } else if (str[i] == "\\") { - buf.push("\\\\"); - } else if (str[i] == "'") { - buf.push("\\'"); - } else if (str[i] == "\r") { - buf.push(" "); - } else if (str[i] == "\n") { - buf.push("\\n"); - lineno++; - } else { - buf.push(str[i]); - } - } - - buf.push("');\n}\nreturn buf.join('');"); - return buf.join(''); -}; - -/** - * Compile the given `str` of ejs into a `Function`. - * - * @param {String} str - * @param {Object} options - * @return {Function} - * @api public - */ - -var compile = exports.compile = function(str, options){ - options = options || {}; - - var input = JSON.stringify(str) - , filename = options.filename - ? JSON.stringify(options.filename) - : 'undefined'; - - // Adds the fancy stack trace meta info - str = [ - 'var __stack = { lineno: 1, input: ' + input + ', filename: ' + filename + ' };', - rethrow.toString(), - 'try {', - exports.parse(str, options), - '} catch (err) {', - ' rethrow(err, __stack.input, __stack.filename, __stack.lineno);', - '}' - ].join("\n"); - - if (options.debug) console.log(str); - var fn = new Function('locals, filters, escape', str); - return function(locals){ - return fn.call(this, locals, filters, utils.escape); - } -}; - -/** - * Render the given `str` of ejs. - * - * Options: - * - * - `locals` Local variables object - * - `cache` Compiled functions are cached, requires `filename` - * - `filename` Used by `cache` to key caches - * - `scope` Function execution context - * - `debug` Output generated function body - * - `open` Open tag, defaulting to "<%" - * - `close` Closing tag, defaulting to "%>" - * - * @param {String} str - * @param {Object} options - * @return {String} - * @api public - */ - -exports.render = function(str, options){ - var fn - , options = options || {}; - if (options.cache) { - if (options.filename) { - fn = cache[options.filename] || (cache[options.filename] = compile(str, options)); - } else { - throw new Error('"cache" option requires "filename".'); - } - } else { - fn = compile(str, options); - } - return fn.call(options.scope, options.locals || {}); -}; - -/** - * Expose to require(). - */ - -if (require.extensions) { - require.extensions['.ejs'] = function(module, filename) { - source = require('fs').readFileSync(filename, 'utf-8'); - module._compile(compile(source, {}), filename); - }; -} else if (require.registerExtension) { - require.registerExtension('.ejs', function(src) { - return compile(src, {}); - }); -} diff --git a/node_modules/ejs/lib/filters.js b/node_modules/ejs/lib/filters.js deleted file mode 100644 index d425c8d..0000000 --- a/node_modules/ejs/lib/filters.js +++ /dev/null @@ -1,198 +0,0 @@ - -/*! - * EJS - Filters - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * First element of the target `obj`. - */ - -exports.first = function(obj) { - return obj[0]; -}; - -/** - * Last element of the target `obj`. - */ - -exports.last = function(obj) { - return obj[obj.length - 1]; -}; - -/** - * Capitalize the first letter of the target `str`. - */ - -exports.capitalize = function(str){ - str = String(str); - return str[0].toUpperCase() + str.substr(1, str.length); -}; - -/** - * Downcase the target `str`. - */ - -exports.downcase = function(str){ - return String(str).toLowerCase(); -}; - -/** - * Uppercase the target `str`. - */ - -exports.upcase = function(str){ - return String(str).toUpperCase(); -}; - -/** - * Sort the target `obj`. - */ - -exports.sort = function(obj){ - return Object.create(obj).sort(); -}; - -/** - * Sort the target `obj` by the given `prop` ascending. - */ - -exports.sort_by = function(obj, prop){ - return Object.create(obj).sort(function(a, b){ - a = a[prop], b = b[prop]; - if (a > b) return 1; - if (a < b) return -1; - return 0; - }); -}; - -/** - * Size or length of the target `obj`. - */ - -exports.size = exports.length = function(obj) { - return obj.length; -}; - -/** - * Add `a` and `b`. - */ - -exports.plus = function(a, b){ - return Number(a) + Number(b); -}; - -/** - * Subtract `b` from `a`. - */ - -exports.minus = function(a, b){ - return Number(a) - Number(b); -}; - -/** - * Multiply `a` by `b`. - */ - -exports.times = function(a, b){ - return Number(a) * Number(b); -}; - -/** - * Divide `a` by `b`. - */ - -exports.divided_by = function(a, b){ - return Number(a) / Number(b); -}; - -/** - * Join `obj` with the given `str`. - */ - -exports.join = function(obj, str){ - return obj.join(str || ', '); -}; - -/** - * Truncate `str` to `len`. - */ - -exports.truncate = function(str, len){ - str = String(str); - return str.substr(0, len); -}; - -/** - * Truncate `str` to `n` words. - */ - -exports.truncate_words = function(str, n){ - var str = String(str) - , words = str.split(/ +/); - return words.slice(0, n).join(' '); -}; - -/** - * Replace `pattern` with `substitution` in `str`. - */ - -exports.replace = function(str, pattern, substitution){ - return String(str).replace(pattern, substitution || ''); -}; - -/** - * Prepend `val` to `obj`. - */ - -exports.prepend = function(obj, val){ - return Array.isArray(obj) - ? [val].concat(obj) - : val + obj; -}; - -/** - * Append `val` to `obj`. - */ - -exports.append = function(obj, val){ - return Array.isArray(obj) - ? obj.concat(val) - : obj + val; -}; - -/** - * Map the given `prop`. - */ - -exports.map = function(arr, prop){ - return arr.map(function(obj){ - return obj[prop]; - }); -}; - -/** - * Reverse the given `obj`. - */ - -exports.reverse = function(obj){ - return Array.isArray(obj) - ? obj.reverse() - : String(obj).split('').reverse().join(''); -}; - -/** - * Get `prop` of the given `obj`. - */ - -exports.get = function(obj, prop){ - return obj[prop]; -}; - -/** - * Packs the given `obj` into json string - */ -exports.json = function(obj){ - return JSON.stringify(obj); -}; \ No newline at end of file diff --git a/node_modules/ejs/lib/utils.js b/node_modules/ejs/lib/utils.js deleted file mode 100644 index 8d569d6..0000000 --- a/node_modules/ejs/lib/utils.js +++ /dev/null @@ -1,23 +0,0 @@ - -/*! - * EJS - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * 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, '"'); -}; - \ No newline at end of file diff --git a/node_modules/ejs/package.json b/node_modules/ejs/package.json deleted file mode 100644 index 810e504..0000000 --- a/node_modules/ejs/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "ejs", - "description": "Embedded JavaScript templates", - "version": "0.4.3", - "author": "TJ Holowaychuk ", - "keywords": ["template", "engine", "ejs"], - "main": "./lib/ejs.js" -} \ No newline at end of file diff --git a/node_modules/ejs/support/compile.js b/node_modules/ejs/support/compile.js deleted file mode 100644 index 0b419e0..0000000 --- a/node_modules/ejs/support/compile.js +++ /dev/null @@ -1,173 +0,0 @@ - -/** - * Module dependencies. - */ - -var fs = require('fs'); - -/** - * Arguments. - */ - -var args = process.argv.slice(2) - , pending = args.length - , files = {}; - -console.log(''); - -// parse arguments - -args.forEach(function(file){ - var mod = file.replace('lib/', ''); - fs.readFile(file, 'utf8', function(err, js){ - if (err) throw err; - console.log(' \033[90mcompile : \033[0m\033[36m%s\033[0m', file); - files[file] = parse(js); - --pending || compile(); - }); -}); - -/** - * Parse the given `js`. - */ - -function parse(js) { - return parseInheritance(parseConditionals(js)); -} - -/** - * Parse __proto__. - */ - -function parseInheritance(js) { - return js - .replace(/^ *(\w+)\.prototype\.__proto__ * = *(\w+)\.prototype *;?/gm, function(_, child, parent){ - return child + '.prototype = new ' + parent + ';\n' - + child + '.prototype.constructor = '+ child + ';\n'; - }); -} - -/** - * Parse the given `js`, currently supporting: - * - * 'if' ['node' | 'browser'] - * 'end' - * - */ - -function parseConditionals(js) { - var lines = js.split('\n') - , len = lines.length - , buffer = true - , browser = false - , buf = [] - , line - , cond; - - for (var i = 0; i < len; ++i) { - line = lines[i]; - if (/^ *\/\/ *if *(node|browser)/gm.exec(line)) { - cond = RegExp.$1; - buffer = browser = 'browser' == cond; - } else if (/^ *\/\/ *end/.test(line)) { - buffer = true; - browser = false; - } else if (browser) { - buf.push(line.replace(/^( *)\/\//, '$1')); - } else if (buffer) { - buf.push(line); - } - } - - return buf.join('\n'); -} - -/** - * Compile the files. - */ - -function compile() { - var buf = ''; - buf += '\n// CommonJS require()\n\n'; - buf += browser.require + '\n\n'; - buf += 'require.modules = {};\n\n'; - buf += 'require.resolve = ' + browser.resolve + ';\n\n'; - buf += 'require.register = ' + browser.register + ';\n\n'; - buf += 'require.relative = ' + browser.relative + ';\n\n'; - args.forEach(function(file){ - var js = files[file]; - file = file.replace('lib/', ''); - buf += '\nrequire.register("' + file + '", function(module, exports, require){\n'; - buf += js; - buf += '\n}); // module: ' + file + '\n'; - }); - fs.writeFile('ejs.js', buf, function(err){ - if (err) throw err; - console.log(' \033[90m create : \033[0m\033[36m%s\033[0m', 'ejs.js'); - console.log(); - }); -} - -// refactored version of weepy's -// https://github.com/weepy/brequire/blob/master/browser/brequire.js - -var browser = { - - /** - * Require a module. - */ - - require: function require(p){ - var path = require.resolve(p) - , mod = require.modules[path]; - if (!mod) throw new Error('failed to require "' + p + '"'); - if (!mod.exports) { - mod.exports = {}; - mod.call(mod.exports, mod, mod.exports, require.relative(path)); - } - return mod.exports; - }, - - /** - * Resolve module path. - */ - - resolve: function(path){ - var orig = path - , reg = path + '.js' - , index = path + '/index.js'; - return require.modules[reg] && reg - || require.modules[index] && index - || orig; - }, - - /** - * Return relative require(). - */ - - relative: function(parent) { - return function(p){ - if ('.' != p[0]) return require(p); - - var path = parent.split('/') - , segs = p.split('/'); - path.pop(); - - for (var i = 0; i < segs.length; i++) { - var seg = segs[i]; - if ('..' == seg) path.pop(); - else if ('.' != seg) path.push(seg); - } - - return require(path.join('/')); - }; - }, - - /** - * Register a module. - */ - - register: function(path, fn){ - require.modules[path] = fn; - } -}; \ No newline at end of file diff --git a/node_modules/ejs/support/expresso/.gitignore b/node_modules/ejs/support/expresso/.gitignore deleted file mode 100644 index 432563f..0000000 --- a/node_modules/ejs/support/expresso/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.DS_Store -lib-cov -*.seed \ No newline at end of file diff --git a/node_modules/ejs/support/expresso/.gitmodules b/node_modules/ejs/support/expresso/.gitmodules deleted file mode 100644 index 191ddeb..0000000 --- a/node_modules/ejs/support/expresso/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "deps/jscoverage"] - path = deps/jscoverage - url = git://github.com/visionmedia/node-jscoverage.git diff --git a/node_modules/ejs/support/expresso/History.md b/node_modules/ejs/support/expresso/History.md deleted file mode 100644 index e3b0141..0000000 --- a/node_modules/ejs/support/expresso/History.md +++ /dev/null @@ -1,87 +0,0 @@ - -0.6.2 / 2010-08-03 -================== - - * Added `assert.type()` - * Renamed `assert.isNotUndefined()` to `assert.isDefined()` - * Fixed `assert.includes()` param ordering - -0.6.0 / 2010-07-31 -================== - - * Added _docs/api.html_ - * Added -w, --watch - * Added `Array` support to `assert.includes()` - * Added; outputting exceptions immediately. Closes #19 - * Fixed `assert.includes()` param ordering - * Fixed `assert.length()` param ordering - * Fixed jscoverage links - -0.5.0 / 2010-07-16 -================== - - * Added support for async exports - * Added timeout support to `assert.response()`. Closes #3 - * Added 4th arg callback support to `assert.response()` - * Added `assert.length()` - * Added `assert.match()` - * Added `assert.isUndefined()` - * Added `assert.isNull()` - * Added `assert.includes()` - * Added growlnotify support via -g, --growl - * Added -o, --only TESTS. Ex: --only "test foo()" --only "test foo(), test bar()" - * Removed profanity - -0.4.0 / 2010-07-09 -================== - - * Added reporting source coverage (respects --boring for color haters) - * Added callback to assert.response(). Closes #12 - * Fixed; putting exceptions to stderr. Closes #13 - -0.3.1 / 2010-06-28 -================== - - * Faster assert.response() - -0.3.0 / 2010-06-28 -================== - - * Added -p, --port NUM flags - * Added assert.response(). Closes #11 - -0.2.1 / 2010-06-25 -================== - - * Fixed issue with reporting object assertions - -0.2.0 / 2010-06-21 -================== - - * Added `make uninstall` - * Added better readdir() failure message - * Fixed `make install` for kiwi - -0.1.0 / 2010-06-15 -================== - - * Added better usage docs via --help - * Added better conditional color support - * Added pre exit assertion support - -0.0.3 / 2010-06-02 -================== - - * Added more room for filenames in test coverage - * Added boring output support via --boring (suppress colored output) - * Fixed async failure exit status - -0.0.2 / 2010-05-30 -================== - - * Fixed exit status for CI support - -0.0.1 / 2010-05-30 -================== - - * Initial release \ No newline at end of file diff --git a/node_modules/ejs/support/expresso/Makefile b/node_modules/ejs/support/expresso/Makefile deleted file mode 100644 index 9348bbd..0000000 --- a/node_modules/ejs/support/expresso/Makefile +++ /dev/null @@ -1,50 +0,0 @@ - -BIN = bin/expresso -PREFIX = /usr/local -JSCOV = deps/jscoverage/node-jscoverage -DOCS = docs/index.md -HTMLDOCS = $(DOCS:.md=.html) - -test: $(BIN) - @./$(BIN) -I lib --growl $(TEST_FLAGS) test/*.test.js - -test-cov: - @./$(BIN) -I lib --cov $(TEST_FLAGS) test/*.test.js - -install: install-jscov install-expresso - -uninstall: - rm -f $(PREFIX)/bin/expresso - rm -f $(PREFIX)/bin/node-jscoverage - -install-jscov: $(JSCOV) - install $(JSCOV) $(PREFIX)/bin - -install-expresso: - install $(BIN) $(PREFIX)/bin - -$(JSCOV): - cd deps/jscoverage && ./configure && make && mv jscoverage node-jscoverage - -clean: - @cd deps/jscoverage && git clean -fd - -docs: docs/api.html $(HTMLDOCS) - -%.html: %.md - @echo "... $< > $@" - @ronn -5 --pipe --fragment $< \ - | cat docs/layout/head.html - docs/layout/foot.html \ - > $@ - -docs/api.html: bin/expresso - dox \ - --title "Expresso" \ - --ribbon "http://github.com/visionmedia/expresso" \ - --desc "Insanely fast TDD framework for [node](http://nodejs.org) featuring code coverage reporting." \ - $< > $@ - -docclean: - rm -f docs/*.html - -.PHONY: test test-cov install uninstall install-expresso install-jscov clean docs docclean \ No newline at end of file diff --git a/node_modules/ejs/support/expresso/Readme.md b/node_modules/ejs/support/expresso/Readme.md deleted file mode 100644 index dcc1c85..0000000 --- a/node_modules/ejs/support/expresso/Readme.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Expresso - - TDD framework for [nodejs](http://nodejs.org). - -## Features - - - light-weight - - intuitive async support - - intuitive test runner executable - - test coverage support and reporting - - uses the _assert_ module - - `assert.eql()` alias of `assert.deepEqual()` - - `assert.response()` http response utility - - `assert.includes()` - - `assert.type()` - - `assert.isNull()` - - `assert.isUndefined()` - - `assert.isNotNull()` - - `assert.isDefined()` - - `assert.match()` - - `assert.length()` - -## Installation - -To install both expresso _and_ node-jscoverage run: - - $ make install - -To install expresso alone (no build required) run: - - $ make install-expresso - -Install via npm: - - $ npm install expresso - - - diff --git a/node_modules/ejs/support/expresso/bin/expresso b/node_modules/ejs/support/expresso/bin/expresso deleted file mode 100755 index 96c7ff3..0000000 --- a/node_modules/ejs/support/expresso/bin/expresso +++ /dev/null @@ -1,775 +0,0 @@ -#!/usr/bin/env node - -/*! - * Expresso - * Copyright(c) TJ Holowaychuk - * (MIT Licensed) - */ - -/** - * Module dependencies. - */ - -var assert = require('assert'), - childProcess = require('child_process'), - http = require('http'), - path = require('path'), - sys = require('sys'), - cwd = process.cwd(), - fs = require('fs'), - defer; - -/** - * Expresso version. - */ - -var version = '0.6.1'; - -/** - * Failure count. - */ - -var failures = 0; - - -/** - * Number of tests executed. - */ - -var testcount = 0; - -/** - * Whitelist of tests to run. - */ - -var only = []; - -/** - * Boring output. - */ - -var boring = false; - -/** - * Growl notifications. - */ - -var growl = false; - -/** - * Server port. - */ - -var port = 5555; - -/** - * Watch mode. - */ - -var watch = false; - -/** - * Usage documentation. - */ - -var usage = '' - + '[bold]{Usage}: expresso [options] ' - + '\n' - + '\n[bold]{Options}:' - + '\n -w, --watch Watch for modifications and re-execute tests' - + '\n -g, --growl Enable growl notifications' - + '\n -c, --coverage Generate and report test coverage' - + '\n -r, --require PATH Require the given module path' - + '\n -o, --only TESTS Execute only the comma sperated TESTS (can be set several times)' - + '\n -I, --include PATH Unshift the given path to require.paths' - + '\n -p, --port NUM Port number for test servers, starts at 5555' - + '\n -b, --boring Suppress ansi-escape colors' - + '\n -v, --version Output version number' - + '\n -h, --help Display help information' - + '\n'; - -// Parse arguments - -var files = [], - args = process.argv.slice(2); - -while (args.length) { - var arg = args.shift(); - switch (arg) { - case '-h': - case '--help': - print(usage + '\n'); - process.exit(1); - break; - case '-v': - case '--version': - sys.puts(version); - process.exit(1); - break; - case '-i': - case '-I': - case '--include': - if (arg = args.shift()) { - require.paths.unshift(arg); - } else { - throw new Error('--include requires a path'); - } - break; - case '-o': - case '--only': - if (arg = args.shift()) { - only = only.concat(arg.split(/ *, */)); - } else { - throw new Error('--only requires comma-separated test names'); - } - break; - case '-p': - case '--port': - if (arg = args.shift()) { - port = parseInt(arg, 10); - } else { - throw new Error('--port requires a number'); - } - break; - case '-r': - case '--require': - if (arg = args.shift()) { - require(arg); - } else { - throw new Error('--require requires a path'); - } - break; - case '-c': - case '--cov': - case '--coverage': - defer = true; - childProcess.exec('rm -fr lib-cov && node-jscoverage lib lib-cov', function(err){ - if (err) throw err; - require.paths.unshift('lib-cov'); - run(files); - }) - break; - case '-b': - case '--boring': - boring = true; - break; - case '-w': - case '--watch': - watch = true; - break; - case '--g': - case '--growl': - growl = true; - break; - default: - if (/\.js$/.test(arg)) { - files.push(arg); - } - break; - } -} - -/** - * Colorized sys.error(). - * - * @param {String} str - */ - -function print(str){ - sys.error(colorize(str)); -} - -/** - * Colorize the given string using ansi-escape sequences. - * Disabled when --boring is set. - * - * @param {String} str - * @return {String} - */ - -function colorize(str){ - var colors = { bold: 1, red: 31, green: 32, yellow: 33 }; - return str.replace(/\[(\w+)\]\{([^]*?)\}/g, function(_, color, str){ - return boring - ? str - : '\x1B[' + colors[color] + 'm' + str + '\x1B[0m'; - }); -} - -// Alias deepEqual as eql for complex equality - -assert.eql = assert.deepEqual; - -/** - * Assert that `val` is null. - * - * @param {Mixed} val - * @param {String} msg - */ - -assert.isNull = function(val, msg) { - assert.strictEqual(null, val, msg); -}; - -/** - * Assert that `val` is not null. - * - * @param {Mixed} val - * @param {String} msg - */ - -assert.isNotNull = function(val, msg) { - assert.notStrictEqual(null, val, msg); -}; - -/** - * Assert that `val` is undefined. - * - * @param {Mixed} val - * @param {String} msg - */ - -assert.isUndefined = function(val, msg) { - assert.strictEqual(undefined, val, msg); -}; - -/** - * Assert that `val` is not undefined. - * - * @param {Mixed} val - * @param {String} msg - */ - -assert.isDefined = function(val, msg) { - assert.notStrictEqual(undefined, val, msg); -}; - -/** - * Assert that `obj` is `type`. - * - * @param {Mixed} obj - * @param {String} type - * @api public - */ - -assert.type = function(obj, type, msg){ - var real = typeof obj; - msg = msg || 'typeof ' + sys.inspect(obj) + ' is ' + real + ', expected ' + type; - assert.ok(type === real, msg); -}; - -/** - * Assert that `str` matches `regexp`. - * - * @param {String} str - * @param {RegExp} regexp - * @param {String} msg - */ - -assert.match = function(str, regexp, msg) { - msg = msg || sys.inspect(str) + ' does not match ' + sys.inspect(regexp); - assert.ok(regexp.test(str), msg); -}; - -/** - * Assert that `val` is within `obj`. - * - * Examples: - * - * assert.includes('foobar', 'bar'); - * assert.includes(['foo', 'bar'], 'foo'); - * - * @param {String|Array} obj - * @param {Mixed} val - * @param {String} msg - */ - -assert.includes = function(obj, val, msg) { - msg = msg || sys.inspect(obj) + ' does not include ' + sys.inspect(val); - assert.ok(obj.indexOf(val) >= 0, msg); -}; - -/** - * Assert length of `val` is `n`. - * - * @param {Mixed} val - * @param {Number} n - * @param {String} msg - */ - -assert.length = function(val, n, msg) { - msg = msg || sys.inspect(val) + ' has length of ' + val.length + ', expected ' + n; - assert.equal(n, val.length, msg); -}; - -/** - * Assert response from `server` with - * the given `req` object and `res` assertions object. - * - * @param {Server} server - * @param {Object} req - * @param {Object|Function} res - * @param {String} msg - */ - -assert.response = function(server, req, res, msg){ - // Callback as third or fourth arg - var callback = typeof res === 'function' - ? res - : typeof msg === 'function' - ? msg - : function(){}; - - // Default messate to test title - if (typeof msg === 'function') msg = null; - msg = msg || assert.testTitle; - msg += '. '; - - // Pending responses - server.__pending = server.__pending || 0; - server.__pending++; - - // Create client - if (!server.fd) { - server.listen(server.__port = port++); - server.client = http.createClient(server.__port); - } - - // Issue request - var timer, - client = server.client, - method = req.method || 'GET', - status = res.status || res.statusCode, - data = req.data || req.body, - timeout = req.timeout || 0; - - var request = client.request(method, req.url, req.headers); - - // Timeout - if (timeout) { - timer = setTimeout(function(){ - --server.__pending || server.close(); - delete req.timeout; - assert.fail(msg + 'Request timed out after ' + timeout + 'ms.'); - }, timeout); - } - - if (data) request.write(data); - request.addListener('response', function(response){ - response.body = ''; - response.setEncoding('utf8'); - response.addListener('data', function(chunk){ response.body += chunk; }); - response.addListener('end', function(){ - --server.__pending || server.close(); - if (timer) clearTimeout(timer); - - // Assert response body - if (res.body !== undefined) { - assert.equal( - response.body, - res.body, - msg + 'Invalid response body.\n' - + ' Expected: ' + sys.inspect(res.body) + '\n' - + ' Got: ' + sys.inspect(response.body) - ); - } - - // Assert response status - if (typeof status === 'number') { - assert.equal( - response.statusCode, - status, - msg + colorize('Invalid response status code.\n' - + ' Expected: [green]{' + status + '}\n' - + ' Got: [red]{' + response.statusCode + '}') - ); - } - - // Assert response headers - if (res.headers) { - var keys = Object.keys(res.headers); - for (var i = 0, len = keys.length; i < len; ++i) { - var name = keys[i], - actual = response.headers[name.toLowerCase()], - expected = res.headers[name]; - assert.equal( - actual, - expected, - msg + colorize('Invalid response header [bold]{' + name + '}.\n' - + ' Expected: [green]{' + expected + '}\n' - + ' Got: [red]{' + actual + '}') - ); - } - } - - // Callback - callback(response); - }); - }); - request.end(); -}; - -/** - * Pad the given string to the maximum width provided. - * - * @param {String} str - * @param {Number} width - * @return {String} - */ - -function lpad(str, width) { - str = String(str); - var n = width - str.length; - if (n < 1) return str; - while (n--) str = ' ' + str; - return str; -} - -/** - * Pad the given string to the maximum width provided. - * - * @param {String} str - * @param {Number} width - * @return {String} - */ - -function rpad(str, width) { - str = String(str); - var n = width - str.length; - if (n < 1) return str; - while (n--) str = str + ' '; - return str; -} - -/** - * Report test coverage. - * - * @param {Object} cov - */ - -function reportCoverage(cov) { - populateCoverage(cov); - // Stats - print('\n [bold]{Test Coverage}\n'); - var sep = ' +------------------------------------------+----------+------+------+--------+', - lastSep = ' +----------+------+------+--------+'; - sys.puts(sep); - sys.puts(' | filename | coverage | LOC | SLOC | missed |'); - sys.puts(sep); - for (var name in cov) { - var file = cov[name]; - if (Array.isArray(file)) { - sys.print(' | ' + rpad(name, 40)); - sys.print(' | ' + lpad(file.coverage.toFixed(2), 8)); - sys.print(' | ' + lpad(file.LOC, 4)); - sys.print(' | ' + lpad(file.SLOC, 4)); - sys.print(' | ' + lpad(file.totalMisses, 6)); - sys.print(' |\n'); - } - } - sys.puts(sep); - sys.print(' ' + rpad('', 40)); - sys.print(' | ' + lpad(cov.coverage.toFixed(2), 8)); - sys.print(' | ' + lpad(cov.LOC, 4)); - sys.print(' | ' + lpad(cov.SLOC, 4)); - sys.print(' | ' + lpad(cov.totalMisses, 6)); - sys.print(' |\n'); - sys.puts(lastSep); - // Source - for (var name in cov) { - if (name.match(/\.js$/)) { - var file = cov[name]; - print('\n [bold]{' + name + '}:'); - print(file.source); - sys.print('\n'); - } - } -} - -/** - * Populate code coverage data. - * - * @param {Object} cov - */ - -function populateCoverage(cov) { - cov.LOC = - cov.SLOC = - cov.totalFiles = - cov.totalHits = - cov.totalMisses = - cov.coverage = 0; - for (var name in cov) { - var file = cov[name]; - if (Array.isArray(file)) { - // Stats - ++cov.totalFiles; - cov.totalHits += file.totalHits = coverage(file, true); - cov.totalMisses += file.totalMisses = coverage(file, false); - file.totalLines = file.totalHits + file.totalMisses; - cov.SLOC += file.SLOC = file.totalLines; - cov.LOC += file.LOC = file.source.length; - file.coverage = (file.totalHits / file.totalLines) * 100; - // Source - var width = file.source.length.toString().length; - file.source = file.source.map(function(line, i){ - ++i; - var hits = file[i] === 0 ? 0 : (file[i] || ' '); - if (!boring) { - if (hits === 0) { - hits = '\x1b[31m' + hits + '\x1b[0m'; - line = '\x1b[41m' + line + '\x1b[0m'; - } else { - hits = '\x1b[32m' + hits + '\x1b[0m'; - } - } - return '\n ' + lpad(i, width) + ' | ' + hits + ' | ' + line; - }).join(''); - } - } - cov.coverage = (cov.totalHits / cov.SLOC) * 100; -} - -/** - * Total coverage for the given file data. - * - * @param {Array} data - * @return {Type} - */ - -function coverage(data, val) { - var n = 0; - for (var i = 0, len = data.length; i < len; ++i) { - if (data[i] !== undefined && data[i] == val) ++n; - } - return n; -} - -/** - * Run the given test `files`, or try _test/*_. - * - * @param {Array} files - */ - -function run(files) { - if (!files.length) { - try { - files = fs.readdirSync('test').map(function(file){ - return 'test/' + file; - }); - } catch (err) { - print('\n failed to load tests in [bold]{./test}\n'); - ++failures; - process.exit(1); - } - } - if (watch) watchFiles(files); - runFiles(files); -} - -/** - * Show the cursor when `show` is true, otherwise hide it. - * - * @param {Boolean} show - */ - -function cursor(show) { - if (show) { - sys.print('\x1b[?25h'); - } else { - sys.print('\x1b[?25l'); - } -} - -/** - * Run the given test `files`. - * - * @param {Array} files - */ - -function runFiles(files) { - files.forEach(runFile); -} - -/** - * Run tests for the given `file`. - * - * @param {String} file - */ - -function runFile(file) { - if (file.match(/\.js$/)) { - var title = path.basename(file), - file = path.join(cwd, file), - mod = require(file.replace(/\.js$/, '')); - (function check(){ - var len = Object.keys(mod).length; - if (len) { - runSuite(title, mod); - } else { - setTimeout(check, 20); - } - })(); - } -} - -/** - * Clear the module cache for the given `file`. - * - * @param {String} file - */ - -function clearCache(file) { - var keys = Object.keys(module.moduleCache); - for (var i = 0, len = keys.length; i < len; ++i) { - var key = keys[i]; - if (key.indexOf(file) === key.length - file.length) { - delete module.moduleCache[key]; - } - } -} - -/** - * Watch the given `files` for changes. - * - * @param {Array} files - */ - -function watchFiles(files) { - var p = 0, - c = ['▫ ', '▫▫ ', '▫▫▫ ', ' ▫▫▫', - ' ▫▫', ' ▫', ' ▫', ' ▫▫', - '▫▫▫ ', '▫▫ ', '▫ '], - l = c.length; - cursor(false); - setInterval(function(){ - sys.print(colorize(' [green]{' + c[p++ % l] + '} watching\r')); - }, 100); - files.forEach(function(file){ - fs.watchFile(file, { interval: 100 }, function(curr, prev){ - if (curr.mtime > prev.mtime) { - print(' [yellow]{◦} ' + file); - clearCache(file); - runFile(file); - } - }); - }); -} - -/** - * Report `err` for the given `test` and `suite`. - * - * @param {String} suite - * @param {String} test - * @param {Error} err - */ - -function error(suite, test, err) { - ++failures; - var name = err.name, - stack = err.stack.replace(err.name, ''), - label = test === 'uncaught' - ? test - : suite + ' ' + test; - print('\n [bold]{' + label + '}: [red]{' + name + '}' + stack + '\n'); - if (watch) notify(label + ' failed'); -} - -/** - * Run the given tests. - * - * @param {String} title - * @param {Object} tests - */ - -function runSuite(title, tests) { - var keys = only.length - ? only.slice(0) - : Object.keys(tests); - (function next(){ - if (keys.length) { - var key, - test = tests[key = keys.shift()]; - if (test) { - try { - ++testcount; - assert.testTitle = key; - test(assert, function(fn){ - process.addListener('beforeExit', function(){ - try { - fn(); - } catch (err) { - error(title, key, err); - } - }); - }); - } catch (err) { - error(title, key, err); - } - } - next(); - } - })(); -} - -/** - * Report exceptions. - */ - -function report() { - process.emit('beforeExit'); - if (failures) { - print('\n [bold]{Failures}: [red]{' + failures + '}\n\n'); - notify('Failures: ' + failures); - } else { - print('\n [green]{100%} ' + testcount + ' tests\n'); - notify('100% ok'); - } - if (typeof _$jscoverage === 'object') { - reportCoverage(_$jscoverage); - } -} - -/** - * Growl notify the given `msg`. - * - * @param {String} msg - */ - -function notify(msg) { - if (growl) { - childProcess.exec('growlnotify -name Expresso -m "' + msg + '"'); - } -} - -// Report uncaught exceptions - -process.addListener('uncaughtException', function(err){ - error('uncaught', 'uncaught', err); -}); - -// Show cursor - -['INT', 'TERM', 'QUIT'].forEach(function(sig){ - process.addListener('SIG' + sig, function(){ - cursor(true); - process.exit(1); - }); -}); - -// Report test coverage when available -// and emit "beforeExit" event to perform -// final assertions - -var orig = process.emit; -process.emit = function(event){ - if (event === 'exit') { - report(); - process.reallyExit(failures); - } - orig.apply(this, arguments); -}; - -// Run test files - -if (!defer) run(files); diff --git a/node_modules/ejs/support/expresso/docs/api.html b/node_modules/ejs/support/expresso/docs/api.html deleted file mode 100644 index 4496371..0000000 --- a/node_modules/ejs/support/expresso/docs/api.html +++ /dev/null @@ -1,989 +0,0 @@ -
Fork me on GitHub - - Expresso - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Expresso

Insanely fast TDD framework for node featuring code coverage reporting.

expresso

bin/expresso
-

!/usr/bin/env node

-
-
!
- * Expresso
- * Copyright(c) TJ Holowaychuk &lt;tj@vision-media.ca&gt;
- * (MIT Licensed)
- 
-
-

Module dependencies. -

-
-
var assert = require('assert'),
-    childProcess = require('child_process'),
-    http = require('http'),
-    path = require('path'),
-    sys = require('sys'),
-    cwd = process.cwd(),
-    fs = require('fs'),
-    defer;
-
-

Expresso version. -

-
-
var version = '0.6.0';
-
-

Failure count. -

-
-
var failures = 0;
-
-

Whitelist of tests to run. -

-
-
var only = [];
-
-

Boring output. -

-
-
var boring = false;
-
-

Growl notifications. -

-
-
var growl = false;
-
-

Server port. -

-
-
var port = 5555;
-
-

Watch mode. -

-
-
var watch = false;
-
-

Usage documentation. -

-
-
var usage = ''
-    + '[bold]{Usage}: expresso [options] <file ...>'
-    + '\n'
-    + '\n[bold]{Options}:'
-    + '\n  -w, --watch          Watch for modifications and re-execute tests'
-    + '\n  -g, --growl          Enable growl notifications'
-    + '\n  -c, --coverage       Generate and report test coverage'
-    + '\n  -r, --require PATH   Require the given module path'
-    + '\n  -o, --only TESTS     Execute only the comma sperated TESTS (can be set several times)'
-    + '\n  -I, --include PATH   Unshift the given path to require.paths'
-    + '\n  -p, --port NUM       Port number for test servers, starts at 5555'
-    + '\n  -b, --boring         Suppress ansi-escape colors'
-    + '\n  -v, --version        Output version number'
-    + '\n  -h, --help           Display help information'
-    + '\n';
-
-// Parse arguments
-
-var files = [],
-    args = process.argv.slice(2);
-
-while (args.length) {
-    var arg = args.shift();
-    switch (arg) {
-        case '-h':
-        case '--help':
-            print(usage + '\n');
-            process.exit(1);
-            break;
-        case '-v':
-        case '--version':
-            sys.puts(version);
-            process.exit(1);
-            break;
-        case '-i':
-        case '-I':
-        case '--include':
-            if (arg = args.shift()) {
-                require.paths.unshift(arg);
-            } else {
-                throw new Error('--include requires a path');
-            }
-            break;
-        case '-o':
-        case '--only':
-            if (arg = args.shift()) {
-                only = only.concat(arg.split(/ *, */));
-            } else {
-                throw new Error('--only requires comma-separated test names');
-            }
-            break;
-        case '-p':
-        case '--port':
-            if (arg = args.shift()) {
-                port = parseInt(arg, 10);
-            } else {
-                throw new Error('--port requires a number');
-            }
-            break;
-        case '-r':
-        case '--require':
-            if (arg = args.shift()) {
-                require(arg);
-            } else {
-                throw new Error('--require requires a path');
-            }
-            break;
-        case '-c':
-        case '--cov':
-        case '--coverage':
-            defer = true;
-            childProcess.exec('rm -fr lib-cov && node-jscoverage lib lib-cov', function(err){
-                if (err) throw err;
-                require.paths.unshift('lib-cov');
-                run(files);
-            })
-            break;
-        case '-b':
-        case '--boring':
-        	boring = true;
-        	break;
-        case '-w':
-        case '--watch':
-            watch = true;
-            break;
-        case '--g':
-        case '--growl':
-            growl = true;
-            break;
-        default:
-            if (/\.js$/.test(arg)) {
-                files.push(arg);
-            }
-            break;
-    }
-}
-
-

Colorized sys.error().

- -

- -
  • param: String str

-
-
function print(str){
-    sys.error(colorize(str));
-}
-
-

Colorize the given string using ansi-escape sequences. -Disabled when --boring is set.

- -

- -
  • param: String str

  • return: String

-
-
function colorize(str){
-    var colors = { bold: 1, red: 31, green: 32, yellow: 33 };
-    return str.replace(/\[(\w+)\]\{([^]*?)\}/g, function(_, color, str){
-        return boring
-            ? str
-            : '\x1B[' + colors[color] + 'm' + str + '\x1B[0m';
-    });
-}
-
-// Alias deepEqual as eql for complex equality
-
-assert.eql = assert.deepEqual;
-
-

Assert that val is null.

- -

- -
  • param: Mixed val

  • param: String msg

-
-
assert.isNull = function(val, msg) {
-    assert.strictEqual(null, val, msg);
-};
-
-

Assert that val is not null.

- -

- -
  • param: Mixed val

  • param: String msg

-
-
assert.isNotNull = function(val, msg) {
-    assert.notStrictEqual(null, val, msg);
-};
-
-

Assert that val is undefined.

- -

- -
  • param: Mixed val

  • param: String msg

-
-
assert.isUndefined = function(val, msg) {
-    assert.strictEqual(undefined, val, msg);
-};
-
-

Assert that val is not undefined.

- -

- -
  • param: Mixed val

  • param: String msg

-
-
assert.isDefined = function(val, msg) {
-    assert.notStrictEqual(undefined, val, msg);
-};
-
-

Assert that obj is type.

- -

- -
  • param: Mixed obj

  • param: String type

  • api: public

-
-
assert.type = function(obj, type, msg){
-    var real = typeof obj;
-    msg = msg || 'typeof ' + sys.inspect(obj) + ' is ' + real + ', expected ' + type;
-    assert.ok(type === real, msg);
-};
-
-

Assert that str matches regexp.

- -

- -
  • param: String str

  • param: RegExp regexp

  • param: String msg

-
-
assert.match = function(str, regexp, msg) {
-    msg = msg || sys.inspect(str) + ' does not match ' + sys.inspect(regexp);
-    assert.ok(regexp.test(str), msg);
-};
-
-

Assert that val is within obj.

- -

Examples

- -

assert.includes('foobar', 'bar'); - assert.includes(['foo', 'bar'], 'foo');

- -

- -
  • param: String | Array obj

  • param: Mixed val

  • param: String msg

-
-
assert.includes = function(obj, val, msg) {
-    msg = msg || sys.inspect(obj) + ' does not include ' + sys.inspect(val);
-    assert.ok(obj.indexOf(val) &gt;= 0, msg);
-};
-
-

Assert length of val is n.

- -

- -
  • param: Mixed val

  • param: Number n

  • param: String msg

-
-
assert.length = function(val, n, msg) {
-    msg = msg || sys.inspect(val) + ' has length of ' + val.length + ', expected ' + n;
-    assert.equal(n, val.length, msg);
-};
-
-

Assert response from server with -the given req object and res assertions object.

- -

- -
  • param: Server server

  • param: Object req

  • param: Object | Function res

  • param: String msg

-
-
assert.response = function(server, req, res, msg){
-    // Callback as third or fourth arg
-    var callback = typeof res === 'function'
-        ? res
-        : typeof msg === 'function'
-            ? msg
-            : function(){};
-
-    // Default messate to test title
-    msg = msg || assert.testTitle;
-    msg += '. ';
-
-    // Pending responses
-    server.__pending = server.__pending || 0;
-    server.__pending++;
-
-    // Create client
-    if (!server.fd) {
-        server.listen(server.__port = port++);
-        server.client = http.createClient(server.__port);
-    }
-
-    // Issue request
-    var timer,
-        client = server.client,
-        method = req.method || 'GET',
-        status = res.status || res.statusCode,
-        data = req.data || req.body,
-        timeout = req.timeout || 0;
-
-    var request = client.request(method, req.url, req.headers);
-
-    // Timeout
-    if (timeout) {
-        timer = setTimeout(function(){
-            --server.__pending || server.close();
-            delete req.timeout;
-            assert.fail(msg + 'Request timed out after ' + timeout + 'ms.');
-        }, timeout);
-    }
-
-    if (data) request.write(data);
-    request.addListener('response', function(response){
-        response.body = '';
-        response.setEncoding('utf8');
-        response.addListener('data', function(chunk){ response.body += chunk; });
-        response.addListener('end', function(){
-            --server.__pending || server.close();
-            if (timer) clearTimeout(timer);
-
-            // Assert response body
-            if (res.body !== undefined) {
-                assert.equal(
-                    response.body,
-                    res.body,
-                    msg + 'Invalid response body.\n'
-                        + '    Expected: ' + sys.inspect(res.body) + '\n'
-                        + '    Got: ' + sys.inspect(response.body)
-                );
-            }
-
-            // Assert response status
-            if (typeof status === 'number') {
-                assert.equal(
-                    response.statusCode,
-                    status,
-                    msg + colorize('Invalid response status code.\n'
-                        + '    Expected: [green]{' + status + '}\n'
-                        + '    Got: [red]{' + response.statusCode + '}')
-                );
-            }
-
-            // Assert response headers
-            if (res.headers) {
-                var keys = Object.keys(res.headers);
-                for (var i = 0, len = keys.length; i &lt; len; ++i) {
-                    var name = keys[i],
-                        actual = response.headers[name.toLowerCase()],
-                        expected = res.headers[name];
-                    assert.equal(
-                        actual,
-                        expected,
-                        msg + colorize('Invalid response header [bold]{' + name + '}.\n'
-                            + '    Expected: [green]{' + expected + '}\n'
-                            + '    Got: [red]{' + actual + '}')
-                    );
-                }
-            }
-
-            // Callback
-            callback(response);
-        });
-    });
-    request.end();
-};
-
-

Pad the given string to the maximum width provided.

- -

- -
  • param: String str

  • param: Number width

  • return: String

-
-
function lpad(str, width) {
-    str = String(str);
-    var n = width - str.length;
-    if (n &lt; 1) return str;
-    while (n--) str = ' ' + str;
-    return str;
-}
-
-

Pad the given string to the maximum width provided.

- -

- -
  • param: String str

  • param: Number width

  • return: String

-
-
function rpad(str, width) {
-    str = String(str);
-    var n = width - str.length;
-    if (n &lt; 1) return str;
-    while (n--) str = str + ' ';
-    return str;
-}
-
-

Report test coverage.

- -

- -
  • param: Object cov

-
-
function reportCoverage(cov) {
-    populateCoverage(cov);
-    // Stats
-    print('\n   [bold]{Test Coverage}\n');
-    var sep = '   +------------------------------------------+----------+------+------+--------+',
-        lastSep = '                                              +----------+------+------+--------+';
-    sys.puts(sep);
-    sys.puts('   | filename                                 | coverage | LOC  | SLOC | missed |');
-    sys.puts(sep);
-    for (var name in cov) {
-        var file = cov[name];
-        if (Array.isArray(file)) {
-            sys.print('   | ' + rpad(name, 40));
-            sys.print(' | ' + lpad(file.coverage.toFixed(2), 8));
-            sys.print(' | ' + lpad(file.LOC, 4));
-            sys.print(' | ' + lpad(file.SLOC, 4));
-            sys.print(' | ' + lpad(file.totalMisses, 6));
-            sys.print(' |\n');
-        }
-    }
-    sys.puts(sep);
-    sys.print('     ' + rpad('', 40));
-    sys.print(' | ' + lpad(cov.coverage.toFixed(2), 8));
-    sys.print(' | ' + lpad(cov.LOC, 4));
-    sys.print(' | ' + lpad(cov.SLOC, 4));
-    sys.print(' | ' + lpad(cov.totalMisses, 6));
-    sys.print(' |\n');
-    sys.puts(lastSep);
-    // Source
-    for (var name in cov) {
-        if (name.match(/\.js$/)) {
-            var file = cov[name];
-            print('\n   [bold]{' + name + '}:');
-            print(file.source);
-            sys.print('\n');
-        }
-    }
-}
-
-

Populate code coverage data.

- -

- -
  • param: Object cov

-
-
function populateCoverage(cov) {
-    cov.LOC = 
-    cov.SLOC =
-    cov.totalFiles =
-    cov.totalHits =
-    cov.totalMisses = 
-    cov.coverage = 0;
-    for (var name in cov) {
-        var file = cov[name];
-        if (Array.isArray(file)) {
-            // Stats
-            ++cov.totalFiles;
-            cov.totalHits += file.totalHits = coverage(file, true);
-            cov.totalMisses += file.totalMisses = coverage(file, false);
-            file.totalLines = file.totalHits + file.totalMisses;
-            cov.SLOC += file.SLOC = file.totalLines;
-            cov.LOC += file.LOC = file.source.length;
-            file.coverage = (file.totalHits / file.totalLines) * 100;
-            // Source
-            var width = file.source.length.toString().length;
-            file.source = file.source.map(function(line, i){
-                ++i;
-                var hits = file[i] === 0 ? 0 : (file[i] || ' ');
-                if (!boring) {
-                    if (hits === 0) {
-                        hits = '\x1b[31m' + hits + '\x1b[0m';
-                        line = '\x1b[41m' + line + '\x1b[0m';
-                    } else {
-                        hits = '\x1b[32m' + hits + '\x1b[0m';
-                    }
-                }
-                return '\n     ' + lpad(i, width) + ' | ' + hits + ' | ' + line;
-            }).join('');
-        }
-    }
-    cov.coverage = (cov.totalHits / cov.SLOC) * 100;
-}
-
-

Total coverage for the given file data.

- -

- -
  • param: Array data

  • return: Type

-
-
function coverage(data, val) {
-    var n = 0;
-    for (var i = 0, len = data.length; i &lt; len; ++i) {
-        if (data[i] !== undefined &amp;&amp; data[i] == val) ++n;
-    }
-    return n;  
-}
-
-

Run the given test files, or try test/*.

- -

- -
  • param: Array files

-
-
function run(files) {
-    if (!files.length) {
-        try {
-            files = fs.readdirSync('test').map(function(file){
-                return 'test/' + file;
-            });
-        } catch (err) {
-            print('\n  failed to load tests in [bold]{./test}\n');
-            ++failures;
-            process.exit(1);
-        }
-    }
-    if (watch) watchFiles(files);
-    runFiles(files);
-}
-
-

Show the cursor when show is true, otherwise hide it.

- -

- -
  • param: Boolean show

-
-
function cursor(show) {
-    if (show) {
-        sys.print('\x1b[?25h');
-    } else {
-        sys.print('\x1b[?25l');
-    }
-}
-
-

Run the given test files.

- -

- -
  • param: Array files

-
-
function runFiles(files) {
-    files.forEach(runFile);
-}
-
-

Run tests for the given file.

- -

- -
  • param: String file

-
-
function runFile(file) {
-    if (file.match(/\.js$/)) {
-        var title = path.basename(file),
-            file = path.join(cwd, file),
-            mod = require(file.replace(/\.js$/, ''));
-        (function check(){
-           var len = Object.keys(mod).length;
-           if (len) {
-               runSuite(title, mod);
-           } else {
-               setTimeout(check, 20);
-           }
-        })();
-    }
-}
-
-

Clear the module cache for the given file.

- -

- -
  • param: String file

-
-
function clearCache(file) {
-    var keys = Object.keys(module.moduleCache);
-    for (var i = 0, len = keys.length; i &lt; len; ++i) {
-        var key = keys[i];
-        if (key.indexOf(file) === key.length - file.length) {
-            delete module.moduleCache[key];
-        }
-    }
-}
-
-

Watch the given files for changes.

- -

- -
  • param: Array files

-
-
function watchFiles(files) {
-    var p = 0,
-        c = ['▫   ', '▫▫  ', '▫▫▫ ', ' ▫▫▫',
-             '  ▫▫', '   ▫', '   ▫', '  ▫▫',
-             '▫▫▫ ', '▫▫  ', '▫   '],
-        l = c.length;
-    cursor(false);
-    setInterval(function(){
-        sys.print(colorize('  [green]{' + c[p++ % l] + '} watching\r'));
-    }, 100);
-    files.forEach(function(file){
-        fs.watchFile(file, { interval: 100 }, function(curr, prev){
-            if (curr.mtime &gt; prev.mtime) {
-                print('  [yellow]{◦} ' + file);
-                clearCache(file);
-                runFile(file);
-            }
-        });
-    });
-}
-
-

Report err for the given test and suite.

- -

- -
  • param: String suite

  • param: String test

  • param: Error err

-
-
function error(suite, test, err) {
-    ++failures;
-    var name = err.name,
-        stack = err.stack.replace(err.name, ''),
-        label = test === 'uncaught'
-            ? test
-            : suite + ' ' + test;
-    print('\n   [bold]{' + label + '}: [red]{' + name + '}' + stack + '\n');
-    if (watch) notify(label + ' failed');
-}
-
-

Run the given tests.

- -

- -
  • param: String title

  • param: Object tests

-
-
function runSuite(title, tests) {
-    var keys = only.length
-        ? only.slice(0)
-        : Object.keys(tests);
-    (function next(){
-        if (keys.length) {
-            var key,
-                test = tests[key = keys.shift()];
-            if (test) {
-                try {
-                    assert.testTitle = key;
-                    test(assert, function(fn){
-                        process.addListener('beforeExit', function(){
-                            try {
-                                fn();
-                            } catch (err) {
-                                error(title, key, err);
-                            }
-                        });
-                    });
-                } catch (err) {
-                    error(title, key, err);
-                }
-            }
-            next();
-        }
-    })();
-}
-
-

Report exceptions. -

-
-
function report() {
-    process.emit('beforeExit');
-    if (failures) {
-        print('\n   [bold]{Failures}: [red]{' + failures + '}\n\n');
-        notify('Failures: ' + failures);
-    } else {
-    	print('\n   [green]{100%} ok\n');
-    	notify('100% ok');
-    }
-    if (typeof _$jscoverage === 'object') {
-        reportCoverage(_$jscoverage);
-    }
-}
-
-

Growl notify the given msg.

- -

- -
  • param: String msg

-
-
function notify(msg) {
-    if (growl) {
-        childProcess.exec('growlnotify -name Expresso -m "' + msg + '"');
-    }
-}
-
-// Report uncaught exceptions
-
-process.addListener('uncaughtException', function(err){
-    error('uncaught', 'uncaught', err);
-});
-
-// Show cursor
-
-['INT', 'TERM', 'QUIT'].forEach(function(sig){
-    process.addListener('SIG' + sig, function(){
-        cursor(true);
-        process.exit(1);
-    });
-});
-
-// Report test coverage when available
-// and emit "beforeExit" event to perform
-// final assertions
-
-var orig = process.emit;
-process.emit = function(event){
-    if (event === 'exit') {
-        report();
-        process.reallyExit(failures);
-    }
-    orig.apply(this, arguments);
-};
-
-// Run test files
-
-if (!defer) run(files);
-
-
\ No newline at end of file diff --git a/node_modules/ejs/support/expresso/docs/index.html b/node_modules/ejs/support/expresso/docs/index.html deleted file mode 100644 index 5ae18ab..0000000 --- a/node_modules/ejs/support/expresso/docs/index.html +++ /dev/null @@ -1,380 +0,0 @@ - - - Expresso - TDD Framework For Node - - - - - Fork me on GitHub - - -
-

Expresso

-
-

Expresso is a JavaScript TDD framework written for nodejs. Expresso is extremely fast, and is packed with features such as additional assertion methods, code coverage reporting, CI support, and more.

- -

Features

- -
    -
  • light-weight
  • -
  • intuitive async support
  • -
  • intuitive test runner executable
  • -
  • test coverage support and reporting via node-jscoverage
  • -
  • uses and extends the core assert module
  • -
  • assert.eql() alias of assert.deepEqual()
  • -
  • assert.response() http response utility
  • -
  • assert.includes()
  • -
  • assert.isNull()
  • -
  • assert.isUndefined()
  • -
  • assert.isNotNull()
  • -
  • assert.isDefined()
  • -
  • assert.match()
  • -
  • assert.length()
  • -
- - -

Installation

- -

To install both expresso and node-jscoverage run -the command below, which will first compile node-jscoverage:

- -
$ make install
-
- -

To install expresso alone without coverage reporting run:

- -
$ make install-expresso
-
- -

Install via npm:

- -
$ npm install expresso
-
- -

Examples

- -

Examples

- -

To define tests we simply export several functions:

- -
exports['test String#length'] = function(assert){
-    assert.equal(6, 'foobar'.length);
-};
-
- -

Alternatively for large numbers of tests you may want to -export your own object containing the tests, however this -is essentially the as above:

- -
module.exports = {
-    'test String#length': function(assert){
-        assert.equal(6, 'foobar'.length);
-    }
-};
-
- -

If you prefer not to use quoted keys:

- -
exports.testsStringLength = function(assert){
-    assert.equal(6, 'foobar'.length);
-};
-
- -

The second argument passed to each callback is beforeExit, -which is typically used to assert that callbacks have been -invoked.

- -
exports.testAsync = function(assert, beforeExit){
-    var n = 0;
-    setTimeout(function(){
-        ++n;
-        assert.ok(true);
-    }, 200);
-    setTimeout(function(){
-        ++n;
-        assert.ok(true);
-    }, 200);
-    beforeExit(function(){
-        assert.equal(2, n, 'Ensure both timeouts are called');
-    });
-};
-
- -

Assert Utilities

- -

assert.isNull(val[, msg])

- -

Asserts that the given val is null.

- -
assert.isNull(null);
-
- -

assert.isNotNull(val[, msg])

- -

Asserts that the given val is not null.

- -
assert.isNotNull(undefined);
-assert.isNotNull(false);
-
- -

assert.isUndefined(val[, msg])

- -

Asserts that the given val is undefined.

- -
assert.isUndefined(undefined);
-
- -

assert.isDefined(val[, msg])

- -

Asserts that the given val is not undefined.

- -
assert.isDefined(null);
-assert.isDefined(false);
-
- -

assert.match(str, regexp[, msg])

- -

Asserts that the given str matches regexp.

- -
assert.match('foobar', /^foo(bar)?/);
-assert.match('foo', /^foo(bar)?/);
-
- -

assert.length(val, n[, msg])

- -

Assert that the given val has a length of n.

- -
assert.length([1,2,3], 3);
-assert.length('foo', 3);
-
- -

assert.type(obj, type[, msg])

- -

Assert that the given obj is typeof type.

- -
assert.type(3, 'number');
-
- -

assert.eql(a, b[, msg])

- -

Assert that object b is equal to object a. This is an -alias for the core assert.deepEqual() method which does complex -comparisons, opposed to assert.equal() which uses ==.

- -
assert.eql('foo', 'foo');
-assert.eql([1,2], [1,2]);
-assert.eql({ foo: 'bar' }, { foo: 'bar' });
-
- -

assert.includes(obj, val[, msg])

- -

Assert that obj is within val. This method supports Array_s -and Strings_s.

- -
assert.includes([1,2,3], 3);
-assert.includes('foobar', 'foo');
-assert.includes('foobar', 'bar');
-
- -

assert.response(server, req, res|fn[, msg|fn])

- -

Performs assertions on the given server, which should not call -listen(), as this is handled internally by expresso and the server -is killed after all responses have completed. This method works with -any http.Server instance, so Connect and Express servers will work -as well.

- -

The req object may contain:

- -
    -
  • url request url
  • -
  • timeout timeout in milliseconds
  • -
  • method HTTP method
  • -
  • data request body
  • -
  • headers headers object
  • -
- - -

The res object may be a callback function which -receives the response for assertions, or an object -which is then used to perform several assertions -on the response with the following properties:

- -
    -
  • body assert response body
  • -
  • status assert response status code
  • -
  • header assert that all given headers match (unspecified are ignored)
  • -
- - -

When providing res you may then also pass a callback function -as the fourth argument for additional assertions.

- -

Below are some examples:

- -
assert.response(server, {
-    url: '/', timeout: 500
-}, {
-    body: 'foobar'
-});
-
-assert.response(server, {
-    url: '/',
-    method: 'GET'
-},{
-    body: '{"name":"tj"}',
-    status: 200,
-    headers: {
-        'Content-Type': 'application/json; charset=utf8',
-        'X-Foo': 'bar'
-    }
-});
-
-assert.response(server, {
-    url: '/foo',
-    method: 'POST',
-    data: 'bar baz'
-},{
-    body: '/foo bar baz',
-    status: 200
-}, 'Test POST');
-
-assert.response(server, {
-    url: '/foo',
-    method: 'POST',
-    data: 'bar baz'
-},{
-    body: '/foo bar baz',
-    status: 200
-}, function(res){
-    // All done, do some more tests if needed
-});
-
-assert.response(server, {
-    url: '/'
-}, function(res){
-    assert.ok(res.body.indexOf('tj') >= 0, 'Test assert.response() callback');
-});
-
- -

expresso(1)

- -

To run a single test suite (file) run:

- -
$ expresso test/a.test.js
-
- -

To run several suites we may simply append another:

- -
$ expresso test/a.test.js test/b.test.js
-
- -

We can also pass a whitelist of tests to run within all suites:

- -
$ expresso --only "foo()" --only "bar()"
-
- -

Or several with one call:

- -
$ expresso --only "foo(), bar()"
-
- -

Globbing is of course possible as well:

- -
$ expresso test/*
-
- -

When expresso is called without any files, test/* is the default, -so the following is equivalent to the command above:

- -
$ expresso
-
- -

If you wish to unshift a path to require.paths before -running tests, you may use the -I or --include flag.

- -
$ expresso --include lib test/*
-
- -

The previous example is typically what I would recommend, since expresso -supports test coverage via node-jscoverage (bundled with expresso), -so you will need to expose an instrumented version of you library.

- -

To instrument your library, simply run node-jscoverage, -passing the src and dest directories:

- -
$ node-jscoverage lib lib-cov
-
- -

Now we can run our tests again, using the lib-cov directory that has been -instrumented with coverage statements:

- -
$ expresso -I lib-cov test/*
-
- -

The output will look similar to below, depending on your test coverage of course :)

- -

node coverage

- -

To make this process easier expresso has the -c or --cov which essentially -does the same as the two commands above. The following two commands will -run the same tests, however one will auto-instrument, and unshift lib-cov, -and the other will run tests normally:

- -
$ expresso -I lib test/*
-$ expresso -I lib --cov test/*
-
- -

Currently coverage is bound to the lib directory, however in the -future --cov will most likely accept a path.

- -

Async Exports

- -

Sometimes it is useful to postpone running of tests until a callback or event has fired, currently the exports.foo = function(){}; syntax is supported for this:

- -
setTimeout(function(){
-    exports['test async exports'] = function(assert){
-        assert.ok('wahoo');
-    };
-}, 100);
-
- -
-
- - \ No newline at end of file diff --git a/node_modules/ejs/support/expresso/docs/index.md b/node_modules/ejs/support/expresso/docs/index.md deleted file mode 100644 index 169b335..0000000 --- a/node_modules/ejs/support/expresso/docs/index.md +++ /dev/null @@ -1,292 +0,0 @@ - -[Expresso](http://github.com/visionmedia/expresso) is a JavaScript [TDD](http://en.wikipedia.org/wiki/Test-driven_development) framework written for [nodejs](http://nodejs.org). Expresso is extremely fast, and is packed with features such as additional assertion methods, code coverage reporting, CI support, and more. - -## Features - - - light-weight - - intuitive async support - - intuitive test runner executable - - test coverage support and reporting via [node-jscoverage](http://github.com/visionmedia/node-jscoverage) - - uses and extends the core _assert_ module - - `assert.eql()` alias of `assert.deepEqual()` - - `assert.response()` http response utility - - `assert.includes()` - - `assert.isNull()` - - `assert.isUndefined()` - - `assert.isNotNull()` - - `assert.isDefined()` - - `assert.match()` - - `assert.length()` - -## Installation - -To install both expresso _and_ node-jscoverage run -the command below, which will first compile node-jscoverage: - - $ make install - -To install expresso alone without coverage reporting run: - - $ make install-expresso - -Install via npm: - - $ npm install expresso - -## Examples - -## Examples - -To define tests we simply export several functions: - - exports['test String#length'] = function(assert){ - assert.equal(6, 'foobar'.length); - }; - -Alternatively for large numbers of tests you may want to -export your own object containing the tests, however this -is essentially the as above: - - module.exports = { - 'test String#length': function(assert){ - assert.equal(6, 'foobar'.length); - } - }; - -If you prefer not to use quoted keys: - - exports.testsStringLength = function(assert){ - assert.equal(6, 'foobar'.length); - }; - -The second argument passed to each callback is _beforeExit_, -which is typically used to assert that callbacks have been -invoked. - - exports.testAsync = function(assert, beforeExit){ - var n = 0; - setTimeout(function(){ - ++n; - assert.ok(true); - }, 200); - setTimeout(function(){ - ++n; - assert.ok(true); - }, 200); - beforeExit(function(){ - assert.equal(2, n, 'Ensure both timeouts are called'); - }); - }; - -## Assert Utilities - -### assert.isNull(val[, msg]) - -Asserts that the given _val_ is _null_. - - assert.isNull(null); - -### assert.isNotNull(val[, msg]) - -Asserts that the given _val_ is not _null_. - - assert.isNotNull(undefined); - assert.isNotNull(false); - -### assert.isUndefined(val[, msg]) - -Asserts that the given _val_ is _undefined_. - - assert.isUndefined(undefined); - -### assert.isDefined(val[, msg]) - -Asserts that the given _val_ is not _undefined_. - - assert.isDefined(null); - assert.isDefined(false); - -### assert.match(str, regexp[, msg]) - -Asserts that the given _str_ matches _regexp_. - - assert.match('foobar', /^foo(bar)?/); - assert.match('foo', /^foo(bar)?/); - -### assert.length(val, n[, msg]) - -Assert that the given _val_ has a length of _n_. - - assert.length([1,2,3], 3); - assert.length('foo', 3); - -### assert.type(obj, type[, msg]) - -Assert that the given _obj_ is typeof _type_. - - assert.type(3, 'number'); - -### assert.eql(a, b[, msg]) - -Assert that object _b_ is equal to object _a_. This is an -alias for the core _assert.deepEqual()_ method which does complex -comparisons, opposed to _assert.equal()_ which uses _==_. - - assert.eql('foo', 'foo'); - assert.eql([1,2], [1,2]); - assert.eql({ foo: 'bar' }, { foo: 'bar' }); - -### assert.includes(obj, val[, msg]) - -Assert that _obj_ is within _val_. This method supports _Array_s -and _Strings_s. - - assert.includes([1,2,3], 3); - assert.includes('foobar', 'foo'); - assert.includes('foobar', 'bar'); - -### assert.response(server, req, res|fn[, msg|fn]) - -Performs assertions on the given _server_, which should _not_ call -listen(), as this is handled internally by expresso and the server -is killed after all responses have completed. This method works with -any _http.Server_ instance, so _Connect_ and _Express_ servers will work -as well. - -The _req_ object may contain: - - - _url_ request url - - _timeout_ timeout in milliseconds - - _method_ HTTP method - - _data_ request body - - _headers_ headers object - -The _res_ object may be a callback function which -receives the response for assertions, or an object -which is then used to perform several assertions -on the response with the following properties: - - - _body_ assert response body - - _status_ assert response status code - - _header_ assert that all given headers match (unspecified are ignored) - -When providing _res_ you may then also pass a callback function -as the fourth argument for additional assertions. - -Below are some examples: - - assert.response(server, { - url: '/', timeout: 500 - }, { - body: 'foobar' - }); - - assert.response(server, { - url: '/', - method: 'GET' - },{ - body: '{"name":"tj"}', - status: 200, - headers: { - 'Content-Type': 'application/json; charset=utf8', - 'X-Foo': 'bar' - } - }); - - assert.response(server, { - url: '/foo', - method: 'POST', - data: 'bar baz' - },{ - body: '/foo bar baz', - status: 200 - }, 'Test POST'); - - assert.response(server, { - url: '/foo', - method: 'POST', - data: 'bar baz' - },{ - body: '/foo bar baz', - status: 200 - }, function(res){ - // All done, do some more tests if needed - }); - - assert.response(server, { - url: '/' - }, function(res){ - assert.ok(res.body.indexOf('tj') >= 0, 'Test assert.response() callback'); - }); - - -## expresso(1) - -To run a single test suite (file) run: - - $ expresso test/a.test.js - -To run several suites we may simply append another: - - $ expresso test/a.test.js test/b.test.js - -We can also pass a whitelist of tests to run within all suites: - - $ expresso --only "foo()" --only "bar()" - -Or several with one call: - - $ expresso --only "foo(), bar()" - -Globbing is of course possible as well: - - $ expresso test/* - -When expresso is called without any files, _test/*_ is the default, -so the following is equivalent to the command above: - - $ expresso - -If you wish to unshift a path to `require.paths` before -running tests, you may use the `-I` or `--include` flag. - - $ expresso --include lib test/* - -The previous example is typically what I would recommend, since expresso -supports test coverage via [node-jscoverage](http://github.com/visionmedia/node-jscoverage) (bundled with expresso), -so you will need to expose an instrumented version of you library. - -To instrument your library, simply run [node-jscoverage](http://github.com/visionmedia/node-jscoverage), -passing the _src_ and _dest_ directories: - - $ node-jscoverage lib lib-cov - -Now we can run our tests again, using the _lib-cov_ directory that has been -instrumented with coverage statements: - - $ expresso -I lib-cov test/* - -The output will look similar to below, depending on your test coverage of course :) - -![node coverage](http://dl.dropbox.com/u/6396913/cov.png) - -To make this process easier expresso has the _-c_ or _--cov_ which essentially -does the same as the two commands above. The following two commands will -run the same tests, however one will auto-instrument, and unshift _lib-cov_, -and the other will run tests normally: - - $ expresso -I lib test/* - $ expresso -I lib --cov test/* - -Currently coverage is bound to the _lib_ directory, however in the -future `--cov` will most likely accept a path. - -## Async Exports - -Sometimes it is useful to postpone running of tests until a callback or event has fired, currently the _exports.foo = function(){};_ syntax is supported for this: - - setTimeout(function(){ - exports['test async exports'] = function(assert){ - assert.ok('wahoo'); - }; - }, 100); diff --git a/node_modules/ejs/support/expresso/docs/layout/foot.html b/node_modules/ejs/support/expresso/docs/layout/foot.html deleted file mode 100644 index 44d85e9..0000000 --- a/node_modules/ejs/support/expresso/docs/layout/foot.html +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/node_modules/ejs/support/expresso/docs/layout/head.html b/node_modules/ejs/support/expresso/docs/layout/head.html deleted file mode 100644 index b2d42c3..0000000 --- a/node_modules/ejs/support/expresso/docs/layout/head.html +++ /dev/null @@ -1,47 +0,0 @@ - - - Expresso - TDD Framework For Node - - - - - Fork me on GitHub - - -
-

Expresso

diff --git a/node_modules/ejs/support/expresso/lib/bar.js b/node_modules/ejs/support/expresso/lib/bar.js deleted file mode 100644 index e15aad4..0000000 --- a/node_modules/ejs/support/expresso/lib/bar.js +++ /dev/null @@ -1,4 +0,0 @@ - -exports.bar = function(msg){ - return msg || 'bar'; -}; \ No newline at end of file diff --git a/node_modules/ejs/support/expresso/lib/foo.js b/node_modules/ejs/support/expresso/lib/foo.js deleted file mode 100644 index 15701a5..0000000 --- a/node_modules/ejs/support/expresso/lib/foo.js +++ /dev/null @@ -1,16 +0,0 @@ - -exports.foo = function(msg){ - if (msg) { - return msg; - } else { - return generateFoo(); - } -}; - -function generateFoo() { - return 'foo'; -} - -function Foo(msg){ - this.msg = msg || 'foo'; -} diff --git a/node_modules/ejs/support/expresso/package.json b/node_modules/ejs/support/expresso/package.json deleted file mode 100644 index ef89b5e..0000000 --- a/node_modules/ejs/support/expresso/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ "name": "expresso", - "version": "0.6.1", - "description": "TDD framework, light-weight, fast, CI-friendly", - "author": "TJ Holowaychuk ", - "bin": { "expresso": "./bin/expresso" }, - "scripts": { - "install": "make install-jscov" - } -} \ No newline at end of file diff --git a/node_modules/ejs/support/expresso/test/assert.test.js b/node_modules/ejs/support/expresso/test/assert.test.js deleted file mode 100644 index 6a5e764..0000000 --- a/node_modules/ejs/support/expresso/test/assert.test.js +++ /dev/null @@ -1,84 +0,0 @@ -module.exports = { - 'assert.eql()': function(assert){ - assert.equal(assert.deepEqual, assert.eql); - }, - - 'assert.type()': function(assert){ - assert.type('foobar', 'string'); - assert.type(2, 'number'); - assert.throws(function(){ - assert.type([1,2,3], 'string'); - }); - }, - - 'assert.includes()': function(assert){ - assert.includes('some random string', 'dom'); - assert.throws(function(){ - assert.include('some random string', 'foobar'); - }); - - assert.includes(['foo', 'bar'], 'bar'); - assert.includes(['foo', 'bar'], 'foo'); - assert.includes([1,2,3], 3); - assert.includes([1,2,3], 2); - assert.includes([1,2,3], 1); - assert.throws(function(){ - assert.includes(['foo', 'bar'], 'baz'); - }); - - assert.throws(function(){ - assert.includes({ wrong: 'type' }, 'foo'); - }); - }, - - 'assert.isNull()': function(assert){ - assert.isNull(null); - assert.throws(function(){ - assert.isNull(undefined); - }); - assert.throws(function(){ - assert.isNull(false); - }); - }, - - 'assert.isUndefined()': function(assert){ - assert.isUndefined(undefined); - assert.throws(function(){ - assert.isUndefined(null); - }); - assert.throws(function(){ - assert.isUndefined(false); - }); - }, - - 'assert.isNotNull()': function(assert){ - assert.isNotNull(false); - assert.isNotNull(undefined); - assert.throws(function(){ - assert.isNotNull(null); - }); - }, - - 'assert.isDefined()': function(assert){ - assert.isDefined(false); - assert.isDefined(null); - assert.throws(function(){ - assert.isDefined(undefined); - }); - }, - - 'assert.match()': function(assert){ - assert.match('foobar', /foo(bar)?/); - assert.throws(function(){ - assert.match('something', /rawr/); - }); - }, - - 'assert.length()': function(assert){ - assert.length('test', 4); - assert.length([1,2,3,4], 4); - assert.throws(function(){ - assert.length([1,2,3], 4); - }); - } -}; \ No newline at end of file diff --git a/node_modules/ejs/support/expresso/test/async.test.js b/node_modules/ejs/support/expresso/test/async.test.js deleted file mode 100644 index 0dc9016..0000000 --- a/node_modules/ejs/support/expresso/test/async.test.js +++ /dev/null @@ -1,6 +0,0 @@ - -setTimeout(function(){ - exports['test async exports'] = function(assert){ - assert.ok('wahoo'); - }; -}, 100); \ No newline at end of file diff --git a/node_modules/ejs/support/expresso/test/bar.test.js b/node_modules/ejs/support/expresso/test/bar.test.js deleted file mode 100644 index 68e8d48..0000000 --- a/node_modules/ejs/support/expresso/test/bar.test.js +++ /dev/null @@ -1,12 +0,0 @@ - -/** - * Module dependencies. - */ - -var bar = require('bar'); - -module.exports = { - 'bar()': function(assert){ - assert.equal('bar', bar.bar()); - } -}; \ No newline at end of file diff --git a/node_modules/ejs/support/expresso/test/foo.test.js b/node_modules/ejs/support/expresso/test/foo.test.js deleted file mode 100644 index 5d9d94e..0000000 --- a/node_modules/ejs/support/expresso/test/foo.test.js +++ /dev/null @@ -1,13 +0,0 @@ - -/** - * Module dependencies. - */ - -var foo = require('foo'); - -module.exports = { - 'foo()': function(assert){ - assert.equal('foo', foo.foo()); - assert.equal('foo', foo.foo()); - } -}; \ No newline at end of file diff --git a/node_modules/ejs/support/expresso/test/http.test.js b/node_modules/ejs/support/expresso/test/http.test.js deleted file mode 100644 index 8eff2b7..0000000 --- a/node_modules/ejs/support/expresso/test/http.test.js +++ /dev/null @@ -1,76 +0,0 @@ - -/** - * Module dependencies. - */ - -var http = require('http'); - -var server = http.createServer(function(req, res){ - if (req.method === 'GET') { - if (req.url === '/delay') { - setTimeout(function(){ - res.writeHead(200, {}); - res.end('delayed'); - }, 200); - } else { - var body = JSON.stringify({ name: 'tj' }); - res.writeHead(200, { - 'Content-Type': 'application/json; charset=utf8', - 'Content-Length': body.length - }); - res.end(body); - } - } else { - var body = ''; - req.setEncoding('utf8'); - req.addListener('data', function(chunk){ body += chunk }); - req.addListener('end', function(){ - res.writeHead(200, {}); - res.end(req.url + ' ' + body); - }); - } -}); - -module.exports = { - 'test assert.response()': function(assert, beforeExit){ - var called = 0; - - assert.response(server, { - url: '/', - method: 'GET' - },{ - body: '{"name":"tj"}', - status: 200, - headers: { - 'Content-Type': 'application/json; charset=utf8' - } - }); - - assert.response(server, { - url: '/foo', - method: 'POST', - data: 'bar baz' - },{ - body: '/foo bar baz', - status: 200 - }, function(res){ - ++called; - assert.ok(res); - }); - - assert.response(server, { - url: '/foo' - }, function(res){ - ++called; - assert.ok(res.body.indexOf('tj') >= 0, 'Test assert.response() callback'); - }); - - assert.response(server, - { url: '/delay', timeout: 300 }, - { body: 'delayed' }); - - beforeExit(function(){ - assert.equal(2, called); - }); - } -}; \ No newline at end of file diff --git a/node_modules/ejs/test/ejs.test.js b/node_modules/ejs/test/ejs.test.js deleted file mode 100644 index d5a7a60..0000000 --- a/node_modules/ejs/test/ejs.test.js +++ /dev/null @@ -1,268 +0,0 @@ - -/** - * Module dependencies. - */ - -var ejs = require('ejs'); - -module.exports = { - 'test .version': function(assert){ - assert.ok(/^\d+\.\d+\.\d+$/.test(ejs.version), 'Test .version format'); - }, - - 'test html': function(assert){ - assert.equal('

yay

', ejs.render('

yay

')); - }, - - 'test buffered code': function(assert){ - var html = '

tj

', - str = '

<%= name %>

', - locals = { name: 'tj' }; - assert.equal(html, ejs.render(str, { locals: locals })); - }, - - 'test unbuffered code': function(assert){ - var html = '

tj

', - str = '<% if (name) { %>

<%= name %>

<% } %>', - locals = { name: 'tj' }; - assert.equal(html, ejs.render(str, { locals: locals })); - }, - - 'test `scope` option': function(assert){ - var html = '

tj

', - str = '

<%= this %>

'; - assert.equal(html, ejs.render(str, { scope: 'tj' })); - }, - - 'test escaping': function(assert){ - assert.equal('<script>', ejs.render('<%= " - - - -
-

{linked-path}

- {files} -
- - \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/lib/public/error.html b/node_modules/express/node_modules/connect/lib/public/error.html deleted file mode 100644 index 34e0df5..0000000 --- a/node_modules/express/node_modules/connect/lib/public/error.html +++ /dev/null @@ -1,13 +0,0 @@ - - - {error} - - - -
-

{title}

-

500 {error}

-
    {stack}
-
- - \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/lib/public/favicon.ico b/node_modules/express/node_modules/connect/lib/public/favicon.ico deleted file mode 100644 index 895fc96a76b68b4924f1c51d022e1b82fa0f461f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1406 zcmZQzU<5(|0R}M0U}azs1F|%L7$l?s#Ec9aKoZP=&}i&OouUjIY8@C}uZw4x5z5N2 zvEG^C^vXtt_xtJ?p3O32c(KTx;lsgZhW%5M85Sf}k-mf`L80)|7ga~M{a znlL=>m1Q`#uoPkbC~GtXMnhnDh5$DU1D6mx+;2QAKt3ZQFH}H~1y~00GcqzVg9QXw z_<%(a7y$V|wJgF=E>MgE#Aid|14}IyCM5MhEnxFF;pTzOK(>#80puP=gnOXwAd33` mpMe2}f66m3eB@_fcnmb^7!b1nO#opK8zcsj1F30)+jEP);68^d)m`eN0o>(5%D`Q(1;j>g@G;xlf`0VBQ`PFY?6)!N&f?*K}$p; zB!U=NBn{eB8${1}&-2_L*HuZp@ZP1@clS@cHp)4iM1ewzw59vko7eMM{e9z|%NNdX z0V;`?KKSzTCvTm5bc{L^CIKLUxc2X{i{ISz$8Sgf{q)1nXTP{`{s?9mQ$4&hPiKC- zY8q7(Y1Xu5iCf33=O4Vy(+|zQ?rW#gkKB0f%}?+6{G*qT22|DQB-73`YzA{N4W^=s zq0kQYcbtFfz zLz)H<&|z(Y4kBG67=JY6c|L1R-#TR>fC$3^Y%QEnYO1xHsf)+GU`3F<{J0kR(;pbF3)zyg$H+idfnl-wl5Wkh!vUH z4Z32YP=l_}1rZd1W_D&^$A($A+&a0e&P?xx0!ctY2}*<#p+qPVN*B(YzvAWXa*%bzq z7Fz41LKILT(GWohi9|LgIzSZBhb*Zf6R6O}WYQ4GOi&71s9lmll0x6;8&ILOl$j(c z0Z1T(6Tg09{?wd{moFHNN6PS?$|e>1MxSJ(0Z7o2)J-Zv|>acY@f`(Y@g7GwsEj5NLQo+q|HsxQ5}XSX_d@*^A9ZT9=A{W~j+$GyI1 zc4oqTHx@1FlRjw4XWyPN5i2~l_F3@aBk!0yu^aoRDvXy}8@HCjUVQUsuSH4$T5|r< zzZOn^?Wfa6y|Q($Hx4{ws+)wX6-HP4zo!S?4KJ@7PG@G3G{CjXs(p*kIrj6rHs7_y z+=<-=Q62s9FuWa^X~WKgJIAAZJR&XBB002ovPDHLkV1jCMPILeO diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_attach.png b/node_modules/express/node_modules/connect/lib/public/icons/page_attach.png deleted file mode 100755 index 89ee2da0753040d1ba0a3487473a715a8fe89322..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 794 zcmV+#1LgdQP)i_t#ewV_0K6;=bl;e_Jt7$~$sQ)q$+ia<4Ec+jeaGt9oWH@O|2`W6&O0t!k{B9sUvLWxkCaPsd9W(`fa z;j-|^ZI^2XnzhgZWYRW-kP&J>DWPo`%;JaBX}or79k=+Jo@h%4Eo72tqev+cB?PjP zO<|ByL#>Tehyq$jR74O$B9WDW1`tK`LzYyL3A9iAcRxLkJ`I)n}v%Od-3H>j$OTBtk>(k-9o?8PqI=0 zB&f-+KOXVnjyKJlf4iHOtnuiE_4+ZVJ$dHjU<^o^YCjQ-wt^!;rPpBv(@pFO{9rdw98 z_s@3+yta93oyfL>7AD5}r=|`zS3Gm$_|(iSl8XBd9k%=91J0j2=ivT5cJ18ZmDjh{ z$-RMd{jQ#X79#Sc diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_code.png b/node_modules/express/node_modules/connect/lib/public/icons/page_code.png deleted file mode 100755 index f7ea90419d950f9e69d977a1f5847456d96a5f0b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 818 zcmV-21I_%2P)@LCln44|RX7Ti z0HI3&7jPq){odH{?_{%nYVq_;n_c4WbUpvU(&Cvnj!vq|kVC-vpF6vp^;;e0mm6HW z+WPzA`AZ|;pPp$&dNjzrc??4rt`k%Q1l*u-BPD0MQ}Fbm8jnsyezNt7+u{23>t7Em zJtETY?ja9KrVs^!LJ$xEMF3-bAZO;-IQJavE60KA7fO$VY_%N)R6s>g5mW>fL4&aR z*EVgKKTBXm!=L?S0?xM zYqL@C$|EDF2q*3zWW7;PDZ}SK*IE8;i!3U62=qn80C&*I1Le7WwNP5EcX;_oh2dJn zf#HgBe4@r$GcjHjmj2vAfT%(YN?}kK=(*+1*DkNNc1H5R++vfBMhACi<5uFUU+N4+ z<&U*CPmWi}REa7C6-t>2im1CWv5Jkefxa6>)dEj-CAW wWa{_}BJ!}~75?MkfaCnj>Dn=~vkLS70Pk`;z)@TQj{pDw07*qoM6N<$f@imYHUIzs diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_copy.png b/node_modules/express/node_modules/connect/lib/public/icons/page_copy.png deleted file mode 100755 index 195dc6d6c365d298e466026b37c1959d96119ea7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 663 zcmV;I0%-k-P)^@R5;6Z z(>-WZK@^7J_sq=QY_e{46@P+~LNG}sRzZsxQHvCsN*h5ir6^j7pq-$xu$N#V1gx}9 zClV7;5)7zih-s3DB)G=7|99>ji@So7-P24n=VQ(@GctDX!^_@$bj%oviY6e4Dh;od zooe%Wvs8LEKQ&&bL&@bwi=STIAI@!-gB2jC5+?y?VR~VkrNxam-`6*8&po|RZ5LpS zNKdJ%c4bTX`XjKsnecf%W>1%6WT?pKNdLLq{=(f(Col?P1+oq@R>)W(n=x!|*BIIh z6DJGw_w`)u6yN|vAhMteYK5#b%r5^v+VCFl1IGssaclZZMS{vs-LJ2$)n7DAr6==K z<29#%AXsBsDoO}SBaXR#_Ap!JKx)(1)3O2pj0_dYWz5By*X74fRT01$Fk%P_RzOMDtV?GU{nsYq#K8iy zb6qzLYDj`_f5$BwC*WE(t0m#xYJ*=jC2|HQYHh=pf#QG7oowi`h!L!{DB$8|qY{~X zu8@sU1tWq;n$XThR0%;45mdqXM892|{CJ@0DS*}>?ami06Q_^tvM~Y3K(_-`#m!8f z8f!QIrH4y#61;0Ym0cCoLl8{IPombPHtnn7%SbTdI&G-d>ZQo!_wBMF9nzX!g8HVY xYTJPGciz9XMh3w2fmZ(7v{)r*QZD48?mrio{~IaoqP z|1Ep}yDQG09bP~E^Dk?@JiKQJ z6-pO(3~IOP)IYisL6D6;oAEd;E%zR}{U$rMRNuD6nQV7nesKS>)yLo7JuDCrD>Abi zbj3uW23?^GA}9jQ{M^8v?ejL?HaT7AX5WPZNkBmfN`w-jL?{tT7ykZt$%Yln?p_m~ z-?>&d(LD(jAd}h=LPltPQbO$*Wbyl@G-_k5jXbb#qffHY03>M1jfEqoPJQ6Mr=Byp=^jfzePZV1 zLjCmNi31hdIJHa%e;5g=1(`u3BRzfeExY%=VCu{loOr{`%2hUR*x>tL^W_TTaj);0 zpPR6CUD1+0>4TQ6zVfH3TQ;%l6#(_%yspK@3gcmG#Q4!WCPyLU93nMKk7E2pcA=l45({2jNho>sdF*A~bA zxX?-cp~y_z_kFf+yqu3m#QiB}03?Z&9vvR5TNgj<)($Vm)xq5G>|o2sFMag&6aNF+ WAT1?sQBYt20000iHtsh1EzPArg^Q zIZrOk#rNsfjaSbMAL;<4h;Z=jvu8dzyz8N&Nb7=z03ZUw?9z%8KQEa6yM5=kUnka& z3?FJk2}L7q>na=T#;<7U*P91xfF`;`6%pVgWgRy0?1ZryL@%z52=-!fGXWGEn4M351L4<+7eDgwo|moqXT+s1&Kmn>-uQQ8mL7XY)w5Zk*(g+<3Y3tmkR!bL zOUKaUtj_pX26sH+=Iorwu}MGd`_%O-_sS}8VpG#fJA)Fcs#ezwtZf?q?Ac70mDv`rVs{$od?VPKeqf<-kUjNtS6ecB*mq<&M97K^6IVsDO zt2$Ru!b+>2S<}_H>$RcInusU_8PMNdf(W{sNlJ3FkrwMJPeBPO#d}Y^a{9TH(#{Y) l0D?dWAV4eUJX#h`!2gmISk&ZKd4B)^002ovPDHLkV1g&sd|Lnj diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_error.png b/node_modules/express/node_modules/connect/lib/public/icons/page_error.png deleted file mode 100755 index f07f449a44ff2761bfc7b752db3d08d0e1238b02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 793 zcmV+!1LpjRP)lHwhvrAu0-@MQwt}+5~MQTtu}C0%;W( z1<{R?aHBz*g;pk%AyQVBR_Zu5m~;ES_vxI-O!vIF|H*|T{l`n#garr?$RMk>)?Y48 z(ZF2yTneKb};DNWF+jK)IF`6_IfJ{i|F3o%Q+l&4_HGBD|ACE8na_6>L z=s{^>-C(a7J$6=8A_%h5W!1K6dcL!D?XX+Ndk)oei?UundDpX_E&1Y&`)3P8#Ny0s z2Ag7_&ZPhyGj%)g&S6V2LNun1;iBQm#Fwlfv zgyESZR$X}2P;=RW!2zid1r$hBL{K7>2qi*f7>pT1=RdT3@-anEoH{ z={KFOO;Dh#bV*jaN>}M>RZqQd`S=6O9C3KpI~I>l%QFYfo;jqQYe5fcn`)+)zMm6P z4X&L(>gnN0!%J4^rhX->?$S5bY<=GEU%jc!KLL8sww-Eg;h z`H-yBHa)yfojYT}&G*GFc$<(Yja_q=lZvj66DC^O5%$B)|Z(CeD=n`|eM04SP; z>-=-l+xdJjA~vR6^xB#o{ehf~tSM`iwaQv$O<8NIHA}W_WOw*~ XD^gE}t;YAo00000NkvXXu0mjfl6ZQ> diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_excel.png b/node_modules/express/node_modules/connect/lib/public/icons/page_excel.png deleted file mode 100755 index eb6158eb5ca9c4b64c81e70e0fd894dbc8e2bed9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 817 zcmV-11J3-3P)hdKqhFO_H1|Vn1E?(=|cjAh_&P}y{{^`u< zcYD@PK?$)4i~7o9*6F_$F$4lR(d4AAvrez^(88Hk+)+B7E)M3jc=Ewl4$S^`_qwSF zA%qz@=c2EOsz@0qB1IqsqJU)HaG&+}%`-OM8YqW{K85hqj@4&V9vz!Cm_n0-W#f;# zeEpJde%vdgRn5?(+PY=W*z~|lT2-mtown({ll8&3S5+lWz5K}LTRW{k{eJn3Qz!SU zQ`@qI_n2;K?RG~pYJ9=dj-RWgG;P&wEuoAxL~Q)<>x0b=dED^Outj&xQ^rA;u3pw| zca_ClTh_d9cxXg_U!lLRl0`xU@$=UXO|_dRdtXfKwPawmnf(LC7u}-U>8k6}3u|{8 zs9LHr>MIJZGD^r9h|q2yF24Wuh+PM^yMN9GP1$khlDkdyCY}D{kg}jEf-(kW5jBY> z0rB29ZhG-r=i_R{;+1k0?A-sBM;AP6(k1i9ZuixR4?MqXOvphQgCYj~RnXKKL~J9Q zIDNz~XMfO{ZhUg&BTtMyXJqDVqc<x643?SvKHx004lTvR=0a5$dUw z>Xb470000$S;ka1sfH4I-R8njUol7M4dtApOahDylptpYswf1hD#CwFoz6oEA>(SIECU&IQ%a}GXdnC!9$70`0uH1B00000NkvXXu0mjf!8w72 diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_find.png b/node_modules/express/node_modules/connect/lib/public/icons/page_find.png deleted file mode 100755 index 2f193889f7ea091c292acdd684c595dcb206b5c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 879 zcmV-#1CacQP)@+1&aazfGU7ezSm^v zpACwO+tu0su66!(dT=`e05DeeCnCFJW(8|RKtKa{4LGONnx2V85A4m%PEQ?MEtR-esdM$pB-`H542D0)N2zSC6Imf)4L8?>%ZrW+H>xCKi$unm zvGZq-*Q%Aahx;C*=l+K%-?>XB)6TB$-L$r*`RUvlA`xP1NG2?)ge8@TQ4EN|Jks0u zcDg;oFC#-#R`YbWB`D?Q`1#y7l$LXhjSLf8AvQuB84}i#j0^!#g{VE#(K7h@5pFHy zSenl=@XBEdxp`h2Ji>CR%=qXJ7!e|?paKet-~;#ok#jETyeB(5&Bkhp;!+;51~G=) zH?L7xmDUu_h+a$+xuWom;AWW!mS$%%+436Rjc@}y?l1134kgD0AOf$OmjOR zstUlshZk$ZC!bAyIg{Y29z#&@3SJ;6D4+_eFume9^#TmMccC5u0J!ZCTnO6m$lnD| z5JeFHf`Xs~1vP>RLKI1GKDY<~pjr2&bi(fX;6Nj-ss@Ds0CcoO0H{JsEQkm{q03skAA);_bv3q{k31qwVo&s-q`Z?_e+j^w(WL? zl+uETs5+~xBU2};OqEE9ETLGwsMGe1%iTRNue)9}|0~E4B*@5#oRXZ9oRXZ9TqRep zPrGZuoOON4n@=uPbyP1y4G=+HktC6l(gZoFD>@_lXDrN?wo+zozGt3P=Qh+3L7+}q z2!WK7geXLnO3Vw;o12Skp%_E#+N#9;DDWP?Q-VS3B$v~Ha)dDzWn0zG~O(^_1!n0HYp-( z+;wPIdoFgQlpYV!10V>5@a)1LyGBMvoa}miyp(bxbMTM-FYNyx;V@TfYddyT00000 LNkvXXu0mjf90!wr diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_go.png b/node_modules/express/node_modules/connect/lib/public/icons/page_go.png deleted file mode 100755 index 80fe1ed0cc75fbb67e9398ae686641f8fb287238..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 779 zcmV+m1N8ifP)JNR2Ufr z!Apo%Wf%b9=l#x^8AolrB&K9H?Pg_|78WA8(M3toqE%3B#7*srcF`i*xhupr27%Nr ziguah1+mN)U5GNmyEfQ3-e%_i&-vb-Co#(>FJ+EhQEwjRYVQ(&UYy{U@%vbY||>@4x=B^vIqabI?L* z;-S&DS^V3-ni4^fl|HMkOEbgX)(390>A}|VIypb5Xee4g;7ck zwKh^A3Mi1Mh@eC$5lV!}Fw%sP623U`g3pd_Hr5sunLvTskx4}&Gm%Q6L}(l4x}jCe z*81q1_4-O*ffi~_nMslo?EQ8t*&Ec(pzEw$vc}pKn_Qp0>D7Jr>ATNC3w@9f|Y+U&+)#!t7l&wKp+nP{PQsb+fb=Yf!Fu&5j8vpRj{FT>jD z>d>$sx;A&+`n$HcF}&sYKSyR;=(=9tvvOj@hUG;~4qTYk^_@E=?$*^_pVh_bGnOt~ z;pEw)j{SK$XVc;qy181rT655gW9NG{(yeablViIL>cDI_ux8m>Pp{tY$J0lgo4#ax za?j0EA3s0S!f>{~ykN9h_RhM&g3K(E`q(dE(Rd49+%xMeR9{qlWnmd{s#(SQ>PmFtSQqUjAtB;_Vvt6}AS_5YgM`Uqu`yva+H8^=4U$e4gHb}u zAQ2N{V3A%pO|?Pv?tb6z=jC}SiRa$G^v3q?*6XcYz$p|cq{uLj@#~Fi`J(>5{@&&N zy%T^+;>8cXx%|o77anP?&W1?1A(>-T49z9pyeCl@7YI+Si zKti7=B~``}TImz(G{0PnlQA3P#MAd}sorMjkP!50B7$nAkU^%#nl{Q9lW0@}9fE-> zN(q7tRuiC_T1r|BBtVBTlQ2+70$Rf;eF`Z;lx46Cpu-rEgb)EBKq(b^W8l<^We(`D z43?0=01z<3G6+UUv6`CsWCk6^93!#+<;ws7007{zS3k2k9-zZKFO~(k`>s0y006+1 zgF_jyIhsL-`FMf~JL~C=cV75(CrJ|q;MVO961G=O zm9d)YpJg5g(4i_HKL75eSE}mq$Y}r}hyVdcV~p>6a}oXr80q`oj%+s700000NkvXX Hu0mjfPs|!l diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_key.png b/node_modules/express/node_modules/connect/lib/public/icons/page_key.png deleted file mode 100755 index d6626cb09eb11a298b90a8a27b0d8eab41f49a82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 801 zcmV++1K#|JP)$lC4gU2-`f*>nhR-;k6IP7e>YO!0^w)WK%3$w02v-#>5Ep64PCP| zJihT#O|N+nT7XR2h7dAB?UEAOhJF^mol1i`QtQB`HSY}RE7=r! z)zaVIHr5?>v2Gz&fdYw&2ug$!p+txby(aWZ7(4QT)l2`jX7eMQ{>)lG6ev(fWKxmH zOr%mM5$6B%u~qGtCf40#`mbGj3s!n+^%wnJ&#rl>g<4Z)lB5J6f!?|AP275)Zswr* z%T}4~{;_(?waU!#?JabbF3Cy-kf0{R{z}6$e=5yMQKt3BPcl2>zoTPMqMwF;3!_n|>sT?~bK_-2O_m+o>GJ6h zt=+g$4n7y%1qVJI7*5Yw(hqM=JusY{d}*?U(Oj*gT655eZ>Ksn(qrd7v3}DX1}C>` z+X+8@+4-pVq_fxG zlU}~Ye!0+%>J+pPk+0wV{GM$QaYM?5ux)w2z59=S&H2+K?;gH$bZGzL&g5>G ft+noNiyiPkP9r@8gT|RZ00000NkvXXu0mjfuqTIu diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png b/node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png deleted file mode 100755 index 7e568703d6432c530224e443771a04fc1e2e59c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 839 zcmV-N1GxN&P)73{`^;G#xwAtHz%LU)4b zqTRU=ve1RNa3QT=ZM7C`iJ~QFQ*9t7<~pX$d^7W%^M8FFCkcQj-~0ZRTBCB(J0^iD z-~e!d9LR`f3#|=(>$bPvx_D-~2jC%pJ=n_e_OK zeJ_2b-KdDDh@@UlzBSMC;EPygH_MwjWBnPGQegihBV73D?-x9PlHL9A=(Vg=8^d<4 z<9r=UkxuIm)*CO=9e###7PztDxUv}e?$0)rQicmYhV`pQ%S!g@;K(?TVfhM#E?bM| z=B0gfb6h@a8bf5FVT-SV~6}?X}9lK@@Yynoty&1zdZP@?RfODsl=2XzzU% zS8gIN43How+9%bK2S@Xbc`O>`z5`%^;pXGy8^4f>9^3!Sp@|O&)m;dOa3q6d;4P-l zca|=H_{G&m?D_+&-}r{u-J$5T=(X4R&)q|O^gN8cgv;s#@5sEPT5_Z)oFo9Ac>l+I zc4ng5zHpps|9)<_Rw>5bKzE(M1j)dFWI_%OH$BJSz0?T+02W0)_a>#vFqb!*d|5wB zzBUN|M&ty51O@=i?kiDrjQ{{}e|^rU?OS|RdxxP1p5mAw36cX72#`R6UsoeCQFI~! z0ATITp!vfeYyQ?Dr=^5BAshfEa0nB~JG?nUa2Aur006MC*<9`)86SPS(W^`H2n+xi ztOWohsFfVfVWrI7PSKW}BmkyPoj(-|J?ES|BGd-}fIxr{00@ANnO*ZR`#)pee4I5T Rmm>fG002ovPDHLkV1i|Hc$okI diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_link.png b/node_modules/express/node_modules/connect/lib/public/icons/page_link.png deleted file mode 100755 index 312eab0914ab59271384686255d1be913a6b3add..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 830 zcmV-E1Ht@>P)VWgGzD=Y79#JI$lhEn`|2MpRa?Bt#-nSD~P0P(mbVe{KrOBoKnSsk>m|ML{6l zBosu@om4j#WzNLRAk+{k1JRvL(MfE&vvbb->v>W{*z*1_uMP}0cIRX*?mz+wk%*#O z%0D-+$B*g1nRkvI+_3E8Pr1NC6@5M&4vWaLCnNlr;lNlr4i91z&)eBGqL{L{GNu;Fof}GS9{gM5BJuH;2QWk8yuOZdB3pGR#s8bd~ zAmt<>3Q=YH$t5YJ5;7@+8Uh6=ktBgY6#6Pa%2F?h910?U8cLT43KAj$Z1*==ra&gILO{WkHfs(--F=bly9l~${z@AT>V$oat!YAD@M zBE0v_F{`g#^wOSP-u~!wvlmXdd*uqFqoZ0^{&nEMDU+=!>({S0wrQhFmoB}Yq1)~0 z^{A)L8Xjzdr(W4_exYO6u3a{4*kIeXZMJUR>Q=ksjW_p!rAwDKYUs90>6Q|C>56o@ zbrSq^Xk7Gq#>dAsn@un`Hz$?w$;Ss`%jV7L%9ShgHFV~C)6M>B`Tp%|nqPc&G*A3| z)Qe+}vT4-x^t1~XE@(6wR;^lPWMo9n*~E!cy~)YRsT2{`?fqeIw-e7N@mOA%UcCIq z_kH(_EK7|>pM*1Wt2^DaDAp|cvp*@(ZZDKpYkKC^?97(`0sb&XTXy7N#sB~S07*qo IM6N<$f;YmCWB>pF diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png b/node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png deleted file mode 100755 index 246a2f0b426faa0c7f5ba009e32b1deaf88d1288..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 813 zcmV+|1JeA7P)otxGRZMDZ!_a~nK|b_-`n%VosaL{KDuPV10`(1LIen8kX2Xff$3BE zah#djvFGJ&eE^89Pk*-O^+&d>FC~^GjRYVQ(uuPJyS|-v?9lxA-+tM5>1Qu*n+Ir1 z6KhA>X4$XDH6?-|E5oe1E?pQ5-M;2xw_ex!x}I2+b=}mPFW$U%^;o(Zg*LP!K^1kP%8ynsD^= z1y^6xD1#GLjO{VLdh@0GKY7;d$+NGukV)GRLPn^=q=dF%B#XaJrNP`0E6=}e&Gj3d zKJbQre*WXt!60_DnIzgMQc6S#fvjXxsE1v7;T;njHkdy2miIqAS(nX~o%cO+q+b#h z5tIleLWvL=dQE8OC#{%y*Tnku&K`Tuub&_ELI0t_ea{@3f>Jv&sYqld(%}3_GY3Dm z;O{3*Y?v^A`a|D;^qrM=ykI)U6QHd%WhO~VF!SGjGn0GOZrc3mGZudNl9{Q#X5&-F zuGwVReFLBjE5jr!!^-5*L%!I%PkYH#Hs5rMrEBl^)9)9XTD;xjHFxVZMc3~Dw6#k$ z(-S}RE$bgMHv6Z`mS5|u$$78sp4G-8b@lVkl`HtEv+MGn!F&bKcHPi$$oP_;=BrPf z$(~b3&p3CsuQxhoV$%jIR;`lB-s7FDX)xCTXuJ7ZyIQk96uIR=HBt%-P?N*bp`)EF zq14c}QM+O70NTOa@V~_)&GMZ$^cQDlkyOCa(H3Mf+6xhCuZh`VSN{cQBl5Ys9{cp( rh`2H3A^=GuC6HjQ*7|*0>;m{7QlnX3z3MSD00000NkvXXu0mjfR5FYo diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_paste.png b/node_modules/express/node_modules/connect/lib/public/icons/page_paste.png deleted file mode 100755 index 968f073fdddc1cc0f0800b1ac4001cd9a55f053d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 703 zcmV;w0zmzVP)AVs!l4K}n~L(tL`6d4Up4iSWnZ3Qg~4n+_J zDGk-qQdogO5JUtO-d5pRp7Nd7_r1^a|M&Zq%mn9Oe((|e0sw%Ur!K7T1pojj=U#f? zQM`qbQrM^DPkwa?DK_be^~z<~RgSMIa<`xP_4P7gg2jCwJ{9^k!fsU=#Ti|%I3p;>90Qd+7|~0h&mIklA#nb>ATL2+v$&u)OBgB z;nsHb)I&QRKeX40H~~cIZxCd}5C} z=79lXoXK%6YlyLtsV$~bSm?Upq|DJh#{|*a7XMm`4QJWZ>s6nL2R1|&J z0VPEwJ9?!n`o5PKAjc->P1Gi8BY*%!5&FVp=#)$mMJYul1Jton}gujiUf??eOy!x&!tsjxy;=Q3_DdcXx=a^OBhW0N~`A@4xB0a*%F? l+@c^sQA%W+?pa#c`9H5UNfS6T{e=Jk002ovPDHLkV1grvM=byV diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_red.png b/node_modules/express/node_modules/connect/lib/public/icons/page_red.png deleted file mode 100755 index 0b18247da5850f3c2486373a3e179acd2772e8aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 641 zcmV-{0)G98P);68^@7JE5sw#jpE*579S@TLkU(6yap1yN*Zuy>-hV%Q_v4Ar&!63c8OBr(ZRhFu z_kWs36-AmgZCT>x!RqM;Zu9tqvoHI~k@UmYo_g(*J3c%2{N8}7I+|qKPQzv}7t>%W zsu&9G)UmCzkDYSw{fBnuW4j;1fKV_nicw`$8C6D=F_qu`zUiK$2Oc?5UVY+D(`I@R zW`KlwqLftWHH3Z2_XVNfKn>VgT~k=@- z+N>c>0|@A_HbI9Jn`v0~7cfIF(TS69zaomDS1QtgvaBBfGEPLHccO2~3jc>n^6}^HAEh-2#VxC7YYcDXv!L9X= z-R*SOUvIs;n`8(LxP4~^2|JsiN^hq6cU}5dn4v1~Kl{eT7pm&f$PoY`hyVe%y8G*S bxB&kH@RuR86sIAS00000NkvXXu0mjfZBi!% diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png b/node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png deleted file mode 100755 index cf347c7d4685128a4a447abb9fb8e939417644f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 858 zcmV-g1Eu_lP)`6pHR2Ufr z!EI=jWf;Km|8+n2IrHqe<9xxFVk)&(Nh?w$Xk`TAyvb=#e=0aySC z00NkRDM597_LiNIJ2M^qhuTvB004REvvU8@of{r?P8tmo3;+Pk0F0@*jAMhdOkS&1 zhJPPfQa;pP0|4+Yk%#j>X}o-s#EF1_DMV93FsfPP`G*>Ks>L&)Q}w2g%slu0kBfW1 z+*$*0BC^oTl6>OGIq(9BgG4|C90Dk-N_mPazGrQ7uHZ|>BLD!-KmZ)z1e^#?1Sf(M z!6m}K(^b|i%$TcA5bC}r$tAA?0C)g1@CgWliJ;NAk&ZF+-w#}$`-3nZ32C6IVKrHp zr+(!L2hRfF&AsTw>_@ z1y23;E%Oz}?q^Q2d($ayO;-sON2t7$w(Z|o0Pw1YnSp^}0PI+I5HnDNsFCA?oorkG z5sUIGIq=FSyxcj+xlhkm0en=52Bx3@02o12gdAU$_i?v6iyFMuc7P9#zQ-Hf; zVuV$t9P5`m)F2w1?t6{<8%wk{w-PP#Sj#%1MbsjrSI6n;D_@8q9`~W98dNQf$j=iI z6~hpgww&be%X_HI50Hhx@W==u4TLPB;ei-J-1}G8wH}|{i#Lk-WZAyfv}k4y0|fvU zZTy^$u6L>2nWo(NDSV2@MRD}JQ4(c%G%=dG@_vxH?>gcH#*Ue2HC}9sapf8X?R$Z;XEnm&g zW99mh)5jNw008mK8)r^`_{yH0rNn%u1|SpC(tjf#om=+r#lh+?Kb>DVb9`|C0Bvbv zN3U(>f4-tAC1hosRoA7p(b(hL*V}(j>ug<`&U)|l$6o$)!>PBQ9RQSwn9asj2p*|xhU*R^vq?*Twb0t!lm5}`yW5lRy-U0ZYK?8to!;o!r!XeOE$ z0HB3T+6EEoI4PlR=wonwqJ+TvCoWh&$?CAPVYcU= zD{DS0?AkOtb@-hh^ZLq~FMjxYf19X?pa_YqtgZGvv2TaxcF#KT?O%=_*a-kW_;N|D zakkWsOe!)HsT5WRBiC+p;N-c>0Qwy(1D2MDBC595oXSiR07)sKNk-%9*rDBOO^HUD zZW#;)R&EZpqha<(HK$(tZYU#V29<@0qCXgU{gXeGpc_|pTqQD-WO|}%yKZbeX7k*H z2W~CK$v8NBAq~czrc5A(v51g0Wma7`G8}f=ZcuAiYYxZan@gP(;Ku66M6?bquGiHe z3Q0ya)%Lvk@kLixZfZyU@#UFbv+>pYhcj8TRKSr_sWG8i^X~UA**LvbD3(_Lba3xm ziYcpup*A9qJ$?AA=Og05lndxfwr`!C+O~h|B~4 z01q8H`StcY);%&mId7_+)76ovRpeNWRp&4M?#jx@|E-)x%P*A6t^fc407*qoM6N<$ Ef@ddc(f|Me diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white.png deleted file mode 100755 index 8b8b1ca0000bc8fa8d0379926736029f8fabe364..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 294 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-&H;pyTSqH(@-Vl>|&1p(LP>kg~E zYiz5X^`c$+%8#zC{u)yfe-5 zmgid={Z3k(ERKCKrE7DF;=x4^O+ pzO8rLO8p|Ip=x)jHOtWj`bJBmKdh_V<`47(gQu&X%Q~loCIFbEay|e6 diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png deleted file mode 100755 index 8f8095e46fa4965700afe1f9d065d8a37b101676..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 591 zcmV-V0~O9lw>B8WRlD)Gm}Jrz31u-X&&gn2lvjs=i{7nIaL6v2==uw+8Lcs(8j27 z;|c`rmSv@Lx!heopGP^^Ieb3f=R!%Lpp$}iMS-&P3EJ)s48wrJ_Ni0~k|c47D2nj= z{jS6bt|kFpFf|p5cM`_&0Zh|`rfEp0(}=}lT#(6RpzAsUfxv^LSYX>WlAaN$>)*J5 z0#sE+JRUD8iT9*fz{)_^7@6P&!sEjTcD+I9Z4YjT1`wH@fV{cEvneYGFU%maIEU2s55&K(LixD|{p-uiS@?KNj zk-Go8G$hH6g002ovPDHLkV1hVj1#|!a diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png deleted file mode 100755 index 159b24075191fc259cfd80c797a1b0d74c168422..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 664 zcmV;J0%!e+P)7Z7t2}reCh0o`+ zAlt$F2tW%oO@m<=(B8a-_VgLl#~yUMUDWG!0qFPppd^03e+x1WpkO1NhIaKD2A)-@ z=Py8(Wi%R%JtYZG#sTKH@6Z+&!S3Edf8jFJJNKuva#KJQD3X^7;H^fd2di znEN&c58aUG>`>P{Vqq$kLb+TP{?I!d4(|o59X_%|nVEZq2Rk60n7072SWJ{64CV?3 zgS!EB=eYxwQ>P2&$}(iT6UMvuFgHHIEdNA29!EBtg=v~X!DxxEH~}L2zn|52%xalaq@DTdhh{EVwv0IaQ=!?daer zTKp4I`l8SDt;d{8Q`5Ko;BXUi&oAG1l4}59P-{|^S(Rmord5s6qsh<&m@Ab^wqCD) zHyRD}lKLDzpYN&@q5&*47mGzGiqcXpmqR9#K|CH8kXS4RNs`(iEF%HjP%f8ItyaZK z6$%Apvsok(2>~dTO5jTZfq;N?0ch4l01f$k9?4{~Youl-#x{UDMr#AFIkz@SDwPtQ z$gQ^$2|*(Ps9LQiav_8o8Ne<=Zx1*M*syo80sEO1tB%>5 zfdHB`1z+!R@?ghPRKmL)hWEvZE$=*54ose*0JiUNTM_)cMDXhxEKg(?-pD=y<)L4J zT0dSyD0&NhJ$^_8Ko9uom%-ZM4BTM{Tw$9qyPj=-9W;N(Wi@3*-Q4pq`Gcp}^vvNr zyd&PsmG>fpCSZz?K}UIEd;HGgG%0MG>ymxKPwy{>wy(m*Atq7)0000~7 zMNw2LQirBVQoa8G3P(rY+l;L4iy+JwSqmy$9JlSkk z&*$^Eg+c)@!R|v4gdc8+TTn&eWHO0VD&>$!B%o;;WLf4CNs=Inq9d`xA4otCWHK38 zmc{pkX`0Y=9g3oGK{}lVy~OYL|C5lQ&U^l;wrg|7w=BcA9L4-r411?K7f`@348&rw zXD#uW)DK;H`hxO}u%=@Cj{;#u#_;bb1_KgUOT2Hp6;)MvC6P$vQP3=g1O5#aU%I!K zZ1dc@f}YvG&*Spnplm2rIp^VdA^HydZ0X1axdms2!RKi5x-SFA4p@ zC@N|PI$ryHL@t-(!zBsf2-+sYAukhDHU7Lxm88-p zDk^c;sHj}OKUc4lGZU}6umlGVNAJx0%sKDOFwQx|V2pVvxhYKe|L9TNk!~md3BVrm zYPDL8Hk*yU-ER3~LGwJ7N`0ZV&nOhBI{~~A;@ND*=kxg?#^W&`4u`zk?Mg_e)8XlK z`T#M+OaR1!<#Nf_>$S`xrqd}OjYhoJ>q)?3vEX8pY&I()ERjfjrXM$k7e+-Qs3Ihj zNyOuEQ2EGYG7ro!o6VOBQEwuV2z)*tR8>WxP{616FY)p1Pn1d}#9}cxolZC$4n(6- z35hJq0;FlHC{ zp*iF(lgUK(E`($(s9pJ8Kn?(M734H_63WHtf}6SQQ_MXEP!#0|&@>J8dL5TfG&tBw z#tYn{TCGZvAr>cca%YYn^!t73tg8OOJ2FvJ(`YpCyVZi*?Ur+1uUA$hAg8-aK)c;e zQ<)!XwHh|n&ND=$@^)>aF-`~n}#*WMkD*M|f8r$i*z7+W! qF|A!t*4fE(R`<_YIkN&?Jng?3oQ|aAqClPi0000t>5xmo{nArfL4CJwMMm+N`pQ3p^Le$?rMud6Rbxz!-yG7bz2z$^USP5(;udf(gfQ zG~f68y^)EvcNWp#bUoDt2=h+^%o-?-|mo~iieWqLNP<0m@2PTB7ftyb= z@H`K$>v9Pr5X`L|rw&CEN2(9SB7A2SE;d|j9@*F}sd(@*2l|P*fWfK>1drZUrtUA7 zNXO~pKn1cjf~~TLbje1g>EPPzN2GH#UIBxJ{}S9=E`{zs-w#hO?vcH+hJxroI5v?j zD!4lP0WXq8zUx3RAP@|Gq$}6wXCjFLZY^YSWBxN9#&g)ro$%5}aYn#y=tJ_aIT%4d z5d4u`rlp!};XGmbZkJE*kYJoi&N0pd*yxY{0${xD;;Q1h^8f$<07*qoM6N<$f(}t7 Ae*gdg diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png deleted file mode 100755 index 0c76bd1297751b66230f74719504b2adb02b1615..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 603 zcmV-h0;K(kP)^~*-1fljz_B$LUvK}k?BNXe#Y!m=zM!!V#}8bncK5m;8VP zw86G*RI63?Cd%b9bX|ueNlZ|wR6rj|r_)VIP@r2imh3?SN+^{|kY%~8B{maJ@F*OK z&VH9LwOeGt#DRjj0~v~8`>iO7!Ybi;zE$va`A^T#yW`y44;k^#O~K5*jD=qcUhPSc zvyy~q;5H_1WT1l~cqje9yfa+l!hu6xjdOJ8s;8E^+=QQ$tw p?%p!Hy#YapB=@+^9(46X{{RQg%9y;OKjr`c002ovPDHLkV1g7l326WT diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png deleted file mode 100755 index 87a69145075afd8f8fd8b391c5da1249ec8b2889..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 587 zcmV-R0<`^!P)LWh{^|hy<@Q*xw+qo|KpY<+vaXbbW{L4q( zTsjXEJvb}e%bgb=o%W0h?4u1;^bWTqH8}5Th002ovPDHLkV1nrS0P+9; diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png deleted file mode 100755 index c66011fb0fbdcbf210483d676b7131542a0e282b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 592 zcmV-W0k7R5;6x zlV4BMP#DI+Z{WQcKZBTk0lfkj5F$ztWhP#lcuyb@0@rA^#Kpu5KLA&Rgc}o#aSmis zrZC__xY^&#cI&!!{c|4Q_tcec*#b>|Y15wPcY2=o3;-Bl=(t4;6Ok*pL)-{*A;GX^ zS(@WGp6j~k1wBVR9)BB_gar`}HyRBXh7nM!)u5^>N~MyN6bc0-5{W?44iB<`2biXb zR;wk?jIQg@G!5l)SqhrXCU}x$GU-dY1sra}0uCq@153FUULT=jNwSk}0WBjKz}Jdu z<5gB*<^XtpAmp3m^ZEXQZWd1krhft}CoYaF4cSMvTJ01}X3X37KYdx-D0$c{doUe8 ztY{vlGr-e*;N!WAV%_hgUawyYrhegW>^F)pv%uUTFslHn; zvJ)l{%w(~{!O4`KTmK{Q{zCYltLfs&4?nz|6IdlqHCvX;|HGv~!QW?8P~_d#e0$v$ z)5XHEz{3>qMiH`1+qNYf?huS+@L`J9_$cjJF)Hf?@pu;)`9}BXwGUM{2!{y-4|Z{L zG>z?O%Cp8P5T#j1DID7u_*(Jg?7iss8AZQ+&;u_J{FmILf((9eoiL5nGUe>Fgq*U$z0000 zJ3A|*qoWOonz+4ZQ0KNhDB07SX1?#FrNy8%K)_l}y&kh`*KYdy`Y99&tgNgMLSSrc z?B?+B@HO@P-jS~z2Rgc6yy~Y~%>oJpBxsb$5<&nRLqiuR7K=@0SZj~jTs|sv_jWVX zGe?WflejOaq|Vec=s9+ahmXbyJ|T)Sl*?s82sr2H?Ce~HD5WI+Sz&tmWrN()wI2}+ zKqg92t*l^-#ae~;9%KFlWkmwnY=-UK`_|%ICZ#P1gdjK<2n38VXsuC7{WiU!fZFmm zW~Sda9(Qi@pxO}$ARY+;t##Ao27usOqNt7Hwq6K7G1il@xitj=LIM&{N&#SuX;x4x zmG6FhCg-$PI;hQ=;1iZ>F>^~@)IPi;l}fX?SZ!QiO=X<|pSVkNpJuLHzW(FT_~W-v z?vFpkyE>8ee4d=7wKauH5~dd_M7d2Aa=ICC{Nj7Blqv&DQEP#j_VeWV&WXL>c=LLK zsmYg^_JiDb;%U!UxO%qjFAvsDFj-kzT2$GbV(ZopPM$i$z`!7jvEk07BcC=6FMt4` z*0u3Sy`0b~%#(0000K diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png deleted file mode 100755 index a9f31a278e17993d8d4e13beac2f9d5f7b42d08f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 309 zcmV-50m}Y~P)sF~CC`eaI+m%Y8jfzomMvZQaNUIT3LIrJ$h)_W{ zwF|LDNlB-g`Hb_G$;>3F$9JF3WYR|3fy2C+_wH}*xp!_4fF2UN4lt#d26oXwru}hT z0+0%Vz-l&|Tdh_L-Ng1G2*RBtBncRx;99K)&+}s0whhxXp{go}$g&Jk6k|vfypI5M z!1sNGVaV?!*L7i87Bo%cfO@?S`bajL{R<($@$|PtgBRcCGIJ_2a|&kO>G-s2aR3E4 zjssoScUa;zIdOeGHBnH13G)W-zt$kUQgNfG;96b=v&4NzRt&@7nN%v3HsG`<<+F$cumMs448N!W3r&2Z*b~D5^$^d6Jxn@SFK5Q8*uKSR7x{I|H-_N1f+AD zSYC5@2K4OKL$==F9U@CH;ONNL(W}oZICHn;d?~pw?GRIsH*x-68Oy6SuK`)`{E)46 z9^3(-HXa#X89SBv?u_YP)WjsQrp;}0X?Bxrvf12IKW8>3t`e~W9|JS<{btTNbNT@EQIWBSNJTX8AMGXD z-SsH|s#>j9Xf~VMtyT-YMD}5^SWHTY5->o`k|d#AE_YQd79j`%GMS7FNvG3b7^Vy9 zn0HYCJy5MyQLoqKnW|JOp-?D*<2V^msZ>BOv0ANd2n7t@{=V;sZrQ>3c})5_%ms4z z7!qXwHHe~!QFj8aR~&*-3F?O|;#(ESIXP~Os%|~y^7c15*q5`gz2-5ol!fU92NIGT z_ves+>+Tf3gfcL?!nimYmR}cw*|BGULzI^7!;k#3K^YO#;!+vM@N~(99+<;fdqr zYPJm+pXYFYk;neQyXXEcTQDNQx57i`Okp9A#n?<7!{#tnKJdsF>utb@JH7dU01gfL zEK2hoPZAnO5+je3&^i*hWM`qCW^vLK!O*?U-#IvXV?#6koWqrwnD{j&K`7N>^tR3G z8zr1(qVOzcF#nF1&0MZ5C$l8*E^Uth0000zE0Ay_3@1Z_7#f-XWL#E{8Al7>L$ z0Rx7lnddoqAyfT%&#`$;v0@*5YdW3w z7mLNoa=FAshK% zDiy@zakyMAxr-H?iQDZi^!t5;Eno2A=?>mMx`Vg(Z!?<53LHLvfTPa`$mjDcX*Qdv zR;ylN4OH+m)fVX&Z#yZpUae;ss@a$K&})gHovkhr@w#xyPVlfVgXti1_357y%I-UHDvRWYvPEX+#g+j4Q9ayba zh7uQN1j%HQgA=Fp9DfODAU^*3*FCs^6IpO7xg`RUXyP)(;=d!ly=#I^l3e0Cub`{H Z`5PU3+D2e&<<>s`J(VpX#y^kqzQ;#=2x({YMw9Q&ndHT&`BD$#%Ql?{+)-OuSA`r}MWJ zVg+2Gc(GW}a=BERPNy^;kEz$|38dTYlFQ{%5S!g@|8f8D_!Nu9_Ni2glF1}xG8xi! zorc39&F6EPOeWOt_XS`W2H_Bo$MXugy}SEctJQj=(TLXTHL(jRXfzs>NF=0SHk;94 zF!&HjdZNX(3U3;LY64IMX__Xv%_wjLC!J2`0Jw?X=zPK$C$`&dYPDKaC={e16bcE@ zgun^<0k;ak*=xLE)@(Lqu~MmsFoMCLY&0Qog`NO(h@kyxaA%EbwJLy8sU*Vi`~52K zX0wrqW;_LmMq@evX4iAM9Od(Q0eHP$1%L|xAh@vrqB`HPQLon}f3aAka=9!3hr=O- z5F9`#J_7Jhah=U(4RjaRhkS4Xkk98kDz-`i!r|~~AQ1TFcDw(@<8g{aBE)l)PNxNE zI(RPyc>9e{@WGSMU%i7*v{!&P$WLz25)0oc=Dl-yy%xYZAm4b-rttL7UjR#%`#j_F R;_m(?iiXTHIMmcoLoO94I8;j@ zv^2DJ5#orqydFJX|Gm$_Bi_vyew+j6{r}$Qc@D1%fQqeAhJj)1!z4pP83k2MV2~s! zSt^w(<#HLFVBg_#xz1W8ioi(WY&Hu~6zil?DI^jJgu`K35(hkP)H%@Imesbg#5!Ps_$Ni*SiR8&sKb9?M`0-mH)gtg&YgRX#*TXz@Z+| z;|2H@xzE0TfuORhuO2k6#K8#sW^J`mQ0+E@$K`QkFV+DTlI$w{GJ;zid{*v9xeIe_ z$|Bp`@iKkgoFK3{4Z)#DWKV~W4K@5WZN+Ql_7%YxNqSx7%cWud&cX>)_PvD*UzxZg a%Kia9Rjz_59@~-t0000)l$0ECbfb-0$}>7z|u>IvuoHEmW&j4lzv=KA+EpIObc7e7{sGA)QVmnM@*^ z%|h38^m;wC+ilpk%>l#V5LCqP_y2_Cayd^XlX;j*r54R*lW!zbqtSpQNyz8(JVmWm zyV4S$2{Uhyc{Cb0QQbf{ZGT{Kr zvJi{K_&f+q^Pv4MK$hhS4TgFj_FD*rLOePdE-E^T7ZzTFCRUB`*?9&h(a#C!-v8lWG#k3AOJQaUey6Oasked^kDPe=Khg@7s584 zg`XfS1)&u*_c;I76#%`kkBfiZgKKo@0)9d6vZw=ExQUtV?eW{Y1Xv}=4X(2zy85d> Y0C^(qLv?Ui{{R3007*qoM6N<$f-gW7od5s; diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png deleted file mode 100755 index b93e77600def75c9a144d3d0a5088a62c02cbb0b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 618 zcmV-w0+s!VP)$>5Y&axjp2O=VLu>*f>1L;s0)kkvKC!*u?s6CVL=HJ6oP~pNfZc; zsKr=bq;7MITw8NXw{SZm%59TId2x_9BQ zV86`NuvGI!>o^V!Na!=$7GJE{Cq`b+XwknM{UcGHFTTfmuS+ zm-zYC!P3+zmY;SG$?!fYkOih`QYaLxyF}A86h$GGN}kFj)_o*0e zjPMP%zTG7FYMAfO2Nn1D`D0Cj?Wl>5q%@CE10nX)KxpNmwk+!IWkzywiYD( zqUXiYYIq3qcRyMGJ;IY`(Gz~E$J$zu2+R{)xGlE*88b3WK6V*J>}2iPY1HH|tER0W z_+^^FdppY?o)Gt5M2`%xwRDH@R3G}^i1l4|6uchm0X0f!@&YdVLB5K&dd7Rv{)DXX zt^&vP;}kqj3f>94j+4xd93>s|Q!Ezi>?r8(Il$P}PFxSqu{d*!Y%*#cX(R0f|Juz# z3o0_xI14Al->1uky@W-rCI_%l&>PK^TXNSN{byMk2AI5vbwp!K-%-@!-vPR3iikL1L7HA!^!~ChCFU#lnGzp88=I z67V8PHBo4(l$u?-AKmT8?#_0rKW9dUNRbpLc`}piywAM9$xZ-3fR1C75T(BjCn-l* zjUcci2oXXo-}iqun@#)+`W@kL_-U&|2>MxZy~3IdmRm&8b)9!2%ksg3R)nNnT*TJOC=6{2hG86Dz+<^p6qfG5$i^UNUh+u)CD7O2 zK>Ioazn;U|+X0x$=feveYZL1W*Fm%e5P1sajd#eW#^5(ddx76*pt$^)b}$Q4oPabL zLc^HF>Z{8za;f$LtN0P$6C?1{X*jtXkRJ8IEeyiSzencvH3Ux_y>y^}wfJrRCQN#9 z?&e+C>sSAfrE%mZD5RfZ`gSndD)=P?+nG5Oq$zmY&-v+gc7R6c0u8^Ke#|XOq?gF@othF3zFpM8Il<8BJrWqBtF>b#_ye4{0)Xbu6j&@UIhRE002ov JPDHLkV1nWI9dZBw diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png deleted file mode 100755 index b977d7e52e2446ea01201c5c7209ac3a05f12c9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 663 zcmV;I0%-k-P)^@R5;6x zlTS!gQ5431_q{u#M2 zg&W%y6a}>qj1Z|7Vu&-DW6d~k-n;jnHsjb-q#u0C^W!_5^C=MlKq<8oNCQ6qS00!X z5eI;XP=g!^f}j{hku}E1zZ?XCjE;`p19k(Rh%^AQQ54xysU+ocx$c#f61Z4HnT#3u~FR(3>BnZniMIF4DouI8Hi4u>cAK%EN)5PO(ip3(% zIgBx+QYirR){Z8QwV$9Z(Mpt=L-Or3#bf-G@66}txq0yc*T(zNTBDT0T8rO^JeNbSI-Tzf5!pBioy4NwAN^?iN#{;fH1Jke4Xa`^fR8m z%h6dq%xX)S?7`zae))(Xst^Scp6B8FejQW?RLTM8@0=vnnntuRGBM2dpo>gbCnTD= z^<;=JuqdSf@O>Z8^XdR?s+KEfhDdB_#ahFj^giCtzT(s8kA$AViyTqaAR;KGaLzUU z<=GqA4bRwpX|IG~*x>pZ!@zLr`XQ`od>m(`;jz|M_*1GDO#$7;n74ppb8=eiqh760 x0yt}J1#p`gw$`o!R{d7zU9~!Un@nJV{4bstt4Au+Up@c;002ovPDHLkV1kWhGjjj{ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png deleted file mode 100755 index 581843637079359a6a58fcdccf0763690c67b063..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 676 zcmV;V0$crwP)_k3`4d{s8lK_6bi^@vq&To98fNoK}7)fx$e2^Y&@<^jR_Ee+8}KG;X`@ z@bCyiolqX>bb1ZIs%QGnjzFU~L8H~d?e;*XP(h(S262}XyZ3a0h07r{KV?E70l+e- zE`%3x|M5#q+;HOC(h@A^M)7Rn13dm0&>K$j%k_F4wOWlsNCIH+!c_#{eS&TL8v4yc zcpnPEY`cQzZ$ILq{U-MA6Z6Z|1p!FZjQ}tXSb25J@HphEqX-6Hqo?-_Zn@{d#>2Ml zJGhxTAd&emK$lV-QK&VM&ix0Xy{GyS3Wp(+E1^8BhD3T0a)m-Lw@Lu4zQRrP)9(3F z^>$hh@N>OAXrmPYunLi|fJ$_*5i`46;M>~*5D{bp>-OL3{+!MJa`3kv~Q#QfQ%c z)1s}QE<_XaYBG;IuRF=td#+}fi4h(6HgoUyJLi0t(*dA^B)%@8kkG&bdM5P5^Z5WF z%d%>m^SbN0XeV)wbUOXn5Ag#A$gJx+7-OCkMM1S%MWIlTkbFLmOeW(&n&wUd&;`>p zVcRy$Z{K0=?SpNnP^;BYEEXleFbq(UY&LrXX$6qkJ~)8+b{=jj3HEXds;Z(?D%}}L zX3`39&dy=Zyar!ehA}e>w)(*vrCct{PI9^2Jpj&OZS8<3-@{0(gNv%1{)zAiLY+_^ zl}e>Ofd4&#Irj#7>=o=Uhv5IJ@?sN0^J|(WL2Uun$4}si6}TG-s3T#p&6GE<<2W)O zf{^Y2HlO#*QDvTp3v&d@;8*}aUC4lisG9(w7@d5Y8y)}U#FwCkqp*Mcgme4{&gGRf zlBfd`nF9cQBKB2_L{F8G2)7pAf$i)Ds`|}-c>pc^LRW{w4SQ)3N^BbZx)6BlCZts! zKph%`(m#xg-q3I7=(us;9<)*2%iuQ1J`oV3gU6V~T}^JU5714JN33&GwEEru0d}Uo U{MPL+lmGw#07*qoM6N<$f^vibe*gdg diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png deleted file mode 100755 index 8d719df5205f7415ce657e5c277db4533c82f346..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 639 zcmV-_0)YLAP)p{{sC7)XB-g4w*W1a1)XtvxrMYa1o?wn&v~3 zHnC|#(>B_M1d`_7gfzLiHy=0c<2kQQdXu*33(xYN_xYW39(cz9jEVT%VokB8|DoF~ z8u%Q5sdl@4VB7X#uh+v_;yOGY&pRi?378ghv)P1cngiAAb<}D#l*?rWDV0j_dc6Zk z-|P~AJZQCA=yWcQjG8fYnimzj*3KqTfN0Cy!G^$7)+bQ$+mHVd1J zvwOR^5Lm<|R+uyB1Nu4vL?d4qa3tn?9H7SZH@~u=fFHEDfSH|bHU6kh0O3%cLdyny z{`9S2Sw~WMy0MPy!64i`jdk4Z3>^+KIL_fN2V_d&ywBt`^IJpxUI$=YAph~5`;xCe Z{s%Y0vkUXDnO6V+002ovPDHLkV1loX8z=w( diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png deleted file mode 100755 index 106f5aa3611a4807ec8c21701c631730275089a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 402 zcmV;D0d4+?P)<@FR}JvtGRKa0_WfK^c7uXaFH3q@Y!Hnl8VySc`OtkPN3;#l*y*l23+99h*9JzA00}rAC!#M1dZ#v9YOBH|eC*${MmzzYjBu!!-< zK8tujf&(6i)1biy*F>4{f*Kd(IU-JsG&#b_@NgTnx@40)2@2%c;*=?-2Za=}O}7&( w%_K#(S>e1j&gfY?mR})n>>0+8p`iTe2d1K2h8#$+)&Kwi07*qoM6N<$f(2cptN;K2 diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png deleted file mode 100755 index e4a1ecba1b60e54f3777717ed105cdde745b7184..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 516 zcmV+f0{i`mP)o)wchR-92qq~y6`XqbKmElbB3z{pkZs0VPF`CFvS?7jDn^mFo>d9Y&06* z&1MsS!M-CH3ee+h_sy)Ms%B*ec3R0RpVi9?*mU84yoq(Bw8 z<4(999dJJE!V%pWT~HGRIAb;(#O%2K3?uRpz}AfgE8e9q&OSdr^e^}lC$QXZz;S2A z)w>^oHy>?v)q--`!pmuBe96PxP0u*inQvyFW(llfv9 zXV1s*Jh`y2H%B3ZTA(AzpsQ?hb6_PyZ=c1?_B4fbl>G%!@ubJln=!)x0000#DY{xaiib^#X=YT4@yE_&2#eBulEdzjE`u&@G%2(&u{J-<}d(^uY4W_kMfEX z@!X)AR9F&FL?RJyJRUzvBoeqN{5kY`z3wcM0+du73~_0|*lac! z42Dw(Eg1o{Ash}P8jXrqN+1w`*XxDD;ShmPCZC7#4;wWbHoMvBl$=zF-`?*9j*Nbjd=v@OWt_BgKxP-3wd zy37?ATx&$b+&zRM!K;BD%Okw`Sb@&Pak8$KRX19jWZmC0&n*Ggv%j8nvSPDFw zEkV65AGOoBQ8kf`R|}Px*&INNS%osq9b{Fq2I(x6@xM>tg=vRLF?I`0rWzHyRc>}g~)F_Qn`A>)C_iwK%Z zrIJ;xR)UI1Y4Ozts|-Nho;q zVk9-bX)%F~!;63iu$Fk=VJn3~fmb5S@@)ZqjBT2{f`vT`b2}zxb0$o;EF@G3&BHK^ zc)`1kUzo^Qkk$?KFKHNBD?nP-MJ3b@&4fg;g5l2wMi^g?9qj+~@b;62o_U1_S1J`g z7m^UMg25FX1MJ5AQxAJ5F5WDt=$=-@JV-!LHA2vuxl9kN>PS8x??^AINH6LjF*#nbk4}=n3gfWp$kEX5IpHS zYiQ{@d7Nl&d$#+7-TckP&Q}N91e-C#5QQ<|d}62BjvZR2H60wE-&H<>}%WqH(_V;zPbB1rgSSSC(0? zWlQ#?N3UgnJ9m2C29w!SwoOo5_2Iq!<8vCyEoDoj@#oV($oJEg6Bj@;nD|2g8 s%L|>IZ381yx9RvPhV4J)*SeoEV4lyr#k*`nfWBbxboFyt=akR{0DpOPi2wiq diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png deleted file mode 100755 index d61648452284da1bc28b10385f95b5d2bf027901..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 616 zcmV-u0+;=XP)-tZUVHjYHp;RjQ0M0pRlXN=mLv{hk9Ebp9&~+Wj-T9IkpzWPWd#fZ)d=zV^~S`;LE*!&u-?g42^wwN&Xr1~#d5ifl_2*B1OoS}CDno^8a50ArfE8;stQF>AP54J@H~%T zFz84s;dO!QJKD36(~!QOg!t_^gfFcSKDU4yK0+Ypg$NT^mIYcQ6bk*3P(lBLh7Df_ zTu=2xC#+-_%)|{Cv8zz0t|0y4D5M`xAc{gwOKc`ou<*&VjUREFHs1qd<_xSkKeTBt zgyCi=@jj;&Ns^GsWWaIUl0Y2azcDlF@u{(P*!+EH;lnU~b|Lv{4|4Hdkh!qoQHiE$ zY#y>KFA0QEw=4Z|uV{0A^`Y=D}hB$GP&<$bi8q(u;p^0(my3Rz7fP}|# zGZ&#uor4@c3q9r|f?H6-UZmfgKx(iV(MQ`MPWB>iC~SxnN5H*zb*A3#zWwgu&c|}3 zn^g87H{pdeasl%Lhmab&jC?lES}7C?4BFDNA<}20hoY@w_IU%i*T;}}wh!589}7~7 z#Ug`-R~4j&+K_y4kW@X7qLr-)S5qVKU)tO;+kXJ++{vPI@{hVK|PhMVVx_`)vx~zUs}c9O-Ok{00000NkvXXu0mjf DS5_-g diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png deleted file mode 100755 index bf7bd1c9bfd78d689c73ba67cf914182933ee68c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 614 zcmV-s0-61ZP)OOAS;jTeL{ZSdz-%)SMH9tDF;N4B6%j=d15J&5qy`F#vB?Ar zqS1nH@%ny_XSI*Y>) z1f5QYdmzT>YciP<3WehS<{GovEaLGv27>{*-7f0&I$yJ^L%ZGPv1YT$V|u;*+ZCWz ztHI~CDVsuy($SfR6-`N~K?9GTB#l%%0h7 z-q`K-y~E)+s8lMyTrPL8^_pUo)9G|SluG5pPqw6!LJB_PzyJUM07*qoM6N<$f^=yZ AYybcN diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png deleted file mode 100755 index f6b74cc40f82fc83e4dfa6e9647ccc1b34e6ed7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 554 zcmV+_0@eMAP)Vb2f>2}Fa82O3m(Ob=t*sniin`NpInLyMJgI`saru@YOPfh zy4g0#G*cV!#N%;Gq9_VH9?v%kjS3Rb1j8^;C={$Gp=lbj z*(?%?geA!5^Pok%UauwjA)v4g2`HedDw4_Mk4hhBQt?e7YJ5(hcj|3dNu^TOPGnjB zTTsqd3GIZ=Bb`n=7no)dflv&K(lsWw?lH6T1Yht0F9qgIuzh}ym0%n<3d3EBWB*pg z+G!I0lbAEXyd>k|QNuwr4=KX1D+tLPv)j@C1=N4sA4NF9A>HcO3G47*Y6!+SrUH-7 z1hb;^#S=r|`aMh>J#dWruAEf}gcR(DRUC`ZUev&$Sbh0SgLiTXeeHEU<$_YV;9281 zym`igIE%Sm8DpDw7@71Tv^EB5xSdUR*0$Mqp+Wq8OoaZtOg52&)zZ;;M=7#C1Yd6x svjx>8ad4e2x|*xHHwRjcjs6zA0XLDUqKT6dS^xk507*qoM6N<$f*wetruo^Ag2=LamM1T#~4RmC^m`_ zs}H7d&XJ}mg+hU?tu0noRvyjI&o2SRAeYZFesYkts79I^jJ7!A7%6nJwq8O?iT55M z1OQ` zbL{!Cp5o*IRmE9PInMCSPjTwfT~J+EYkz}tjxY=fg5Yf6EQ@DG$0kMJ9h^&$W}9BU zP1oj2;?MWVkKIEl)r=Y;L^Cx2q|>!)qJJ8zE7-V*-Cf7V8_2#1c0N975t~+&QUpQJ z5(uo(-O_`%Rj@U@t>JYAgd!>L?0Idxtd#oW2gc!jinsAEva8|kF4#Ic**mmml_{d^$s}Q5Q)KCys4sfck5bP1SyeHwh2`A<@N&t2j0^lgHC_^(pAAPCNjwl+>AN%C4Ll>_8Hjda%9 oS~i=#*e)>KsPlg0=2)Qg6BCqJ=F8HdGXMYp07*qoM6N<$f@i)wr~m)} diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png deleted file mode 100755 index a65bcb3e1e9613cd9e4950850db43d7025a5fdf9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 779 zcmV+m1N8ifP)JNR5;6x zll@CmQ5eTZ^k*a#RQf}fVOdd`5NJh6S(>6Cf$wEW#f&JyAR#GAn9>Gml;nOf3WCDa z5({5&UB$(IF?G#$x4X@Ickg!Y-HU!Z_rzX=qAq-XI_LS^=lOCT0|0{#{kBkYDS7{3 zD`iu%E=`cDX_^#^#n$5SIQ|4Zhsk8>N|zXHXG@*41$i-7`Jr{8`3S_OEcmY|RF48wXkk?WpdVM4OePBSbfh z#4_=eXJg@3epx~gi>QbUmO}Bm(ENN3+@c?jWiKvSrm(o|W}Ud*?vy~fn1!V~Cl4kB zI-;c!8f~-v)jX82%EG($>?;KSD$64f2&4qQ#=Yyrcpy$57RAVuV#vKMP)0hT$r6m# zc^F^XaJ8R9Q|}x^NoJYIvYZkq-z}Tnj@UJK2l2H zG}p+VvtjP2Z%bsb$~7QLJ9#pC0dKi`ppOd^_V;ME6tdzC0PtV|r=@e@37O`%0k^=5^`%cf$eu00N17Ro!{^30krz>a%3j34C?*{Mt2^a4~ zK=P+Qq%|f;Tc&+9ps;@Mw`EE%rgs&#y=j6BUGg96oIqdwj9-fiy*N(|@o)eD002ov JPDHLkV1j#pUPb@_ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png deleted file mode 100755 index 23a37b891c2f5faa3b8128d45373ceab794ca609..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 688 zcmV;h0#E&kP)PK^TXt2QS_@2qt2T|9~baC-vaPn=ziepcfAwB$0!O2Q)E}1e8!q+9)KT5JVKU z7HNY}h##OS-BxWHWjD0wrPDeEfUClHs%Q6&2u@FTOJkKMQN|_Rlw6rQz$gPzqGNtj z#ruSeFeh835JJFiM6vp@6M5bXj%k7CMt%SIwfbF_fD-3*Os`9Ly_Q3WQ_SX33E{pX z9_WIeeTCGQ3wYALpBcK+P-iuw;3i&7xCua37k5# z`>c`M@sGeC7cdsdz`aE9lOz!hPholbyz%T85LYf6O*@SA+9&+^7k>+4M8$A8iNQq{ zQvn8k?-+dU`Z@gK0z$EtPV#+`^OH`R@cE-cuE&_!D)SZGxmQxeobP_Zwq zMEgi6ePN45N`|V1so0uE8^}1xw8s;VM%Ai@7} z2-&Cyvez_-O4?6uv{zTaj|YeYEk34i~K@`8YW2g{x* zc;7z3lItpVy_et{Z-ZZ)<@*%{l7Ao8mu@V7*gz<_1##mwW*%LEwCdzNsVLYx2*T-J z#HeQ*_a=R~KDdVNk$EVgAIRl$oQi_(`_IrdJciDpH|Xe{K-YsMtc!cRnFi$qzsr4z z5*$;ecov%3->1{YNy6-Gf(Ecy&_I$CjI#laeuE+S120^|Vjsf)W&i*H07*qoM6N<$ Ef)^4A_ab^avY?n0hpS-#mn_4{O$e%cm-@NH=3`90Wq+3`~HKArSdfX`&Z12 z(CY$VW-MNtXX4xy%yUeE?}*~0-|iByA@ZrwXgph4S*bhcc5{HB!DFVm_v}P*g7+Q~K}7K0lcp(^N@X>U zV`{ZpeIf${R6Hgg4FL^`X$Eu75k(PE6ycl$AW0Ic)#@rR7Z(7;V?i-dR1K935Jgcx zPfkwK>2wGokf!Nih^ARp6-6arYFG#(9Ta!x93nFEjoA==z(g?#sDg?Owk?Mg7K+>l zWYsf(<`#+$h9Sp6gFOg_dd+80SkUpk&xM7h0`Sov9W73spU;GP073|VfZ&Gd$J$*0<~TV5aPS|qWH57|VJz+d0000vYep8SaFV10Q$h+;hIUPX_=v5b}%>Tm<(&j1&5;I!55C)oN0s(P%ZB zP3Q#ahfpXKWF@S?jm4U#fv)QovMhrriclyNs6-G12#3R##4PSZ0VY(dRWJ;Lwuq{# zAW0Gwi$yA^R4RZ!;W+L`f&%x{=D^VK#BBWL4Ys{;*!A7Q;!=dN<&D8*GzGaF4`hV4 zDbY0{NrMX>ZqF=0((gR5-zL$kC*b)!fwu{Euru|XrG<$^n#@)7i_>rCmRxnDq>$Y%gJaCkRd|tE*a2x05Pe!I^e13o69#&RQZ36s0 zB=O|K2Yi(jsMqThn}9t?f5E-)L^naZ+db$&%M$!bCdm=jv7?t_lB?3&%Ltq(>ESw? c;MI421LCcoDG!2@;{X5v07*qoM6N<$f`UZt7XSbN diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png deleted file mode 100755 index 134b6693687b2fa5fe36d48a9c0b8001f937c741..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 650 zcmV;50(Jd~P)VHAd+bMNh~)LLRqN>D)-jd9UvB%+hyKX5U|&4t0)fzgD-MPpQ$nHU%yoz=vI zMGb>1Xu!6Hw$NT~@Au<4P-+{9;Uw?&oj31uzH>xX0T7Xkz!(tn|Ed9-s_FqyReC13 z(ll)vW1O{Ck5ihay12Ob2ABc@RUI;zHpaMiyRDs0r>|D4rHw{ItJSJnYjt~jTbGuW z`X(~}?!&86q40R8<4zYw;$qi0^3ec=c&<&H;r`8W%H=Xymf^i;Wo6~<+}zx2UMzpC z*6MZN?(FMv`n|KO3(KFiUaucP0;Z!@LcUNa%8#vGK5aZ>wDgB0Gi=t*argWJcdlMQ z2#MpEX0wU+9&0U?N(F#OgpviU_Y{jYMsj65U3|PjwUOY}lUYj?MTiK_Il}NCVx-Eh zDx-TzMk7se+M#W_>?A1-x}ZXw3kkyz5kW)_hkjsi@RhKadN#H$Hq)$07*qoM6N<$f}lhwPXGV_ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png deleted file mode 100755 index c4eff0387d5888c638ba09473ba6d2369f7b56f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 588 zcmV-S0<-;zP)HU2HvUSp%6 z*n}iP63IK?dpo;h@sj9~pcxo;VVTc-XLiP@DgefqE#NE=@oyUd-&HjLpsLIuSFXV-EMck)oQ(A`s%*^&wf0(rNiNHsU%=0Rw;WC z(kbc37l6fo`-0uR!pYkYv8U^3?nsh^@pw!K0TH3uYyx1_2>|JbXPmfskJ|1YAw9w! z9`N)1^Aesr;y5Nr5-ODn)oOL|CGi}f9!&iVwpK$khlIX10X$H6^A_stBJqvLhU$?V`QXqKme*s~gVDJ4A;LTs_e15jhc1;By a82kqHEPVYFAD2!50000JNR5;6( zlS@kiVHAe7MZY2;Xi-5)WxDDgv@tCUl*&p14T@Z~3ThM5LP4tuQfLu@EnG;nXc<8S z6&3BN?fx-cv-Kp6>HRiNTHE>$X( zD&=w+?GWC>?RLAGC6Yix;an~UmSt)tSf}1VS6N1N2ONORdD? zaj}w6DAZZdOud9Ep?M?{iQWbE5^9HLLZZF|1kdy0Tu4InEuboP9@nvbZ-P0n4AZTy zyMRIxRDmUE#LdqYuD=-Qz4N^bC`_#S7vcLn1M}{J(Wl3#c4VWczu&)AjUlh(11>gp>f`wv{KnjF%!aA*Jk N002ovPDHLkV1kkt*XsZP diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png deleted file mode 100755 index f59b7c4365fa1720af1aa04eb47167ddaa6eeed4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 626 zcmV-&0*(ENP)ZS(e|#C2>JN4>y}l*tQ*E7zP@R2CCJnkW?xa6bgk%(hgtZ z0=~d?U3i`+Mvi4!&~+WPT1^NX#{u6&QIx+DE(oR{&T5&-ovF?@wGw)P&AtpHZa|G%V*GUUqL@@!d4V$`8=##4)ytY959JG zdc&Kho)&AL70^i z!PEmeeDWCB-UbK(*4JST44^tV2z_J(dn~+vBMJT97_7rzFio=~XczIv?PQ5$v%u~y zu(bteXb5I1h2zCV{Jc2~V{{yzZipgsP6;k264$*#5q?GzCm|CPa9CKqm4b116h3Pu z?+%Cm52plC8|5P0@igf2GV1KkCfk{Zecu=G@VNrf>s%g9c5D%@cfxVb6$nY`1IW=4 zt10QqSps_2JLp0f3I0j0u>#qA;v!+T))KEbCg|mo3q0pG{OR}p0fPds8+K~d>Hq)$ M07*qoM6N<$g1S2e3jhEB diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png deleted file mode 100755 index 44084add79b9a0fc3354d16bbd4b4b5ff8095da7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 317 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-$R@9E+gqH(@-qA%AW0|7U8+xDRI z0k`B18}ImRw2g{jTGP$Pmx3yI6F_2s&$|`cJ!i0UN zB3H;=r{#{FwLaNVJ&hZl9+MTHGx1T^-A=Q0?hRb#8a~x50X%;`b6ik3cw=#XdxWy= zgrpBoDjpwP&g9<9h3x!k_B!?vuTJVkmIJ-U N;OXk;vd$@?2>|rNdMN+^ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png deleted file mode 100755 index 3a1441c9a12062a4bb3d706000d3ca14399aebca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 565 zcmV-50?Pe~P)SCZIX8XZzY2l?gCw6LlgWJ5Avz#QX4|&mI8LN)w~J1vgL=KLAhlWz*=#m~gyvxa z&;iC6gb?aZvMdXxX`<0+D1hs_pqJ!wxqlEH;CJ)je~uL(gpi@v>!I0f_Kl=E(E+Tq z26na*9gribxx-Oft(HnstyXUUy!39&E-cI%J5Rsy;(PGZH{g{ty!HVC&yGPT3H8x# zw{^gBPW)O0FMoh{k%l<`1a|To_Wl&u&-GXm8izU|&<&utILc4wc6s@u1bmTz6x{qg zTw@7=FQRcg&r`h+gcR$*Jbv+*DPk7v)B@e0o2 z6IlBXW&8xh@9)YKiV~2>+z&XKd24JT55YWz&JtfvCg4r^~bLP79-yS@n$OW00000NkvXXu0mjf DStt2z diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png deleted file mode 100755 index e7708292adabf4821612bfca032cbd019c63180b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 634 zcmV-=0)_pFP)KrcWDBzIw9XCtIF5G<@j zP(;CSqHxUrerI>~wKyloM4~t_Ofl@UFEj6$Bmm6p1aK6H{5zI_FOn(%k{CiRq?CT< zoV}Ey-7=-5nVFes;1m!f?EqZLIs4k$n%39XN4dPbtX{9DZnvvaiWV0aH9I>yf;2<< zHmo7WNC<&iE4ji-iKJpsBApDKiAiqWy8R$FV|M@E-RCB03vjWNGQZJxKCc-cSB=dq z#v3snoDMC=4<2BDgiZrv0Veh~mz(X=S@;fbe>CJO_5|oe2o3=wgfW(StLzI-qr&kc zhXEJ?9=`nWXzrUKL_p*Kr9u@95MU9EKqp2vi+%&1&gUn&>Ut_d3>wiyiAJg5G7j%G z#$sf%Kqau!AAHP&4Q?edl!FWqpT=C{D}$15WC#5QQ<|d}62BjvZR2H60wE-%6;pyTSA|c6o&@eC9QG)Hj&ExYL zO&oVL^)+cM^qd@ApywS>pwx0H@RDN}hq;7mU-SKczYQ-hnrr=;iDAQMZQ+*g=YOM= z!QlMQEn7FbaD->uKAYgo_j9)W&$$zS*W9}m(ey0q$&7l-XEWO0Y(9M=SnhLbwy;d>@~SY$Ku*0xPvIOQeV1x7u_z-2-X>_74(yfh7C znXL|3GZ+d2`3re2hs?MKC#5QQ<|d}62BjvZR2H60wE-$R>*?YcqH(@;f-l!01CbW>s1Izr z3LkoHh<3E?TVANoG4CX|$empRCCS=R(U(hVJfm~E?IkDKRK&NP2|n`v>d(vV;W1uY zrFGVdwn;4b{qUtE`?GB`)E1ga&i2|7ncUL1b!KMq^QnT#_gn?_Z8(c`1Q~Vy3oL!N z$M8vHL&U1J3SJF!56azQU3B6>r|ZQ{U6)pC|tRy7$(5JQ<@7eB8yk=XcNf-aBIe#;8c_B$^=N z{-Iq&o3%O}V4~G($=zcP(LI|+6dq{?rby~MXwJQ*=!bOvl%?k zYY;jP^@M_k03MHL+-9?_3W5MN=moFW3xmPHU=-4Bw;62MrIhg_lwHEsv)V9U4x>+9cG2kIz8fWo`WyMMfz zdg-)p!<(hFR{VYSDJHEJn09O@#)%q0l?GUg9eS2~vKPUtd+=ak5lWLd-jI=;cjEf# zt$1;~?G!t@s+VLwL=P+Ks;E z!Jkh#NeohG;&02OFD7^EY zP!_PL2~i9VnPEW6Fz?O3dVF_U$duAL$=SU7&hNc@-drC5A4z=IgjR%B|D)?dOEaGb zuwod-$hPex$8oSoqK;@Z8u3EBfK@V2CKKqo?yA%2pjNA)(P%)HWf#)x^$?52W{|1b zPXOA$IfrSQV2q(qC_vLR)a!L9isAxjoeoJRlgE&G0Ga8krBVsGjZJJ-x6y1i(eL-q zwB%+o53no?l}ZJh#drAjlc6nhs3RTn;1IH+x;K#|X)!=#fM76)$IqT4^N}IF%aQ#o zTKS@*)|#L#jiCPi9~);c`x>TR|0{+9a?O5Exg#~V5W2C7G9nAAN(~f z2caqx&t~GhnK;qW3~&OuEke?%u(8Jxs_+ZVVz1^-uLrP95TahadGG$+(D&+%2QMF8 eFxE8s%l`oWamgLPAe&$S0000dKE@duOisOkyZ-5 zuwDqkAi_*y5o3Xrq7ieT<<3p#-R^dGySwea-CgZZZITBc?#1u+FtBuUCJUZe;~j-%Tu@ZpYB;$&ydfdZG#(j;(iB#^yRlqv#C*LO zXWXM0cpKKBlj#L6awm|;A38Zs3mg;sQZmCAZT8m@X{AlP6 zVI=SsiA16x=>2%^XV3U0y4~G+MNE!B{!#;~%L2l(14PX>EblXb{rnCSlVKe0dyf-O zuY#uOf}m&2xq80;4d3i|cuNw}U@sg3VKRU)>Os_1L3pl5mK*|?X3#a}K+EVZt&w?w zefXKP^ZqnW-3y9AhYJZ~r4m*!Z3OSz3d}2Q`nDM_f_u>L%8Cb}8`?bl)x?gwAy>zp z06y57kT6sry1g2l{|V%UW?)JwnbzUugbvpOF3=oZDo}spfs2EWKOH{_^59;ue!o^A z@e7dWS|QI`Ff-E$USJ`LqDF}zH%R}YOlMiv63A=qK^d}n!5_(fW%^k4U_D`_meIDi kNMKea>saR;>gt<+0gk_zsk5>Xc>n+a07*qoM6N<$f>Jg*?*IS* diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png deleted file mode 100755 index 1eb880947ddf3e745c29e8d9dc90f09c7e6e323c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-$R?&;zfqH(@;q9b3Efq-lM(nr^( z=EYR73-9e)UYMWsXy%?aZsD68Yyv^2$~6QgEcljw%kx>O(f-gQ?@fOOx3A-0+Qw?O zRx~W)kn~Qe2d6f9nMG#g9Q04Mk==M~N!Dglvxk!fgVh#w@ZV$IY1+Xc`d{d2UcaP~ zfWp)_Ivqj}l2SPy^9ZWy6rG9Yx4v67_uA&&9|XA~5-#3)W3%em1peD8RWH^#O%XoM zxMPud%}GTj#~*+7JMxTd!`{^Q+>(D3*|@KV`*G2;{QnANOxu1$r2xIe;OXk;vd$@? F2>@zac~<}c diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png deleted file mode 100755 index ae8ecbf47672a874c0958d0d113a56162c2bd364..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 651 zcmV;60(AX}P)hkjP zNW|QGv-YFNLN^qH@tJycPNG5ti6B7;r4mEr#lr@*T8*M85D`{ZR^BWwF23T<%MYIh zdC)S*p=|xk^!~H=+HSZ183~y8v4|mYmZxt&)5{{~>J`>E223Q5>T$=~mtA71q-jdG z+eJhOAyBW^0k9Gk1+rX8)zFx((CG^&tDY>6XaS~Fy!WJON|Gdujg5^~Vzt@o%BcYLiNiTQSD`zL^ociBz_>bDlpw3kriQ@Z`bVsGz-_6N>$&gTDiKDTKR^ z-hB*tHa^>!oD~5TK^0UK5rZ}RBm50Bv}S-yA%s=Ha5RYb{)!z2N&$&64gfhybBu8p lh~_|?8^bu;BRYt{<}Yrwd83Y=s?Goa002ovPDHLkV1l%3CP4rI diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png deleted file mode 100755 index 6ed2490ed1432d5d667a76235360824a1088e928..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 734 zcmV<40wMj0P)JT{hN;C#tgf#9krG=I>5!<*aE1_(spcgF}<`n4i zJi-}^6UUeU4jUFwdCiVPDm%`Zx^UBa8J(mnR6wEgz^}o8;)M*Y(@l_!Kfv)}4+NuM zaPXE50z)r)9=D=SR|RIqfQ^j}Hu!fzMeQBo+@PZk1G8hOw|vBTvkx`HM)Xe9q3xao z@`p0`NO!2904FHSLA6E@Y-O6zH$DQzvq@aHsz}}<(!v(Z_+EodX%R&NZW75g+nENo zV0020rxE^;7d!067AN>6*+&YLp$9uH6F-=In`XC{Cn%+o|5)b&boEPr02w@|P*oGm QmjD0&07*qoM6N<$g78X0Q~&?~ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png deleted file mode 100755 index fecadd08afed92536be91ab12d8e37b6bf410d5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 613 zcmV-r0-F7aP)wK%m(L+9IV|s|#(WRl-O^4GvaQsnHq|OstfO zIJ3}3<01}YGARE4m!7=)QisvlHUo!Qymx-@-t*p_129Ko-#pVI)6#!*kLj-AGXWNR zyA_{wKii_amK7^YT-v z6#plaNm#8`-kz@OvjIt^4%IN{@J3bR zRI}ME1Mv85p|%;RK>ViR>APPLB4;;BpCtqE@P+*7!G>I4UjNx~e>r3HA^tWCQ@S)l z{BslcSwL-CxQ&_ZZSv_g0Tu{yi*X){Mt|W7)lbE`SQxFP00000NkvXXu0mjf;)M*S diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png deleted file mode 100755 index fd4bbccdf1643f4ff5022fbc59b82546e259317e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 386 zcmV-|0e$|7P)_QM!1S$Bhw4w+iRuFWf;tfR6D%SMJrb+tx zC9R6{2>Ou6#juIy6u(I?|;&Owi$sRB4^20apB5xE2 z#B9XekY66S6lzfCL!eEQRgo0LokTA55@Y#%_wN!TXPw^Q4IIXsG~v#u_4t;x_HM16EQ@QRY+rut&97&UefsPmLrQ5P zBC2kcbux9L%2bJz$P$XV$*zSxb2e@6_3O#;&!FD<&hLjGn%~%en;7)djE^d6!t$lW7GyIOKlQ46hr`Z zjLNuRDP_53dNoN?wd&HMgL^m1DXFU<5dQsrceN>fSz00000)O9XRTN^$%%`*Fg>ryDtc(lF@?b>dE!20r+y z#Q*>(wbV5H`-E4Do={CJp7=ERhw15hgZi)?jRG88 zzVz(5;g?Td1izJyO33bhjg2Qc7FVY@f9!o)Gu?DII~vm-Dc?}3M!fsgjP?F(7`rgg z+xOk8XD)e?Zl=5+un`5!7kr?F=eq)K-5uqr%yU$1hLv){Vlm=)*5~`lwMciiXFu*g z)*Jkz6AF>#zb(Vx`Iv{bdGZHtlW)v(y5k^|xgSUc9%0}S20nrYrO}78ofk?bV!5)4 z=Ngz@+$9N1>>mA%IWx`Fqa240bWkiW;2TZgd8CZS0U}@mknC;!2;wi$eI@`h0y2JS`Eae0CW}q(2(%!m8 zWq$`PDU>LT1_y*bBv#P5<@q0@ttz$hIH}YMDvAigCc=y*)jY-VOpTd;A8@3t7Xh4r z0KTWOk;N2Ox4!&&^4B*no$WtTX!BXB)rg!y8dvGgKBQKLJNXRRp0}Bsjd1|LNQX~c zbC~fjrk2iL@4dYF*vt;}dFn(%h)n_-vzEIHMOKRkdF%3Lq|zBgKm_h>TEq!))nWjq zzn;B!?!(dQcHu$#=JF`cS&W~C`WHFW^B!~MI#k)>1Vk&eQy8P1O`J6V04{D@|7d6^ zyBABnh-d^H0FX&L07M||E0n_dp4v&Q%PSE9p#R#Hq)`5I_(B5CE#q dxjPz0{s-<+c#AC!i7@~G002ovPDHLkV1iPlpuqqD diff --git a/node_modules/express/node_modules/connect/lib/public/style.css b/node_modules/express/node_modules/connect/lib/public/style.css deleted file mode 100644 index 32b6507..0000000 --- a/node_modules/express/node_modules/connect/lib/public/style.css +++ /dev/null @@ -1,141 +0,0 @@ -body { - margin: 0; - padding: 80px 100px; - font: 13px "Helvetica Neue", "Lucida Grande", "Arial"; - background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9)); - background: #ECE9E9 -moz-linear-gradient(top, #fff, #ECE9E9); - background-repeat: no-repeat; - color: #555; - -webkit-font-smoothing: antialiased; -} -h1, h2, h3 { - margin: 0; - font-size: 22px; - color: #343434; -} -h1 em, h2 em { - padding: 0 5px; - font-weight: normal; -} -h1 { - font-size: 60px; -} -h2 { - margin-top: 10px; -} -h3 { - margin: 5px 0 10px 0; - padding-bottom: 5px; - border-bottom: 1px solid #eee; - font-size: 18px; -} -ul { - margin: 0; - padding: 0; -} -ul li { - margin: 5px 0; - padding: 3px 8px; - list-style: none; -} -ul li:hover { - cursor: pointer; - color: #2e2e2e; -} -ul li .path { - padding-left: 5px; - font-weight: bold; -} -ul li .line { - padding-right: 5px; - font-style: italic; -} -ul li:first-child .path { - padding-left: 0; -} -p { - line-height: 1.5; -} -a { - color: #555; - text-decoration: none; -} -a:hover { - color: #303030; -} -#stacktrace { - margin-top: 15px; -} -.directory h1 { - margin-bottom: 15px; - font-size: 18px; -} -ul#files { - width: 100%; - height: 500px; -} -ul#files li { - padding: 0; -} -ul#files li img { - position: absolute; - top: 5px; - left: 5px; -} -ul#files li a { - position: relative; - display: block; - margin: 1px; - width: 30%; - height: 25px; - line-height: 25px; - text-indent: 8px; - float: left; - border: 1px solid transparent; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - overflow: hidden; - text-overflow: ellipsis; -} -ul#files li a.icon { - text-indent: 25px; -} -ul#files li a:focus, -ul#files li a:hover { - outline: none; - background: rgba(255,255,255,0.65); - border: 1px solid #ececec; -} -ul#files li a.highlight { - -webkit-transition: background .4s ease-in-out; - background: #ffff4f; - border-color: #E9DC51; -} -#search { - display: block; - position: fixed; - top: 20px; - right: 20px; - width: 90px; - -webkit-transition: width ease 0.2s, opacity ease 0.4s; - -moz-transition: width ease 0.2s, opacity ease 0.4s; - -webkit-border-radius: 32px; - -moz-border-radius: 32px; - -webkit-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); - -moz-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); - -webkit-font-smoothing: antialiased; - text-align: left; - font: 13px "Helvetica Neue", Arial, sans-serif; - padding: 4px 10px; - border: none; - background: transparent; - margin-bottom: 0; - outline: none; - opacity: 0.7; - color: #888; -} -#search:focus { - width: 120px; - opacity: 1.0; -} diff --git a/node_modules/express/node_modules/connect/lib/utils.js b/node_modules/express/node_modules/connect/lib/utils.js deleted file mode 100644 index d0bc172..0000000 --- a/node_modules/express/node_modules/connect/lib/utils.js +++ /dev/null @@ -1,451 +0,0 @@ - -/*! - * Connect - utils - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var crypto = require('crypto') - , Path = require('path') - , fs = require('fs'); - -/** - * Flatten the given `arr`. - * - * @param {Array} arr - * @return {Array} - * @api private - */ - -exports.flatten = function(arr, ret){ - var ret = ret || [] - , len = arr.length; - for (var i = 0; i < len; ++i) { - if (Array.isArray(arr[i])) { - exports.flatten(arr[i], ret); - } else { - ret.push(arr[i]); - } - } - return ret; -}; - -/** - * 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 public - */ - -exports.md5 = function(str, encoding){ - return crypto - .createHash('md5') - .update(str) - .digest(encoding || 'hex'); -}; - -/** - * 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 public - */ - -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 public - */ - -exports.escape = function(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; - - -/** - * Return a unique identifier with the given `len`. - * - * utils.uid(10); - * // => "FDaS435D2z" - * - * @param {Number} len - * @return {String} - * @api public - */ - -exports.uid = function(len) { - var buf = [] - , chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' - , charlen = chars.length; - - for (var i = 0; i < len; ++i) { - buf.push(chars[getRandomInt(0, charlen - 1)]); - } - - return buf.join(''); -}; - -/** - * Parse the given cookie string into an object. - * - * @param {String} str - * @return {Object} - * @api public - */ - -exports.parseCookie = function(str){ - var obj = {} - , pairs = str.split(/[;,] */); - for (var i = 0, len = pairs.length; i < len; ++i) { - var pair = pairs[i] - , eqlIndex = pair.indexOf('=') - , key = pair.substr(0, eqlIndex).trim().toLowerCase() - , val = pair.substr(++eqlIndex, pair.length).trim(); - - // quoted values - if ('"' == val[0]) val = val.slice(1, -1); - - // only assign once - if (undefined == obj[key]) { - val = val.replace(/\+/g, ' '); - try { - obj[key] = decodeURIComponent(val); - } catch (err) { - if (err instanceof URIError) { - obj[key] = val; - } else { - throw err; - } - } - } - } - return obj; -}; - -/** - * Serialize the given object into a cookie string. - * - * utils.serializeCookie('name', 'tj', { httpOnly: true }) - * // => "name=tj; httpOnly" - * - * @param {String} name - * @param {String} val - * @param {Object} obj - * @return {String} - * @api public - */ - -exports.serializeCookie = function(name, val, obj){ - var pairs = [name + '=' + encodeURIComponent(val)] - , obj = obj || {}; - - if (obj.domain) pairs.push('domain=' + obj.domain); - if (obj.path) pairs.push('path=' + obj.path); - if (obj.expires) pairs.push('expires=' + obj.expires.toUTCString()); - if (obj.httpOnly) pairs.push('httpOnly'); - if (obj.secure) pairs.push('secure'); - - return pairs.join('; '); -}; - -/** - * 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. - * - * var pause = utils.pause(req); - * fs.readFile(path, function(){ - * next(); - * pause.resume(); - * }); - * - * @param {Object} obj - * @return {Object} - * @api public - */ - -exports.pause = function(obj){ - var onData - , onEnd - , events = []; - - // buffer data - obj.on('data', onData = function(data, encoding){ - events.push(['data', data, encoding]); - }); - - // buffer end - obj.on('end', onEnd = function(data, encoding){ - events.push(['end', data, encoding]); - }); - - return { - end: function(){ - obj.removeListener('data', onData); - obj.removeListener('end', onEnd); - }, - resume: function(){ - this.end(); - for (var i = 0, len = events.length; i < len; ++i) { - obj.emit.apply(obj, events[i]); - } - } - }; -}; - -/** - * Check `req` and `res` to see if it has been modified. - * - * @param {IncomingMessage} req - * @param {ServerResponse} res - * @return {Boolean} - * @api public - */ - -exports.modified = function(req, res, headers) { - var headers = headers || res._headers || {} - , modifiedSince = req.headers['if-modified-since'] - , lastModified = headers['last-modified'] - , noneMatch = req.headers['if-none-match'] - , etag = headers['etag']; - - if (noneMatch) noneMatch = noneMatch.split(/ *, */); - - // check If-None-Match - if (noneMatch && etag && ~noneMatch.indexOf(etag)) { - return false; - } - - // check If-Modified-Since - if (modifiedSince && lastModified) { - modifiedSince = new Date(modifiedSince); - lastModified = new Date(lastModified); - // Ignore invalid dates - if (!isNaN(modifiedSince.getTime())) { - if (lastModified <= modifiedSince) return false; - } - } - - return true; -}; - -/** - * Strip `Content-*` headers from `res`. - * - * @param {ServerResponse} res - * @api public - */ - -exports.removeContentHeaders = function(res){ - Object.keys(res._headers).forEach(function(field){ - if (0 == field.indexOf('content')) { - res.removeHeader(field); - } - }); -}; - -/** - * Check if `req` is a conditional GET request. - * - * @param {IncomingMessage} req - * @return {Boolean} - * @api public - */ - -exports.conditionalGET = function(req) { - return req.headers['if-modified-since'] - || req.headers['if-none-match']; -}; - -/** - * Respond with 403 "Forbidden". - * - * @param {ServerResponse} res - * @api public - */ - -exports.forbidden = function(res) { - var body = 'Forbidden'; - res.setHeader('Content-Type', 'text/plain'); - res.setHeader('Content-Length', body.length); - res.statusCode = 403; - res.end(body); -}; - -/** - * Respond with 401 "Unauthorized". - * - * @param {ServerResponse} res - * @param {String} realm - * @api public - */ - -exports.unauthorized = function(res, realm) { - res.statusCode = 401; - res.setHeader('WWW-Authenticate', 'Basic realm="' + realm + '"'); - res.end('Unauthorized'); -}; - -/** - * Respond with 400 "Bad Request". - * - * @param {ServerResponse} res - * @api public - */ - -exports.badRequest = function(res) { - res.statusCode = 400; - res.end('Bad Request'); -}; - -/** - * Respond with 304 "Not Modified". - * - * @param {ServerResponse} res - * @param {Object} headers - * @api public - */ - -exports.notModified = function(res) { - exports.removeContentHeaders(res); - res.statusCode = 304; - res.end(); -}; - -/** - * Return an ETag in the form of `"-"` - * from the given `stat`. - * - * @param {Object} stat - * @return {String} - * @api public - */ - -exports.etag = function(stat) { - return '"' + stat.size + '-' + Number(stat.mtime) + '"'; -}; - -/** - * Parse "Range" header `str` relative to the given file `size`. - * - * @param {Number} size - * @param {String} str - * @return {Array} - * @api public - */ - -exports.parseRange = function(size, str){ - var valid = true; - var arr = str.substr(6).split(',').map(function(range){ - var range = range.split('-') - , start = parseInt(range[0], 10) - , end = parseInt(range[1], 10); - - // -500 - if (isNaN(start)) { - start = size - end; - end = size - 1; - // 500- - } else if (isNaN(end)) { - end = size - 1; - } - - // Invalid - if (isNaN(start) || isNaN(end) || start > end) valid = false; - - return { start: start, end: end }; - }); - return valid ? arr : undefined; -}; - -/** - * Parse the given Cache-Control `str`. - * - * @param {String} str - * @return {Object} - * @api public - */ - -exports.parseCacheControl = function(str){ - var directives = str.split(',') - , obj = {}; - - for(var i = 0, len = directives.length; i < len; i++) { - var parts = directives[i].split('=') - , key = parts.shift().trim() - , val = parseInt(parts.shift(), 10); - - obj[key] = isNaN(val) ? true : val; - } - - return obj; -}; - - -/** - * Convert array-like object to an `Array`. - * - * node-bench measured "16.5 times faster than Array.prototype.slice.call()" - * - * @param {Object} obj - * @return {Array} - * @api public - */ - -var toArray = exports.toArray = function(obj){ - var len = obj.length - , arr = new Array(len); - for (var i = 0; i < len; ++i) { - arr[i] = obj[i]; - } - return arr; -}; - -/** - * Retrun a random int, used by `utils.uid()` - * - * @param {Number} min - * @param {Number} max - * @return {Number} - * @api private - */ - -function getRandomInt(min, max) { - return Math.floor(Math.random() * (max - min + 1)) + min; -} diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/..travis.yml.un~ b/node_modules/express/node_modules/connect/node_modules/formidable/..travis.yml.un~ deleted file mode 100644 index 5dc982fce6fb6694dbdcae443e5a802ea26f7f90..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 953 zcmWH`%$*;a=aT=FfvLGaXYHXQ%)gz~yID`YatKNKb=_A?ZZ)IGZo`!)V!!QUU|?VY zVr0Mw_=LwfIGWH^pcyvGr6dG^(R2oyYrxS2$`i2Q2L(L4f`YDs Lfu5;p~v?DJU?c3r(N-yoyY!M@ZA|| zZtuN%{<>2g3-&+lKKZdyDo*U|cB(%ccW&HX{y2BnaWYd*H^x+%5#?!BN2w2Isg%oR z@oCO^`c+*pq)HU{=$trC;N+JG*@6=rhtI$T(dD@62AWfMF2AlCFawZfnlvPi*}10VR*V1A9)sm|OA3#sLX5vwRyI36{I3}cLD25r_ASr{Oa zxV}BWbv~6V9FG|zhp~ROwXQ~DQdN__*XM?U025B8lB+X*cxu^wN`V zv}>o#qD`N>8=4MOdS{9;f)R9bYFav^WPnIQ_eIhT_otieM^}j%o`ee?UyRqVv-E2$ zqMPG--v~o|b*cltFr7eyHANN%h$N=pq-nOl>8-<A^~Y` cSd!+tq)5H^3ReDr@#nQhw@Q@Rt-UwD0dLwRtN;K2 diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/.npmignore b/node_modules/express/node_modules/connect/node_modules/formidable/.npmignore deleted file mode 100644 index 4fbabb3..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -/test/tmp/ -*.upload -*.un~ -*.http diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/.package.json.un~ b/node_modules/express/node_modules/connect/node_modules/formidable/.package.json.un~ deleted file mode 100644 index 26c5b26c92be8977ee5b5204a8156a1e1a3e8ba7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 542 zcmWH`%$*;a=aT=Ff$8}Zxt^rL1?Q$te0Ff%Dc4$uz)iCgIF`P2U-0#OxM;8f0|SE? z5F-OdAP0m&0LBLM{VsbHus}rOFF@o`NRSjeOyoZhz>R?kj?z>N0bq3GL!;xX1khYI hAch4$C@O>%fIulNu}H~ELCHYRK+jxB$F%YJDgYFGC4T?_ diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/.travis.yml b/node_modules/express/node_modules/connect/node_modules/formidable/.travis.yml deleted file mode 100644 index f1d0f13..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/Makefile b/node_modules/express/node_modules/connect/node_modules/formidable/Makefile deleted file mode 100644 index 8945872..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -SHELL := /bin/bash - -test: - @./test/run.js - -build: npm test - -npm: - npm install . - -clean: - rm test/tmp/* - -.PHONY: test clean build diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md b/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md deleted file mode 100644 index 3427514..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md +++ /dev/null @@ -1,303 +0,0 @@ -# Formidable - -[![Build Status](https://secure.travis-ci.org/felixge/node-formidable.png)](http://travis-ci.org/felixge/node-formidable) - -## Purpose - -A node.js module for parsing form data, especially file uploads. - -## Current status - -This module was developed for [Transloadit](http://transloadit.com/), a service focused on uploading -and encoding images and videos. It has been battle-tested against hundreds of GB of file uploads from -a large variety of clients and is considered production-ready. - -## Features - -* Fast (~500mb/sec), non-buffering multipart parser -* Automatically writing file uploads to disk -* Low memory footprint -* Graceful error handling -* Very high test coverage - -## Changelog - -### v1.0.9 - -* Emit progress when content length header parsed (Tim Koschützki) -* Fix Readme syntax due to GitHub changes (goob) -* Replace references to old 'sys' module in Readme with 'util' (Peter Sugihara) - -### v1.0.8 - -* Strip potentially unsafe characters when using `keepExtensions: true`. -* Switch to utest / urun for testing -* Add travis build - -### v1.0.7 - -* Remove file from package that was causing problems when installing on windows. (#102) -* Fix typos in Readme (Jason Davies). - -### v1.0.6 - -* Do not default to the default to the field name for file uploads where - filename="". - -### v1.0.5 - -* Support filename="" in multipart parts -* Explain unexpected end() errors in parser better - -**Note:** Starting with this version, formidable emits 'file' events for empty -file input fields. Previously those were incorrectly emitted as regular file -input fields with value = "". - -### v1.0.4 - -* Detect a good default tmp directory regardless of platform. (#88) - -### v1.0.3 - -* Fix problems with utf8 characters (#84) / semicolons in filenames (#58) -* Small performance improvements -* New test suite and fixture system - -### v1.0.2 - -* Exclude node\_modules folder from git -* Implement new `'aborted'` event -* Fix files in example folder to work with recent node versions -* Make gently a devDependency - -[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.1...v1.0.2) - -### v1.0.1 - -* Fix package.json to refer to proper main directory. (#68, Dean Landolt) - -[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.0...v1.0.1) - -### v1.0.0 - -* Add support for multipart boundaries that are quoted strings. (Jeff Craig) - -This marks the beginning of development on version 2.0 which will include -several architectural improvements. - -[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.11...v1.0.0) - -### v0.9.11 - -* Emit `'progress'` event when receiving data, regardless of parsing it. (Tim Koschützki) -* Use [W3C FileAPI Draft](http://dev.w3.org/2006/webapi/FileAPI/) properties for File class - -**Important:** The old property names of the File class will be removed in a -future release. - -[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.10...v0.9.11) - -### Older releases - -These releases were done before starting to maintain the above Changelog: - -* [v0.9.10](https://github.com/felixge/node-formidable/compare/v0.9.9...v0.9.10) -* [v0.9.9](https://github.com/felixge/node-formidable/compare/v0.9.8...v0.9.9) -* [v0.9.8](https://github.com/felixge/node-formidable/compare/v0.9.7...v0.9.8) -* [v0.9.7](https://github.com/felixge/node-formidable/compare/v0.9.6...v0.9.7) -* [v0.9.6](https://github.com/felixge/node-formidable/compare/v0.9.5...v0.9.6) -* [v0.9.5](https://github.com/felixge/node-formidable/compare/v0.9.4...v0.9.5) -* [v0.9.4](https://github.com/felixge/node-formidable/compare/v0.9.3...v0.9.4) -* [v0.9.3](https://github.com/felixge/node-formidable/compare/v0.9.2...v0.9.3) -* [v0.9.2](https://github.com/felixge/node-formidable/compare/v0.9.1...v0.9.2) -* [v0.9.1](https://github.com/felixge/node-formidable/compare/v0.9.0...v0.9.1) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.1.0](https://github.com/felixge/node-formidable/commits/v0.1.0) - -## Installation - -Via [npm](http://github.com/isaacs/npm): - - npm install formidable@latest - -Manually: - - git clone git://github.com/felixge/node-formidable.git formidable - vim my.js - # var formidable = require('./formidable'); - -Note: Formidable requires [gently](http://github.com/felixge/node-gently) to run the unit tests, but you won't need it for just using the library. - -## Example - -Parse an incoming file upload. - - var formidable = require('formidable'), - http = require('http'), - - util = require('util'); - - http.createServer(function(req, res) { - if (req.url == '/upload' && req.method.toLowerCase() == 'post') { - // parse a file upload - var form = new formidable.IncomingForm(); - form.parse(req, function(err, fields, files) { - res.writeHead(200, {'content-type': 'text/plain'}); - res.write('received upload:\n\n'); - res.end(util.inspect({fields: fields, files: files})); - }); - return; - } - - // show a file upload form - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
'+ - '
'+ - '
'+ - ''+ - '
' - ); - }).listen(80); - -## API - -### formidable.IncomingForm - -__new formidable.IncomingForm()__ - -Creates a new incoming form. - -__incomingForm.encoding = 'utf-8'__ - -The encoding to use for incoming form fields. - -__incomingForm.uploadDir = process.env.TMP || '/tmp' || process.cwd()__ - -The directory for placing file uploads in. You can move them later on using -`fs.rename()`. The default directory is picked at module load time depending on -the first existing directory from those listed above. - -__incomingForm.keepExtensions = false__ - -If you want the files written to `incomingForm.uploadDir` to include the extensions of the original files, set this property to `true`. - -__incomingForm.type__ - -Either 'multipart' or 'urlencoded' depending on the incoming request. - -__incomingForm.maxFieldsSize = 2 * 1024 * 1024__ - -Limits the amount of memory a field (not file) can allocate in bytes. -If this value is exceeded, an `'error'` event is emitted. The default -size is 2MB. - -__incomingForm.bytesReceived__ - -The amount of bytes received for this form so far. - -__incomingForm.bytesExpected__ - -The expected number of bytes in this form. - -__incomingForm.parse(request, [cb])__ - -Parses an incoming node.js `request` containing form data. If `cb` is provided, all fields an files are collected and passed to the callback: - - incomingForm.parse(req, function(err, fields, files) { - // ... - }); - -__incomingForm.onPart(part)__ - -You may overwrite this method if you are interested in directly accessing the multipart stream. Doing so will disable any `'field'` / `'file'` events processing which would occur otherwise, making you fully responsible for handling the processing. - - incomingForm.onPart = function(part) { - part.addListener('data', function() { - // ... - }); - } - -If you want to use formidable to only handle certain parts for you, you can do so: - - incomingForm.onPart = function(part) { - if (!part.filename) { - // let formidable handle all non-file parts - incomingForm.handlePart(part); - } - } - -Check the code in this method for further inspiration. - -__Event: 'progress' (bytesReceived, bytesExpected)__ - -Emitted after each incoming chunk of data that has been parsed. Can be used to roll your own progress bar. - -__Event: 'field' (name, value)__ - -Emitted whenever a field / value pair has been received. - -__Event: 'fileBegin' (name, file)__ - -Emitted whenever a new file is detected in the upload stream. Use this even if -you want to stream the file to somewhere else while buffering the upload on -the file system. - -__Event: 'file' (name, file)__ - -Emitted whenever a field / file pair has been received. `file` is an instance of `File`. - -__Event: 'error' (err)__ - -Emitted when there is an error processing the incoming form. A request that experiences an error is automatically paused, you will have to manually call `request.resume()` if you want the request to continue firing `'data'` events. - -__Event: 'aborted'__ - -Emitted when the request was aborted by the user. Right now this can be due to a 'timeout' or 'close' event on the socket. In the future there will be a separate 'timeout' event (needs a change in the node core). - -__Event: 'end' ()__ - -Emitted when the entire request has been received, and all contained files have finished flushing to disk. This is a great place for you to send your response. - -### formidable.File - -__file.size = 0__ - -The size of the uploaded file in bytes. If the file is still being uploaded (see `'fileBegin'` event), this property says how many bytes of the file have been written to disk yet. - -__file.path = null__ - -The path this file is being written to. You can modify this in the `'fileBegin'` event in -case you are unhappy with the way formidable generates a temporary path for your files. - -__file.name = null__ - -The name this file had according to the uploading client. - -__file.type = null__ - -The mime type of this file, according to the uploading client. - -__file.lastModifiedDate = null__ - -A date object (or `null`) containing the time this file was last written to. Mostly -here for compatibility with the [W3C File API Draft](http://dev.w3.org/2006/webapi/FileAPI/). - -## License - -Formidable is licensed under the MIT license. - -## Ports - -* [multipart-parser](http://github.com/FooBarWidget/multipart-parser): a C++ parser based on formidable - -## Credits - -* [Ryan Dahl](http://twitter.com/ryah) for his work on [http-parser](http://github.com/ry/http-parser) which heavily inspired multipart_parser.js diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/TODO b/node_modules/express/node_modules/connect/node_modules/formidable/TODO deleted file mode 100644 index e1107f2..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/TODO +++ /dev/null @@ -1,3 +0,0 @@ -- Better bufferMaxSize handling approach -- Add tests for JSON parser pull request and merge it -- Implement QuerystringParser the same way as MultipartParser diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js b/node_modules/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js deleted file mode 100644 index bff41f1..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js +++ /dev/null @@ -1,70 +0,0 @@ -require('../test/common'); -var multipartParser = require('../lib/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - parser = new MultipartParser(), - Buffer = require('buffer').Buffer, - boundary = '-----------------------------168072824752491622650073', - mb = 100, - buffer = createMultipartBuffer(boundary, mb * 1024 * 1024), - callbacks = - { partBegin: -1, - partEnd: -1, - headerField: -1, - headerValue: -1, - partData: -1, - end: -1, - }; - - -parser.initWithBoundary(boundary); -parser.onHeaderField = function() { - callbacks.headerField++; -}; - -parser.onHeaderValue = function() { - callbacks.headerValue++; -}; - -parser.onPartBegin = function() { - callbacks.partBegin++; -}; - -parser.onPartData = function() { - callbacks.partData++; -}; - -parser.onPartEnd = function() { - callbacks.partEnd++; -}; - -parser.onEnd = function() { - callbacks.end++; -}; - -var start = +new Date(), - nparsed = parser.write(buffer), - duration = +new Date - start, - mbPerSec = (mb / (duration / 1000)).toFixed(2); - -console.log(mbPerSec+' mb/sec'); - -assert.equal(nparsed, buffer.length); - -function createMultipartBuffer(boundary, size) { - var head = - '--'+boundary+'\r\n' - + 'content-disposition: form-data; name="field1"\r\n' - + '\r\n' - , tail = '\r\n--'+boundary+'--\r\n' - , buffer = new Buffer(size); - - buffer.write(head, 'ascii', 0); - buffer.write(tail, 'ascii', buffer.length - tail.length); - return buffer; -} - -process.on('exit', function() { - for (var k in callbacks) { - assert.equal(0, callbacks[k], k+' count off by '+callbacks[k]); - } -}); diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/example/post.js b/node_modules/express/node_modules/connect/node_modules/formidable/example/post.js deleted file mode 100644 index f6c15a6..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/example/post.js +++ /dev/null @@ -1,43 +0,0 @@ -require('../test/common'); -var http = require('http'), - util = require('util'), - formidable = require('formidable'), - server; - -server = http.createServer(function(req, res) { - if (req.url == '/') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
'+ - '
'+ - '
'+ - ''+ - '
' - ); - } else if (req.url == '/post') { - var form = new formidable.IncomingForm(), - fields = []; - - form - .on('error', function(err) { - res.writeHead(200, {'content-type': 'text/plain'}); - res.end('error:\n\n'+util.inspect(err)); - }) - .on('field', function(field, value) { - console.log(field, value); - fields.push([field, value]); - }) - .on('end', function() { - console.log('-> post done'); - res.writeHead(200, {'content-type': 'text/plain'}); - res.end('received fields:\n\n '+util.inspect(fields)); - }); - form.parse(req); - } else { - res.writeHead(404, {'content-type': 'text/plain'}); - res.end('404'); - } -}); -server.listen(TEST_PORT); - -console.log('listening on http://localhost:'+TEST_PORT+'/'); diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/example/upload.js b/node_modules/express/node_modules/connect/node_modules/formidable/example/upload.js deleted file mode 100644 index 050cdd9..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/example/upload.js +++ /dev/null @@ -1,48 +0,0 @@ -require('../test/common'); -var http = require('http'), - util = require('util'), - formidable = require('formidable'), - server; - -server = http.createServer(function(req, res) { - if (req.url == '/') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
'+ - '
'+ - '
'+ - ''+ - '
' - ); - } else if (req.url == '/upload') { - var form = new formidable.IncomingForm(), - files = [], - fields = []; - - form.uploadDir = TEST_TMP; - - form - .on('field', function(field, value) { - console.log(field, value); - fields.push([field, value]); - }) - .on('file', function(field, file) { - console.log(field, file); - files.push([field, file]); - }) - .on('end', function() { - console.log('-> upload done'); - res.writeHead(200, {'content-type': 'text/plain'}); - res.write('received fields:\n\n '+util.inspect(fields)); - res.write('\n\n'); - res.end('received files:\n\n '+util.inspect(files)); - }); - form.parse(req); - } else { - res.writeHead(404, {'content-type': 'text/plain'}); - res.end('404'); - } -}); -server.listen(TEST_PORT); - -console.log('listening on http://localhost:'+TEST_PORT+'/'); diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/index.js b/node_modules/express/node_modules/connect/node_modules/formidable/index.js deleted file mode 100644 index be41032..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/formidable'); \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/lib/.incoming_form.js.un~ b/node_modules/express/node_modules/connect/node_modules/formidable/lib/.incoming_form.js.un~ deleted file mode 100644 index 2e3220132c00294f535af61df327cd09af6553b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12289 zcmeI2%T5$Q6o$KDKt@qPK)gg56=5dh%&5^sLNGDnEm3d-UV!LGhH!@vf@n<84I3Z9 zg$p*uxbYEu0!?@ZSDQjF-B|UYjn(jWFum7s*sv4e}dp|Vazwq6w zx$^7k*R_>b4eNCs?XMqv`MH$IG_GxY8tVPrvvKFc+XJ5GzwkWoVuDg(bs1Tr4_0=m zusE9^FC=rx(d*B;>*24QvkHis5X` zd-4ruDb*A+{-sm?6j=vR`a_9t#i!iQzed0xrz_fvSFwFc?yy2R+XI_-uQ3kK`+cMs zdNA~#(;t9RO*~#wj|;uaZx|iU*P<+mF#6MEGfsyt2#Z~AgzkD2y83v0CBKvqSb!2! zt`Il}OU0uq(+F07B&O@Ic2HHSeQnzZfIE4sQI&W1dZYubcyr% zxk4h{msrd%PiCoiL^(MzHCup@>J`~Ra`nndqRO&sK%FD0B4c41k-Vu%(#WEudusqm zB|M03kMe}jIpL{zRAn0Bx~*}Q3$IZNPZS1qv6{p;!pF#(P<9HFs90u3$nHfUYtqQ@ z5h2*1vbge!5OTxl#{DWNwx$ubft|1g<9n!TuX2HKv9h?zDN9Ah!ZboOSdIvv*GTyE z3NS%M`%sod$XH1{+IN_Ou-N5BnC_Qj!eDWg9tcb^G=TgKt$VWo9`wbddU20Hy537- zQFUenZ#W8GGvMi|uatCO5Zr#{ATeZa&8TytQ<1SStLN5I&MlV<$U$v1#~CJ~=*Wf9 zsM0VZ_b^Ivt=q_DLv#=vj}OI5OjV;tY(d$HPNHI&8KHX=g|2NIy3s9mkQ{%KiF?G6 z*|nnV*hy3@Gb477qu8}qU^g-rDi5mTu1y>yl1z`6cpN=TY;u_qy|E~ICo0jC1-g(S z)OSdEN<3Z1r{YnSX~ghp6vK`PhUrvD5h~>VPTVD;OtAxHr$mX0WoAV2SrkP;Ecsw4 zT`LbULWtb;iKm2=F`h=*VU(y?W=0q%qA+&uf{`{nbO#?4P-C0&l&~_&lc;kjRb(to zBb1X-D7$t?iM=cGT@OtjR(=v#o=odPor9?&V__P>oYpXd^}1j(jbUQFj^<=&Q_>D= zufgIgR4Kb(*job2%5*cM7Vye1F@iaxVFvS`0nB8yGPm}Xi8i52+M^UELd)9Z3a8C5 zE>;FdQWoS`Bw~BRbUU_btJp#XocuIQbY}&p;buX-tt`C9S=?h+earg*X&>cFi$C;k zu;*NI?}Lhrg=zFYEb{x{7q<@5Oq@SQ2jm?rZ$Pfc)YA!lObEVP>=` c6kM~4DA*?xw1dShYq1ivyeHpUvp+um1>qtr4FCWD diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js b/node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js deleted file mode 100644 index 6dc8720..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js +++ /dev/null @@ -1,61 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -var util = require('./util'), - WriteStream = require('fs').WriteStream, - EventEmitter = require('events').EventEmitter; - -function File(properties) { - EventEmitter.call(this); - - this.size = 0; - this.path = null; - this.name = null; - this.type = null; - this.lastModifiedDate = null; - - this._writeStream = null; - - for (var key in properties) { - this[key] = properties[key]; - } - - this._backwardsCompatibility(); -} -module.exports = File; -util.inherits(File, EventEmitter); - -// @todo Next release: Show error messages when accessing these -File.prototype._backwardsCompatibility = function() { - var self = this; - this.__defineGetter__('length', function() { - return self.size; - }); - this.__defineGetter__('filename', function() { - return self.name; - }); - this.__defineGetter__('mime', function() { - return self.type; - }); -}; - -File.prototype.open = function() { - this._writeStream = new WriteStream(this.path); -}; - -File.prototype.write = function(buffer, cb) { - var self = this; - this._writeStream.write(buffer, function() { - self.lastModifiedDate = new Date(); - self.size += buffer.length; - self.emit('progress', self.size); - cb(); - }); -}; - -File.prototype.end = function(cb) { - var self = this; - this._writeStream.end(function() { - self.emit('end'); - cb(); - }); -}; diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js b/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js deleted file mode 100644 index b1e2bfb..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js +++ /dev/null @@ -1,378 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -var fs = require('fs'); -var util = require('./util'), - path = require('path'), - File = require('./file'), - MultipartParser = require('./multipart_parser').MultipartParser, - QuerystringParser = require('./querystring_parser').QuerystringParser, - StringDecoder = require('string_decoder').StringDecoder, - EventEmitter = require('events').EventEmitter; - -function IncomingForm() { - if (!(this instanceof IncomingForm)) return new IncomingForm; - EventEmitter.call(this); - - this.error = null; - this.ended = false; - - this.maxFieldsSize = 2 * 1024 * 1024; - this.keepExtensions = false; - this.uploadDir = IncomingForm.UPLOAD_DIR; - this.encoding = 'utf-8'; - this.headers = null; - this.type = null; - - this.bytesReceived = null; - this.bytesExpected = null; - - this._parser = null; - this._flushing = 0; - this._fieldsSize = 0; -}; -util.inherits(IncomingForm, EventEmitter); -exports.IncomingForm = IncomingForm; - -IncomingForm.UPLOAD_DIR = (function() { - var dirs = [process.env.TMP, '/tmp', process.cwd()]; - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - var isDirectory = false; - - try { - isDirectory = fs.statSync(dir).isDirectory(); - } catch (e) {} - - if (isDirectory) return dir; - } -})(); - -IncomingForm.prototype.parse = function(req, cb) { - this.pause = function() { - try { - req.pause(); - } catch (err) { - // the stream was destroyed - if (!this.ended) { - // before it was completed, crash & burn - this._error(err); - } - return false; - } - return true; - }; - - this.resume = function() { - try { - req.resume(); - } catch (err) { - // the stream was destroyed - if (!this.ended) { - // before it was completed, crash & burn - this._error(err); - } - return false; - } - - return true; - }; - - this.writeHeaders(req.headers); - - var self = this; - req - .on('error', function(err) { - self._error(err); - }) - .on('aborted', function() { - self.emit('aborted'); - }) - .on('data', function(buffer) { - self.write(buffer); - }) - .on('end', function() { - if (self.error) { - return; - } - - var err = self._parser.end(); - if (err) { - self._error(err); - } - }); - - if (cb) { - var fields = {}, files = {}; - this - .on('field', function(name, value) { - fields[name] = value; - }) - .on('file', function(name, file) { - files[name] = file; - }) - .on('error', function(err) { - cb(err, fields, files); - }) - .on('end', function() { - cb(null, fields, files); - }); - } - - return this; -}; - -IncomingForm.prototype.writeHeaders = function(headers) { - this.headers = headers; - this._parseContentLength(); - this._parseContentType(); -}; - -IncomingForm.prototype.write = function(buffer) { - if (!this._parser) { - this._error(new Error('unintialized parser')); - return; - } - - this.bytesReceived += buffer.length; - this.emit('progress', this.bytesReceived, this.bytesExpected); - - var bytesParsed = this._parser.write(buffer); - if (bytesParsed !== buffer.length) { - this._error(new Error('parser error, '+bytesParsed+' of '+buffer.length+' bytes parsed')); - } - - return bytesParsed; -}; - -IncomingForm.prototype.pause = function() { - // this does nothing, unless overwritten in IncomingForm.parse - return false; -}; - -IncomingForm.prototype.resume = function() { - // this does nothing, unless overwritten in IncomingForm.parse - return false; -}; - -IncomingForm.prototype.onPart = function(part) { - // this method can be overwritten by the user - this.handlePart(part); -}; - -IncomingForm.prototype.handlePart = function(part) { - var self = this; - - if (part.filename === undefined) { - var value = '' - , decoder = new StringDecoder(this.encoding); - - part.on('data', function(buffer) { - self._fieldsSize += buffer.length; - if (self._fieldsSize > self.maxFieldsSize) { - self._error(new Error('maxFieldsSize exceeded, received '+self._fieldsSize+' bytes of field data')); - return; - } - value += decoder.write(buffer); - }); - - part.on('end', function() { - self.emit('field', part.name, value); - }); - return; - } - - this._flushing++; - - var file = new File({ - path: this._uploadPath(part.filename), - name: part.filename, - type: part.mime, - }); - - this.emit('fileBegin', part.name, file); - - file.open(); - - part.on('data', function(buffer) { - self.pause(); - file.write(buffer, function() { - self.resume(); - }); - }); - - part.on('end', function() { - file.end(function() { - self._flushing--; - self.emit('file', part.name, file); - self._maybeEnd(); - }); - }); -}; - -IncomingForm.prototype._parseContentType = function() { - if (!this.headers['content-type']) { - this._error(new Error('bad content-type header, no content-type')); - return; - } - - if (this.headers['content-type'].match(/urlencoded/i)) { - this._initUrlencoded(); - return; - } - - if (this.headers['content-type'].match(/multipart/i)) { - var m; - if (m = this.headers['content-type'].match(/boundary=(?:"([^"]+)"|([^;]+))/i)) { - this._initMultipart(m[1] || m[2]); - } else { - this._error(new Error('bad content-type header, no multipart boundary')); - } - return; - } - - this._error(new Error('bad content-type header, unknown content-type: '+this.headers['content-type'])); -}; - -IncomingForm.prototype._error = function(err) { - if (this.error) { - return; - } - - this.error = err; - this.pause(); - this.emit('error', err); -}; - -IncomingForm.prototype._parseContentLength = function() { - if (this.headers['content-length']) { - this.bytesReceived = 0; - this.bytesExpected = parseInt(this.headers['content-length'], 10); - this.emit('progress', this.bytesReceived, this.bytesExpected); - } -}; - -IncomingForm.prototype._newParser = function() { - return new MultipartParser(); -}; - -IncomingForm.prototype._initMultipart = function(boundary) { - this.type = 'multipart'; - - var parser = new MultipartParser(), - self = this, - headerField, - headerValue, - part; - - parser.initWithBoundary(boundary); - - parser.onPartBegin = function() { - part = new EventEmitter(); - part.headers = {}; - part.name = null; - part.filename = null; - part.mime = null; - headerField = ''; - headerValue = ''; - }; - - parser.onHeaderField = function(b, start, end) { - headerField += b.toString(self.encoding, start, end); - }; - - parser.onHeaderValue = function(b, start, end) { - headerValue += b.toString(self.encoding, start, end); - }; - - parser.onHeaderEnd = function() { - headerField = headerField.toLowerCase(); - part.headers[headerField] = headerValue; - - var m; - if (headerField == 'content-disposition') { - if (m = headerValue.match(/name="([^"]+)"/i)) { - part.name = m[1]; - } - - part.filename = self._fileName(headerValue); - } else if (headerField == 'content-type') { - part.mime = headerValue; - } - - headerField = ''; - headerValue = ''; - }; - - parser.onHeadersEnd = function() { - self.onPart(part); - }; - - parser.onPartData = function(b, start, end) { - part.emit('data', b.slice(start, end)); - }; - - parser.onPartEnd = function() { - part.emit('end'); - }; - - parser.onEnd = function() { - self.ended = true; - self._maybeEnd(); - }; - - this._parser = parser; -}; - -IncomingForm.prototype._fileName = function(headerValue) { - var m = headerValue.match(/filename="(.*?)"($|; )/i) - if (!m) return; - - var filename = m[1].substr(m[1].lastIndexOf('\\') + 1); - filename = filename.replace(/%22/g, '"'); - filename = filename.replace(/&#([\d]{4});/g, function(m, code) { - return String.fromCharCode(code); - }); - return filename; -}; - -IncomingForm.prototype._initUrlencoded = function() { - this.type = 'urlencoded'; - - var parser = new QuerystringParser() - , self = this; - - parser.onField = function(key, val) { - self.emit('field', key, val); - }; - - parser.onEnd = function() { - self.ended = true; - self._maybeEnd(); - }; - - this._parser = parser; -}; - -IncomingForm.prototype._uploadPath = function(filename) { - var name = ''; - for (var i = 0; i < 32; i++) { - name += Math.floor(Math.random() * 16).toString(16); - } - - if (this.keepExtensions) { - var ext = path.extname(filename); - ext = ext.replace(/(\.[a-z0-9]+).*/, '$1') - - name += ext; - } - - return path.join(this.uploadDir, name); -}; - -IncomingForm.prototype._maybeEnd = function() { - if (!this.ended || this._flushing) { - return; - } - - this.emit('end'); -}; diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/lib/index.js b/node_modules/express/node_modules/connect/node_modules/formidable/lib/index.js deleted file mode 100644 index 7a6e3e1..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/lib/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var IncomingForm = require('./incoming_form').IncomingForm; -IncomingForm.IncomingForm = IncomingForm; -module.exports = IncomingForm; diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js b/node_modules/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js deleted file mode 100644 index 9ca567c..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js +++ /dev/null @@ -1,312 +0,0 @@ -var Buffer = require('buffer').Buffer, - s = 0, - S = - { PARSER_UNINITIALIZED: s++, - START: s++, - START_BOUNDARY: s++, - HEADER_FIELD_START: s++, - HEADER_FIELD: s++, - HEADER_VALUE_START: s++, - HEADER_VALUE: s++, - HEADER_VALUE_ALMOST_DONE: s++, - HEADERS_ALMOST_DONE: s++, - PART_DATA_START: s++, - PART_DATA: s++, - PART_END: s++, - END: s++, - }, - - f = 1, - F = - { PART_BOUNDARY: f, - LAST_BOUNDARY: f *= 2, - }, - - LF = 10, - CR = 13, - SPACE = 32, - HYPHEN = 45, - COLON = 58, - A = 97, - Z = 122, - - lower = function(c) { - return c | 0x20; - }; - -for (var s in S) { - exports[s] = S[s]; -} - -function MultipartParser() { - this.boundary = null; - this.boundaryChars = null; - this.lookbehind = null; - this.state = S.PARSER_UNINITIALIZED; - - this.index = null; - this.flags = 0; -}; -exports.MultipartParser = MultipartParser; - -MultipartParser.stateToString = function(stateNumber) { - for (var state in S) { - var number = S[state]; - if (number === stateNumber) return state; - } -}; - -MultipartParser.prototype.initWithBoundary = function(str) { - this.boundary = new Buffer(str.length+4); - this.boundary.write('\r\n--', 'ascii', 0); - this.boundary.write(str, 'ascii', 4); - this.lookbehind = new Buffer(this.boundary.length+8); - this.state = S.START; - - this.boundaryChars = {}; - for (var i = 0; i < this.boundary.length; i++) { - this.boundaryChars[this.boundary[i]] = true; - } -}; - -MultipartParser.prototype.write = function(buffer) { - var self = this, - i = 0, - len = buffer.length, - prevIndex = this.index, - index = this.index, - state = this.state, - flags = this.flags, - lookbehind = this.lookbehind, - boundary = this.boundary, - boundaryChars = this.boundaryChars, - boundaryLength = this.boundary.length, - boundaryEnd = boundaryLength - 1, - bufferLength = buffer.length, - c, - cl, - - mark = function(name) { - self[name+'Mark'] = i; - }, - clear = function(name) { - delete self[name+'Mark']; - }, - callback = function(name, buffer, start, end) { - if (start !== undefined && start === end) { - return; - } - - var callbackSymbol = 'on'+name.substr(0, 1).toUpperCase()+name.substr(1); - if (callbackSymbol in self) { - self[callbackSymbol](buffer, start, end); - } - }, - dataCallback = function(name, clear) { - var markSymbol = name+'Mark'; - if (!(markSymbol in self)) { - return; - } - - if (!clear) { - callback(name, buffer, self[markSymbol], buffer.length); - self[markSymbol] = 0; - } else { - callback(name, buffer, self[markSymbol], i); - delete self[markSymbol]; - } - }; - - for (i = 0; i < len; i++) { - c = buffer[i]; - switch (state) { - case S.PARSER_UNINITIALIZED: - return i; - case S.START: - index = 0; - state = S.START_BOUNDARY; - case S.START_BOUNDARY: - if (index == boundary.length - 2) { - if (c != CR) { - return i; - } - index++; - break; - } else if (index - 1 == boundary.length - 2) { - if (c != LF) { - return i; - } - index = 0; - callback('partBegin'); - state = S.HEADER_FIELD_START; - break; - } - - if (c != boundary[index+2]) { - return i; - } - index++; - break; - case S.HEADER_FIELD_START: - state = S.HEADER_FIELD; - mark('headerField'); - index = 0; - case S.HEADER_FIELD: - if (c == CR) { - clear('headerField'); - state = S.HEADERS_ALMOST_DONE; - break; - } - - index++; - if (c == HYPHEN) { - break; - } - - if (c == COLON) { - if (index == 1) { - // empty header field - return i; - } - dataCallback('headerField', true); - state = S.HEADER_VALUE_START; - break; - } - - cl = lower(c); - if (cl < A || cl > Z) { - return i; - } - break; - case S.HEADER_VALUE_START: - if (c == SPACE) { - break; - } - - mark('headerValue'); - state = S.HEADER_VALUE; - case S.HEADER_VALUE: - if (c == CR) { - dataCallback('headerValue', true); - callback('headerEnd'); - state = S.HEADER_VALUE_ALMOST_DONE; - } - break; - case S.HEADER_VALUE_ALMOST_DONE: - if (c != LF) { - return i; - } - state = S.HEADER_FIELD_START; - break; - case S.HEADERS_ALMOST_DONE: - if (c != LF) { - return i; - } - - callback('headersEnd'); - state = S.PART_DATA_START; - break; - case S.PART_DATA_START: - state = S.PART_DATA - mark('partData'); - case S.PART_DATA: - prevIndex = index; - - if (index == 0) { - // boyer-moore derrived algorithm to safely skip non-boundary data - i += boundaryEnd; - while (i < bufferLength && !(buffer[i] in boundaryChars)) { - i += boundaryLength; - } - i -= boundaryEnd; - c = buffer[i]; - } - - if (index < boundary.length) { - if (boundary[index] == c) { - if (index == 0) { - dataCallback('partData', true); - } - index++; - } else { - index = 0; - } - } else if (index == boundary.length) { - index++; - if (c == CR) { - // CR = part boundary - flags |= F.PART_BOUNDARY; - } else if (c == HYPHEN) { - // HYPHEN = end boundary - flags |= F.LAST_BOUNDARY; - } else { - index = 0; - } - } else if (index - 1 == boundary.length) { - if (flags & F.PART_BOUNDARY) { - index = 0; - if (c == LF) { - // unset the PART_BOUNDARY flag - flags &= ~F.PART_BOUNDARY; - callback('partEnd'); - callback('partBegin'); - state = S.HEADER_FIELD_START; - break; - } - } else if (flags & F.LAST_BOUNDARY) { - if (c == HYPHEN) { - callback('partEnd'); - callback('end'); - state = S.END; - } else { - index = 0; - } - } else { - index = 0; - } - } - - if (index > 0) { - // when matching a possible boundary, keep a lookbehind reference - // in case it turns out to be a false lead - lookbehind[index-1] = c; - } else if (prevIndex > 0) { - // if our boundary turned out to be rubbish, the captured lookbehind - // belongs to partData - callback('partData', lookbehind, 0, prevIndex); - prevIndex = 0; - mark('partData'); - - // reconsider the current character even so it interrupted the sequence - // it could be the beginning of a new sequence - i--; - } - - break; - case S.END: - break; - default: - return i; - } - } - - dataCallback('headerField'); - dataCallback('headerValue'); - dataCallback('partData'); - - this.index = index; - this.state = state; - this.flags = flags; - - return len; -}; - -MultipartParser.prototype.end = function() { - if (this.state != S.END) { - return new Error('MultipartParser.end(): stream ended unexpectedly: ' + this.explain()); - } -}; - -MultipartParser.prototype.explain = function() { - return 'state = ' + MultipartParser.stateToString(this.state); -}; diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js b/node_modules/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js deleted file mode 100644 index 63f109e..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js +++ /dev/null @@ -1,25 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -// This is a buffering parser, not quite as nice as the multipart one. -// If I find time I'll rewrite this to be fully streaming as well -var querystring = require('querystring'); - -function QuerystringParser() { - this.buffer = ''; -}; -exports.QuerystringParser = QuerystringParser; - -QuerystringParser.prototype.write = function(buffer) { - this.buffer += buffer.toString('ascii'); - return buffer.length; -}; - -QuerystringParser.prototype.end = function() { - var fields = querystring.parse(this.buffer); - for (var field in fields) { - this.onField(field, fields[field]); - } - this.buffer = ''; - - this.onEnd(); -}; \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/lib/util.js b/node_modules/express/node_modules/connect/node_modules/formidable/lib/util.js deleted file mode 100644 index e9493e9..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/lib/util.js +++ /dev/null @@ -1,6 +0,0 @@ -// Backwards compatibility ... -try { - module.exports = require('util'); -} catch (e) { - module.exports = require('sys'); -} diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/package.json b/node_modules/express/node_modules/connect/node_modules/formidable/package.json deleted file mode 100644 index 4cf5f2d..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "formidable", - "version": "1.0.9", - "dependencies": {}, - "devDependencies": { - "gently": "0.8.0", - "findit": "0.1.1", - "hashish": "0.0.4", - "urun": "0.0.4", - "utest": "0.0.3" - }, - "directories": { - "lib": "./lib" - }, - "main": "./lib/index", - "scripts": { - "test": "make test" - }, - "engines": { - "node": "*" - } -} \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/.common.js.un~ b/node_modules/express/node_modules/connect/node_modules/formidable/test/.common.js.un~ deleted file mode 100644 index 00420761503c6a48f67dcc878b7ea3595f57d4c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1666 zcmWH`%$*;a=aT=Ff$8He&D_W32b3d1pH?Keh_o7=jl+@QR1!i}8_3=G0R zj0_lo9A>Bhh=ySXzssIYEFf7%hWHCm1x!#HM1iFEVf_C<02YA>jM7vN0bq2Lfun{;qPqD-y2U_o zbxmv2MsS=WM?T2Cp!fwD36cl|oT|eu;v%g1UZ5YH^7^ zP)J<|tezdH24*lwy^?}LT4qH_X;CV=9;h%>AIM=KyFdV>PgFr6Co>6250D2{$_kVQ VSpxzfrMwDY*Fe#c48#WW{Vsb1uz*xCGQ?kiDn_P2ieQE?{09OA4_VnLn>rx?j1GTjbbOV7 T8VQRla5SKZf<;UlpRWP{lBXd7 diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/common.js b/node_modules/express/node_modules/connect/node_modules/formidable/test/common.js deleted file mode 100644 index eb432ad..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/common.js +++ /dev/null @@ -1,19 +0,0 @@ -var mysql = require('..'); -var path = require('path'); - -var root = path.join(__dirname, '../'); -exports.dir = { - root : root, - lib : root + '/lib', - fixture : root + '/test/fixture', - tmp : root + '/test/tmp', -}; - -exports.port = 13532; - -exports.formidable = require('..'); -exports.assert = require('assert'); - -exports.require = function(lib) { - return require(exports.dir.lib + '/' + lib); -}; diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt b/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt deleted file mode 100644 index e7a4785..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt +++ /dev/null @@ -1 +0,0 @@ -I am a text file with a funky name! diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt b/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt deleted file mode 100644 index 9b6903e..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt +++ /dev/null @@ -1 +0,0 @@ -I am a plain text file diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/no-filename/.generic.http.un~ b/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/no-filename/.generic.http.un~ deleted file mode 100644 index a863c08aec4e610f4e4b4340331b0f34eec45e61..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 641 zcmWH`%$*;a=aT=FfoZOok%Ha=ek068d0LI3~& diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md b/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md deleted file mode 100644 index 3c9dbe3..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md +++ /dev/null @@ -1,3 +0,0 @@ -* Opera does not allow submitting this file, it shows a warning to the - user that the file could not be found instead. Tested in 9.8, 11.51 on OSX. - Reported to Opera on 08.09.2011 (tracking email DSK-346009@bugs.opera.com). diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/.no-filename.js.un~ b/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/.no-filename.js.un~ deleted file mode 100644 index ea9828b0ac20914dbecd85a13e554592b0b9b6ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1147 zcmWH`%$*;a=aT=Ffyrl+PG{?quti?~*K$u2*NeQ&wDszYs*>YVJqo8yd@OK{fq{V; zh+P#Fs!J*hQmqu!(=u~X)pZo|5_3Vk(t@1)#1tSOBn%Y;^D0V8i$DqrauPH1^hzp9 z)N6Hs1~CD#1Q0Vq*+2>`1`-Eh27gJ5J1h{{_zNHbAOK51m~f3CLm2)80ayeoIZ9DG z1c1?T5gZ+i3}0dK21*bh42mV{Bn;C=a9o27LWl*SDcr4{Kc8 P<0=G*%>Jg0&sPBeAD(H* diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/.special-chars-in-filename.js.un~ b/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/.special-chars-in-filename.js.un~ deleted file mode 100644 index 4c13bdb1a76bb2141c36a4151c55d2245c51d722..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2129 zcmWH`%$*;a=aT=Ff$7jJdo{nc&(5>&F0gERG`Cjfk;|I)s%ak=uD_IgQSz@O0|SF7 z5J#6K7AX`Inp^>DA+5gDrhOxC@3k|DA+0JDLk6dtYEDW zqpskfpsb*x5T~G~prN3tpsNrM)S|6Wtx&5Ftq`k_pirk*QccT015?K0$>Udf@VmpDL@r_fst04 zmtC0#EkV?+p>YXwC@B6w@d`>xqq!LtDm174Hm`pHj!Q=DxmgB#Toz|!0!weSCYvR{;RB@}4~a diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js b/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js deleted file mode 100644 index 0bae449..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports['generic.http'] = [ - {type: 'file', name: 'upload', filename: '', fixture: 'plain.txt'}, -]; diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js b/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js deleted file mode 100644 index eb76fdc..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js +++ /dev/null @@ -1,21 +0,0 @@ -var properFilename = 'funkyfilename.txt'; - -function expect(filename) { - return [ - {type: 'field', name: 'title', value: 'Weird filename'}, - {type: 'file', name: 'upload', filename: filename, fixture: properFilename}, - ]; -}; - -var webkit = " ? % * | \" < > . ? ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt"; -var ffOrIe = " ? % * | \" < > . ☃ ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt"; - -module.exports = { - 'osx-chrome-13.http' : expect(webkit), - 'osx-firefox-3.6.http' : expect(ffOrIe), - 'osx-safari-5.http' : expect(webkit), - 'xp-chrome-12.http' : expect(webkit), - 'xp-ie-7.http' : expect(ffOrIe), - 'xp-ie-8.http' : expect(ffOrIe), - 'xp-safari-5.http' : expect(webkit), -}; diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js b/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js deleted file mode 100644 index a476169..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js +++ /dev/null @@ -1,72 +0,0 @@ -exports['rfc1867'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--\r\n', - parts: - [ { headers: { - 'content-disposition': 'form-data; name="field1"', - }, - data: 'Joe Blow\r\nalmost tricked you!', - }, - { headers: { - 'content-disposition': 'form-data; name="pics"; filename="file1.txt"', - 'Content-Type': 'text/plain', - }, - data: '... contents of file1.txt ...\r', - } - ] - }; - -exports['noTrailing\r\n'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--', - parts: - [ { headers: { - 'content-disposition': 'form-data; name="field1"', - }, - data: 'Joe Blow\r\nalmost tricked you!', - }, - { headers: { - 'content-disposition': 'form-data; name="pics"; filename="file1.txt"', - 'Content-Type': 'text/plain', - }, - data: '... contents of file1.txt ...\r', - } - ] - }; - -exports['emptyHeader'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - ': foo\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--\r\n', - expectError: true, - }; diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/integration/.test-fixtures.js.un~ b/node_modules/express/node_modules/connect/node_modules/formidable/test/integration/.test-fixtures.js.un~ deleted file mode 100644 index a4d8a0e0a078bcb546453d0c1dcf02d76716b331..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30260 zcmeI5OKcri8Gvt`cO5rPlafdCICj$dnmFSYD6|ePky?-lZE%~`^g#u;_PD;mzSp_; z+9awf)Uttn7l4E+9*c?vARbaBP`3zHNZl79gxJ6agv0_-{_o8B$G!|?(i=~=9&P`*Ht_4IlfOIk_SGL=_|89`JMoL@FJFKCSMOf@`oI75 z&5?_*z18^pziPGGv*OM;*PM6t;rZr`-byDObKSJFns$=e#dbHXk6n~o&WXE2+zxS< z#37fAt6h2L^51rGb*T2G-;0L~WS;-arQ7uQJrSRjo{0YYtbr@R`+Vo>V*9H}SN;h12VV6kxqqiP6|g#S9&bdc zYWbjiLHQGl@{DBULS~>j?>xx*XfWSNH|oy2R%0n0ck?T)*hQ%#dc%vGg-4*?=wjOJMNYnonBWAQ(_Q7 zgqBz?jk!)Ljd9Cix&8#rFmiu(U$FLMzTNqBV|JmQn|gX(IQ#Um=<)nsNOh>aHG@&yp*R;!5hxhF|yKT9kFa zPviFeFg@*m+cUh!8b{7`n)qw**Bazd_$`j#hY4>tzEZh2T@3#uBa;ya1F zovr@T+A0Q(`Vm^t-If(>_Hrc%+=j&+;W*Z-XrY2QiMt)Ew=63njEI{S2dmRq*5-9& zFgT#?6Q=^uM4Zn$LR7Vs^qp!_{LLE2-*|{SveCx{xe@gvKpX^Os4W9A2r)=ef!>fF zL}IFmlD?C8YIeCD$T{1c`HwZb19DN-53!Ss6_XcJ>20KIU5)jl3Xtg-Q-U5RX~b3z zZB!M8eToo!(y&GN-j)cndNZ5bS>L_PJ1SV zEWv_>s(>tFQf*ZA^Eyisx?P;Fzr+WV56fKVj($r!C>I|KH^_WyW@R!OS?Kkali5z% z=%rWvtZFu&dRA{q7MtB(+Ny_1xaBs3Heavm;9(tH$pP@><|Vd_s)>?*5!eG3Hcy1A zpO$gw+At3?Tvj3N+)N`WRZB^~2&vmFDK(tWNru?%Aafs?VKNr%c8o{YrO8P~>9qR{2UHF(d4=&V`U^!|E0kXXH zi&wO5~F!0R|ObWcuc`#RMXa#LU{B`DSab*^`jW(j?uRty!I&nQL~Euu`Lbh0auP#~*Pkb@C);%|oFr8ixx9D6fgHq%Ichlm& z)M>9Q`xWipLh@px>sPo#tZ_FgDUJHo=7))}(CEq@k%hb<9a+3@%4B`W#OwtMzhK<& z5y}cEdx((6+}u+XEX$Z*XtolC&4H9sm$xOj+peARARiZ}!b7f_jU52hN?AYGq}8f~ z3q9Dj{sGGgacm4kKo*+`uZs8KPZ3Nbw*Eo&;CO`0LlXfK-)-ic2-ov@i`YbXos|ER zYcgn7Q(D!4G!bX}5rN}zaZLTiCgPTx2vi#$ZXRaaGNW0}d5I6VYNDiHZT4$@Hrbr6{LWPLWjy>#eBN>-L-6@MP+{|Gs23r`HV+l(kxwM18mZ!2Vp`pi zo+b9AC8moDYH$P2d1KS_*4RMhNG%8$$q>VgbtOuuB6f*qGh>_C3f*10OWeQU)|D~! z^DkV~4HmE(HpO!i&PT4XqBNQ*6D-2+8P9HK)*V6hK)xc5igI7p&IRM+DjgP#Qd>GF z!4Zyw0FxBF#YcdumXf{&X!{ek-n?dwPrLWik|6;7d=?N3O)rJE5Qb+>iQ${iQ$(gl zGi8EBn101FWvU3S%JiTbrSr3hlYttP&Y1#15KHtcf{~ihOqpO2YD<<{za`$S)YKAX zR#>NX13`%0V+sdNlJT=zk)Y8`ncyuGq{?F;r*?N(2|6V==>j=O-D?U3MWTC&}=n)w@>p@t2sL3U9lfCuy_ z(Sq<0rysD+7Uj%%|f(N>)AMi&M{92`(zi$Dmx+xeKnFWX=exsDq!6N8-79Fa0 z;+_x(x?Q02)~Qo7)WbUL02a%?DuAQ|ZpcBg77=@)_bvV}J+8PR)rQXKGx^^N#^ z+!0>D*RR~@*D&DrVR0%jg=6frsz$2#ML2$KD~=;MM>b7dNpJM@OA7rU0e9Y%6{tFH zjFWIiF{OeqiHo zr^JCyF@fa*$3Z{_ChFd3VJM-B6v6Zji%AFTPfM=W!t^}&6dkA%j)Q;^#D1_JElkx? z(l3JUb&C$w(}86CXwh+=Q2|I59jGQa4gyB*A=7AeD4~iJLH8|-P6usYAlEPk2g!Y= z6yO4HT>mplDIF|==-V41dPcIux@7W&4YlD5QDNF8`!G}h2(bH20f7m?I1)EXDIF{V z@Vi?9lr7d901O~?As1#JF=d1&#_A zh5?$a!K)oAMnBVHXETeLE|@<`CP8=vB6ihARX^9HBm{O9uzL~g-}`@H2lK~58Sr=n z==ctC5Um|8RFERrf8eq2%C>Fjs9u{~S-&vW&X${C=G{bIRGIIseP0-G5166?l_eIx zdJ;hz&6Eii0r{r2U)pL^uORb9<9x}{O)AUKd4kx-P2r$PGCuD}&}gPiusFfpnJMa0 zq7wA4pGoU0;(Ng2Pj0@P2)s|2asrkukE9ywRg_RgiopD_HOD(7w?pEdCD(QPPdQ_! z4uHg+VApXe@E+ti2w+JO7h$4=Dw1nb5+QtNNNiQZ(l^Rr?%5cf>`Pt$oo{I}^TlCU zO@1`EmV*q?0#kq5%VGvg4rGGXE%B?Z7j$exuH=6*F|v;i9dD(F8^l zQ;k&dOCx$taxG+H@VaD*2+Mp{CYqShOqpO2et+~PHn`TpsruokW@b%{)0f22t0aTi zt3(M^qzIdzIP|+3sKInX!SElddI|DHIQLG8!9Ns31isX8&Yl?|O>liLuq4 zo0zzT(ZNwu*y9pDCXSgHFA=9|qNLB>YZV)w(UUUEa>jN~P(4#IkBH+vjrg^eTmD*0 zsHgIWShPspgjQK!V|^gjQz)T|uxfsLNC2(+i9PXouzgq_?1T2f)(Ds72I{HNExzcf ZyQb^%g*QKKOb+BmWX&o2c>P~~^j~kcCXoOD diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js b/node_modules/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js deleted file mode 100644 index 66ad259..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js +++ /dev/null @@ -1,89 +0,0 @@ -var hashish = require('hashish'); -var fs = require('fs'); -var findit = require('findit'); -var path = require('path'); -var http = require('http'); -var net = require('net'); -var assert = require('assert'); - -var common = require('../common'); -var formidable = common.formidable; - -var server = http.createServer(); -server.listen(common.port, findFixtures); - -function findFixtures() { - var fixtures = []; - findit - .sync(common.dir.fixture + '/js') - .forEach(function(jsPath) { - if (!/\.js$/.test(jsPath)) return; - - var group = path.basename(jsPath, '.js'); - hashish.forEach(require(jsPath), function(fixture, name) { - fixtures.push({ - name : group + '/' + name, - fixture : fixture, - }); - }); - }); - - testNext(fixtures); -} - -function testNext(fixtures) { - var fixture = fixtures.shift(); - if (!fixture) return server.close(); - - var name = fixture.name; - var fixture = fixture.fixture; - - uploadFixture(name, function(err, parts) { - if (err) throw err; - - fixture.forEach(function(expectedPart, i) { - var parsedPart = parts[i]; - assert.equal(parsedPart.type, expectedPart.type); - assert.equal(parsedPart.name, expectedPart.name); - - if (parsedPart.type === 'file') { - var filename = parsedPart.value.name; - assert.equal(filename, expectedPart.filename); - } - }); - - testNext(fixtures); - }); -}; - -function uploadFixture(name, cb) { - server.once('request', function(req, res) { - var form = new formidable.IncomingForm(); - form.uploadDir = common.dir.tmp; - form.parse(req); - - function callback() { - var realCallback = cb; - cb = function() {}; - realCallback.apply(null, arguments); - } - - var parts = []; - form - .on('error', callback) - .on('fileBegin', function(name, value) { - parts.push({type: 'file', name: name, value: value}); - }) - .on('field', function(name, value) { - parts.push({type: 'field', name: name, value: value}); - }) - .on('end', function() { - callback(null, parts); - }); - }); - - var socket = net.createConnection(common.port); - var file = fs.createReadStream(common.dir.fixture + '/http/' + name); - - file.pipe(socket); -} diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/common.js b/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/common.js deleted file mode 100644 index 2b98598..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/common.js +++ /dev/null @@ -1,24 +0,0 @@ -var path = require('path'), - fs = require('fs'); - -try { - global.Gently = require('gently'); -} catch (e) { - throw new Error('this test suite requires node-gently'); -} - -exports.lib = path.join(__dirname, '../../lib'); - -global.GENTLY = new Gently(); - -global.assert = require('assert'); -global.TEST_PORT = 13532; -global.TEST_FIXTURES = path.join(__dirname, '../fixture'); -global.TEST_TMP = path.join(__dirname, '../tmp'); - -// Stupid new feature in node that complains about gently attaching too many -// listeners to process 'exit'. This is a workaround until I can think of a -// better way to deal with this. -if (process.setMaxListeners) { - process.setMaxListeners(10000); -} diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js b/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js deleted file mode 100644 index 75232aa..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js +++ /dev/null @@ -1,80 +0,0 @@ -var common = require('../common'); -var CHUNK_LENGTH = 10, - multipartParser = require(common.lib + '/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - parser = new MultipartParser(), - fixtures = require(TEST_FIXTURES + '/multipart'), - Buffer = require('buffer').Buffer; - -Object.keys(fixtures).forEach(function(name) { - var fixture = fixtures[name], - buffer = new Buffer(Buffer.byteLength(fixture.raw, 'binary')), - offset = 0, - chunk, - nparsed, - - parts = [], - part = null, - headerField, - headerValue, - endCalled = ''; - - parser.initWithBoundary(fixture.boundary); - parser.onPartBegin = function() { - part = {headers: {}, data: ''}; - parts.push(part); - headerField = ''; - headerValue = ''; - }; - - parser.onHeaderField = function(b, start, end) { - headerField += b.toString('ascii', start, end); - }; - - parser.onHeaderValue = function(b, start, end) { - headerValue += b.toString('ascii', start, end); - } - - parser.onHeaderEnd = function() { - part.headers[headerField] = headerValue; - headerField = ''; - headerValue = ''; - }; - - parser.onPartData = function(b, start, end) { - var str = b.toString('ascii', start, end); - part.data += b.slice(start, end); - } - - parser.onEnd = function() { - endCalled = true; - } - - buffer.write(fixture.raw, 'binary', 0); - - while (offset < buffer.length) { - if (offset + CHUNK_LENGTH < buffer.length) { - chunk = buffer.slice(offset, offset+CHUNK_LENGTH); - } else { - chunk = buffer.slice(offset, buffer.length); - } - offset = offset + CHUNK_LENGTH; - - nparsed = parser.write(chunk); - if (nparsed != chunk.length) { - if (fixture.expectError) { - return; - } - puts('-- ERROR --'); - p(chunk.toString('ascii')); - throw new Error(chunk.length+' bytes written, but only '+nparsed+' bytes parsed!'); - } - } - - if (fixture.expectError) { - throw new Error('expected parse error did not happen'); - } - - assert.ok(endCalled); - assert.deepEqual(parts, fixture.parts); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js b/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js deleted file mode 100644 index 52ceedb..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js +++ /dev/null @@ -1,104 +0,0 @@ -var common = require('../common'); -var WriteStreamStub = GENTLY.stub('fs', 'WriteStream'); - -var File = require(common.lib + '/file'), - EventEmitter = require('events').EventEmitter, - file, - gently; - -function test(test) { - gently = new Gently(); - file = new File(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.ok(file instanceof EventEmitter); - assert.strictEqual(file.size, 0); - assert.strictEqual(file.path, null); - assert.strictEqual(file.name, null); - assert.strictEqual(file.type, null); - assert.strictEqual(file.lastModifiedDate, null); - - assert.strictEqual(file._writeStream, null); - - (function testSetProperties() { - var file2 = new File({foo: 'bar'}); - assert.equal(file2.foo, 'bar'); - })(); -}); - -test(function open() { - var WRITE_STREAM; - file.path = '/foo'; - - gently.expect(WriteStreamStub, 'new', function (path) { - WRITE_STREAM = this; - assert.strictEqual(path, file.path); - }); - - file.open(); - assert.strictEqual(file._writeStream, WRITE_STREAM); -}); - -test(function write() { - var BUFFER = {length: 10}, - CB_STUB, - CB = function() { - CB_STUB.apply(this, arguments); - }; - - file._writeStream = {}; - - gently.expect(file._writeStream, 'write', function (buffer, cb) { - assert.strictEqual(buffer, BUFFER); - - gently.expect(file, 'emit', function (event, bytesWritten) { - assert.ok(file.lastModifiedDate instanceof Date); - assert.equal(event, 'progress'); - assert.equal(bytesWritten, file.size); - }); - - CB_STUB = gently.expect(function writeCb() { - assert.equal(file.size, 10); - }); - - cb(); - - gently.expect(file, 'emit', function (event, bytesWritten) { - assert.equal(event, 'progress'); - assert.equal(bytesWritten, file.size); - }); - - CB_STUB = gently.expect(function writeCb() { - assert.equal(file.size, 20); - }); - - cb(); - }); - - file.write(BUFFER, CB); -}); - -test(function end() { - var CB_STUB, - CB = function() { - CB_STUB.apply(this, arguments); - }; - - file._writeStream = {}; - - gently.expect(file._writeStream, 'end', function (cb) { - gently.expect(file, 'emit', function (event) { - assert.equal(event, 'end'); - }); - - CB_STUB = gently.expect(function endCb() { - }); - - cb(); - }); - - file.end(CB); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js b/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js deleted file mode 100644 index b64df8b..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js +++ /dev/null @@ -1,726 +0,0 @@ -var common = require('../common'); -var MultipartParserStub = GENTLY.stub('./multipart_parser', 'MultipartParser'), - QuerystringParserStub = GENTLY.stub('./querystring_parser', 'QuerystringParser'), - EventEmitterStub = GENTLY.stub('events', 'EventEmitter'), - FileStub = GENTLY.stub('./file'); - -var formidable = require(common.lib + '/index'), - IncomingForm = formidable.IncomingForm, - events = require('events'), - fs = require('fs'), - path = require('path'), - Buffer = require('buffer').Buffer, - fixtures = require(TEST_FIXTURES + '/multipart'), - form, - gently; - -function test(test) { - gently = new Gently(); - gently.expect(EventEmitterStub, 'call'); - form = new IncomingForm(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.strictEqual(form.error, null); - assert.strictEqual(form.ended, false); - assert.strictEqual(form.type, null); - assert.strictEqual(form.headers, null); - assert.strictEqual(form.keepExtensions, false); - assert.strictEqual(form.uploadDir, '/tmp'); - assert.strictEqual(form.encoding, 'utf-8'); - assert.strictEqual(form.bytesReceived, null); - assert.strictEqual(form.bytesExpected, null); - assert.strictEqual(form.maxFieldsSize, 2 * 1024 * 1024); - assert.strictEqual(form._parser, null); - assert.strictEqual(form._flushing, 0); - assert.strictEqual(form._fieldsSize, 0); - assert.ok(form instanceof EventEmitterStub); - assert.equal(form.constructor.name, 'IncomingForm'); - - (function testSimpleConstructor() { - gently.expect(EventEmitterStub, 'call'); - var form = IncomingForm(); - assert.ok(form instanceof IncomingForm); - })(); - - (function testSimpleConstructorShortcut() { - gently.expect(EventEmitterStub, 'call'); - var form = formidable(); - assert.ok(form instanceof IncomingForm); - })(); -}); - -test(function parse() { - var REQ = {headers: {}} - , emit = {}; - - gently.expect(form, 'writeHeaders', function(headers) { - assert.strictEqual(headers, REQ.headers); - }); - - var events = ['error', 'aborted', 'data', 'end']; - gently.expect(REQ, 'on', events.length, function(event, fn) { - assert.equal(event, events.shift()); - emit[event] = fn; - return this; - }); - - form.parse(REQ); - - (function testPause() { - gently.expect(REQ, 'pause'); - assert.strictEqual(form.pause(), true); - })(); - - (function testPauseCriticalException() { - form.ended = false; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'pause', function() { - throw ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - assert.strictEqual(form.pause(), false); - })(); - - (function testPauseHarmlessException() { - form.ended = true; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'pause', function() { - throw ERR; - }); - - assert.strictEqual(form.pause(), false); - })(); - - (function testResume() { - gently.expect(REQ, 'resume'); - assert.strictEqual(form.resume(), true); - })(); - - (function testResumeCriticalException() { - form.ended = false; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'resume', function() { - throw ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - assert.strictEqual(form.resume(), false); - })(); - - (function testResumeHarmlessException() { - form.ended = true; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'resume', function() { - throw ERR; - }); - - assert.strictEqual(form.resume(), false); - })(); - - (function testEmitError() { - var ERR = new Error('something bad happened'); - gently.expect(form, '_error',function(err) { - assert.strictEqual(err, ERR); - }); - emit.error(ERR); - })(); - - (function testEmitAborted() { - gently.expect(form, 'emit',function(event) { - assert.equal(event, 'aborted'); - }); - - emit.aborted(); - })(); - - - (function testEmitData() { - var BUFFER = [1, 2, 3]; - gently.expect(form, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - }); - emit.data(BUFFER); - })(); - - (function testEmitEnd() { - form._parser = {}; - - (function testWithError() { - var ERR = new Error('haha'); - gently.expect(form._parser, 'end', function() { - return ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - emit.end(); - })(); - - (function testWithoutError() { - gently.expect(form._parser, 'end'); - emit.end(); - })(); - - (function testAfterError() { - form.error = true; - emit.end(); - })(); - })(); - - (function testWithCallback() { - gently.expect(EventEmitterStub, 'call'); - var form = new IncomingForm(), - REQ = {headers: {}}, - parseCalled = 0; - - gently.expect(form, 'writeHeaders'); - gently.expect(REQ, 'on', 4, function() { - return this; - }); - - gently.expect(form, 'on', 4, function(event, fn) { - if (event == 'field') { - fn('field1', 'foo'); - fn('field1', 'bar'); - fn('field2', 'nice'); - } - - if (event == 'file') { - fn('file1', '1'); - fn('file1', '2'); - fn('file2', '3'); - } - - if (event == 'end') { - fn(); - } - return this; - }); - - form.parse(REQ, gently.expect(function parseCbOk(err, fields, files) { - assert.deepEqual(fields, {field1: 'bar', field2: 'nice'}); - assert.deepEqual(files, {file1: '2', file2: '3'}); - })); - - gently.expect(form, 'writeHeaders'); - gently.expect(REQ, 'on', 4, function() { - return this; - }); - - var ERR = new Error('test'); - gently.expect(form, 'on', 3, function(event, fn) { - if (event == 'field') { - fn('foo', 'bar'); - } - - if (event == 'error') { - fn(ERR); - gently.expect(form, 'on'); - } - return this; - }); - - form.parse(REQ, gently.expect(function parseCbErr(err, fields, files) { - assert.strictEqual(err, ERR); - assert.deepEqual(fields, {foo: 'bar'}); - })); - })(); -}); - -test(function pause() { - assert.strictEqual(form.pause(), false); -}); - -test(function resume() { - assert.strictEqual(form.resume(), false); -}); - - -test(function writeHeaders() { - var HEADERS = {}; - gently.expect(form, '_parseContentLength'); - gently.expect(form, '_parseContentType'); - - form.writeHeaders(HEADERS); - assert.strictEqual(form.headers, HEADERS); -}); - -test(function write() { - var parser = {}, - BUFFER = [1, 2, 3]; - - form._parser = parser; - form.bytesExpected = 523423; - - (function testBasic() { - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, BUFFER.length); - assert.equal(bytesExpected, form.bytesExpected); - }); - - gently.expect(parser, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - return buffer.length; - }); - - assert.equal(form.write(BUFFER), BUFFER.length); - assert.equal(form.bytesReceived, BUFFER.length); - })(); - - (function testParserError() { - gently.expect(form, 'emit'); - - gently.expect(parser, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - return buffer.length - 1; - }); - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/parser error/i)); - }); - - assert.equal(form.write(BUFFER), BUFFER.length - 1); - assert.equal(form.bytesReceived, BUFFER.length + BUFFER.length); - })(); - - (function testUninitialized() { - delete form._parser; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/unintialized parser/i)); - }); - form.write(BUFFER); - })(); -}); - -test(function parseContentType() { - var HEADERS = {}; - - form.headers = {'content-type': 'application/x-www-form-urlencoded'}; - gently.expect(form, '_initUrlencoded'); - form._parseContentType(); - - // accept anything that has 'urlencoded' in it - form.headers = {'content-type': 'broken-client/urlencoded-stupid'}; - gently.expect(form, '_initUrlencoded'); - form._parseContentType(); - - var BOUNDARY = '---------------------------57814261102167618332366269'; - form.headers = {'content-type': 'multipart/form-data; boundary='+BOUNDARY}; - - gently.expect(form, '_initMultipart', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - form._parseContentType(); - - (function testQuotedBoundary() { - form.headers = {'content-type': 'multipart/form-data; boundary="' + BOUNDARY + '"'}; - - gently.expect(form, '_initMultipart', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - form._parseContentType(); - })(); - - (function testNoBoundary() { - form.headers = {'content-type': 'multipart/form-data'}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/no multipart boundary/i)); - }); - form._parseContentType(); - })(); - - (function testNoContentType() { - form.headers = {}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/no content-type/i)); - }); - form._parseContentType(); - })(); - - (function testUnknownContentType() { - form.headers = {'content-type': 'invalid'}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/unknown content-type/i)); - }); - form._parseContentType(); - })(); -}); - -test(function parseContentLength() { - var HEADERS = {}; - - form.headers = {}; - form._parseContentLength(); - assert.strictEqual(form.bytesReceived, null); - assert.strictEqual(form.bytesExpected, null); - - form.headers['content-length'] = '8'; - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, 0); - assert.equal(bytesExpected, 8); - }); - form._parseContentLength(); - assert.strictEqual(form.bytesReceived, 0); - assert.strictEqual(form.bytesExpected, 8); - - // JS can be evil, lets make sure we are not - form.headers['content-length'] = '08'; - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, 0); - assert.equal(bytesExpected, 8); - }); - form._parseContentLength(); - assert.strictEqual(form.bytesExpected, 8); -}); - -test(function _initMultipart() { - var BOUNDARY = '123', - PARSER; - - gently.expect(MultipartParserStub, 'new', function() { - PARSER = this; - }); - - gently.expect(MultipartParserStub.prototype, 'initWithBoundary', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - - form._initMultipart(BOUNDARY); - assert.equal(form.type, 'multipart'); - assert.strictEqual(form._parser, PARSER); - - (function testRegularField() { - var PART; - gently.expect(EventEmitterStub, 'new', function() { - PART = this; - }); - - gently.expect(form, 'onPart', function(part) { - assert.strictEqual(part, PART); - assert.deepEqual - ( part.headers - , { 'content-disposition': 'form-data; name="field1"' - , 'foo': 'bar' - } - ); - assert.equal(part.name, 'field1'); - - var strings = ['hello', ' world']; - gently.expect(part, 'emit', 2, function(event, b) { - assert.equal(event, 'data'); - assert.equal(b.toString(), strings.shift()); - }); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'end'); - }); - }); - - PARSER.onPartBegin(); - PARSER.onHeaderField(new Buffer('content-disposition'), 0, 10); - PARSER.onHeaderField(new Buffer('content-disposition'), 10, 19); - PARSER.onHeaderValue(new Buffer('form-data; name="field1"'), 0, 14); - PARSER.onHeaderValue(new Buffer('form-data; name="field1"'), 14, 24); - PARSER.onHeaderEnd(); - PARSER.onHeaderField(new Buffer('foo'), 0, 3); - PARSER.onHeaderValue(new Buffer('bar'), 0, 3); - PARSER.onHeaderEnd(); - PARSER.onHeadersEnd(); - PARSER.onPartData(new Buffer('hello world'), 0, 5); - PARSER.onPartData(new Buffer('hello world'), 5, 11); - PARSER.onPartEnd(); - })(); - - (function testFileField() { - var PART; - gently.expect(EventEmitterStub, 'new', function() { - PART = this; - }); - - gently.expect(form, 'onPart', function(part) { - assert.deepEqual - ( part.headers - , { 'content-disposition': 'form-data; name="field2"; filename="C:\\Documents and Settings\\IE\\Must\\Die\\Sun"et.jpg"' - , 'content-type': 'text/plain' - } - ); - assert.equal(part.name, 'field2'); - assert.equal(part.filename, 'Sun"et.jpg'); - assert.equal(part.mime, 'text/plain'); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'data'); - assert.equal(b.toString(), '... contents of file1.txt ...'); - }); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'end'); - }); - }); - - PARSER.onPartBegin(); - PARSER.onHeaderField(new Buffer('content-disposition'), 0, 19); - PARSER.onHeaderValue(new Buffer('form-data; name="field2"; filename="C:\\Documents and Settings\\IE\\Must\\Die\\Sun"et.jpg"'), 0, 85); - PARSER.onHeaderEnd(); - PARSER.onHeaderField(new Buffer('Content-Type'), 0, 12); - PARSER.onHeaderValue(new Buffer('text/plain'), 0, 10); - PARSER.onHeaderEnd(); - PARSER.onHeadersEnd(); - PARSER.onPartData(new Buffer('... contents of file1.txt ...'), 0, 29); - PARSER.onPartEnd(); - })(); - - (function testEnd() { - gently.expect(form, '_maybeEnd'); - PARSER.onEnd(); - assert.ok(form.ended); - })(); -}); - -test(function _fileName() { - // TODO - return; -}); - -test(function _initUrlencoded() { - var PARSER; - - gently.expect(QuerystringParserStub, 'new', function() { - PARSER = this; - }); - - form._initUrlencoded(); - assert.equal(form.type, 'urlencoded'); - assert.strictEqual(form._parser, PARSER); - - (function testOnField() { - var KEY = 'KEY', VAL = 'VAL'; - gently.expect(form, 'emit', function(field, key, val) { - assert.equal(field, 'field'); - assert.equal(key, KEY); - assert.equal(val, VAL); - }); - - PARSER.onField(KEY, VAL); - })(); - - (function testOnEnd() { - gently.expect(form, '_maybeEnd'); - - PARSER.onEnd(); - assert.equal(form.ended, true); - })(); -}); - -test(function _error() { - var ERR = new Error('bla'); - - gently.expect(form, 'pause'); - gently.expect(form, 'emit', function(event, err) { - assert.equal(event, 'error'); - assert.strictEqual(err, ERR); - }); - - form._error(ERR); - assert.strictEqual(form.error, ERR); - - // make sure _error only does its thing once - form._error(ERR); -}); - -test(function onPart() { - var PART = {}; - gently.expect(form, 'handlePart', function(part) { - assert.strictEqual(part, PART); - }); - - form.onPart(PART); -}); - -test(function handlePart() { - (function testUtf8Field() { - var PART = new events.EventEmitter(); - PART.name = 'my_field'; - - gently.expect(form, 'emit', function(event, field, value) { - assert.equal(event, 'field'); - assert.equal(field, 'my_field'); - assert.equal(value, 'hello world: €'); - }); - - form.handlePart(PART); - PART.emit('data', new Buffer('hello')); - PART.emit('data', new Buffer(' world: ')); - PART.emit('data', new Buffer([0xE2])); - PART.emit('data', new Buffer([0x82, 0xAC])); - PART.emit('end'); - })(); - - (function testBinaryField() { - var PART = new events.EventEmitter(); - PART.name = 'my_field2'; - - gently.expect(form, 'emit', function(event, field, value) { - assert.equal(event, 'field'); - assert.equal(field, 'my_field2'); - assert.equal(value, 'hello world: '+new Buffer([0xE2, 0x82, 0xAC]).toString('binary')); - }); - - form.encoding = 'binary'; - form.handlePart(PART); - PART.emit('data', new Buffer('hello')); - PART.emit('data', new Buffer(' world: ')); - PART.emit('data', new Buffer([0xE2])); - PART.emit('data', new Buffer([0x82, 0xAC])); - PART.emit('end'); - })(); - - (function testFieldSize() { - form.maxFieldsSize = 8; - var PART = new events.EventEmitter(); - PART.name = 'my_field'; - - gently.expect(form, '_error', function(err) { - assert.equal(err.message, 'maxFieldsSize exceeded, received 9 bytes of field data'); - }); - - form.handlePart(PART); - form._fieldsSize = 1; - PART.emit('data', new Buffer(7)); - PART.emit('data', new Buffer(1)); - })(); - - (function testFilePart() { - var PART = new events.EventEmitter(), - FILE = new events.EventEmitter(), - PATH = '/foo/bar'; - - PART.name = 'my_file'; - PART.filename = 'sweet.txt'; - PART.mime = 'sweet.txt'; - - gently.expect(form, '_uploadPath', function(filename) { - assert.equal(filename, PART.filename); - return PATH; - }); - - gently.expect(FileStub, 'new', function(properties) { - assert.equal(properties.path, PATH); - assert.equal(properties.name, PART.filename); - assert.equal(properties.type, PART.mime); - FILE = this; - - gently.expect(form, 'emit', function (event, field, file) { - assert.equal(event, 'fileBegin'); - assert.strictEqual(field, PART.name); - assert.strictEqual(file, FILE); - }); - - gently.expect(FILE, 'open'); - }); - - form.handlePart(PART); - assert.equal(form._flushing, 1); - - var BUFFER; - gently.expect(form, 'pause'); - gently.expect(FILE, 'write', function(buffer, cb) { - assert.strictEqual(buffer, BUFFER); - gently.expect(form, 'resume'); - // @todo handle cb(new Err) - cb(); - }); - - PART.emit('data', BUFFER = new Buffer('test')); - - gently.expect(FILE, 'end', function(cb) { - gently.expect(form, 'emit', function(event, field, file) { - assert.equal(event, 'file'); - assert.strictEqual(file, FILE); - }); - - gently.expect(form, '_maybeEnd'); - - cb(); - assert.equal(form._flushing, 0); - }); - - PART.emit('end'); - })(); -}); - -test(function _uploadPath() { - (function testUniqueId() { - var UUID_A, UUID_B; - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, uuid) { - assert.equal(uploadDir, form.uploadDir); - UUID_A = uuid; - }); - form._uploadPath(); - - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, uuid) { - UUID_B = uuid; - }); - form._uploadPath(); - - assert.notEqual(UUID_A, UUID_B); - })(); - - (function testFileExtension() { - form.keepExtensions = true; - var FILENAME = 'foo.jpg', - EXT = '.bar'; - - gently.expect(GENTLY.hijacked.path, 'extname', function(filename) { - assert.equal(filename, FILENAME); - gently.restore(path, 'extname'); - - return EXT; - }); - - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, name) { - assert.equal(path.extname(name), EXT); - }); - form._uploadPath(FILENAME); - })(); -}); - -test(function _maybeEnd() { - gently.expect(form, 'emit', 0); - form._maybeEnd(); - - form.ended = true; - form._flushing = 1; - form._maybeEnd(); - - gently.expect(form, 'emit', function(event) { - assert.equal(event, 'end'); - }); - - form.ended = true; - form._flushing = 0; - form._maybeEnd(); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js b/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js deleted file mode 100644 index d8dc968..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js +++ /dev/null @@ -1,50 +0,0 @@ -var common = require('../common'); -var multipartParser = require(common.lib + '/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - events = require('events'), - Buffer = require('buffer').Buffer, - parser; - -function test(test) { - parser = new MultipartParser(); - test(); -} - -test(function constructor() { - assert.equal(parser.boundary, null); - assert.equal(parser.state, 0); - assert.equal(parser.flags, 0); - assert.equal(parser.boundaryChars, null); - assert.equal(parser.index, null); - assert.equal(parser.lookbehind, null); - assert.equal(parser.constructor.name, 'MultipartParser'); -}); - -test(function initWithBoundary() { - var boundary = 'abc'; - parser.initWithBoundary(boundary); - assert.deepEqual(Array.prototype.slice.call(parser.boundary), [13, 10, 45, 45, 97, 98, 99]); - assert.equal(parser.state, multipartParser.START); - - assert.deepEqual(parser.boundaryChars, {10: true, 13: true, 45: true, 97: true, 98: true, 99: true}); -}); - -test(function parserError() { - var boundary = 'abc', - buffer = new Buffer(5); - - parser.initWithBoundary(boundary); - buffer.write('--ad', 'ascii', 0); - assert.equal(parser.write(buffer), 3); -}); - -test(function end() { - (function testError() { - assert.equal(parser.end().message, 'MultipartParser.end(): stream ended unexpectedly: ' + parser.explain()); - })(); - - (function testRegular() { - parser.state = multipartParser.END; - assert.strictEqual(parser.end(), undefined); - })(); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js b/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js deleted file mode 100644 index 54d3e2d..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js +++ /dev/null @@ -1,45 +0,0 @@ -var common = require('../common'); -var QuerystringParser = require(common.lib + '/querystring_parser').QuerystringParser, - Buffer = require('buffer').Buffer, - gently, - parser; - -function test(test) { - gently = new Gently(); - parser = new QuerystringParser(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.equal(parser.buffer, ''); - assert.equal(parser.constructor.name, 'QuerystringParser'); -}); - -test(function write() { - var a = new Buffer('a=1'); - assert.equal(parser.write(a), a.length); - - var b = new Buffer('&b=2'); - parser.write(b); - assert.equal(parser.buffer, a + b); -}); - -test(function end() { - var FIELDS = {a: ['b', {c: 'd'}], e: 'f'}; - - gently.expect(GENTLY.hijacked.querystring, 'parse', function(str) { - assert.equal(str, parser.buffer); - return FIELDS; - }); - - gently.expect(parser, 'onField', Object.keys(FIELDS).length, function(key, val) { - assert.deepEqual(FIELDS[key], val); - }); - - gently.expect(parser, 'onEnd'); - - parser.buffer = 'my buffer'; - parser.end(); - assert.equal(parser.buffer, ''); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js b/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js deleted file mode 100644 index fcfdb94..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js +++ /dev/null @@ -1,72 +0,0 @@ -var common = require('../common'); -var BOUNDARY = '---------------------------10102754414578508781458777923', - FIXTURE = TEST_FIXTURES+'/multi_video.upload', - fs = require('fs'), - util = require(common.lib + '/util'), - http = require('http'), - formidable = require(common.lib + '/index'), - server = http.createServer(); - -server.on('request', function(req, res) { - var form = new formidable.IncomingForm(), - uploads = {}; - - form.uploadDir = TEST_TMP; - form.parse(req); - - form - .on('fileBegin', function(field, file) { - assert.equal(field, 'upload'); - - var tracker = {file: file, progress: [], ended: false}; - uploads[file.filename] = tracker; - file - .on('progress', function(bytesReceived) { - tracker.progress.push(bytesReceived); - assert.equal(bytesReceived, file.length); - }) - .on('end', function() { - tracker.ended = true; - }); - }) - .on('field', function(field, value) { - assert.equal(field, 'title'); - assert.equal(value, ''); - }) - .on('file', function(field, file) { - assert.equal(field, 'upload'); - assert.strictEqual(uploads[file.filename].file, file); - }) - .on('end', function() { - assert.ok(uploads['shortest_video.flv']); - assert.ok(uploads['shortest_video.flv'].ended); - assert.ok(uploads['shortest_video.flv'].progress.length > 3); - assert.equal(uploads['shortest_video.flv'].progress.slice(-1), uploads['shortest_video.flv'].file.length); - assert.ok(uploads['shortest_video.mp4']); - assert.ok(uploads['shortest_video.mp4'].ended); - assert.ok(uploads['shortest_video.mp4'].progress.length > 3); - - server.close(); - res.writeHead(200); - res.end('good'); - }); -}); - -server.listen(TEST_PORT, function() { - var client = http.createClient(TEST_PORT), - stat = fs.statSync(FIXTURE), - headers = { - 'content-type': 'multipart/form-data; boundary='+BOUNDARY, - 'content-length': stat.size, - } - request = client.request('POST', '/', headers), - fixture = new fs.ReadStream(FIXTURE); - - fixture - .on('data', function(b) { - request.write(b); - }) - .on('end', function() { - request.end(); - }); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/run.js b/node_modules/express/node_modules/connect/node_modules/formidable/test/run.js deleted file mode 100755 index 50b2361..0000000 --- a/node_modules/express/node_modules/connect/node_modules/formidable/test/run.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -require('urun')(__dirname) diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/tmp/.empty b/node_modules/express/node_modules/connect/node_modules/formidable/test/tmp/.empty deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/express/node_modules/connect/node_modules/formidable/test/unit/.test-incoming-form.js.un~ b/node_modules/express/node_modules/connect/node_modules/formidable/test/unit/.test-incoming-form.js.un~ deleted file mode 100644 index 4002e6d77c8c5034e28b755dd5e4df04a088bafc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 61302 zcmeI5+m9T_b%)oKD3O*(ij+jsA}KX5((GE~$Xeb+QWRGdO_RE;ZqeFFoKVBvUUIG7 zndQt5FJ@>-3ymHdnP>ijapoKy6j`bXWKOzB<*XtE*=wX6AnLjrOU|zYMK<|Ip|98@~E0-}?IB ze*3lWuRhUu|Ghu>z3+bZy&tc6_w$`~|9I}}LqkI+Bt4vowR*k0yU@%p^;@&U`PGHJ zS))1G9c_#plP!)&+A8T|lD;AdBiA%Ee)Hwyck=1>p>yBlQ?XS==Kk^#%lEMKV=-41 z3(5Wu6d1pG=8qkYp`jltw>#uG`y_#4&*fG(TgZD0+3{?$GdI_1H>X>@g_pap&vvf3 z;_%3^gYP($Y|p-GU}T-Mgi@8LnWN+<{JyBHZU;70-(`ng9HD3>a)ff1X7h<+rR?XMiaj@K;UCg- zO8F&5HPzG0h+m7kr5JSNt!HfI7N_c`m5M;m486w3xLJC~|T8IN`*9{s0FF)0pq z7{lMrw#B(-+80iDx^n}+E}d`2e|&CQK5vXP?dF9STVJHs755W6%4^&L)=`hQjo z4(W-hn;g?!y%i8^T=(NUeYRZ7R^9+x!b{*(mYR8~q*qmyzAVeGES>&eF7-GNj7kF2 zdLpvnM!PkaH}+=NJv6rXxFmcNqpI>y37XTS{vXsO7Q)mWC<6_Z<*xS3-&tsiV?Q4{ zZ(}pyum+5)vTV_M@M_lyJa_-gIx)bq&YePni6jw*nhKM$11PzL`S%tk*x2x(B+%WF zWjDOrvHD&~YEVn0RE^j?gw%H|DRmr3sWX9OojDV5f!y7=CTB9r)G4B_Iuqq8XZo&1 z#0K<^hb1kJLs;YDkVVnSA-4102Dgz!%bnom)@(o55g%A>pgM1G|9yceSbN2 z8(}xy?J$I}h#Q>llcYv%bhD}ZR7GO)5N_{VZW@cI&q)~RJ4e85H0J^|oGt~8MwHsc z5K#YYL2<3pu!F1Gojf}8s6eyHoC?@VA4`3qQKn8Y1l12LDm+K!2i02F7s_y{Uc2CP zzd04y=?-ZO(g;(l7|m-dBO=Z7xr}hs5jezR`b84UjU%G@DQEC^X z@ompCo=r&L(ax_ddYmzMv<$Kb%_)L2d7u#_su+#%jvM8ZUC3-UX9KlF$_Nrwj3%YG z(qP$QP6cFyEGb$vqSP*iVER`Zf^hFfwD_bXLXgc_*5InvIGR;l(168c9W_9*ce
IVtEJ4-oRCMdZ2qdgi16PSGAyQdt<|{^o^gAUz%K<$i);+?qH*hs15iX`dKtzbK5JW$;Ui6q8 zZCKJNN!&3VE~Z88J~urxn~%%nsO-wj!bO>cexX0htn`bmZfkNO@AhQURK+b7G&4zR zkfwTP$pKY~nt2G_A6dFMmda0{zb)gzat2!_zR6f&W4hC6E?iw`aHSht@>UY#iOsSl z49~UR%FpDjsk}R^HH?hNYfD;1Id}zi{9Y}S!Y3sqA6G?U@{m^WKeiQ&$k85`bW##N zexTaN`|Z3p*_zL%vP=EW0<$7396Xc#cS%wMGj%&l4z5bn%u&)giR89?S=W!>JUe93 z;#DgDZ5({=+OAj!*D6W}hx%?wYP5)bl9Gd~A~CroZ_Bn7thTLSuN(>q|0Xi&~-Z~@m@LZnL6%u$lA660}&mM63j9?A9toC;i41J*?hgMvOvf73EDT)b~kJ zqeX0%lzLcIBqk4O1>0>a(5X_ig5`TyKLcr~?;Exw>w1b9i2gD#MKkoWqF{EDoPz+WF%*nw~cTPTRgsD{wVK=-SJM&rvWZcY1e0!A*_y?^MhkzX9S5VhOiq6j0_>;X8Zdyf?6UK zg~#k1O-egMusm%l1{s*r%rhfO?P3U~PcC&R1{%S@ZStAwnP=x)eo|@HYENaYsi_&h zTcS0a_4?=cU3625tM9C-_qZfA(3g(}(x`~aQZo<1z1QN#(^P&QqkX`WyaUB_wF0nA zHm{mMo;{v5j>$JybdK*j-|Fsi^U$AMeja*JpUgZjXQAsi%+NgCR2we{O^1QC)H`@V zqOy?Y(zMNmv2DgPiGt`In$^8SFQ1#4?96uB)qMaEPe@V&u#S?Z(KS`2ZXN>lQx+=z zr1CSIUfBm6i=UBNR8c<7hx(W#HChCtdC9d^k(fNB6&$p!K!>~;L%_B7SG#t9Vfv}T zOJmjk4asNC$&X3798FKxc%w|6VhGu%ELogN<;TBwR?RtoZ1<7F`=1vJfUTo zYjC0p(P7!(|Kr^h&EwOO)Mz?8C2_7P@J56f3u!K6wz*_-v|W;DF3WetfI2Nn4TylF zPe|YpA;v<$owVSPevc%;={P1xKEtv%Z~@m@>WWo~nmI~p_q*GaZCCtU6(XJju;WK` zQw#MolGJDsk4Z{BtSS3YPC-0d-cA8V~`Ou_C!IDnwWaxYHIK z((^tR;IxMY$@46G0~c_eB}A%3%^W4QhvkhpE!!UUGgXL=`Hgpew8IL}e?gKOErZv@ zoTb*FO4Q6lTEiLJ8gN#XpPp8o7A!Ba>3*N*~$<`r`~U{haAv5OI=Rxt$C*^sUfEU!u$_oo4}@|C;P6?#?bW+9kf zb(mHaKd;BM2bF)VKWg>VKlzYJwjb6u-fO}Cy04RrromOwjo+r`fFuzX(i~c@Ijk<4 z13?RS=`;(2&;-ay8-X*fm|iOEAS z{knB1q^CbqhjKrL>VD>1KXDT?{S^>cKV{AjkU+kZb;-w2A;Lo7{l-#w*2mUxqrf+; zdtBi8X>&rLOTK0Vi7M8@74B=m`n)+oKqg-^f`Xb?w>h$YZv#pz|)H&NTyi!1}-XF!*cR3RERJh=qVz~Rfzt|`WFt#hP<(cf63Pu zEPvn8n4W3p%`ePfIKlT9$k!JP!dFn{lGMQL2Hsea(5fso^ANP(v}jk$f$oxYhy%J2 zQ()*CU@u-v6HqS&-89SIz)F1%XF{p6)XYmIy{a(52wh!SLf5~xD3^lU&d31COt_fq zO!a5;fj5He0=0SrCkJ+2LPDsr)XYmIy{ez^^?=Zo1>xT;hj51(+$kr`EM*9@i@s(u zcsj>rAu&XS2!r7kzkjK!EKg{i!th&F4EdZLwpB4?z)rl-b+~uPMjQoWhcR|I+n(&q z&9pC^mggYiz_KvcX*bI@FylWy$8(a#NYid!)XI}c*Ae?#cT#Js*UP&)6RWJXSX=DI z32;If~nTL@5jwAc= zB9vQ7_UXlB>6)4XdARtI>%mN<;bjnm^eyubfScBnMlp>jwTmH$zvmF&Qy|8>nDL;_ zyA{NXM=`-%4r79A)|?(Fsbe$il82%~goWVy2Z!(8Y7adg;h`mCn9iC10^TsbpLK~b zDnwYRq|`xqo3HD#mL*L5FUNRYHRI>185eUqgZko3&9?P3VM|914&S6@mu-+C!E59fh($($S@f#>cZ zQzvVbsZ$Jq_u>N%-hI{Z9;$%HF!kUr6kuIR^ZxvR2|#BFpej)_2cR24mK;^}DmkI+ z$8WxPb!p$J@^cp|Uq7=nkZk~PbU+YdJxOZNfFeRgcB7atW;9!pzMMS$q8FsSse0<7N;UQBpcw6_@f_IY|2}m ztyvlNo82peMDzLNLOxYSHDK#YQUfUm+{}uE5fvh=R8s1oyu;T8MpqV$*B!=<)joJD zMhQtPFoNxhubd2|9Pl9)5=K;run>&zIEb%b8y&`mTp>$O1ld(dv<(cL9N1Yx zs7ln#=^yoR5vpo=Ld)Wbzi2yDHrg-gkR*Mu4w7pudjl8O#q?lZ6^Y4fAsUqp zNd(E4C8>c6UrkYqDiV{|Lc~DIF^=jHf#hwLy@88unBbeD7DR}#5Jbi6D*nk3-hmfA zEs3b*HqUvNiCPBptIPX4n7$)P?QJP=kQA|~A~AUgJ$IVZd3Aq33cHKz(s7`nl@6s{O$ z>J&lpnBNgq-J4sIPe|Iu`th4DAF|;J8xgADgnBIm$uF?%4O}>C3RhH-n7kGu23Vfq zs6Jc)$yZqR1}?U7fq(KMm8E7Lg6N3#BD@1HIw6U0<;02xS$h5XyxWvs^6{x&YpO9) z1}xSIrB+9r!)#?CQAULb3!(h9qrAPi-r-n>*JTT|JkerF-iTJ5QB8DFD+(P8XZRwiKyJ2g&wO_Qs&- zqmu5G %s', req.method, req.url, socket.filename); - - req.on('end', function() { - if (req.url !== '/') { - res.end(JSON.stringify({ - method: req.method, - url: req.url, - filename: socket.filename, - })); - return; - } - - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
'+ - '
'+ - '
'+ - ''+ - '
' - ); - }); -}); - -server.on('connection', function(socket) { - connections++; - - socket.id = connections; - socket.filename = 'connection-' + socket.id + '.http'; - socket.file = fs.createWriteStream(socket.filename); - socket.pipe(socket.file); - - console.log('--> %s', socket.filename); - socket.on('close', function() { - console.log('<-- %s', socket.filename); - }); -}); - -var port = process.env.PORT || 8080; -server.listen(port, function() { - console.log('Recording connections on port %s', port); -}); diff --git a/node_modules/express/node_modules/connect/package.json b/node_modules/express/node_modules/connect/package.json deleted file mode 100644 index f9c43d5..0000000 --- a/node_modules/express/node_modules/connect/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "connect", - "version": "1.8.5", - "description": "High performance middleware framework", - "keywords": ["framework", "web", "middleware", "connect", "rack"], - "repository": "git://github.com/senchalabs/connect.git", - "author": "TJ Holowaychuk (http://tjholowaychuk.com)", - "repository": "git://github.com/senchalabs/connect", - "dependencies": { - "qs": ">= 0.4.0", - "mime": ">= 0.0.1", - "formidable": "1.0.x" - }, - "devDependencies": { - "expresso": "0.9.2", - "koala": "0.1.2", - "less": "1.1.1", - "sass": "0.5.0", - "markdown": "0.2.1", - "ejs": "0.4.3", - "should": "0.3.2" - }, - "main": "index", - "engines": { "node": ">= 0.4.1 < 0.7.0" } -} \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/test.js b/node_modules/express/node_modules/connect/test.js deleted file mode 100644 index a1e1d55..0000000 --- a/node_modules/express/node_modules/connect/test.js +++ /dev/null @@ -1,52 +0,0 @@ - -var connect = require('./') - , http = require('http') - , RedisStore = require('connect-redis')(connect); - -var app = connect(); -app.use(connect.cookieParser('fucj')); -app.use(connect.session({store:new RedisStore})); -app.use(function(req, res, next){ - req.session.views = (req.session.views || 0) + 1; - res.writeHead(200, {"Content-Type": "text/plain"}); - res.end("You've viewed this page "+req.session.views+" times."); -}) - -http.createServer(app).listen(3000); - - -// var set = RedisStore.prototype.set; -// -// function slow(sid){ -// console.log('%s saving', sid); -// var args = arguments; -// setTimeout(function(self){ -// console.log('%s saved', sid); -// set.apply(self, args); -// }, 2000, this); -// }; -// -// http.createServer(connect() -// .use(connect.logger('dev')) -// .use(connect.cookieParser('keyboard cat')) -// .use(connect.session({ store: new RedisStore })) -// .use(function(req, res, next){ -// var sess = req.session; -// switch (req.url) { -// case '/foo.js': -// console.log('%s foo.js sid', sess.id); -// RedisStore.prototype.set = set; -// res.end('data'); -// break; -// default: -// console.log('%s html sid', sess.id); -// RedisStore.prototype.set = slow; -// res.setHeader('Content-Type', 'html'); -// res.write(''); -// setTimeout(function(){ -// res.end(''); -// }, 1000); -// } -// })).listen(3000); -// -// console.log('port 3000'); \ No newline at end of file diff --git a/node_modules/express/node_modules/mime/LICENSE b/node_modules/express/node_modules/mime/LICENSE deleted file mode 100644 index 451fc45..0000000 --- a/node_modules/express/node_modules/mime/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Benjamin Thomas, Robert Kieffer - -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/express/node_modules/mime/README.md b/node_modules/express/node_modules/mime/README.md deleted file mode 100644 index d8b66a8..0000000 --- a/node_modules/express/node_modules/mime/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# mime - -Comprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community. - -## Install - -Install with [npm](http://github.com/isaacs/npm): - - npm install mime - -## API - Queries - -### mime.lookup(path) -Get the mime type associated with a file. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. - - var mime = require('mime'); - - mime.lookup('/path/to/file.txt'); // => 'text/plain' - mime.lookup('file.txt'); // => 'text/plain' - mime.lookup('.TXT'); // => 'text/plain' - mime.lookup('htm'); // => 'text/html' - -### mime.extension(type) -Get the default extension for `type` - - mime.extension('text/html'); // => 'html' - mime.extension('application/octet-stream'); // => 'bin' - -### mime.charsets.lookup() - -Map mime-type to charset - - mime.charsets.lookup('text/plain'); // => 'UTF-8' - -(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) - -## API - Defining Custom Types - -The following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/bentomas/node-mime/wiki/Requesting-New-Types). - -### mime.define() - -Add custom mime/extension mappings - - mime.define({ - 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], - 'application/x-my-type': ['x-mt', 'x-mtt'], - // etc ... - }); - - mime.lookup('x-sft'); // => 'text/x-some-format' - -The first entry in the extensions array is returned by `mime.extension()`. E.g. - - mime.extension('text/x-some-format'); // => 'x-sf' - -### mime.load(filepath) - -Load mappings from an Apache ".types" format file - - mime.load('./my_project.types'); - -The .types file format is simple - See the `types` dir for examples. diff --git a/node_modules/express/node_modules/mime/mime.js b/node_modules/express/node_modules/mime/mime.js deleted file mode 100644 index 64dbeec..0000000 --- a/node_modules/express/node_modules/mime/mime.js +++ /dev/null @@ -1,93 +0,0 @@ -var path = require('path'), - fs = require('fs'); - -var mime = module.exports = { - // Map of extension to mime type - types: Object.create(null), - - // Map of mime type to extension - extensions :Object.create(null), - - /** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * @param map (Object) type definitions - */ - define: function(map) { - for (var type in map) { - var exts = map[type]; - - for (var i = 0; i < exts.length; i++) { - mime.types[exts[i]] = type; - } - - // Default extension is the first one we encounter - if (!mime.extensions[type]) { - mime.extensions[type] = exts[0]; - } - } - }, - - /** - * Load an Apache2-style ".types" file - * - * This may be called multiple times (it's expected). Where files declare - * overlapping types/extensions, the last file wins. - * - * @param file (String) path of file to load. - */ - load: function(file) { - // Read file and split into lines - var map = {}, - content = fs.readFileSync(file, 'ascii'), - lines = content.split(/[\r\n]+/); - - lines.forEach(function(line, lineno) { - // Clean up whitespace/comments, and split into fields - var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); - map[fields.shift()] = fields; - }); - - mime.define(map); - }, - - /** - * Lookup a mime type based on extension - */ - lookup: function(path, fallback) { - var ext = path.replace(/.*[\.\/]/, '').toLowerCase(); - - return mime.types[ext] || fallback || mime.default_type - }, - - /** - * Return file extension associated with a mime type - */ - extension: function(mimeType) { - return mime.extensions[mimeType]; - }, - - /** - * Lookup a charset based on mime type. - */ - charsets: { - lookup: function (mimeType, fallback) { - // Assume text types are utf8. Modify mime logic as needed. - return (/^text\//).test(mimeType) ? 'UTF-8' : fallback; - } - } -}; - -// Load our local copy of -// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -mime.load(path.join(__dirname, 'types/mime.types')); - -// Overlay enhancements submitted by the node.js community -mime.load(path.join(__dirname, 'types/node.types')); - -// Set the default type -mime.default_type = mime.types.bin; diff --git a/node_modules/express/node_modules/mime/package.json b/node_modules/express/node_modules/mime/package.json deleted file mode 100644 index 31d4e20..0000000 --- a/node_modules/express/node_modules/mime/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "author": { - "name": "Robert Kieffer", - "url": "http://github.com/broofa", - "email": "robert@broofa.com" - }, - "contributors": [ - { - "name": "Benjamin Thomas", - "url": "http://github.com/bentomas", - "email": "benjamin@benjaminthomas.org" - } - ], - "dependencies": {}, - "description": "A comprehensive library for mime-type mapping", - "devDependencies": {}, - "keywords": ["util", "mime"], - "main": "mime.js", - "name": "mime", - "repository": {"url": "http://github.com/bentomas/node-mime", "type": "git"}, - "version": "1.2.5" -} diff --git a/node_modules/express/node_modules/mime/test.js b/node_modules/express/node_modules/mime/test.js deleted file mode 100644 index 8a8a5b1..0000000 --- a/node_modules/express/node_modules/mime/test.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Usage: node test.js - */ - -var mime = require('./mime'); -var assert = require('assert'); - -function eq(a, b) { - console.log('Test: ' + a + ' === ' + b); - assert.strictEqual.apply(null, arguments); -} - -console.log(Object.keys(mime.extensions).length + ' types'); -console.log(Object.keys(mime.types).length + ' extensions\n'); - -// -// Test mime lookups -// - -eq('text/plain', mime.lookup('text.txt')); -eq('text/plain', mime.lookup('.text.txt')); -eq('text/plain', mime.lookup('.txt')); -eq('text/plain', mime.lookup('txt')); -eq('application/octet-stream', mime.lookup('text.nope')); -eq('fallback', mime.lookup('text.fallback', 'fallback')); -eq('application/octet-stream', mime.lookup('constructor')); -eq('text/plain', mime.lookup('TEXT.TXT')); - -// -// Test extensions -// - -eq('txt', mime.extension(mime.types.text)); -eq('html', mime.extension(mime.types.htm)); -eq('bin', mime.extension('application/octet-stream')); -eq(undefined, mime.extension('constructor')); - -// -// Test node types -// - -eq('application/octet-stream', mime.lookup('file.buffer')); -eq('audio/mp4', mime.lookup('file.m4a')); - -// -// Test charsets -// - -eq('UTF-8', mime.charsets.lookup('text/plain')); -eq(undefined, mime.charsets.lookup(mime.types.js)); -eq('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); - -console.log('\nOK'); diff --git a/node_modules/express/node_modules/mime/types/mime.types b/node_modules/express/node_modules/mime/types/mime.types deleted file mode 100644 index b3cae2e..0000000 --- a/node_modules/express/node_modules/mime/types/mime.types +++ /dev/null @@ -1,1510 +0,0 @@ -# This file maps Internet media types to unique file extension(s). -# Although created for httpd, this file is used by many software systems -# and has been placed in the public domain for unlimited redisribution. -# -# The table below contains both registered and (common) unregistered types. -# A type that has no unique extension can be ignored -- they are listed -# here to guide configurations toward known types and to make it easier to -# identify "new" types. File extensions are also commonly used to indicate -# content languages and encodings, so choose them carefully. -# -# Internet media types should be registered as described in RFC 4288. -# The registry is at . -# -# MIME type (lowercased) Extensions -# ============================================ ========== -# application/1d-interleaved-parityfec -# application/3gpp-ims+xml -# application/activemessage -application/andrew-inset ez -# application/applefile -application/applixware aw -application/atom+xml atom -application/atomcat+xml atomcat -# application/atomicmail -application/atomsvc+xml atomsvc -# application/auth-policy+xml -# application/batch-smtp -# application/beep+xml -# application/calendar+xml -# application/cals-1840 -# application/ccmp+xml -application/ccxml+xml ccxml -application/cdmi-capability cdmia -application/cdmi-container cdmic -application/cdmi-domain cdmid -application/cdmi-object cdmio -application/cdmi-queue cdmiq -# application/cea-2018+xml -# application/cellml+xml -# application/cfw -# application/cnrp+xml -# application/commonground -# application/conference-info+xml -# application/cpl+xml -# application/csta+xml -# application/cstadata+xml -application/cu-seeme cu -# application/cybercash -application/davmount+xml davmount -# application/dca-rft -# application/dec-dx -# application/dialog-info+xml -# application/dicom -# application/dns -# application/dskpp+xml -application/dssc+der dssc -application/dssc+xml xdssc -# application/dvcs -application/ecmascript ecma -# application/edi-consent -# application/edi-x12 -# application/edifact -application/emma+xml emma -# application/epp+xml -application/epub+zip epub -# application/eshop -# application/example -application/exi exi -# application/fastinfoset -# application/fastsoap -# application/fits -application/font-tdpfr pfr -# application/framework-attributes+xml -# application/h224 -# application/held+xml -# application/http -application/hyperstudio stk -# application/ibe-key-request+xml -# application/ibe-pkg-reply+xml -# application/ibe-pp-data -# application/iges -# application/im-iscomposing+xml -# application/index -# application/index.cmd -# application/index.obj -# application/index.response -# application/index.vnd -application/inkml+xml ink inkml -# application/iotp -application/ipfix ipfix -# application/ipp -# application/isup -application/java-archive jar -application/java-serialized-object ser -application/java-vm class -application/javascript js -application/json json -# application/kpml-request+xml -# application/kpml-response+xml -application/lost+xml lostxml -application/mac-binhex40 hqx -application/mac-compactpro cpt -# application/macwriteii -application/mads+xml mads -application/marc mrc -application/marcxml+xml mrcx -application/mathematica ma nb mb -# application/mathml-content+xml -# application/mathml-presentation+xml -application/mathml+xml mathml -# application/mbms-associated-procedure-description+xml -# application/mbms-deregister+xml -# application/mbms-envelope+xml -# application/mbms-msk+xml -# application/mbms-msk-response+xml -# application/mbms-protection-description+xml -# application/mbms-reception-report+xml -# application/mbms-register+xml -# application/mbms-register-response+xml -# application/mbms-user-service-description+xml -application/mbox mbox -# application/media_control+xml -application/mediaservercontrol+xml mscml -application/metalink4+xml meta4 -application/mets+xml mets -# application/mikey -application/mods+xml mods -# application/moss-keys -# application/moss-signature -# application/mosskey-data -# application/mosskey-request -application/mp21 m21 mp21 -application/mp4 mp4s -# application/mpeg4-generic -# application/mpeg4-iod -# application/mpeg4-iod-xmt -# application/msc-ivr+xml -# application/msc-mixer+xml -application/msword doc dot -application/mxf mxf -# application/nasdata -# application/news-checkgroups -# application/news-groupinfo -# application/news-transmission -# application/nss -# application/ocsp-request -# application/ocsp-response -application/octet-stream bin dms lha lrf lzh so iso dmg dist distz pkg bpk dump elc deploy -application/oda oda -application/oebps-package+xml opf -application/ogg ogx -application/onenote onetoc onetoc2 onetmp onepkg -application/oxps oxps -# application/parityfec -application/patch-ops-error+xml xer -application/pdf pdf -application/pgp-encrypted pgp -# application/pgp-keys -application/pgp-signature asc sig -application/pics-rules prf -# application/pidf+xml -# application/pidf-diff+xml -application/pkcs10 p10 -application/pkcs7-mime p7m p7c -application/pkcs7-signature p7s -application/pkcs8 p8 -application/pkix-attr-cert ac -application/pkix-cert cer -application/pkix-crl crl -application/pkix-pkipath pkipath -application/pkixcmp pki -application/pls+xml pls -# application/poc-settings+xml -application/postscript ai eps ps -# application/prs.alvestrand.titrax-sheet -application/prs.cww cww -# application/prs.nprend -# application/prs.plucker -# application/prs.rdf-xml-crypt -# application/prs.xsf+xml -application/pskc+xml pskcxml -# application/qsig -application/rdf+xml rdf -application/reginfo+xml rif -application/relax-ng-compact-syntax rnc -# application/remote-printing -application/resource-lists+xml rl -application/resource-lists-diff+xml rld -# application/riscos -# application/rlmi+xml -application/rls-services+xml rs -application/rpki-ghostbusters gbr -application/rpki-manifest mft -application/rpki-roa roa -# application/rpki-updown -application/rsd+xml rsd -application/rss+xml rss -application/rtf rtf -# application/rtx -# application/samlassertion+xml -# application/samlmetadata+xml -application/sbml+xml sbml -application/scvp-cv-request scq -application/scvp-cv-response scs -application/scvp-vp-request spq -application/scvp-vp-response spp -application/sdp sdp -# application/set-payment -application/set-payment-initiation setpay -# application/set-registration -application/set-registration-initiation setreg -# application/sgml -# application/sgml-open-catalog -application/shf+xml shf -# application/sieve -# application/simple-filter+xml -# application/simple-message-summary -# application/simplesymbolcontainer -# application/slate -# application/smil -application/smil+xml smi smil -# application/soap+fastinfoset -# application/soap+xml -application/sparql-query rq -application/sparql-results+xml srx -# application/spirits-event+xml -application/srgs gram -application/srgs+xml grxml -application/sru+xml sru -application/ssml+xml ssml -# application/tamp-apex-update -# application/tamp-apex-update-confirm -# application/tamp-community-update -# application/tamp-community-update-confirm -# application/tamp-error -# application/tamp-sequence-adjust -# application/tamp-sequence-adjust-confirm -# application/tamp-status-query -# application/tamp-status-response -# application/tamp-update -# application/tamp-update-confirm -application/tei+xml tei teicorpus -application/thraud+xml tfi -# application/timestamp-query -# application/timestamp-reply -application/timestamped-data tsd -# application/tve-trigger -# application/ulpfec -# application/vcard+xml -# application/vemmi -# application/vividence.scriptfile -# application/vnd.3gpp.bsf+xml -application/vnd.3gpp.pic-bw-large plb -application/vnd.3gpp.pic-bw-small psb -application/vnd.3gpp.pic-bw-var pvb -# application/vnd.3gpp.sms -# application/vnd.3gpp2.bcmcsinfo+xml -# application/vnd.3gpp2.sms -application/vnd.3gpp2.tcap tcap -application/vnd.3m.post-it-notes pwn -application/vnd.accpac.simply.aso aso -application/vnd.accpac.simply.imp imp -application/vnd.acucobol acu -application/vnd.acucorp atc acutc -application/vnd.adobe.air-application-installer-package+zip air -application/vnd.adobe.fxp fxp fxpl -# application/vnd.adobe.partial-upload -application/vnd.adobe.xdp+xml xdp -application/vnd.adobe.xfdf xfdf -# application/vnd.aether.imp -# application/vnd.ah-barcode -application/vnd.ahead.space ahead -application/vnd.airzip.filesecure.azf azf -application/vnd.airzip.filesecure.azs azs -application/vnd.amazon.ebook azw -application/vnd.americandynamics.acc acc -application/vnd.amiga.ami ami -# application/vnd.amundsen.maze+xml -application/vnd.android.package-archive apk -application/vnd.anser-web-certificate-issue-initiation cii -application/vnd.anser-web-funds-transfer-initiation fti -application/vnd.antix.game-component atx -application/vnd.apple.installer+xml mpkg -application/vnd.apple.mpegurl m3u8 -# application/vnd.arastra.swi -application/vnd.aristanetworks.swi swi -application/vnd.astraea-software.iota iota -application/vnd.audiograph aep -# application/vnd.autopackage -# application/vnd.avistar+xml -application/vnd.blueice.multipass mpm -# application/vnd.bluetooth.ep.oob -application/vnd.bmi bmi -application/vnd.businessobjects rep -# application/vnd.cab-jscript -# application/vnd.canon-cpdl -# application/vnd.canon-lips -# application/vnd.cendio.thinlinc.clientconf -application/vnd.chemdraw+xml cdxml -application/vnd.chipnuts.karaoke-mmd mmd -application/vnd.cinderella cdy -# application/vnd.cirpack.isdn-ext -application/vnd.claymore cla -application/vnd.cloanto.rp9 rp9 -application/vnd.clonk.c4group c4g c4d c4f c4p c4u -application/vnd.cluetrust.cartomobile-config c11amc -application/vnd.cluetrust.cartomobile-config-pkg c11amz -# application/vnd.collection+json -# application/vnd.commerce-battelle -application/vnd.commonspace csp -application/vnd.contact.cmsg cdbcmsg -application/vnd.cosmocaller cmc -application/vnd.crick.clicker clkx -application/vnd.crick.clicker.keyboard clkk -application/vnd.crick.clicker.palette clkp -application/vnd.crick.clicker.template clkt -application/vnd.crick.clicker.wordbank clkw -application/vnd.criticaltools.wbs+xml wbs -application/vnd.ctc-posml pml -# application/vnd.ctct.ws+xml -# application/vnd.cups-pdf -# application/vnd.cups-postscript -application/vnd.cups-ppd ppd -# application/vnd.cups-raster -# application/vnd.cups-raw -# application/vnd.curl -application/vnd.curl.car car -application/vnd.curl.pcurl pcurl -# application/vnd.cybank -application/vnd.data-vision.rdz rdz -application/vnd.dece.data uvf uvvf uvd uvvd -application/vnd.dece.ttml+xml uvt uvvt -application/vnd.dece.unspecified uvx uvvx -application/vnd.dece.zip uvz uvvz -application/vnd.denovo.fcselayout-link fe_launch -# application/vnd.dir-bi.plate-dl-nosuffix -application/vnd.dna dna -application/vnd.dolby.mlp mlp -# application/vnd.dolby.mobile.1 -# application/vnd.dolby.mobile.2 -application/vnd.dpgraph dpg -application/vnd.dreamfactory dfac -application/vnd.dvb.ait ait -# application/vnd.dvb.dvbj -# application/vnd.dvb.esgcontainer -# application/vnd.dvb.ipdcdftnotifaccess -# application/vnd.dvb.ipdcesgaccess -# application/vnd.dvb.ipdcesgaccess2 -# application/vnd.dvb.ipdcesgpdd -# application/vnd.dvb.ipdcroaming -# application/vnd.dvb.iptv.alfec-base -# application/vnd.dvb.iptv.alfec-enhancement -# application/vnd.dvb.notif-aggregate-root+xml -# application/vnd.dvb.notif-container+xml -# application/vnd.dvb.notif-generic+xml -# application/vnd.dvb.notif-ia-msglist+xml -# application/vnd.dvb.notif-ia-registration-request+xml -# application/vnd.dvb.notif-ia-registration-response+xml -# application/vnd.dvb.notif-init+xml -# application/vnd.dvb.pfr -application/vnd.dvb.service svc -# application/vnd.dxr -application/vnd.dynageo geo -# application/vnd.easykaraoke.cdgdownload -# application/vnd.ecdis-update -application/vnd.ecowin.chart mag -# application/vnd.ecowin.filerequest -# application/vnd.ecowin.fileupdate -# application/vnd.ecowin.series -# application/vnd.ecowin.seriesrequest -# application/vnd.ecowin.seriesupdate -# application/vnd.emclient.accessrequest+xml -application/vnd.enliven nml -# application/vnd.eprints.data+xml -application/vnd.epson.esf esf -application/vnd.epson.msf msf -application/vnd.epson.quickanime qam -application/vnd.epson.salt slt -application/vnd.epson.ssf ssf -# application/vnd.ericsson.quickcall -application/vnd.eszigno3+xml es3 et3 -# application/vnd.etsi.aoc+xml -# application/vnd.etsi.cug+xml -# application/vnd.etsi.iptvcommand+xml -# application/vnd.etsi.iptvdiscovery+xml -# application/vnd.etsi.iptvprofile+xml -# application/vnd.etsi.iptvsad-bc+xml -# application/vnd.etsi.iptvsad-cod+xml -# application/vnd.etsi.iptvsad-npvr+xml -# application/vnd.etsi.iptvservice+xml -# application/vnd.etsi.iptvsync+xml -# application/vnd.etsi.iptvueprofile+xml -# application/vnd.etsi.mcid+xml -# application/vnd.etsi.overload-control-policy-dataset+xml -# application/vnd.etsi.sci+xml -# application/vnd.etsi.simservs+xml -# application/vnd.etsi.tsl+xml -# application/vnd.etsi.tsl.der -# application/vnd.eudora.data -application/vnd.ezpix-album ez2 -application/vnd.ezpix-package ez3 -# application/vnd.f-secure.mobile -application/vnd.fdf fdf -application/vnd.fdsn.mseed mseed -application/vnd.fdsn.seed seed dataless -# application/vnd.ffsns -# application/vnd.fints -application/vnd.flographit gph -application/vnd.fluxtime.clip ftc -# application/vnd.font-fontforge-sfd -application/vnd.framemaker fm frame maker book -application/vnd.frogans.fnc fnc -application/vnd.frogans.ltf ltf -application/vnd.fsc.weblaunch fsc -application/vnd.fujitsu.oasys oas -application/vnd.fujitsu.oasys2 oa2 -application/vnd.fujitsu.oasys3 oa3 -application/vnd.fujitsu.oasysgp fg5 -application/vnd.fujitsu.oasysprs bh2 -# application/vnd.fujixerox.art-ex -# application/vnd.fujixerox.art4 -# application/vnd.fujixerox.hbpl -application/vnd.fujixerox.ddd ddd -application/vnd.fujixerox.docuworks xdw -application/vnd.fujixerox.docuworks.binder xbd -# application/vnd.fut-misnet -application/vnd.fuzzysheet fzs -application/vnd.genomatix.tuxedo txd -# application/vnd.geocube+xml -application/vnd.geogebra.file ggb -application/vnd.geogebra.tool ggt -application/vnd.geometry-explorer gex gre -application/vnd.geonext gxt -application/vnd.geoplan g2w -application/vnd.geospace g3w -# application/vnd.globalplatform.card-content-mgt -# application/vnd.globalplatform.card-content-mgt-response -application/vnd.gmx gmx -application/vnd.google-earth.kml+xml kml -application/vnd.google-earth.kmz kmz -application/vnd.grafeq gqf gqs -# application/vnd.gridmp -application/vnd.groove-account gac -application/vnd.groove-help ghf -application/vnd.groove-identity-message gim -application/vnd.groove-injector grv -application/vnd.groove-tool-message gtm -application/vnd.groove-tool-template tpl -application/vnd.groove-vcard vcg -# application/vnd.hal+json -application/vnd.hal+xml hal -application/vnd.handheld-entertainment+xml zmm -application/vnd.hbci hbci -# application/vnd.hcl-bireports -application/vnd.hhe.lesson-player les -application/vnd.hp-hpgl hpgl -application/vnd.hp-hpid hpid -application/vnd.hp-hps hps -application/vnd.hp-jlyt jlt -application/vnd.hp-pcl pcl -application/vnd.hp-pclxl pclxl -# application/vnd.httphone -application/vnd.hydrostatix.sof-data sfd-hdstx -application/vnd.hzn-3d-crossword x3d -# application/vnd.ibm.afplinedata -# application/vnd.ibm.electronic-media -application/vnd.ibm.minipay mpy -application/vnd.ibm.modcap afp listafp list3820 -application/vnd.ibm.rights-management irm -application/vnd.ibm.secure-container sc -application/vnd.iccprofile icc icm -application/vnd.igloader igl -application/vnd.immervision-ivp ivp -application/vnd.immervision-ivu ivu -# application/vnd.informedcontrol.rms+xml -# application/vnd.informix-visionary -# application/vnd.infotech.project -# application/vnd.infotech.project+xml -application/vnd.insors.igm igm -application/vnd.intercon.formnet xpw xpx -application/vnd.intergeo i2g -# application/vnd.intertrust.digibox -# application/vnd.intertrust.nncp -application/vnd.intu.qbo qbo -application/vnd.intu.qfx qfx -# application/vnd.iptc.g2.conceptitem+xml -# application/vnd.iptc.g2.knowledgeitem+xml -# application/vnd.iptc.g2.newsitem+xml -# application/vnd.iptc.g2.packageitem+xml -application/vnd.ipunplugged.rcprofile rcprofile -application/vnd.irepository.package+xml irp -application/vnd.is-xpr xpr -application/vnd.isac.fcs fcs -application/vnd.jam jam -# application/vnd.japannet-directory-service -# application/vnd.japannet-jpnstore-wakeup -# application/vnd.japannet-payment-wakeup -# application/vnd.japannet-registration -# application/vnd.japannet-registration-wakeup -# application/vnd.japannet-setstore-wakeup -# application/vnd.japannet-verification -# application/vnd.japannet-verification-wakeup -application/vnd.jcp.javame.midlet-rms rms -application/vnd.jisp jisp -application/vnd.joost.joda-archive joda -application/vnd.kahootz ktz ktr -application/vnd.kde.karbon karbon -application/vnd.kde.kchart chrt -application/vnd.kde.kformula kfo -application/vnd.kde.kivio flw -application/vnd.kde.kontour kon -application/vnd.kde.kpresenter kpr kpt -application/vnd.kde.kspread ksp -application/vnd.kde.kword kwd kwt -application/vnd.kenameaapp htke -application/vnd.kidspiration kia -application/vnd.kinar kne knp -application/vnd.koan skp skd skt skm -application/vnd.kodak-descriptor sse -application/vnd.las.las+xml lasxml -# application/vnd.liberty-request+xml -application/vnd.llamagraphics.life-balance.desktop lbd -application/vnd.llamagraphics.life-balance.exchange+xml lbe -application/vnd.lotus-1-2-3 123 -application/vnd.lotus-approach apr -application/vnd.lotus-freelance pre -application/vnd.lotus-notes nsf -application/vnd.lotus-organizer org -application/vnd.lotus-screencam scm -application/vnd.lotus-wordpro lwp -application/vnd.macports.portpkg portpkg -# application/vnd.marlin.drm.actiontoken+xml -# application/vnd.marlin.drm.conftoken+xml -# application/vnd.marlin.drm.license+xml -# application/vnd.marlin.drm.mdcf -application/vnd.mcd mcd -application/vnd.medcalcdata mc1 -application/vnd.mediastation.cdkey cdkey -# application/vnd.meridian-slingshot -application/vnd.mfer mwf -application/vnd.mfmp mfm -application/vnd.micrografx.flo flo -application/vnd.micrografx.igx igx -application/vnd.mif mif -# application/vnd.minisoft-hp3000-save -# application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf daf -application/vnd.mobius.dis dis -application/vnd.mobius.mbk mbk -application/vnd.mobius.mqy mqy -application/vnd.mobius.msl msl -application/vnd.mobius.plc plc -application/vnd.mobius.txf txf -application/vnd.mophun.application mpn -application/vnd.mophun.certificate mpc -# application/vnd.motorola.flexsuite -# application/vnd.motorola.flexsuite.adsi -# application/vnd.motorola.flexsuite.fis -# application/vnd.motorola.flexsuite.gotap -# application/vnd.motorola.flexsuite.kmr -# application/vnd.motorola.flexsuite.ttc -# application/vnd.motorola.flexsuite.wem -# application/vnd.motorola.iprm -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry cil -# application/vnd.ms-asf -application/vnd.ms-cab-compressed cab -application/vnd.ms-excel xls xlm xla xlc xlt xlw -application/vnd.ms-excel.addin.macroenabled.12 xlam -application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb -application/vnd.ms-excel.sheet.macroenabled.12 xlsm -application/vnd.ms-excel.template.macroenabled.12 xltm -application/vnd.ms-fontobject eot -application/vnd.ms-htmlhelp chm -application/vnd.ms-ims ims -application/vnd.ms-lrm lrm -# application/vnd.ms-office.activex+xml -application/vnd.ms-officetheme thmx -application/vnd.ms-pki.seccat cat -application/vnd.ms-pki.stl stl -# application/vnd.ms-playready.initiator+xml -application/vnd.ms-powerpoint ppt pps pot -application/vnd.ms-powerpoint.addin.macroenabled.12 ppam -application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm -application/vnd.ms-powerpoint.slide.macroenabled.12 sldm -application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm -application/vnd.ms-powerpoint.template.macroenabled.12 potm -application/vnd.ms-project mpp mpt -# application/vnd.ms-tnef -# application/vnd.ms-wmdrm.lic-chlg-req -# application/vnd.ms-wmdrm.lic-resp -# application/vnd.ms-wmdrm.meter-chlg-req -# application/vnd.ms-wmdrm.meter-resp -application/vnd.ms-word.document.macroenabled.12 docm -application/vnd.ms-word.template.macroenabled.12 dotm -application/vnd.ms-works wps wks wcm wdb -application/vnd.ms-wpl wpl -application/vnd.ms-xpsdocument xps -application/vnd.mseq mseq -# application/vnd.msign -# application/vnd.multiad.creator -# application/vnd.multiad.creator.cif -# application/vnd.music-niff -application/vnd.musician mus -application/vnd.muvee.style msty -application/vnd.mynfc taglet -# application/vnd.ncd.control -# application/vnd.ncd.reference -# application/vnd.nervana -# application/vnd.netfpx -application/vnd.neurolanguage.nlu nlu -application/vnd.noblenet-directory nnd -application/vnd.noblenet-sealer nns -application/vnd.noblenet-web nnw -# application/vnd.nokia.catalogs -# application/vnd.nokia.conml+wbxml -# application/vnd.nokia.conml+xml -# application/vnd.nokia.isds-radio-presets -# application/vnd.nokia.iptv.config+xml -# application/vnd.nokia.landmark+wbxml -# application/vnd.nokia.landmark+xml -# application/vnd.nokia.landmarkcollection+xml -# application/vnd.nokia.n-gage.ac+xml -application/vnd.nokia.n-gage.data ngdat -application/vnd.nokia.n-gage.symbian.install n-gage -# application/vnd.nokia.ncd -# application/vnd.nokia.pcd+wbxml -# application/vnd.nokia.pcd+xml -application/vnd.nokia.radio-preset rpst -application/vnd.nokia.radio-presets rpss -application/vnd.novadigm.edm edm -application/vnd.novadigm.edx edx -application/vnd.novadigm.ext ext -# application/vnd.ntt-local.file-transfer -# application/vnd.ntt-local.sip-ta_remote -# application/vnd.ntt-local.sip-ta_tcp_stream -application/vnd.oasis.opendocument.chart odc -application/vnd.oasis.opendocument.chart-template otc -application/vnd.oasis.opendocument.database odb -application/vnd.oasis.opendocument.formula odf -application/vnd.oasis.opendocument.formula-template odft -application/vnd.oasis.opendocument.graphics odg -application/vnd.oasis.opendocument.graphics-template otg -application/vnd.oasis.opendocument.image odi -application/vnd.oasis.opendocument.image-template oti -application/vnd.oasis.opendocument.presentation odp -application/vnd.oasis.opendocument.presentation-template otp -application/vnd.oasis.opendocument.spreadsheet ods -application/vnd.oasis.opendocument.spreadsheet-template ots -application/vnd.oasis.opendocument.text odt -application/vnd.oasis.opendocument.text-master odm -application/vnd.oasis.opendocument.text-template ott -application/vnd.oasis.opendocument.text-web oth -# application/vnd.obn -# application/vnd.oftn.l10n+json -# application/vnd.oipf.contentaccessdownload+xml -# application/vnd.oipf.contentaccessstreaming+xml -# application/vnd.oipf.cspg-hexbinary -# application/vnd.oipf.dae.svg+xml -# application/vnd.oipf.dae.xhtml+xml -# application/vnd.oipf.mippvcontrolmessage+xml -# application/vnd.oipf.pae.gem -# application/vnd.oipf.spdiscovery+xml -# application/vnd.oipf.spdlist+xml -# application/vnd.oipf.ueprofile+xml -# application/vnd.oipf.userprofile+xml -application/vnd.olpc-sugar xo -# application/vnd.oma-scws-config -# application/vnd.oma-scws-http-request -# application/vnd.oma-scws-http-response -# application/vnd.oma.bcast.associated-procedure-parameter+xml -# application/vnd.oma.bcast.drm-trigger+xml -# application/vnd.oma.bcast.imd+xml -# application/vnd.oma.bcast.ltkm -# application/vnd.oma.bcast.notification+xml -# application/vnd.oma.bcast.provisioningtrigger -# application/vnd.oma.bcast.sgboot -# application/vnd.oma.bcast.sgdd+xml -# application/vnd.oma.bcast.sgdu -# application/vnd.oma.bcast.simple-symbol-container -# application/vnd.oma.bcast.smartcard-trigger+xml -# application/vnd.oma.bcast.sprov+xml -# application/vnd.oma.bcast.stkm -# application/vnd.oma.cab-address-book+xml -# application/vnd.oma.cab-feature-handler+xml -# application/vnd.oma.cab-pcc+xml -# application/vnd.oma.cab-user-prefs+xml -# application/vnd.oma.dcd -# application/vnd.oma.dcdc -application/vnd.oma.dd2+xml dd2 -# application/vnd.oma.drm.risd+xml -# application/vnd.oma.group-usage-list+xml -# application/vnd.oma.pal+xml -# application/vnd.oma.poc.detailed-progress-report+xml -# application/vnd.oma.poc.final-report+xml -# application/vnd.oma.poc.groups+xml -# application/vnd.oma.poc.invocation-descriptor+xml -# application/vnd.oma.poc.optimized-progress-report+xml -# application/vnd.oma.push -# application/vnd.oma.scidm.messages+xml -# application/vnd.oma.xcap-directory+xml -# application/vnd.omads-email+xml -# application/vnd.omads-file+xml -# application/vnd.omads-folder+xml -# application/vnd.omaloc-supl-init -application/vnd.openofficeorg.extension oxt -# application/vnd.openxmlformats-officedocument.custom-properties+xml -# application/vnd.openxmlformats-officedocument.customxmlproperties+xml -# application/vnd.openxmlformats-officedocument.drawing+xml -# application/vnd.openxmlformats-officedocument.drawingml.chart+xml -# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml -# application/vnd.openxmlformats-officedocument.extended-properties+xml -# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml -# application/vnd.openxmlformats-officedocument.presentationml.comments+xml -# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml -application/vnd.openxmlformats-officedocument.presentationml.presentation pptx -# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml -application/vnd.openxmlformats-officedocument.presentationml.slide sldx -# application/vnd.openxmlformats-officedocument.presentationml.slide+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml -application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx -# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml -# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml -# application/vnd.openxmlformats-officedocument.presentationml.tags+xml -application/vnd.openxmlformats-officedocument.presentationml.template potx -# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx -# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml -# application/vnd.openxmlformats-officedocument.theme+xml -# application/vnd.openxmlformats-officedocument.themeoverride+xml -# application/vnd.openxmlformats-officedocument.vmldrawing -# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.document docx -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx -# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml -# application/vnd.openxmlformats-package.core-properties+xml -# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml -# application/vnd.openxmlformats-package.relationships+xml -# application/vnd.quobject-quoxdocument -# application/vnd.osa.netdeploy -application/vnd.osgeo.mapguide.package mgp -# application/vnd.osgi.bundle -application/vnd.osgi.dp dp -# application/vnd.otps.ct-kip+xml -application/vnd.palm pdb pqa oprc -# application/vnd.paos.xml -application/vnd.pawaafile paw -application/vnd.pg.format str -application/vnd.pg.osasli ei6 -# application/vnd.piaccess.application-licence -application/vnd.picsel efif -application/vnd.pmi.widget wg -# application/vnd.poc.group-advertisement+xml -application/vnd.pocketlearn plf -application/vnd.powerbuilder6 pbd -# application/vnd.powerbuilder6-s -# application/vnd.powerbuilder7 -# application/vnd.powerbuilder7-s -# application/vnd.powerbuilder75 -# application/vnd.powerbuilder75-s -# application/vnd.preminet -application/vnd.previewsystems.box box -application/vnd.proteus.magazine mgz -application/vnd.publishare-delta-tree qps -application/vnd.pvi.ptid1 ptid -# application/vnd.pwg-multiplexed -# application/vnd.pwg-xhtml-print+xml -# application/vnd.qualcomm.brew-app-res -application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb -# application/vnd.radisys.moml+xml -# application/vnd.radisys.msml+xml -# application/vnd.radisys.msml-audit+xml -# application/vnd.radisys.msml-audit-conf+xml -# application/vnd.radisys.msml-audit-conn+xml -# application/vnd.radisys.msml-audit-dialog+xml -# application/vnd.radisys.msml-audit-stream+xml -# application/vnd.radisys.msml-conf+xml -# application/vnd.radisys.msml-dialog+xml -# application/vnd.radisys.msml-dialog-base+xml -# application/vnd.radisys.msml-dialog-fax-detect+xml -# application/vnd.radisys.msml-dialog-fax-sendrecv+xml -# application/vnd.radisys.msml-dialog-group+xml -# application/vnd.radisys.msml-dialog-speech+xml -# application/vnd.radisys.msml-dialog-transform+xml -# application/vnd.rainstor.data -# application/vnd.rapid -application/vnd.realvnc.bed bed -application/vnd.recordare.musicxml mxl -application/vnd.recordare.musicxml+xml musicxml -# application/vnd.renlearn.rlprint -application/vnd.rig.cryptonote cryptonote -application/vnd.rim.cod cod -application/vnd.rn-realmedia rm -application/vnd.route66.link66+xml link66 -# application/vnd.ruckus.download -# application/vnd.s3sms -application/vnd.sailingtracker.track st -# application/vnd.sbm.cid -# application/vnd.sbm.mid2 -# application/vnd.scribus -# application/vnd.sealed.3df -# application/vnd.sealed.csf -# application/vnd.sealed.doc -# application/vnd.sealed.eml -# application/vnd.sealed.mht -# application/vnd.sealed.net -# application/vnd.sealed.ppt -# application/vnd.sealed.tiff -# application/vnd.sealed.xls -# application/vnd.sealedmedia.softseal.html -# application/vnd.sealedmedia.softseal.pdf -application/vnd.seemail see -application/vnd.sema sema -application/vnd.semd semd -application/vnd.semf semf -application/vnd.shana.informed.formdata ifm -application/vnd.shana.informed.formtemplate itp -application/vnd.shana.informed.interchange iif -application/vnd.shana.informed.package ipk -application/vnd.simtech-mindmapper twd twds -application/vnd.smaf mmf -# application/vnd.smart.notebook -application/vnd.smart.teacher teacher -# application/vnd.software602.filler.form+xml -# application/vnd.software602.filler.form-xml-zip -application/vnd.solent.sdkm+xml sdkm sdkd -application/vnd.spotfire.dxp dxp -application/vnd.spotfire.sfs sfs -# application/vnd.sss-cod -# application/vnd.sss-dtf -# application/vnd.sss-ntf -application/vnd.stardivision.calc sdc -application/vnd.stardivision.draw sda -application/vnd.stardivision.impress sdd -application/vnd.stardivision.math smf -application/vnd.stardivision.writer sdw vor -application/vnd.stardivision.writer-global sgl -application/vnd.stepmania.package smzip -application/vnd.stepmania.stepchart sm -# application/vnd.street-stream -application/vnd.sun.xml.calc sxc -application/vnd.sun.xml.calc.template stc -application/vnd.sun.xml.draw sxd -application/vnd.sun.xml.draw.template std -application/vnd.sun.xml.impress sxi -application/vnd.sun.xml.impress.template sti -application/vnd.sun.xml.math sxm -application/vnd.sun.xml.writer sxw -application/vnd.sun.xml.writer.global sxg -application/vnd.sun.xml.writer.template stw -# application/vnd.sun.wadl+xml -application/vnd.sus-calendar sus susp -application/vnd.svd svd -# application/vnd.swiftview-ics -application/vnd.symbian.install sis sisx -application/vnd.syncml+xml xsm -application/vnd.syncml.dm+wbxml bdm -application/vnd.syncml.dm+xml xdm -# application/vnd.syncml.dm.notification -# application/vnd.syncml.ds.notification -application/vnd.tao.intent-module-archive tao -application/vnd.tcpdump.pcap pcap cap dmp -application/vnd.tmobile-livetv tmo -application/vnd.trid.tpt tpt -application/vnd.triscape.mxs mxs -application/vnd.trueapp tra -# application/vnd.truedoc -# application/vnd.ubisoft.webplayer -application/vnd.ufdl ufd ufdl -application/vnd.uiq.theme utz -application/vnd.umajin umj -application/vnd.unity unityweb -application/vnd.uoml+xml uoml -# application/vnd.uplanet.alert -# application/vnd.uplanet.alert-wbxml -# application/vnd.uplanet.bearer-choice -# application/vnd.uplanet.bearer-choice-wbxml -# application/vnd.uplanet.cacheop -# application/vnd.uplanet.cacheop-wbxml -# application/vnd.uplanet.channel -# application/vnd.uplanet.channel-wbxml -# application/vnd.uplanet.list -# application/vnd.uplanet.list-wbxml -# application/vnd.uplanet.listcmd -# application/vnd.uplanet.listcmd-wbxml -# application/vnd.uplanet.signal -application/vnd.vcx vcx -# application/vnd.vd-study -# application/vnd.vectorworks -# application/vnd.verimatrix.vcas -# application/vnd.vidsoft.vidconference -application/vnd.visio vsd vst vss vsw -application/vnd.visionary vis -# application/vnd.vividence.scriptfile -application/vnd.vsf vsf -# application/vnd.wap.sic -# application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo wtb -# application/vnd.wfa.wsc -# application/vnd.wmc -# application/vnd.wmf.bootstrap -# application/vnd.wolfram.mathematica -# application/vnd.wolfram.mathematica.package -application/vnd.wolfram.player nbp -application/vnd.wordperfect wpd -application/vnd.wqd wqd -# application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf stf -# application/vnd.wv.csp+wbxml -# application/vnd.wv.csp+xml -# application/vnd.wv.ssp+xml -application/vnd.xara xar -application/vnd.xfdl xfdl -# application/vnd.xfdl.webform -# application/vnd.xmi+xml -# application/vnd.xmpie.cpkg -# application/vnd.xmpie.dpkg -# application/vnd.xmpie.plan -# application/vnd.xmpie.ppkg -# application/vnd.xmpie.xlim -application/vnd.yamaha.hv-dic hvd -application/vnd.yamaha.hv-script hvs -application/vnd.yamaha.hv-voice hvp -application/vnd.yamaha.openscoreformat osf -application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg -# application/vnd.yamaha.remote-setup -application/vnd.yamaha.smaf-audio saf -application/vnd.yamaha.smaf-phrase spf -# application/vnd.yamaha.through-ngn -# application/vnd.yamaha.tunnel-udpencap -application/vnd.yellowriver-custom-menu cmp -application/vnd.zul zir zirz -application/vnd.zzazz.deck+xml zaz -application/voicexml+xml vxml -# application/vq-rtcpxr -# application/watcherinfo+xml -# application/whoispp-query -# application/whoispp-response -application/widget wgt -application/winhlp hlp -# application/wita -# application/wordperfect5.1 -application/wsdl+xml wsdl -application/wspolicy+xml wspolicy -application/x-7z-compressed 7z -application/x-abiword abw -application/x-ace-compressed ace -application/x-authorware-bin aab x32 u32 vox -application/x-authorware-map aam -application/x-authorware-seg aas -application/x-bcpio bcpio -application/x-bittorrent torrent -application/x-bzip bz -application/x-bzip2 bz2 boz -application/x-cdlink vcd -application/x-chat chat -application/x-chess-pgn pgn -# application/x-compress -application/x-cpio cpio -application/x-csh csh -application/x-debian-package deb udeb -application/x-director dir dcr dxr cst cct cxt w3d fgd swa -application/x-doom wad -application/x-dtbncx+xml ncx -application/x-dtbook+xml dtb -application/x-dtbresource+xml res -application/x-dvi dvi -application/x-font-bdf bdf -# application/x-font-dos -# application/x-font-framemaker -application/x-font-ghostscript gsf -# application/x-font-libgrx -application/x-font-linux-psf psf -application/x-font-otf otf -application/x-font-pcf pcf -application/x-font-snf snf -# application/x-font-speedo -# application/x-font-sunos-news -application/x-font-ttf ttf ttc -application/x-font-type1 pfa pfb pfm afm -application/x-font-woff woff -# application/x-font-vfont -application/x-futuresplash spl -application/x-gnumeric gnumeric -application/x-gtar gtar -# application/x-gzip -application/x-hdf hdf -application/x-java-jnlp-file jnlp -application/x-latex latex -application/x-mobipocket-ebook prc mobi -application/x-ms-application application -application/x-ms-wmd wmd -application/x-ms-wmz wmz -application/x-ms-xbap xbap -application/x-msaccess mdb -application/x-msbinder obd -application/x-mscardfile crd -application/x-msclip clp -application/x-msdownload exe dll com bat msi -application/x-msmediaview mvb m13 m14 -application/x-msmetafile wmf -application/x-msmoney mny -application/x-mspublisher pub -application/x-msschedule scd -application/x-msterminal trm -application/x-mswrite wri -application/x-netcdf nc cdf -application/x-pkcs12 p12 pfx -application/x-pkcs7-certificates p7b spc -application/x-pkcs7-certreqresp p7r -application/x-rar-compressed rar -application/x-sh sh -application/x-shar shar -application/x-shockwave-flash swf -application/x-silverlight-app xap -application/x-stuffit sit -application/x-stuffitx sitx -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-tex-tfm tfm -application/x-texinfo texinfo texi -application/x-ustar ustar -application/x-wais-source src -application/x-x509-ca-cert der crt -application/x-xfig fig -application/x-xpinstall xpi -# application/x400-bp -# application/xcap-att+xml -# application/xcap-caps+xml -application/xcap-diff+xml xdf -# application/xcap-el+xml -# application/xcap-error+xml -# application/xcap-ns+xml -# application/xcon-conference-info-diff+xml -# application/xcon-conference-info+xml -application/xenc+xml xenc -application/xhtml+xml xhtml xht -# application/xhtml-voice+xml -application/xml xml xsl -application/xml-dtd dtd -# application/xml-external-parsed-entity -# application/xmpp+xml -application/xop+xml xop -application/xslt+xml xslt -application/xspf+xml xspf -application/xv+xml mxml xhvml xvml xvm -application/yang yang -application/yin+xml yin -application/zip zip -# audio/1d-interleaved-parityfec -# audio/32kadpcm -# audio/3gpp -# audio/3gpp2 -# audio/ac3 -audio/adpcm adp -# audio/amr -# audio/amr-wb -# audio/amr-wb+ -# audio/asc -# audio/atrac-advanced-lossless -# audio/atrac-x -# audio/atrac3 -audio/basic au snd -# audio/bv16 -# audio/bv32 -# audio/clearmode -# audio/cn -# audio/dat12 -# audio/dls -# audio/dsr-es201108 -# audio/dsr-es202050 -# audio/dsr-es202211 -# audio/dsr-es202212 -# audio/dv -# audio/dvi4 -# audio/eac3 -# audio/evrc -# audio/evrc-qcp -# audio/evrc0 -# audio/evrc1 -# audio/evrcb -# audio/evrcb0 -# audio/evrcb1 -# audio/evrcwb -# audio/evrcwb0 -# audio/evrcwb1 -# audio/example -# audio/fwdred -# audio/g719 -# audio/g722 -# audio/g7221 -# audio/g723 -# audio/g726-16 -# audio/g726-24 -# audio/g726-32 -# audio/g726-40 -# audio/g728 -# audio/g729 -# audio/g7291 -# audio/g729d -# audio/g729e -# audio/gsm -# audio/gsm-efr -# audio/gsm-hr-08 -# audio/ilbc -# audio/ip-mr_v2.5 -# audio/l16 -# audio/l20 -# audio/l24 -# audio/l8 -# audio/lpc -audio/midi mid midi kar rmi -# audio/mobile-xmf -audio/mp4 mp4a -# audio/mp4a-latm -# audio/mpa -# audio/mpa-robust -audio/mpeg mpga mp2 mp2a mp3 m2a m3a -# audio/mpeg4-generic -audio/ogg oga ogg spx -# audio/parityfec -# audio/pcma -# audio/pcma-wb -# audio/pcmu-wb -# audio/pcmu -# audio/prs.sid -# audio/qcelp -# audio/red -# audio/rtp-enc-aescm128 -# audio/rtp-midi -# audio/rtx -# audio/smv -# audio/smv0 -# audio/smv-qcp -# audio/sp-midi -# audio/speex -# audio/t140c -# audio/t38 -# audio/telephone-event -# audio/tone -# audio/uemclip -# audio/ulpfec -# audio/vdvi -# audio/vmr-wb -# audio/vnd.3gpp.iufp -# audio/vnd.4sb -# audio/vnd.audiokoz -# audio/vnd.celp -# audio/vnd.cisco.nse -# audio/vnd.cmles.radio-events -# audio/vnd.cns.anp1 -# audio/vnd.cns.inf1 -audio/vnd.dece.audio uva uvva -audio/vnd.digital-winds eol -# audio/vnd.dlna.adts -# audio/vnd.dolby.heaac.1 -# audio/vnd.dolby.heaac.2 -# audio/vnd.dolby.mlp -# audio/vnd.dolby.mps -# audio/vnd.dolby.pl2 -# audio/vnd.dolby.pl2x -# audio/vnd.dolby.pl2z -# audio/vnd.dolby.pulse.1 -audio/vnd.dra dra -audio/vnd.dts dts -audio/vnd.dts.hd dtshd -# audio/vnd.dvb.file dvb -# audio/vnd.everad.plj -# audio/vnd.hns.audio -audio/vnd.lucent.voice lvp -audio/vnd.ms-playready.media.pya pya -# audio/vnd.nokia.mobile-xmf -# audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 ecelp4800 -audio/vnd.nuera.ecelp7470 ecelp7470 -audio/vnd.nuera.ecelp9600 ecelp9600 -# audio/vnd.octel.sbc -# audio/vnd.qcelp -# audio/vnd.rhetorex.32kadpcm -audio/vnd.rip rip -# audio/vnd.sealedmedia.softseal.mpeg -# audio/vnd.vmx.cvsd -# audio/vorbis -# audio/vorbis-config -audio/webm weba -audio/x-aac aac -audio/x-aiff aif aiff aifc -audio/x-mpegurl m3u -audio/x-ms-wax wax -audio/x-ms-wma wma -audio/x-pn-realaudio ram ra -audio/x-pn-realaudio-plugin rmp -audio/x-wav wav -chemical/x-cdx cdx -chemical/x-cif cif -chemical/x-cmdf cmdf -chemical/x-cml cml -chemical/x-csml csml -# chemical/x-pdb -chemical/x-xyz xyz -image/bmp bmp -image/cgm cgm -# image/example -# image/fits -image/g3fax g3 -image/gif gif -image/ief ief -# image/jp2 -image/jpeg jpeg jpg jpe -# image/jpm -# image/jpx -image/ktx ktx -# image/naplps -image/png png -image/prs.btif btif -# image/prs.pti -image/svg+xml svg svgz -# image/t38 -image/tiff tiff tif -# image/tiff-fx -image/vnd.adobe.photoshop psd -# image/vnd.cns.inf2 -image/vnd.dece.graphic uvi uvvi uvg uvvg -image/vnd.dvb.subtitle sub -image/vnd.djvu djvu djv -image/vnd.dwg dwg -image/vnd.dxf dxf -image/vnd.fastbidsheet fbs -image/vnd.fpx fpx -image/vnd.fst fst -image/vnd.fujixerox.edmics-mmr mmr -image/vnd.fujixerox.edmics-rlc rlc -# image/vnd.globalgraphics.pgb -# image/vnd.microsoft.icon -# image/vnd.mix -image/vnd.ms-modi mdi -image/vnd.net-fpx npx -# image/vnd.radiance -# image/vnd.sealed.png -# image/vnd.sealedmedia.softseal.gif -# image/vnd.sealedmedia.softseal.jpg -# image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff xif -image/webp webp -image/x-cmu-raster ras -image/x-cmx cmx -image/x-freehand fh fhc fh4 fh5 fh7 -image/x-icon ico -image/x-pcx pcx -image/x-pict pic pct -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -# message/cpim -# message/delivery-status -# message/disposition-notification -# message/example -# message/external-body -# message/feedback-report -# message/global -# message/global-delivery-status -# message/global-disposition-notification -# message/global-headers -# message/http -# message/imdn+xml -# message/news -# message/partial -message/rfc822 eml mime -# message/s-http -# message/sip -# message/sipfrag -# message/tracking-status -# message/vnd.si.simp -# model/example -model/iges igs iges -model/mesh msh mesh silo -model/vnd.collada+xml dae -model/vnd.dwf dwf -# model/vnd.flatland.3dml -model/vnd.gdl gdl -# model/vnd.gs-gdl -# model/vnd.gs.gdl -model/vnd.gtw gtw -# model/vnd.moml+xml -model/vnd.mts mts -# model/vnd.parasolid.transmit.binary -# model/vnd.parasolid.transmit.text -model/vnd.vtu vtu -model/vrml wrl vrml -# multipart/alternative -# multipart/appledouble -# multipart/byteranges -# multipart/digest -# multipart/encrypted -# multipart/example -# multipart/form-data -# multipart/header-set -# multipart/mixed -# multipart/parallel -# multipart/related -# multipart/report -# multipart/signed -# multipart/voice-message -# text/1d-interleaved-parityfec -text/calendar ics ifb -text/css css -text/csv csv -# text/directory -# text/dns -# text/ecmascript -# text/enriched -# text/example -# text/fwdred -text/html html htm -# text/javascript -text/n3 n3 -# text/parityfec -text/plain txt text conf def list log in -# text/prs.fallenstein.rst -text/prs.lines.tag dsc -# text/vnd.radisys.msml-basic-layout -# text/red -# text/rfc822-headers -text/richtext rtx -# text/rtf -# text/rtp-enc-aescm128 -# text/rtx -text/sgml sgml sgm -# text/t140 -text/tab-separated-values tsv -text/troff t tr roff man me ms -text/turtle ttl -# text/ulpfec -text/uri-list uri uris urls -text/vcard vcard -# text/vnd.abc -text/vnd.curl curl -text/vnd.curl.dcurl dcurl -text/vnd.curl.scurl scurl -text/vnd.curl.mcurl mcurl -# text/vnd.dmclientscript -text/vnd.dvb.subtitle sub -# text/vnd.esmertec.theme-descriptor -text/vnd.fly fly -text/vnd.fmi.flexstor flx -text/vnd.graphviz gv -text/vnd.in3d.3dml 3dml -text/vnd.in3d.spot spot -# text/vnd.iptc.newsml -# text/vnd.iptc.nitf -# text/vnd.latex-z -# text/vnd.motorola.reflex -# text/vnd.ms-mediapackage -# text/vnd.net2phone.commcenter.command -# text/vnd.si.uricatalogue -text/vnd.sun.j2me.app-descriptor jad -# text/vnd.trolltech.linguist -# text/vnd.wap.si -# text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-asm s asm -text/x-c c cc cxx cpp h hh dic -text/x-fortran f for f77 f90 -text/x-pascal p pas -text/x-java-source java -text/x-setext etx -text/x-uuencode uu -text/x-vcalendar vcs -text/x-vcard vcf -# text/xml -# text/xml-external-parsed-entity -# video/1d-interleaved-parityfec -video/3gpp 3gp -# video/3gpp-tt -video/3gpp2 3g2 -# video/bmpeg -# video/bt656 -# video/celb -# video/dv -# video/example -video/h261 h261 -video/h263 h263 -# video/h263-1998 -# video/h263-2000 -video/h264 h264 -# video/h264-rcdo -# video/h264-svc -video/jpeg jpgv -# video/jpeg2000 -video/jpm jpm jpgm -video/mj2 mj2 mjp2 -# video/mp1s -# video/mp2p -# video/mp2t -video/mp4 mp4 mp4v mpg4 -# video/mp4v-es -video/mpeg mpeg mpg mpe m1v m2v -# video/mpeg4-generic -# video/mpv -# video/nv -video/ogg ogv -# video/parityfec -# video/pointer -video/quicktime qt mov -# video/raw -# video/rtp-enc-aescm128 -# video/rtx -# video/smpte292m -# video/ulpfec -# video/vc1 -# video/vnd.cctv -video/vnd.dece.hd uvh uvvh -video/vnd.dece.mobile uvm uvvm -# video/vnd.dece.mp4 -video/vnd.dece.pd uvp uvvp -video/vnd.dece.sd uvs uvvs -video/vnd.dece.video uvv uvvv -# video/vnd.directv.mpeg -# video/vnd.directv.mpeg-tts -# video/vnd.dlna.mpeg-tts -video/vnd.dvb.file dvb -video/vnd.fvt fvt -# video/vnd.hns.video -# video/vnd.iptvforum.1dparityfec-1010 -# video/vnd.iptvforum.1dparityfec-2005 -# video/vnd.iptvforum.2dparityfec-1010 -# video/vnd.iptvforum.2dparityfec-2005 -# video/vnd.iptvforum.ttsavc -# video/vnd.iptvforum.ttsmpeg2 -# video/vnd.motorola.video -# video/vnd.motorola.videop -video/vnd.mpegurl mxu m4u -video/vnd.ms-playready.media.pyv pyv -# video/vnd.nokia.interleaved-multimedia -# video/vnd.nokia.videovoip -# video/vnd.objectvideo -# video/vnd.sealed.mpeg1 -# video/vnd.sealed.mpeg4 -# video/vnd.sealed.swf -# video/vnd.sealedmedia.softseal.mov -video/vnd.uvvu.mp4 uvu uvvu -video/vnd.vivo viv -video/webm webm -video/x-f4v f4v -video/x-fli fli -video/x-flv flv -video/x-m4v m4v -video/x-ms-asf asf asx -video/x-ms-wm wm -video/x-ms-wmv wmv -video/x-ms-wmx wmx -video/x-ms-wvx wvx -video/x-msvideo avi -video/x-sgi-movie movie -x-conference/x-cooltalk ice diff --git a/node_modules/express/node_modules/mime/types/node.types b/node_modules/express/node_modules/mime/types/node.types deleted file mode 100644 index f7da49f..0000000 --- a/node_modules/express/node_modules/mime/types/node.types +++ /dev/null @@ -1,48 +0,0 @@ -# What: Google Chrome Extension -# Why: To allow apps to (work) be served with the right content type header. -# http://codereview.chromium.org/2830017 -# Added by: niftylettuce -application/x-chrome-extension crx - -# What: OTF Message Silencer -# Why: To silence the "Resource interpreted as font but transferred with MIME -# type font/otf" message that occurs in Google Chrome -# Added by: niftylettuce -font/opentype otf - -# What: HTC support -# Why: To properly render .htc files such as CSS3PIE -# Added by: niftylettuce -text/x-component htc - -# What: HTML5 application cache manifest -# Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps -# per https://developer.mozilla.org/en/offline_resources_in_firefox -# Added by: louisremi -text/cache-manifest appcache manifest - -# What: node binary buffer format -# Why: semi-standard extension w/in the node community -# Added by: tootallnate -application/octet-stream buffer - -# What: The "protected" MP-4 formats used by iTunes. -# Why: Required for streaming music to browsers (?) -# Added by: broofa -application/mp4 m4p -audio/mp4 m4a - -# What: Music playlist format (http://en.wikipedia.org/wiki/M3U) -# Why: See https://github.com/bentomas/node-mime/pull/6 -# Added by: mjrusso -application/x-mpegURL m3u8 - -# What: Video format, Part of RFC1890 -# Why: See https://github.com/bentomas/node-mime/pull/6 -# Added by: mjrusso -video/MP2T ts - -# What: The FLAC lossless codec format -# Why: Streaming and serving FLAC audio -# Added by: jacobrask -audio/flac flac \ No newline at end of file diff --git a/node_modules/express/node_modules/qs/.gitignore b/node_modules/express/node_modules/qs/.gitignore deleted file mode 100644 index 3c3629e..0000000 --- a/node_modules/express/node_modules/qs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/express/node_modules/qs/.gitmodules b/node_modules/express/node_modules/qs/.gitmodules deleted file mode 100644 index 49e31da..0000000 --- a/node_modules/express/node_modules/qs/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "support/expresso"] - path = support/expresso - url = git://github.com/visionmedia/expresso.git -[submodule "support/should"] - path = support/should - url = git://github.com/visionmedia/should.js.git diff --git a/node_modules/express/node_modules/qs/.travis.yml b/node_modules/express/node_modules/qs/.travis.yml deleted file mode 100644 index 2c0a8f6..0000000 --- a/node_modules/express/node_modules/qs/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.4 \ No newline at end of file diff --git a/node_modules/express/node_modules/qs/History.md b/node_modules/express/node_modules/qs/History.md deleted file mode 100644 index 3eaf7df..0000000 --- a/node_modules/express/node_modules/qs/History.md +++ /dev/null @@ -1,73 +0,0 @@ - -0.4.2 / 2012-02-08 -================== - - * Fixed: ensure objects are created when appropriate not arrays [aheckmann] - -0.4.1 / 2012-01-26 -================== - - * Fixed stringify()ing numbers. Closes #23 - -0.4.0 / 2011-11-21 -================== - - * Allow parsing of an existing object (for `bodyParser()`) [jackyz] - * Replaced expresso with mocha - -0.3.2 / 2011-11-08 -================== - - * Fixed global variable leak - -0.3.1 / 2011-08-17 -================== - - * Added `try/catch` around malformed uri components - * Add test coverage for Array native method bleed-though - -0.3.0 / 2011-07-19 -================== - - * Allow `array[index]` and `object[property]` syntaxes [Aria Stewart] - -0.2.0 / 2011-06-29 -================== - - * Added `qs.stringify()` [Cory Forsyth] - -0.1.0 / 2011-04-13 -================== - - * Added jQuery-ish array support - -0.0.7 / 2011-03-13 -================== - - * Fixed; handle empty string and `== null` in `qs.parse()` [dmit] - allows for convenient `qs.parse(url.parse(str).query)` - -0.0.6 / 2011-02-14 -================== - - * Fixed; support for implicit arrays - -0.0.4 / 2011-02-09 -================== - - * Fixed `+` as a space - -0.0.3 / 2011-02-08 -================== - - * Fixed case when right-hand value contains "]" - -0.0.2 / 2011-02-07 -================== - - * Fixed "=" presence in key - -0.0.1 / 2011-02-07 -================== - - * Initial release \ No newline at end of file diff --git a/node_modules/express/node_modules/qs/Makefile b/node_modules/express/node_modules/qs/Makefile deleted file mode 100644 index e4df837..0000000 --- a/node_modules/express/node_modules/qs/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -test: - @./node_modules/.bin/mocha - -.PHONY: test \ No newline at end of file diff --git a/node_modules/express/node_modules/qs/Readme.md b/node_modules/express/node_modules/qs/Readme.md deleted file mode 100644 index db0d145..0000000 --- a/node_modules/express/node_modules/qs/Readme.md +++ /dev/null @@ -1,54 +0,0 @@ -# node-querystring - - query string parser for node supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others. - -## Installation - - $ npm install qs - -## Examples - -```js -var qs = require('qs'); - -qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com'); -// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } } - -qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}) -// => user[name]=Tobi&user[email]=tobi%40learnboost.com -``` - -## Testing - -Install dev dependencies: - - $ npm install -d - -and execute: - - $ make test - -## License - -(The MIT License) - -Copyright (c) 2010 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/express/node_modules/qs/benchmark.js b/node_modules/express/node_modules/qs/benchmark.js deleted file mode 100644 index 97e2c93..0000000 --- a/node_modules/express/node_modules/qs/benchmark.js +++ /dev/null @@ -1,17 +0,0 @@ - -var qs = require('./'); - -var times = 100000 - , start = new Date - , n = times; - -console.log('times: %d', times); - -while (n--) qs.parse('foo=bar'); -console.log('simple: %dms', new Date - start); - -var start = new Date - , n = times; - -while (n--) qs.parse('user[name][first]=tj&user[name][last]=holowaychuk'); -console.log('nested: %dms', new Date - start); \ No newline at end of file diff --git a/node_modules/express/node_modules/qs/examples.js b/node_modules/express/node_modules/qs/examples.js deleted file mode 100644 index 27617b7..0000000 --- a/node_modules/express/node_modules/qs/examples.js +++ /dev/null @@ -1,51 +0,0 @@ - -/** - * Module dependencies. - */ - -var qs = require('./'); - -var obj = qs.parse('foo'); -console.log(obj) - -var obj = qs.parse('foo=bar=baz'); -console.log(obj) - -var obj = qs.parse('users[]'); -console.log(obj) - -var obj = qs.parse('name=tj&email=tj@vision-media.ca'); -console.log(obj) - -var obj = qs.parse('users[]=tj&users[]=tobi&users[]=jane'); -console.log(obj) - -var obj = qs.parse('user[name][first]=tj&user[name][last]=holowaychuk'); -console.log(obj) - -var obj = qs.parse('users[][name][first]=tj&users[][name][last]=holowaychuk'); -console.log(obj) - -var obj = qs.parse('a=a&a=b&a=c'); -console.log(obj) - -var obj = qs.parse('user[tj]=tj&user[tj]=TJ'); -console.log(obj) - -var obj = qs.parse('user[names]=tj&user[names]=TJ&user[names]=Tyler'); -console.log(obj) - -var obj = qs.parse('user[name][first]=tj&user[name][first]=TJ'); -console.log(obj) - -var obj = qs.parse('user[0]=tj&user[1]=TJ'); -console.log(obj) - -var obj = qs.parse('user[0]=tj&user[]=TJ'); -console.log(obj) - -var obj = qs.parse('user[0]=tj&user[foo]=TJ'); -console.log(obj) - -var str = qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}); -console.log(str); \ No newline at end of file diff --git a/node_modules/express/node_modules/qs/index.js b/node_modules/express/node_modules/qs/index.js deleted file mode 100644 index d177d20..0000000 --- a/node_modules/express/node_modules/qs/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/querystring'); \ No newline at end of file diff --git a/node_modules/express/node_modules/qs/lib/querystring.js b/node_modules/express/node_modules/qs/lib/querystring.js deleted file mode 100644 index 6c72712..0000000 --- a/node_modules/express/node_modules/qs/lib/querystring.js +++ /dev/null @@ -1,264 +0,0 @@ - -/*! - * querystring - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Library version. - */ - -exports.version = '0.4.2'; - -/** - * Object#toString() ref for stringify(). - */ - -var toString = Object.prototype.toString; - -/** - * Cache non-integer test regexp. - */ - -var isint = /^[0-9]+$/; - -function promote(parent, key) { - if (parent[key].length == 0) return parent[key] = {}; - var t = {}; - for (var i in parent[key]) t[i] = parent[key][i]; - parent[key] = t; - return t; -} - -function parse(parts, parent, key, val) { - var part = parts.shift(); - // end - if (!part) { - if (Array.isArray(parent[key])) { - parent[key].push(val); - } else if ('object' == typeof parent[key]) { - parent[key] = val; - } else if ('undefined' == typeof parent[key]) { - parent[key] = val; - } else { - parent[key] = [parent[key], val]; - } - // array - } else { - var obj = parent[key] = parent[key] || []; - if (']' == part) { - if (Array.isArray(obj)) { - if ('' != val) obj.push(val); - } else if ('object' == typeof obj) { - obj[Object.keys(obj).length] = val; - } else { - obj = parent[key] = [parent[key], val]; - } - // prop - } else if (~part.indexOf(']')) { - part = part.substr(0, part.length - 1); - if (!isint.test(part) && Array.isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - // key - } else { - if (!isint.test(part) && Array.isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - } - } -} - -/** - * Merge parent key/val pair. - */ - -function merge(parent, key, val){ - if (~key.indexOf(']')) { - var parts = key.split('[') - , len = parts.length - , last = len - 1; - parse(parts, parent, 'base', val); - // optimize - } else { - if (!isint.test(key) && Array.isArray(parent.base)) { - var t = {}; - for (var k in parent.base) t[k] = parent.base[k]; - parent.base = t; - } - set(parent.base, key, val); - } - - return parent; -} - -/** - * Parse the given obj. - */ - -function parseObject(obj){ - var ret = { base: {} }; - Object.keys(obj).forEach(function(name){ - merge(ret, name, obj[name]); - }); - return ret.base; -} - -/** - * Parse the given str. - */ - -function parseString(str){ - return String(str) - .split('&') - .reduce(function(ret, pair){ - try{ - pair = decodeURIComponent(pair.replace(/\+/g, ' ')); - } catch(e) { - // ignore - } - - var eql = pair.indexOf('=') - , brace = lastBraceInKey(pair) - , key = pair.substr(0, brace || eql) - , val = pair.substr(brace || eql, pair.length) - , val = val.substr(val.indexOf('=') + 1, val.length); - - // ?foo - if ('' == key) key = pair, val = ''; - - return merge(ret, key, val); - }, { base: {} }).base; -} - -/** - * Parse the given query `str` or `obj`, returning an object. - * - * @param {String} str | {Object} obj - * @return {Object} - * @api public - */ - -exports.parse = function(str){ - if (null == str || '' == str) return {}; - return 'object' == typeof str - ? parseObject(str) - : parseString(str); -}; - -/** - * Turn the given `obj` into a query string - * - * @param {Object} obj - * @return {String} - * @api public - */ - -var stringify = exports.stringify = function(obj, prefix) { - if (Array.isArray(obj)) { - return stringifyArray(obj, prefix); - } else if ('[object Object]' == toString.call(obj)) { - return stringifyObject(obj, prefix); - } else if ('string' == typeof obj) { - return stringifyString(obj, prefix); - } else { - return prefix + '=' + obj; - } -}; - -/** - * Stringify the given `str`. - * - * @param {String} str - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyString(str, prefix) { - if (!prefix) throw new TypeError('stringify expects an object'); - return prefix + '=' + encodeURIComponent(str); -} - -/** - * Stringify the given `arr`. - * - * @param {Array} arr - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyArray(arr, prefix) { - var ret = []; - if (!prefix) throw new TypeError('stringify expects an object'); - for (var i = 0; i < arr.length; i++) { - ret.push(stringify(arr[i], prefix + '[]')); - } - return ret.join('&'); -} - -/** - * Stringify the given `obj`. - * - * @param {Object} obj - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyObject(obj, prefix) { - var ret = [] - , keys = Object.keys(obj) - , key; - - for (var i = 0, len = keys.length; i < len; ++i) { - key = keys[i]; - ret.push(stringify(obj[key], prefix - ? prefix + '[' + encodeURIComponent(key) + ']' - : encodeURIComponent(key))); - } - - return ret.join('&'); -} - -/** - * Set `obj`'s `key` to `val` respecting - * the weird and wonderful syntax of a qs, - * where "foo=bar&foo=baz" becomes an array. - * - * @param {Object} obj - * @param {String} key - * @param {String} val - * @api private - */ - -function set(obj, key, val) { - var v = obj[key]; - if (undefined === v) { - obj[key] = val; - } else if (Array.isArray(v)) { - v.push(val); - } else { - obj[key] = [v, val]; - } -} - -/** - * Locate last brace in `str` within the key. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function lastBraceInKey(str) { - var len = str.length - , brace - , c; - for (var i = 0; i < len; ++i) { - c = str[i]; - if (']' == c) brace = false; - if ('[' == c) brace = true; - if ('=' == c && !brace) return i; - } -} diff --git a/node_modules/express/node_modules/qs/package.json b/node_modules/express/node_modules/qs/package.json deleted file mode 100644 index 68dd5a6..0000000 --- a/node_modules/express/node_modules/qs/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "qs", - "description": "querystring parser", - "version": "0.4.2", - "repository": { - "type" : "git", - "url" : "git://github.com/visionmedia/node-querystring.git" - }, - "devDependencies": { - "mocha": "*" - , "should": "*" - }, - "author": "TJ Holowaychuk (http://tjholowaychuk.com)", - "main": "index", - "engines": { "node": "*" } -} \ No newline at end of file diff --git a/node_modules/express/node_modules/qs/test/mocha.opts b/node_modules/express/node_modules/qs/test/mocha.opts deleted file mode 100644 index 521cbb2..0000000 --- a/node_modules/express/node_modules/qs/test/mocha.opts +++ /dev/null @@ -1,2 +0,0 @@ ---require should ---ui exports diff --git a/node_modules/express/node_modules/qs/test/parse.js b/node_modules/express/node_modules/qs/test/parse.js deleted file mode 100644 index f219e27..0000000 --- a/node_modules/express/node_modules/qs/test/parse.js +++ /dev/null @@ -1,167 +0,0 @@ - -/** - * Module dependencies. - */ - -var qs = require('../'); - -module.exports = { - 'test basics': function(){ - qs.parse('0=foo').should.eql({ '0': 'foo' }); - - qs.parse('foo=c++') - .should.eql({ foo: 'c ' }); - - qs.parse('a[>=]=23') - .should.eql({ a: { '>=': '23' }}); - - qs.parse('a[<=>]==23') - .should.eql({ a: { '<=>': '=23' }}); - - qs.parse('a[==]=23') - .should.eql({ a: { '==': '23' }}); - - qs.parse('foo') - .should.eql({ foo: '' }); - - qs.parse('foo=bar') - .should.eql({ foo: 'bar' }); - - qs.parse('foo%3Dbar=baz') - .should.eql({ foo: 'bar=baz' }); - - qs.parse(' foo = bar = baz ') - .should.eql({ ' foo ': ' bar = baz ' }); - - qs.parse('foo=bar=baz') - .should.eql({ foo: 'bar=baz' }); - - qs.parse('foo=bar&bar=baz') - .should.eql({ foo: 'bar', bar: 'baz' }); - - qs.parse('foo=bar&baz') - .should.eql({ foo: 'bar', baz: '' }); - - qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World') - .should.eql({ - cht: 'p3' - , chd: 't:60,40' - , chs: '250x100' - , chl: 'Hello|World' - }); - }, - - 'test nesting': function(){ - qs.parse('ops[>=]=25') - .should.eql({ ops: { '>=': '25' }}); - - qs.parse('user[name]=tj') - .should.eql({ user: { name: 'tj' }}); - - qs.parse('user[name][first]=tj&user[name][last]=holowaychuk') - .should.eql({ user: { name: { first: 'tj', last: 'holowaychuk' }}}); - }, - - 'test escaping': function(){ - qs.parse('foo=foo%20bar') - .should.eql({ foo: 'foo bar' }); - }, - - 'test arrays': function(){ - qs.parse('images[]') - .should.eql({ images: [] }); - - qs.parse('user[]=tj') - .should.eql({ user: ['tj'] }); - - qs.parse('user[]=tj&user[]=tobi&user[]=jane') - .should.eql({ user: ['tj', 'tobi', 'jane'] }); - - qs.parse('user[names][]=tj&user[names][]=tyler') - .should.eql({ user: { names: ['tj', 'tyler'] }}); - - qs.parse('user[names][]=tj&user[names][]=tyler&user[email]=tj@vision-media.ca') - .should.eql({ user: { names: ['tj', 'tyler'], email: 'tj@vision-media.ca' }}); - - qs.parse('items=a&items=b') - .should.eql({ items: ['a', 'b'] }); - - qs.parse('user[names]=tj&user[names]=holowaychuk&user[names]=TJ') - .should.eql({ user: { names: ['tj', 'holowaychuk', 'TJ'] }}); - - qs.parse('user[name][first]=tj&user[name][first]=TJ') - .should.eql({ user: { name: { first: ['tj', 'TJ'] }}}); - - var o = qs.parse('existing[fcbaebfecc][name][last]=tj') - o.should.eql({ existing: { 'fcbaebfecc': { name: { last: 'tj' }}}}) - Array.isArray(o.existing).should.be.false; - }, - - 'test right-hand brackets': function(){ - qs.parse('pets=["tobi"]') - .should.eql({ pets: '["tobi"]' }); - - qs.parse('operators=[">=", "<="]') - .should.eql({ operators: '[">=", "<="]' }); - - qs.parse('op[>=]=[1,2,3]') - .should.eql({ op: { '>=': '[1,2,3]' }}); - - qs.parse('op[>=]=[1,2,3]&op[=]=[[[[1]]]]') - .should.eql({ op: { '>=': '[1,2,3]', '=': '[[[[1]]]]' }}); - }, - - 'test duplicates': function(){ - qs.parse('items=bar&items=baz&items=raz') - .should.eql({ items: ['bar', 'baz', 'raz'] }); - }, - - 'test empty': function(){ - qs.parse('').should.eql({}); - qs.parse(undefined).should.eql({}); - qs.parse(null).should.eql({}); - }, - - 'test arrays with indexes': function(){ - qs.parse('foo[0]=bar&foo[1]=baz').should.eql({ foo: ['bar', 'baz'] }); - qs.parse('foo[1]=bar&foo[0]=baz').should.eql({ foo: ['baz', 'bar'] }); - qs.parse('foo[base64]=RAWR').should.eql({ foo: { base64: 'RAWR' }}); - qs.parse('foo[64base]=RAWR').should.eql({ foo: { '64base': 'RAWR' }}); - }, - - 'test arrays becoming objects': function(){ - qs.parse('foo[0]=bar&foo[bad]=baz').should.eql({ foo: { 0: "bar", bad: "baz" }}); - qs.parse('foo[bad]=baz&foo[0]=bar').should.eql({ foo: { 0: "bar", bad: "baz" }}); - }, - - 'test bleed-through of Array native properties/methods': function(){ - Array.prototype.protoProperty = true; - Array.prototype.protoFunction = function () {}; - qs.parse('foo=bar').should.eql({ foo: 'bar' }); - }, - - 'test malformed uri': function(){ - qs.parse('{%:%}').should.eql({ '{%:%}': '' }); - qs.parse('foo=%:%}').should.eql({ 'foo': '%:%}' }); - }, - - 'test semi-parsed': function(){ - qs.parse({ 'user[name]': 'tobi' }) - .should.eql({ user: { name: 'tobi' }}); - - qs.parse({ 'user[name]': 'tobi', 'user[email][main]': 'tobi@lb.com' }) - .should.eql({ user: { name: 'tobi', email: { main: 'tobi@lb.com' } }}); - } - - // 'test complex': function(){ - // qs.parse('users[][name][first]=tj&users[foo]=bar') - // .should.eql({ - // users: [ { name: 'tj' }, { name: 'tobi' }, { foo: 'bar' }] - // }); - // - // qs.parse('users[][name][first]=tj&users[][name][first]=tobi') - // .should.eql({ - // users: [ { name: 'tj' }, { name: 'tobi' }] - // }); - // } -}; diff --git a/node_modules/express/node_modules/qs/test/stringify.js b/node_modules/express/node_modules/qs/test/stringify.js deleted file mode 100644 index c2195cb..0000000 --- a/node_modules/express/node_modules/qs/test/stringify.js +++ /dev/null @@ -1,103 +0,0 @@ - -/** - * Module dependencies. - */ - -var qs = require('../') - , should = require('should') - , str_identities = { - 'basics': [ - { str: 'foo=bar', obj: {'foo' : 'bar'}}, - { str: 'foo=%22bar%22', obj: {'foo' : '\"bar\"'}}, - { str: 'foo=', obj: {'foo': ''}}, - { str: 'foo=1&bar=2', obj: {'foo' : '1', 'bar' : '2'}}, - { str: 'my%20weird%20field=q1!2%22\'w%245%267%2Fz8)%3F', obj: {'my weird field': "q1!2\"'w$5&7/z8)?"}}, - { str: 'foo%3Dbaz=bar', obj: {'foo=baz': 'bar'}}, - { str: 'foo=bar&bar=baz', obj: {foo: 'bar', bar: 'baz'}} - ], - 'escaping': [ - { str: 'foo=foo%20bar', obj: {foo: 'foo bar'}}, - { str: 'cht=p3&chd=t%3A60%2C40&chs=250x100&chl=Hello%7CWorld', obj: { - cht: 'p3' - , chd: 't:60,40' - , chs: '250x100' - , chl: 'Hello|World' - }} - ], - 'nested': [ - { str: 'foo[]=bar&foo[]=quux', obj: {'foo' : ['bar', 'quux']}}, - { str: 'foo[]=bar', obj: {foo: ['bar']}}, - { str: 'foo[]=1&foo[]=2', obj: {'foo' : ['1', '2']}}, - { str: 'foo=bar&baz[]=1&baz[]=2&baz[]=3', obj: {'foo' : 'bar', 'baz' : ['1', '2', '3']}}, - { str: 'foo[]=bar&baz[]=1&baz[]=2&baz[]=3', obj: {'foo' : ['bar'], 'baz' : ['1', '2', '3']}}, - { str: 'x[y][z]=1', obj: {'x' : {'y' : {'z' : '1'}}}}, - { str: 'x[y][z][]=1', obj: {'x' : {'y' : {'z' : ['1']}}}}, - { str: 'x[y][z]=2', obj: {'x' : {'y' : {'z' : '2'}}}}, - { str: 'x[y][z][]=1&x[y][z][]=2', obj: {'x' : {'y' : {'z' : ['1', '2']}}}}, - { str: 'x[y][][z]=1', obj: {'x' : {'y' : [{'z' : '1'}]}}}, - { str: 'x[y][][z][]=1', obj: {'x' : {'y' : [{'z' : ['1']}]}}}, - { str: 'x[y][][z]=1&x[y][][w]=2', obj: {'x' : {'y' : [{'z' : '1', 'w' : '2'}]}}}, - { str: 'x[y][][v][w]=1', obj: {'x' : {'y' : [{'v' : {'w' : '1'}}]}}}, - { str: 'x[y][][z]=1&x[y][][v][w]=2', obj: {'x' : {'y' : [{'z' : '1', 'v' : {'w' : '2'}}]}}}, - { str: 'x[y][][z]=1&x[y][][z]=2', obj: {'x' : {'y' : [{'z' : '1'}, {'z' : '2'}]}}}, - { str: 'x[y][][z]=1&x[y][][w]=a&x[y][][z]=2&x[y][][w]=3', obj: {'x' : {'y' : [{'z' : '1', 'w' : 'a'}, {'z' : '2', 'w' : '3'}]}}}, - { str: 'user[name][first]=tj&user[name][last]=holowaychuk', obj: { user: { name: { first: 'tj', last: 'holowaychuk' }}}} - ], - 'errors': [ - { obj: 'foo=bar', message: 'stringify expects an object' }, - { obj: ['foo', 'bar'], message: 'stringify expects an object' } - ], - 'numbers': [ - { str: 'limit[]=1&limit[]=2&limit[]=3', obj: { limit: [1, 2, '3'] }}, - { str: 'limit=1', obj: { limit: 1 }} - ] - }; - - -// Assert error -function err(fn, msg){ - var err; - try { - fn(); - } catch (e) { - should.equal(e.message, msg); - return; - } - throw new Error('no exception thrown, expected "' + msg + '"'); -} - -function test(type) { - var str, obj; - for (var i = 0; i < str_identities[type].length; i++) { - str = str_identities[type][i].str; - obj = str_identities[type][i].obj; - qs.stringify(obj).should.eql(str); - } -} - -module.exports = { - 'test basics': function() { - test('basics'); - }, - - 'test escaping': function() { - test('escaping'); - }, - - 'test nested': function() { - test('nested'); - }, - - 'test numbers': function(){ - test('numbers'); - }, - - 'test errors': function() { - var obj, message; - for (var i = 0; i < str_identities['errors'].length; i++) { - message = str_identities['errors'][i].message; - obj = str_identities['errors'][i].obj; - err(function(){ qs.stringify(obj) }, message); - } - } -}; \ No newline at end of file diff --git a/node_modules/express/package.json b/node_modules/express/package.json deleted file mode 100644 index 6e52528..0000000 --- a/node_modules/express/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "express", - "description": "Sinatra inspired web development framework", - "version": "2.4.6", - "author": "TJ Holowaychuk ", - "contributors": [ - { "name": "TJ Holowaychuk", "email": "tj@vision-media.ca" }, - { "name": "Aaron Heckmann", "email": "aaron.heckmann+github@gmail.com" }, - { "name": "Ciaran Jessup", "email": "ciaranj@gmail.com" }, - { "name": "Guillermo Rauch", "email": "rauchg@gmail.com" } - ], - "dependencies": { - "connect": ">= 1.5.2 < 2.0.0", - "mime": ">= 0.0.1", - "qs": ">= 0.3.1" - }, - "devDependencies": { - "connect-form": "0.2.1", - "ejs": "0.4.2", - "expresso": "0.7.2", - "hamljs": "0.5.1", - "jade": "0.11.0", - "stylus": "0.13.0", - "should": "0.2.1", - "express-messages": "0.0.2", - "node-markdown": ">= 0.0.1", - "connect-redis": ">= 0.0.1" - }, - "keywords": ["framework", "sinatra", "web", "rest", "restful"], - "repository": "git://github.com/visionmedia/express", - "main": "index", - "bin": { "express": "./bin/express" }, - "scripts": { - "test": "make test", - "prepublish" : "npm prune" - }, - "engines": { "node": ">= 0.4.1 < 0.5.0" } -} \ No newline at end of file diff --git a/node_modules/faceplate/.npmignore b/node_modules/faceplate/.npmignore deleted file mode 100644 index 3c3629e..0000000 --- a/node_modules/faceplate/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/faceplate/README.md b/node_modules/faceplate/README.md deleted file mode 100644 index a0ec037..0000000 --- a/node_modules/faceplate/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# faceplate - -A Node.js wrapper for Facebook authentication and API - -## Usage - -Use as a connect middleware - -```javascript -// create an express webserver -var app = require('express').createServer( - express.bodyParser(), - express.cookieParser(), - require('faceplate').middleware({ - app_id: process.env.FACEBOOK_APP_ID, - secret: process.env.FACEBOOK_SECRET, - scope: 'user_likes,user_photos,user_photo_video_tags' - }) -); - -// show friends -app.get('/friends', function(req, res) { - req.facebook.get('/me/friends', { limit: 4 }, function(friends) { - req.send('friends: ' + require('util').inspect(friends)); - }); -}); - -// use fql to show my friends using this app -app.get('/friends_using_app', function(req, res) { - req.facebook.fql('SELECT uid, name, is_app_user, pic_square FROM user WHERE uid in (SELECT uid2 FROM friend WHERE uid1 = me()) AND is_app_user = 1', function(friends_using_app) { - req.send('friends using app: ' + require('util').inspect(friends_using_app)); - }); -}); -``` - -## License - -MIT diff --git a/node_modules/faceplate/index.js b/node_modules/faceplate/index.js deleted file mode 100644 index 3778da0..0000000 --- a/node_modules/faceplate/index.js +++ /dev/null @@ -1,135 +0,0 @@ -var b64url = require('b64url'); -var crypto = require('crypto'); -var qs = require('querystring'); -var restler = require('restler'); -var util = require('util'); - -var Faceplate = function(options) { - - var self = this; - - this.options = options || {}; - this.app_id = this.options.app_id; - this.secret = this.options.secret; - - this.middleware = function() { - return function(req, res, next) { - if (req.body.signed_request) { - self.parse_signed_request(req.body.signed_request, function(token) { - req.facebook = new FaceplateSession(self, token); - next(); - }); - } else if (req.cookies["fbsr_" + self.app_id]) { - self.parse_signed_request(req.cookies["fbsr_" + self.app_id], function(token) { - req.facebook = new FaceplateSession(self, token); - next(); - }); - } else { - req.facebook = new FaceplateSession(self); - next(); - } - } - } - - this.parse_signed_request = function(signed_request, cb) { - var encoded_data = signed_request.split('.', 2); - - var sig = encoded_data[0]; - var json = b64url.decode(encoded_data[1]); - var data = JSON.parse(json); - - // check algorithm - if (!data.algorithm || (data.algorithm.toUpperCase() != 'HMAC-SHA256')) { - throw("unknown algorithm. expected HMAC-SHA256"); - } - - // check signature - var secret = self.secret; - var expected_sig = crypto.createHmac('sha256', secret).update(encoded_data[1]).digest('base64').replace(/\+/g,'-').replace(/\//g,'_').replace('=',''); - - if (sig !== expected_sig) - throw("bad signature"); - - // not logged in - if (!data.user_id) { - cb(); - return; - } - - if (data.oauth_token) { - cb(data.oauth_token); - return; - } - - if (!data.code) - throw("no oauth token and no code to get one"); - - var params = { - client_id: self.app_id, - client_secret: self.secret, - redirect_uri: '', - code: data.code - }; - - var request = restler.get('https://graph.facebook.com/oauth/access_token', { query:params }); - - request.on('fail', function(data) { - var result = JSON.parse(data); - console.log('invalid code: ' + result.error.message); - cb(); - }); - - request.on('success', function(data) { - cb(qs.parse(data).access_token); - }); - } -} - -var FaceplateSession = function(plate, token) { - - var self = this; - - this.plate = plate; - this.token = token; - - this.app = function(cb) { - self.get('/' + self.plate.app_id, function(app) { - cb(app); - }); - } - - this.me = function(cb) { - if (self.token) { - self.get('/me', function(me) { - cb(me); - }); - } else { - cb(); - } - } - - this.get = function(path, params, cb) { - if (cb === undefined) { - cb = params; - params = {}; - } - - if (self.token) - params.access_token = self.token; - - restler.get('https://graph.facebook.com' + path, { query: params }).on('complete', function(data) { - var result = JSON.parse(data); - cb(result.data ? result.data : result); - }); - } - - this.fql = function(query, cb) { - restler.get('https://api.facebook.com/method/fql.query', { query: { access_token: self.token, query:query, format:'json' } }).on('complete', function(data) { - cb(data); - }); - } -} - -module.exports.middleware = function(options) { - return new Faceplate(options).middleware(); -} diff --git a/node_modules/faceplate/node_modules/b64url/lib/b64url.js b/node_modules/faceplate/node_modules/b64url/lib/b64url.js deleted file mode 100644 index 6dbc81c..0000000 --- a/node_modules/faceplate/node_modules/b64url/lib/b64url.js +++ /dev/null @@ -1,26 +0,0 @@ -function rtrim(data, chr) { - var drop = 0 - , len = data.length - while (data.charAt(len - 1 - drop) === chr) drop++ - return data.substr(0, len - drop) -} - -module.exports.safe = function(b64data) { - return rtrim(b64data, '=').replace(/\+/g, '-').replace(/\//g, '_') -} - -module.exports.encode = function(data) { - var buf = data - if (!(data instanceof Buffer)) { - buf = new Buffer(Buffer.byteLength(data)) - buf.write(data) - } - return exports.safe(buf.toString('base64')) -} - -module.exports.decode = function(data, encoding) { - encoding = encoding === undefined ? 'utf8' : encoding - var buf = new Buffer(data.replace(/-/g, '+').replace(/_/g, '/'), 'base64') - if (!encoding) return buf - return buf.toString(encoding) -} diff --git a/node_modules/faceplate/node_modules/b64url/package.json b/node_modules/faceplate/node_modules/b64url/package.json deleted file mode 100644 index 9e3b260..0000000 --- a/node_modules/faceplate/node_modules/b64url/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "b64url", - "description": "URL safe base64 encoding/decoding.", - "version": "1.0.3", - "homepage": "https://github.com/nshah/nodejs-b64url", - "author": "Naitik Shah ", - "main": "lib/b64url", - "repository": { - "type": "git", - "url": "https://github.com/nshah/nodejs-b64url" - }, - "scripts": { "test": "./node_modules/.bin/expresso -c" }, - "devDependencies": { - "expresso": ">= 0.8.1" - }, - "engines": { "node": ">= 0.4.1" } -} diff --git a/node_modules/faceplate/node_modules/b64url/readme.md b/node_modules/faceplate/node_modules/b64url/readme.md deleted file mode 100644 index 5c38a83..0000000 --- a/node_modules/faceplate/node_modules/b64url/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -b64url -====== - -URL safe base64 encoding/decoding as described -[here](http://tools.ietf.org/html/rfc3548#section-4). - -```javascript -var encoded = b64url.encode(data) -var decoded = b64url.decode(encoded) -``` diff --git a/node_modules/faceplate/node_modules/restler/.npmignore b/node_modules/faceplate/node_modules/restler/.npmignore deleted file mode 100644 index 32943a1..0000000 --- a/node_modules/faceplate/node_modules/restler/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -*.swp -.[Dd][Ss]_store -node_modules diff --git a/node_modules/faceplate/node_modules/restler/MIT-LICENSE b/node_modules/faceplate/node_modules/restler/MIT-LICENSE deleted file mode 100644 index cc25ab4..0000000 --- a/node_modules/faceplate/node_modules/restler/MIT-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2009 Dan Webb - -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/faceplate/node_modules/restler/README.md b/node_modules/faceplate/node_modules/restler/README.md deleted file mode 100644 index 37ee3c6..0000000 --- a/node_modules/faceplate/node_modules/restler/README.md +++ /dev/null @@ -1,210 +0,0 @@ -Restler -======= - -(C) Dan Webb (dan@danwebb.net/@danwrong) 2011, Licensed under the MIT-LICENSE - -An HTTP client library for node.js (0.3 and up). Hides most of the complexity of creating and using http.Client. Very early days yet. - -**Release 2.x.x** will be dedicated to modifying how errors are handled and emitted. Currently errors are being fired as an on 'error' event but as [@ctavan](https://github.com/ctavan) pointed out on [issue #36](https://github.com/danwrong/restler/pull/36) a better approach (and more commonly in vogue now) would be to pass the error obj to the callback. - -Ths change will inevitably affect those using older < 0.2.x versions of restler. Those not ready to upgrade yet are encouraged to stay on the 0.2.x version. - -See [Version History](https://github.com/danwrong/restler/wiki/Version-History) for changes - - -Features --------- - -* Easy interface for common operations via http.request -* Automatic serialization of post data -* Automatic serialization of query string data -* Automatic deserialization of XML, JSON and YAML responses to JavaScript objects (if you have js-yaml and/or xml2js in the require path) -* Provide your own deserialization functions for other datatypes -* Automatic following of redirects -* Send files with multipart requests -* Transparently handle SSL (just specify https in the URL) -* Deals with basic auth for you, just provide username and password options -* Simple service wrapper that allows you to easily put together REST API libraries -* Transparently handle content-encoded responses (gzip, deflate) (requires node 0.6+) -* Transparently handle different content charsets via [iconv](https://github.com/bnoordhuis/node-iconv) (if available) - - -API ---- - -### request(url, options) - -Basic method to make a request of any type. The function returns a RestRequest object that emits events: - -#### events - -* `complete: function(result, response)` - emitted when the request has finished whether it was successful or not. Gets passed the response result and the response object as arguments. If some error has occurred, `result` is always instance of `Error`, otherwise it contains response data. -* `success: function(data, response)` - emitted when the request was successful. Gets passed the response data and the response object as arguments. -* `fail: function(data, response)` - emitted when the request was successful, but 4xx status code returned. Gets passed the response data and the response object as arguments. -* `error: function(err, response)` - emitted when some errors have occurred (eg. connection aborted, parse, encoding, decoding failed or some other unhandled errors). Gets passed the `Error` object and the response object (when available) as arguments. -* `abort: function()` - emitted when `request.abort()` is called. -* `2XX`, `3XX`, `4XX`, `5XX: function(data, response)` - emitted for all requests with response codes in the range (eg. `2XX` emitted for 200, 201, 203). -* actual response code: function(data, response) - emitted for every single response code (eg. 404, 201, etc). - -#### members - -* `abort([error])` Cancels request. `abort` event is emitted. `request.aborted` is set to `true`. If non-falsy `error` is passed, then `error` will be additionaly emitted (with `error` passed as a param and `error.type` is set to `"abort"`). Otherwise only `complete` event will raise. -* `retry([timeout])` Re-sends request after `timeout` ms. Pending request is aborted. -* `aborted` Determines if request was aborted. - - -### get(url, options) - -Create a GET request. - -### post(url, options) - -Create a POST request. - -### put(url, options) - -Create a PUT request. - -### del(url, options) - -Create a DELETE request. - -### head(url, options) - -Create a HEAD request. - -### json(url, data, options) - -Send json `data` via GET method. - -### postJson(url, data, options) - -Send json `data` via POST method. - - -### Parsers - -You can give any of these to the parsers option to specify how the response data is deserialized. -In case of malformed content, parsers emit `error` event. Original data returned by server is stored in `response.raw`. - -#### parsers.auto - -Checks the content-type and then uses parsers.xml, parsers.json or parsers.yaml. -If the content type isn't recognised it just returns the data untouched. - -#### parsers.json, parsers.xml, parsers.yaml - -All of these attempt to turn the response into a JavaScript object. In order to use the YAML and XML parsers you must have yaml and/or xml2js installed. - -### Options - -* `method` Request method, can be get, post, put, del. Defaults to `"get"`. -* `query` Query string variables as a javascript object, will override the querystring in the URL. Defaults to empty. -* `data` The data to be added to the body of the request. Can be a string or any object. -Note that if you want your request body to be JSON with the `Content-Type: application/json`, you need to -`JSON.stringify` your object first. Otherwise, it will be sent as `application/x-www-form-urlencoded` and encoded accordingly. -Also you can use `json()` and `postJson()` methods. -* `parser` A function that will be called on the returned data. Use any of predefined `restler.parsers`. See parsers section below. Defaults to `restler.parsers.auto`. -* `encoding` The encoding of the request body. Defaults to `"utf8"`. -* `decoding` The encoding of the response body. For a list of supported values see [Buffers](http://nodejs.org/docs/latest/api/buffers.html#buffers). Additionally accepts `"buffer"` - returns response as `Buffer`. Defaults to `"utf8"`. -* `headers` A hash of HTTP headers to be sent. Defaults to `{ 'Accept': '*/*', 'User-Agent': 'Restler for node.js' }`. -* `username` Basic auth username. Defaults to empty. -* `password` Basic auth password. Defaults to empty. -* `multipart` If set the data passed will be formated as `multipart/form-encoded`. See multipart example below. Defaults to `false`. -* `client` A http.Client instance if you want to reuse or implement some kind of connection pooling. Defaults to empty. -* `followRedirects` If set will recursively follow redirects. Defaults to `true`. - - -Example usage -------------- - -```javascript -var sys = require('util'), - rest = require('./restler'); - -rest.get('http://google.com').on('complete', function(result) { - if (result instanceof Error) { - sys.puts('Error: ' + result.message); - this.retry(5000); // try again after 5 sec - } else { - sys.puts(result); - } -}); - -rest.get('http://twaud.io/api/v1/users/danwrong.json').on('complete', function(data) { - sys.puts(data[0].message); // auto convert to object -}); - -rest.get('http://twaud.io/api/v1/users/danwrong.xml').on('complete', function(data) { - sys.puts(data[0].sounds[0].sound[0].message); // auto convert to object -}); - -rest.post('http://user:pass@service.com/action', { - data: { id: 334 }, -}).on('complete', function(data, response) { - if (response.statusCode == 201) { - // you can get at the raw response like this... - } -}); - -// multipart request sending a file and using https -rest.post('https://twaud.io/api/v1/upload.json', { - multipart: true, - username: 'danwrong', - password: 'wouldntyouliketoknow', - data: { - 'sound[message]': 'hello from restler!', - 'sound[file]': rest.file('doug-e-fresh_the-show.mp3', null, null, null, 'audio/mpeg') - } -}).on('complete', function(data) { - sys.puts(data.audio_url); -}); - -// create a service constructor for very easy API wrappers a la HTTParty... -Twitter = rest.service(function(u, p) { - this.defaults.username = u; - this.defaults.password = p; -}, { - baseURL: 'http://twitter.com' -}, { - update: function(message) { - return this.post('/statuses/update.json', { data: { status: message } }); - } -}); - -var client = new Twitter('danwrong', 'password'); -client.update('Tweeting using a Restler service thingy').on('complete', function(data) { - sys.p(data); -}); - -// post JSON -var jsonData = { id: 334 }; -rest.postJson('http://example.com/action', jsonData).on('complete', function(data, response) { - // handle response -}); - -``` - -Running the tests ------------------ -install **[nodeunit](https://github.com/caolan/nodeunit)** - -```bash -npm install nodeunit -``` - -then - -```bash -node test/all.js -``` - -or - -```bash -nodeunit test/restler.js -``` - -TODO ----- -* What do you need? Let me know or fork. diff --git a/node_modules/faceplate/node_modules/restler/bin/restler b/node_modules/faceplate/node_modules/restler/bin/restler deleted file mode 100755 index 8f112de..0000000 --- a/node_modules/faceplate/node_modules/restler/bin/restler +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env node - -require.paths.push(process.cwd()); - -var sys = require('util'), - rest = require('../lib/restler'), - repl = require('repl'); - -var replServer = repl.start(); - -var exportMethods = { - sys: sys, - rest: rest -} - -Object.keys(exportMethods).forEach(function(exportMethod) { - replServer.context[exportMethod] = exportMethods[exportMethod]; -}); - -rest.get('http://twaud.io/api/v1/7.json').on('complete', function(data, response) { - console.log(response.headers); - replServer.context.data = data; -}); \ No newline at end of file diff --git a/node_modules/faceplate/node_modules/restler/index.js b/node_modules/faceplate/node_modules/restler/index.js deleted file mode 100644 index 9b280e8..0000000 --- a/node_modules/faceplate/node_modules/restler/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/restler'); \ No newline at end of file diff --git a/node_modules/faceplate/node_modules/restler/lib/multipartform.js b/node_modules/faceplate/node_modules/restler/lib/multipartform.js deleted file mode 100644 index 215d032..0000000 --- a/node_modules/faceplate/node_modules/restler/lib/multipartform.js +++ /dev/null @@ -1,203 +0,0 @@ -var fs = require('fs'); -var sys = require('util') -exports.defaultBoundary = '48940923NODERESLTER3890457293'; - - -// This little object allows us hijack the write method via duck-typing -// and write to strings or regular streams that support the write method. -function Stream(stream) { - //If the user pases a string for stream,we initalize one to write to - if (this._isString(stream)) { - this.string = ""; - } - this.stream = stream; - -} - -Stream.prototype = { - //write to an internal String or to the Stream - write: function(data) { - if (this.string != undefined) { - this.string += data; - } else { - this.stream.write(data, "binary"); - } - }, - - //stolen from underscore.js - _isString: function(obj) { - return !!(obj === '' || (obj && obj.charCodeAt && obj.substr)); - } -} - -function File(path, filename, fileSize, encoding, contentType) { - this.path = path; - this.filename = filename || this._basename(path); - this.fileSize = fileSize; - this.encoding = encoding || "binary"; - this.contentType = contentType || 'application/octet-stream'; -} - -File.prototype = { - _basename: function(path) { - var parts = path.split(/\/|\\/); - return parts[parts.length - 1]; - } -}; - -function Data(filename, contentType, data) { - this.filename = filename; - this.contentType = contentType || 'application/octet-stream'; - this.data = data; -} - -function Part(name, value, boundary) { - this.name = name; - this.value = value; - this.boundary = boundary; -} - - -Part.prototype = { - - //returns the Content-Disposition header - header: function() { - var header; - - if (this.value.data) { - header = "Content-Disposition: form-data; name=\"" + this.name + - "\"; filename=\"" + this.value.filename + "\"\r\n" + - "Content-Type: " + this.value.contentType; - } if (this.value instanceof File) { - header = "Content-Disposition: form-data; name=\"" + this.name + - "\"; filename=\"" + this.value.filename + "\"\r\n" + - "Content-Length: " + this.value.fileSize + "\r\n" + - "Content-Type: " + this.value.contentType; - } else { - header = "Content-Disposition: form-data; name=\"" + this.name + "\""; - } - - return "--" + this.boundary + "\r\n" + header + "\r\n\r\n"; - }, - - //calculates the size of the Part - sizeOf: function() { - var valueSize; - if (this.value instanceof File) { - valueSize = this.value.fileSize; - } else if (this.value.data) { - valueSize = this.value.data.length; - } else { - valueSize = this.value.length; - } - return valueSize + this.header().length + 2; - }, - - // Writes the Part out to a writable stream that supports the write(data) method - // You can also pass in a String and a String will be returned to the callback - // with the whole Part - // Calls the callback when complete - write: function(stream, callback) { - - var self = this; - - //first write the Content-Disposition - stream.write(this.header()); - - //Now write out the body of the Part - if (this.value instanceof File) { - fs.open(this.value.path, "r", 0666, function (err, fd) { - if (err) throw err; - - var position = 0; - - (function reader () { - fs.read(fd, 1024 * 4, position, "binary", function (er, chunk) { - if (er) callback(err); - stream.write(chunk); - position += 1024 * 4; - if (chunk) reader(); - else { - stream.write("\r\n") - callback(); - fs.close(fd); - } - }); - })(); // reader() - }); - } else { - stream.write(this.value + "\r\n"); - callback(); - } - } -} - -//Renamed to MultiPartRequest from Request -function MultiPartRequest(data, boundary) { - this.encoding = 'binary'; - this.boundary = boundary || exports.defaultBoundary; - this.data = data; - this.partNames = this._partNames(); -} - -MultiPartRequest.prototype = { - _partNames: function() { - var partNames = []; - for (var name in this.data) { - partNames.push(name) - } - return partNames; - }, - - write: function(stream, callback) { - var partCount = 0, self = this; - - // wrap the stream in our own Stream object - // See the Stream function above for the benefits of this - var stream = new Stream(stream); - - // Let each part write itself out to the stream - (function writePart() { - var partName = self.partNames[partCount]; - var part = new Part(partName, self.data[partName], self.boundary); - part.write(stream, function (err) { - if (err) { - callback(err); - return; - } - partCount += 1; - if (partCount < self.partNames.length) - writePart(); - else { - stream.write('--' + self.boundary + '--' + "\r\n"); - - if (callback) callback(stream.string || ""); - } - }); - })(); - } -} - -var exportMethods = { - file: function(path, filename, fileSize, encoding, contentType) { - return new File(path, filename, fileSize, encoding, contentType) - }, - data: function(filename, contentType, data) { - return new Data(filename, contentType, data); - }, - sizeOf: function(parts, boundary) { - var totalSize = 0; - boundary = boundary || exports.defaultBoundary; - for (var name in parts) totalSize += new Part(name, parts[name], boundary).sizeOf(); - return totalSize + boundary.length + 6; - }, - write: function(stream, data, callback, boundary) { - var r = new MultiPartRequest(data, boundary); - r.write(stream, callback); - return r; - } -} - -Object.keys(exportMethods).forEach(function(exportMethod) { - exports[exportMethod] = exportMethods[exportMethod] -}) diff --git a/node_modules/faceplate/node_modules/restler/lib/restler.js b/node_modules/faceplate/node_modules/restler/lib/restler.js deleted file mode 100644 index 7842164..0000000 --- a/node_modules/faceplate/node_modules/restler/lib/restler.js +++ /dev/null @@ -1,488 +0,0 @@ -var sys = require('util'); -var http = require('http'); -var https = require('https'); -var url = require('url'); -var qs = require('querystring'); -var multipart = require('./multipartform'); -var zlib = null; -var Iconv = null; - -try { - zlib = require('zlib'); -} catch (err) {} - -try { - Iconv = require('iconv').Iconv; -} catch (err) {} - -function mixin(target, source) { - source = source || {}; - Object.keys(source).forEach(function(key) { - target[key] = source[key]; - }); - - return target; -} - -function Request(uri, options) { - this.url = url.parse(uri); - this.options = options; - this.headers = { - 'Accept': '*/*', - 'User-Agent': 'Restler for node.js', - 'Host': this.url.host - }; - - if (zlib) { - this.headers['Accept-Encoding'] = 'gzip, deflate'; - } - - mixin(this.headers, options.headers || {}); - - // set port and method defaults - if (!this.url.port) this.url.port = (this.url.protocol == 'https:') ? '443' : '80'; - if (!this.options.method) this.options.method = (this.options.data) ? 'POST' : 'GET'; - if (typeof this.options.followRedirects == 'undefined') this.options.followRedirects = true; - - // stringify query given in options of not given in URL - if (this.options.query && !this.url.query) { - if (typeof this.options.query == 'object') - this.url.query = qs.stringify(this.options.query); - else this.url.query = this.options.query; - } - - this._applyBasicAuth(); - - if (this.options.multipart) { - this.headers['Content-Type'] = 'multipart/form-data; boundary=' + multipart.defaultBoundary; - } else { - if (typeof this.options.data == 'object') { - this.options.data = qs.stringify(this.options.data); - this.headers['Content-Type'] = 'application/x-www-form-urlencoded'; - this.headers['Content-Length'] = this.options.data.length; - } - if(typeof this.options.data == 'string') { - var buffer = new Buffer(this.options.data, this.options.encoding || 'utf8'); - this.options.data = buffer; - this.headers['Content-Length'] = buffer.length; - } - } - - var proto = (this.url.protocol == 'https:') ? https : http; - - this.request = proto.request({ - host: this.url.hostname, - port: this.url.port, - path: this._fullPath(), - method: this.options.method, - headers: this.headers - }); - - this._makeRequest(); -} - -Request.prototype = new process.EventEmitter(); - -mixin(Request.prototype, { - _isRedirect: function(response) { - return ([301, 302, 303].indexOf(response.statusCode) >= 0); - }, - _fullPath: function() { - var path = this.url.pathname || '/'; - if (this.url.hash) path += this.url.hash; - if (this.url.query) path += '?' + this.url.query; - return path; - }, - _applyBasicAuth: function() { - var authParts; - - if (this.url.auth) { - authParts = this.url.auth.split(':'); - this.options.username = authParts[0]; - this.options.password = authParts[1]; - } - - if (this.options.username && this.options.password) { - var b = new Buffer([this.options.username, this.options.password].join(':')); - this.headers['Authorization'] = "Basic " + b.toString('base64'); - } - }, - _responseHandler: function(response) { - var self = this; - - if (self._isRedirect(response) && self.options.followRedirects) { - try { - self.url = url.parse(url.resolve(self.url.href, response.headers['location'])); - self._retry(); - // todo handle somehow infinite redirects - } catch(err) { - err.message = 'Failed to follow redirect: ' + err.message; - self._fireError(err, response); - } - } else { - var body = ''; - - response.setEncoding('binary'); - - response.on('data', function(chunk) { - body += chunk; - }); - - response.on('end', function() { - response.rawEncoded = body; - self._decode(new Buffer(body, 'binary'), response, function(err, body) { - if (err) { - self._fireError(err, response); - return; - } - response.raw = body; - body = self._iconv(body, response); - self._encode(body, response, function(err, body) { - if (err) { - self._fireError(err, response); - } else { - self._fireSuccess(body, response); - } - }); - }); - }); - } - }, - _decode: function(body, response, callback) { - var decoder = response.headers['content-encoding']; - if (decoder in decoders) { - decoders[decoder].call(response, body, callback); - } else { - callback(null, body); - } - }, - _iconv: function(body, response) { - if (Iconv) { - var charset = response.headers['content-type']; - if (charset) { - charset = /\bcharset=(.+)(?:;|$)/i.exec(charset); - if (charset) { - charset = charset[1].trim().toUpperCase(); - if (charset != 'UTF-8') { - try { - var iconv = new Iconv(charset, 'UTF-8//TRANSLIT//IGNORE'); - return iconv.convert(body); - } catch (err) {} - } - } - } - } - return body; - }, - _encode: function(body, response, callback) { - var self = this; - if (self.options.decoding == 'buffer') { - callback(null, body); - } else { - body = body.toString(self.options.decoding); - if (self.options.parser) { - self.options.parser.call(response, body, callback); - } else { - callback(null, body); - } - } - }, - _fireError: function(err, response) { - this.emit('error', err, response); - this.emit('complete', err, response); - }, - _fireSuccess: function(body, response) { - if (parseInt(response.statusCode) >= 400) { - this.emit('fail', body, response); - } else { - this.emit('success', body, response); - } - this.emit(response.statusCode.toString().replace(/\d{2}$/, 'XX'), body, response); - this.emit(response.statusCode.toString(), body, response); - this.emit('complete', body, response); - }, - _makeRequest: function() { - var self = this; - this.request.on('response', function(response) { - self._responseHandler(response); - }).on('error', function(err) { - if (!self.aborted) { - self._fireError(err, null); - } - }); - }, - _retry: function() { - this.request.removeAllListeners().on('error', function() {}); - if (this.request.finished) { - this.request.abort(); - } - Request.call(this, this.url.href, this.options); // reusing request object to handle recursive calls and remember listeners - this.run(); - }, - run: function() { - var self = this; - - if (this.options.multipart) { - multipart.write(this.request, this.options.data, function() { - self.request.end(); - }); - } else { - if (this.options.data) { - this.request.write(this.options.data.toString(), this.options.encoding || 'utf8'); - } - this.request.end(); - } - - return this; - }, - abort: function(err) { - var self = this; - - if (err) { - if (typeof err == 'string') { - err = new Error(err); - } else if (!(err instanceof Error)) { - err = new Error('AbortError'); - } - err.type = 'abort'; - } else { - err = null; - } - - self.request.on('close', function() { - if (err) { - self._fireError(err, null); - } else { - self.emit('complete', null, null); - } - }); - - self.aborted = true; - self.request.abort(); - self.emit('abort', err); - return this; - }, - retry: function(timeout) { - var self = this; - timeout = parseInt(timeout); - var fn = self._retry.bind(self); - if (!isFinite(timeout) || timeout <= 0) { - process.nextTick(fn, timeout); - } else { - setTimeout(fn, timeout); - } - return this; - } -}); - -function shortcutOptions(options, method) { - options = options || {}; - options.method = method; - options.parser = (typeof options.parser !== "undefined") ? options.parser : parsers.auto; - return options; -} - -function request(url, options) { - var request = new Request(url, options); - request.on('error', function() {}); - process.nextTick(request.run.bind(request)); - return request; -} - -function get(url, options) { - return request(url, shortcutOptions(options, 'GET')); -} - -function patch(url, options) { - return request(url, shortcutOptions(options, 'PATCH')); -} - -function post(url, options) { - return request(url, shortcutOptions(options, 'POST')); -} - -function put(url, options) { - return request(url, shortcutOptions(options, 'PUT')); -} - -function del(url, options) { - return request(url, shortcutOptions(options, 'DELETE')); -} - -function head(url, options) { - return request(url, shortcutOptions(options, 'HEAD')); -} - -function json(url, data, options, method) { - options = options || {}; - options.parser = (typeof options.parser !== "undefined") ? options.parser : parsers.auto; - options.headers = options.headers || {}; - options.headers['content-type'] = 'application/json'; - options.data = JSON.stringify(data); - options.method = method || 'GET'; - return request(url, options); -} - -function postJson(url, data, options) { - return json(url, data, options, 'POST'); -} - -var parsers = { - auto: function(data, callback) { - var contentType = this.headers['content-type']; - var contentParser; - if (contentType) { - contentType = contentType.replace(/;.+/, ''); // remove all except mime type (eg. text/html; charset=UTF-8) - if (contentType in parsers.auto.matchers) { - contentParser = parsers.auto.matchers[contentType]; - } else { - // custom (vendor) mime types - var parts = contentType.match(/^([\w-]+)\/vnd((?:\.(?:[\w-]+))+)\+([\w-]+)$/i); - if (parts) { - var type = parts[1]; - var vendors = parts[2].substr(1).split('.'); - var subtype = parts[3]; - var vendorType; - while (vendors.pop() && !(vendorType in parsers.auto.matchers)) { - vendorType = vendors.length - ? type + '/vnd.' + vendors.join('.') + '+' + subtype - : vendorType = type + '/' + subtype; - } - contentParser = parsers.auto.matchers[vendorType]; - } - } - } - if (typeof contentParser == 'function') { - contentParser.call(this, data, callback); - } else { - callback(null, data); - } - }, - json: function(data, callback) { - if (data && data.length) { - try { - callback(null, JSON.parse(data)); - } catch (err) { - err.message = 'Failed to parse JSON body: ' + err.message; - callback(err, null); - } - } else { - callback(null, null); - } - } -}; - -parsers.auto.matchers = { - 'application/json': parsers.json -}; - -try { - var yaml = require('yaml'); - - parsers.yaml = function(data, callback) { - if (data) { - try { - callback(null, yaml.eval(data)); - } catch (err) { - err.message = 'Failed to parse YAML body: ' + err.message; - callback(err, null); - } - } else { - callback(null, null); - } - }; - - parsers.auto.matchers['application/yaml'] = parsers.yaml; -} catch(e) {} - -try { - var xml2js = require('xml2js'); - - parsers.xml = function(data, callback) { - if (data) { - var parser = new xml2js.Parser(); - parser.parseString(data, function(err, data) { - if (err) { - err.message = 'Failed to parse XML body: ' + err.message; - } - callback(err, data); - }); - } else { - callback(null, null); - } - }; - - parsers.auto.matchers['application/xml'] = parsers.xml; -} catch(e) { } - -var decoders = { - gzip: function(buf, callback) { - zlib.gunzip(buf, callback); - }, - deflate: function(buf, callback) { - zlib.inflate(buf, callback); - } -}; - - -function Service(defaults) { - if (defaults.baseURL) { - this.baseURL = defaults.baseURL; - delete defaults.baseURL; - } - - this.defaults = defaults; -} - -mixin(Service.prototype, { - request: function(path, options) { - return request(this._url(path), this._withDefaults(options)); - }, - get: function(path, options) { - return get(this._url(path), this._withDefaults(options)); - }, - patch: function(path, options) { - return patch(this._url(path), this._withDefaults(options)); - }, - put: function(path, options) { - return put(this._url(path), this._withDefaults(options)); - }, - post: function(path, options) { - return post(this._url(path), this._withDefaults(options)); - }, - del: function(path, options) { - return del(this._url(path), this._withDefaults(options)); - }, - _url: function(path) { - if (this.baseURL) return url.resolve(this.baseURL, path); - else return path; - }, - _withDefaults: function(options) { - var o = mixin({}, this.defaults); - return mixin(o, options); - } -}); - -function service(constructor, defaults, methods) { - constructor.prototype = new Service(defaults || {}); - mixin(constructor.prototype, methods); - return constructor; -} - -mixin(exports, { - Request: Request, - Service: Service, - request: request, - service: service, - get: get, - patch: patch, - post: post, - put: put, - del: del, - head: head, - json: json, - postJson: postJson, - parsers: parsers, - file: multipart.file, - data: multipart.data -}); diff --git a/node_modules/faceplate/node_modules/restler/package.json b/node_modules/faceplate/node_modules/restler/package.json deleted file mode 100644 index f68449b..0000000 --- a/node_modules/faceplate/node_modules/restler/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "restler", - "version": "2.0.0", - "description": "An HTTP client library for node.js", - "contributors": [{ "name": "Dan Webb", "email": "dan@danwebb.net" }], - "homepage": "https://github.com/danwrong/restler", - "directories" : { "lib" : "./lib" }, - "main" : "./lib/restler", - "engines": { "node": ">= 0.6.x" }, - "dependencies": { - }, - "devDependencies": { - "nodeunit": ">=0.5.0", - "xml2js" : ">=0.1.0", - "yaml" : ">=0.2.0", - "iconv": ">=1.0.0" - } -} diff --git a/node_modules/faceplate/node_modules/restler/test/all.js b/node_modules/faceplate/node_modules/restler/test/all.js deleted file mode 100644 index 12f3044..0000000 --- a/node_modules/faceplate/node_modules/restler/test/all.js +++ /dev/null @@ -1,6 +0,0 @@ - -require('./restler'); // debug -var nodeunit = require('nodeunit'); -var reporter = nodeunit.reporters['default']; -process.chdir(__dirname); -reporter.run(['restler.js']); diff --git a/node_modules/faceplate/node_modules/restler/test/restler.js b/node_modules/faceplate/node_modules/restler/test/restler.js deleted file mode 100644 index 1165f9b..0000000 --- a/node_modules/faceplate/node_modules/restler/test/restler.js +++ /dev/null @@ -1,672 +0,0 @@ - -var rest = require('../lib/restler'); -var http = require('http'); -var sys = require('util'); -var path = require('path'); -var fs = require('fs'); -var crypto = require('crypto'); -var zlib = null; -var Iconv = null; - -try { - zlib = require('zlib'); -} catch (err) {} - -try { - Iconv = require('iconv').Iconv; -} catch (err) {} - -var p = sys.inspect; - -var port = 9000; -var hostname = 'localhost'; -var host = 'http://' + hostname + ':' + port; - -var nodeunit = require('nodeunit'); -nodeunit.assert.re = function(actual, expected, message) { - new RegExp(expected).test(actual) || nodeunit.assert.fail(actual, expected, message, '~=', nodeunit.assert.re); -}; - - -function setup(response) { - return function(next) { - this.server = http.createServer(response); - this.server.listen(port, hostname, next); - }; -} - -function teardown() { - return function (next) { - this.server._handle && this.server.close(); - process.nextTick(next); - }; -} - - -function echoResponse(request, response) { - if (request.headers['x-connection-abort'] == 'true') { - request.connection.destroy(); - return; - } - var echo = []; - echo.push(request.method + ' ' + request.url + ' HTTP/' + request.httpVersion); - for (var header in request.headers) { - echo.push(header + ': ' + request.headers[header]); - } - echo.push('', ''); - echo = echo.join('\r\n'); - - request.addListener('data', function(chunk) { - echo += chunk.toString('binary'); - }); - - request.addListener('end', function() { - response.writeHead(request.headers['x-status-code'] || 200, { - 'content-type': 'text/plain', - 'content-length': echo.length, - 'request-method': request.method.toLowerCase() - }); - setTimeout(function() { - response.end(request.method == 'HEAD' ? undefined : echo); - }, request.headers['x-delay'] | 0); - }); -} - -module.exports['Basic'] = { - - setUp: setup(echoResponse), - tearDown: teardown(), - - 'Should GET': function (test) { - rest.get(host).on('complete', function(data) { - test.re(data, /^GET/, 'should be GET'); - test.done(); - }); - }, - - 'Should PATCH': function(test) { - rest.patch(host).on('complete', function(data) { - test.re(data, /^PATCH/, 'should be PATCH'); - test.done(); - }); - }, - - 'Should PUT': function(test) { - rest.put(host).on('complete', function(data) { - test.re(data, /^PUT/, 'should be PUT'); - test.done(); - }); - }, - - 'Should POST': function(test) { - rest.post(host).on('complete', function(data) { - test.re(data, /^POST/, 'should be POST'); - test.done(); - }); - }, - - 'Should DELETE': function(test) { - rest.del(host).on('complete', function(data) { - test.re(data, /^DELETE/, 'should be DELETE'); - test.done(); - }); - }, - - 'Should HEAD': function(test) { - rest.head(host).on('complete', function(data, response) { - test.equal(response.headers['request-method'], 'head', 'should be HEAD'); - test.done(); - }); - }, - - 'Should GET withouth path': function(test) { - rest.get(host).on('complete', function(data) { - test.re(data, /^GET \//, 'should hit /'); - test.done(); - }); - }, - - 'Should GET path': function(test) { - rest.get(host + '/thing').on('complete', function(data) { - test.re(data, /^GET \/thing/, 'should hit /thing'); - test.done(); - }); - }, - - 'Should preserve query string in url': function(test) { - rest.get(host + '/thing?boo=yah').on('complete', function(data) { - test.re(data, /^GET \/thing\?boo\=yah/, 'should hit /thing?boo=yah'); - test.done(); - }); - }, - - 'Should serialize query': function(test) { - rest.get(host, { query: { q: 'balls' } }).on('complete', function(data) { - test.re(data, /^GET \/\?q\=balls/, 'should hit /?q=balls'); - test.done(); - }); - }, - - 'Should POST body': function(test) { - rest.post(host, { data: 'balls' }).on('complete', function(data) { - test.re(data, /\r\n\r\nballs/, 'should have balls in the body'); - test.done(); - }); - }, - - 'Should serialize POST body': function(test) { - rest.post(host, { data: { q: 'balls' } }).on('complete', function(data) { - test.re(data, /content-type\: application\/x-www-form-urlencoded/, 'should set content-type'); - test.re(data, /content-length\: 7/, 'should set content-length'); - test.re(data, /\r\n\r\nq=balls/, 'should have balls in the body'); - test.done(); - }); - }, - - 'Should send headers': function(test) { - rest.get(host, { - headers: { 'Content-Type': 'application/json' } - }).on('complete', function(data) { - test.re(data, /content\-type\: application\/json/, 'should have "content-type" header'); - test.done(); - }); - }, - - 'Should send basic auth': function(test) { - rest.post(host, { username: 'danwrong', password: 'flange' }).on('complete', function(data) { - test.re(data, /authorization\: Basic ZGFud3Jvbmc6Zmxhbmdl/, 'should have "authorization "header'); - test.done(); - }); - }, - - 'Should send basic auth if in url': function(test) { - rest.post('http://danwrong:flange@' + hostname + ':' + port).on('complete', function(data) { - test.re(data, /authorization\: Basic ZGFud3Jvbmc6Zmxhbmdl/, 'should have "authorization" header'); - test.done(); - }); - }, - - 'Should fire 2XX and 200 events': function(test) { - test.expect(3); - rest.get(host).on('2XX', function() { - test.ok(true); - }).on('200', function() { - test.ok(true); - }).on('complete', function() { - test.ok(true); - test.done(); - }); - }, - - 'Should fire fail, 4XX and 404 events for 404': function(test) { - test.expect(4); - rest.get(host, { headers: { 'x-status-code': 404 }}).on('fail', function() { - test.ok(true); - }).on('4XX', function() { - test.ok(true); - }).on('404', function() { - test.ok(true); - }).on('complete', function() { - test.ok(true); - test.done(); - }); - }, - - 'Should fire error and complete events on connection abort': function(test) { - test.expect(2); - rest.get(host, { headers: { 'x-connection-abort': 'true' }}).on('error', function() { - test.ok(true); - }).on('complete', function() { - test.ok(true); - test.done(); - }); - }, - - 'Should correctly retry': function(test) { - var counter = 0; - rest.get(host, { headers: { 'x-connection-abort': 'true' }}).on('complete', function() { - if (++counter < 3) { - this.retry(10); - } else { - test.ok(true); - test.done(); - } - }); - }, - - 'Should correctly retry after abort': function(test) { - var counter = 0; - rest.get(host).on('complete', function() { - if (++counter < 3) { - this.retry().abort(); - } else { - test.ok(true); - test.done(); - } - }).abort(); - }, - - 'Should correctly retry while pending': function(test) { - var counter = 0, request; - function command() { - var args = [].slice.call(arguments); - var method = args.shift(); - method && setTimeout(function() { - request[method](); - command.apply(null, args); - }, 50); - } - - request = rest.get(host, { headers: { 'x-delay': '1000' } }).on('complete', function() { - if (++counter < 3) { - command('retry', 'abort'); - } else { - test.ok(true); - test.done(); - } - }); - command('abort'); - } - -}; - -module.exports['Multipart'] = { - - setUp: setup(echoResponse), - tearDown: teardown(), - - 'Test multipart request with simple vars': function(test) { - rest.post(host, { - data: { a: 1, b: 'thing' }, - multipart: true - }).on('complete', function(data) { - test.re(data, /content-type\: multipart\/form-data/, 'should set "content-type" header') - test.re(data, /name="a"(\s)+1/, 'should send a=1'); - test.re(data, /name="b"(\s)+thing/, 'should send b=thing'); - test.done(); - }); - } - -}; - - -function dataResponse(request, response) { - switch (request.url) { - case '/json': - response.writeHead(200, { 'content-type': 'application/json' }); - response.end('{ "ok": true }'); - break; - case '/xml': - response.writeHead(200, { 'content-type': 'application/xml' }); - response.end('true'); - break; - case '/yaml': - response.writeHead(200, { 'content-type': 'application/yaml' }); - response.end('ok: true'); - break; - case '/gzip': - response.writeHead(200, { 'content-encoding': 'gzip' }); - response.end(Buffer('H4sIAAAAAAAAA0vOzy0oSi0uTk1RSEksSUweHFwADdgOgJYAAAA=', 'base64')); - break; - case '/deflate': - response.writeHead(200, { 'content-encoding': 'deflate' }); - response.end(Buffer('eJxLzs8tKEotLk5NUUhJLElMHhxcAI9GO1c=', 'base64')); - break; - case '/truth': - response.writeHead(200, { - 'content-encoding': 'deflate', - 'content-type': 'application/json' - }); - response.end(Buffer('eJw1i0sKgDAQQ++S9Sj+cDFXEReCoy2UCv0oIt7dEZEsEvKSC4eZErjoCTaCr5uQjICHilQjYfLxkAD+g/IN3BCcXXT3GSF7u0uI2vjs3HubwW1ZdwRRcCZj/QpOIcv9ACXbJLo=', 'base64')); - break; - case '/binary': - response.writeHead(200); - response.end(Buffer([9, 30, 64, 135, 200])); - break; - case '/push-json': - var echo = ''; - request.addListener('data', function(chunk) { - echo += chunk.toString('binary'); - }); - request.addListener('end', function() { - response.writeHead(200, { - 'content-type': 'application/json' - }); - response.end(JSON.stringify(JSON.parse(echo))); - }); - break; - case '/custom-mime': - response.writeHead(200, { - 'content-type': 'application/vnd.github.beta.raw+json; charset=UTF-8' - }); - response.end(JSON.stringify([6,6,6])); - break; - case '/mal-json': - response.writeHead(200, { 'content-type': 'application/json' }); - response.end('Чебурашка'); - break; - case '/mal-xml': - response.writeHead(200, { 'content-type': 'application/xml' }); - response.end('Чебурашка'); - break; - case '/mal-yaml': - response.writeHead(200, { 'content-type': 'application/yaml' }); - response.end('{Чебурашка'); - break; - case '/abort': - setTimeout(function() { - response.writeHead(200); - response.end('not aborted'); - }, 100); - break; - case '/charset': - response.writeHead(200, { - 'content-type': 'text/plain; charset=windows-1251' - }); - response.end(Buffer('e0e1e2e3e4e5b8e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff', 'hex')); - break; - default: - response.writeHead(404); - response.end(); - } -} - -module.exports['Deserialization'] = { - - setUp: setup(dataResponse), - tearDown: teardown(), - - 'Should parse JSON': function(test) { - rest.get(host + '/json').on('complete', function(data) { - test.equal(data.ok, true, 'returned: ' + p(data)); - test.done(); - }); - }, - - 'Should parse XML': function(test) { - rest.get(host + '/xml').on('complete', function(data, response) { - test.equal(data.ok, 'true', 'returned: ' + response.raw + ' || ' + p(data)); - test.done(); - }); - }, - - 'Should parse YAML': function(test) { - rest.get(host + '/yaml').on('complete', function(data) { - test.equal(data.ok, true, 'returned: ' + p(data)); - test.done(); - }); - }, - - 'Should gunzip': function(test) { - if (zlib) { - rest.get(host + '/gzip').on('complete', function(data) { - test.re(data, /^(compressed data){10}$/, 'returned: ' + p(data)); - test.done(); - }); - } else { - test.done(); - } - }, - - 'Should inflate': function(test) { - if (zlib) { - rest.get(host + '/deflate').on('complete', function(data) { - test.re(data, /^(compressed data){10}$/, 'returned: ' + p(data)); - test.done(); - }) - } else { - test.done(); - } - }, - - 'Should decode and parse': function(test) { - if (zlib) { - rest.get(host + '/truth').on('complete', function(data) { - try { - with (data) { - var result = what + (is + the + answer + to + life + the + universe + and + everything).length; - } - test.equal(result, 42, 'returned: ' + p(data)); - } catch (err) { - test.ok(false, 'returned: ' + p(data)); - } - test.done(); - }) - } else { - test.done(); - } - }, - - 'Should decode as buffer': function(test) { - rest.get(host + '/binary', { decoding: 'buffer' }).on('complete', function(data) { - test.ok(data instanceof Buffer, 'should be buffer'); - test.equal(data.toString('base64'), 'CR5Ah8g=', 'returned: ' + p(data)); - test.done(); - }) - }, - - 'Should decode as binary': function(test) { - rest.get(host + '/binary', { decoding: 'binary' }).on('complete', function(data) { - test.ok(typeof data == 'string', 'should be string: ' + p(data)); - test.equal(data, '\t\u001e@‡È', 'returned: ' + p(data)); - test.done(); - }) - }, - - 'Should decode as base64': function(test) { - rest.get(host + '/binary', { decoding: 'base64' }).on('complete', function(data) { - test.ok(typeof data == 'string', 'should be string: ' + p(data)); - test.equal(data, 'CR5Ah8g=', 'returned: ' + p(data)); - test.done(); - }) - }, - - 'Should post and parse JSON': function(test) { - var obj = { secret : 'very secret string' }; - rest.post(host + '/push-json', { - headers: { - 'content-type': 'application/json' - }, - data: JSON.stringify(obj) - }).on('complete', function(data) { - test.equal(obj.secret, data.secret, 'returned: ' + p(data)); - test.done(); - }) - }, - - 'Should post and parse JSON via shortcut method': function(test) { - var obj = { secret : 'very secret string' }; - rest.postJson(host + '/push-json', obj).on('complete', function(data) { - test.equal(obj.secret, data.secret, 'returned: ' + p(data)); - test.done(); - }); - }, - - 'Should understand custom mime-type': function(test) { - rest.parsers.auto.matchers['application/vnd.github+json'] = function(data, callback) { - rest.parsers.json.call(this, data, function(err, data) { - err || (data.__parsedBy__ = 'github'); - callback(err, data); - }); - }; - rest.get(host + '/custom-mime').on('complete', function(data) { - test.expect(3); - test.ok(Array.isArray(data), 'should be array, returned: ' + p(data)); - test.equal(data.join(''), '666', 'should be [6,6,6], returned: ' + p(data)); - test.equal(data.__parsedBy__, 'github', 'should use vendor-specific parser, returned: ' + p(data.__parsedBy__)); - test.done(); - }); - }, - - 'Should correctly soft-abort request': function(test) { - test.expect(4); - rest.get(host + '/abort').on('complete', function(data) { - test.equal(data, null, 'data should be null'); - test.equal(this.aborted, true, 'should be aborted'); - test.done(); - }).on('error', function(err) { - test.ok(false, 'should not emit error event'); - }).on('abort', function(err) { - test.equal(err, null, 'err should be null'); - test.equal(this.aborted, true, 'should be aborted'); - }).on('success', function() { - test.ok(false, 'should not emit success event'); - }).on('fail', function() { - test.ok(false, 'should not emit fail event'); - }).abort(); - }, - - 'Should correctly hard-abort request': function(test) { - test.expect(4); - rest.get(host + '/abort').on('complete', function(data) { - test.ok(data instanceof Error, 'should be error, got: ' + p(data)); - test.equal(this.aborted, true, 'should be aborted'); - test.done(); - }).on('error', function(err) { - test.ok(err instanceof Error, 'should be error, got: ' + p(err)); - }).on('abort', function(err) { - test.equal(this.aborted, true, 'should be aborted'); - }).on('success', function() { - test.ok(false, 'should not emit success event'); - }).on('fail', function() { - test.ok(false, 'should not emit fail event'); - }).abort(true); - }, - - 'Should correctly handle malformed JSON': function(test) { - test.expect(4); - rest.get(host + '/mal-json').on('complete', function(data, response) { - test.ok(data instanceof Error, 'should be instanceof Error, got: ' + p(data)); - test.re(data.message, /^Failed to parse/, 'should contain "Failed to parse", got: ' + p(data.message)); - test.equal(response.raw, 'Чебурашка', 'should be "Чебурашка", got: ' + p(response.raw)); - test.done(); - }).on('error', function(err) { - test.ok(err instanceof Error, 'should be instanceof Error, got: ' + p(err)); - }).on('success', function() { - test.ok(false, 'should not have got here'); - }).on('fail', function() { - test.ok(false, 'should not have got here'); - }); - }, - - 'Should correctly handle malformed XML': function(test) { - test.expect(4); - rest.get(host + '/mal-xml').on('complete', function(data, response) { - test.ok(data instanceof Error, 'should be instanceof Error, got: ' + p(data)); - test.re(data.message, /^Failed to parse/, 'should contain "Failed to parse", got: ' + p(data.message)); - test.equal(response.raw, 'Чебурашка', 'should be "Чебурашка", got: ' + p(response.raw)); - test.done(); - }).on('error', function(err) { - test.ok(err instanceof Error, 'should be instanceof Error, got: ' + p(err)); - }).on('success', function() { - test.ok(false, 'should not have got here'); - }).on('fail', function() { - test.ok(false, 'should not have got here'); - }); - }, - - 'Should correctly handle malformed YAML': function(test) { - test.expect(4); - rest.get(host + '/mal-yaml').on('complete', function(data, response) { - test.ok(data instanceof Error, 'should be instanceof Error, got: ' + p(data)); - test.re(data.message, /^Failed to parse/, 'should contain "Failed to parse", got: ' + p(data.message)); - test.equal(response.raw, '{Чебурашка', 'should be "{Чебурашка", got: ' + p(response.raw)); - test.done(); - }).on('error', function(err) { - test.ok(err instanceof Error, 'should be instanceof Error, got: ' + p(err)); - }).on('success', function() { - test.ok(false, 'should not have got here'); - }).on('fail', function() { - test.ok(false, 'should not have got here'); - }); - } - -}; - -if (Iconv) { - module.exports['Deserialization']['Should correctly convert charsets '] = function(test) { - rest.get(host + '/charset').on('complete', function(data) { - test.equal(data, 'абвгдеёжзийклмнопрстуфхцчшщъыьэюя'); - test.done(); - }); - }; -} - - -function redirectResponse(request, response) { - if (request.url == '/redirected') { - response.writeHead(200, { 'content-type': 'text/plain' }); - response.end('redirected'); - } else if (request.url == '/') { - response.writeHead(301, { - 'location': host + '/' + (request.headers['x-redirects'] ? '1' : 'redirected') - }); - response.end('redirect'); - } else { - var count = parseInt(request.url.substr(1)); - var max = parseInt(request.headers['x-redirects']); - response.writeHead(count < max ? 301 : 200, { - 'location': host + '/' + (count + 1) - }); - response.end(count.toString(10)); - } -} - -module.exports['Redirect'] = { - - setUp: setup(redirectResponse), - tearDown: teardown(), - - 'Should follow redirects': function(test) { - rest.get(host).on('complete', function(data) { - test.equal(data, 'redirected', 'returned: ' + p(data)); - test.done(); - }); - }, - - 'Should follow multiple redirects': function(test) { - rest.get(host, { - headers: { 'x-redirects': '5' } - }).on('complete', function(data) { - test.equal(data, '5', 'returned: ' + p(data)); - test.done(); - }); - } - -}; - - -function contentLengthResponse(request, response) { - response.writeHead(200, { 'content-type': 'text/plain' }); - if ('content-length' in request.headers) { - response.write(request.headers['content-length']); - } else { - response.write('content-length is not set'); - } - response.end(); -} - -module.exports['Content-Length'] = { - - setUp: setup(contentLengthResponse), - tearDown: teardown(), - - 'JSON content length': function(test) { - rest.post(host, { - data: JSON.stringify({ greeting: 'hello world' }) - }).on('complete', function(data) { - test.equal(26, data, 'should set content-length'); - test.done(); - }); - }, - - 'JSON multibyte content length': function (test) { - rest.post(host, { - data: JSON.stringify({ greeting: 'こんにちは世界' }) - }).on('complete', function(data) { - test.equal(36, data, 'should byte-size content-length'); - test.done(); - }); - } - -}; diff --git a/node_modules/faceplate/package.json b/node_modules/faceplate/package.json deleted file mode 100644 index 97dc566..0000000 --- a/node_modules/faceplate/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "faceplate", - "version": "0.0.4", - "author": "Heroku", - "homepage": "https://github.com/heroku/faceplate", - - "description": "Wrapper for Facebook authentication and API", - - "repository": { - "type": "git", - "url": "https://github.com/heroku/faceplate" - }, - - "dependencies": { - "b64url": "1.0.3", - "restler": "2.0.0" - } -} diff --git a/node_modules/socket_manager/index.js b/node_modules/socket_manager/index.js deleted file mode 100644 index 89c596c..0000000 --- a/node_modules/socket_manager/index.js +++ /dev/null @@ -1,66 +0,0 @@ -var SocketManager = function(io) { - - this.io = io; - this.sockets = {}; - this.queues = {}; - - var manager = this; - - io.sockets.on('connection', function(socket) { - - // when a socket sends an auth message, associate it with - // that socket id - socket.on('auth', function(socket_id) { - manager.sockets[socket_id] = socket; - socket.set('socket_id', socket_id); - }); - - // clean up - socket.on('disconnect', function() { - socket.get('socket_id', function(err, socket_id) { - delete manager.sockets[socket_id]; - delete manager.queues[socket_id]; - }); - }); - - }); - - // send a message to a socket - this.send = function(socket_id, topic, message) { - - // build a queue if it doesn't exist - if (! manager.queues[socket_id]) { - manager.queues[socket_id] = []; - } - - // add this message to the socket's queue - manager.queues[socket_id].push([ topic, message ]); - - }; - - // attempt to send all queued messages to the available sockets - this.flush = function() { - - for (var socket_id in manager.queues) { - - // if a socket exists for this socket_id - if (manager.sockets[socket_id]) { - - // send all outstanding messages to the socket - manager.queues[socket_id].forEach(function(item) { - manager.sockets[socket_id].emit(item[0], item[1]); - }); - - // clear the queue - manager.queues[socket_id] = []; - } - }; - }; - - // attempt to flush the socket queues every 1000ms - setInterval(this.flush, 1000); -}; - -module.exports.create = function(io) { - return new SocketManager(io); -} From 6f933161bbe678d6d5cc5e449d62656ac24be599 Mon Sep 17 00:00:00 2001 From: Hatem Nassrat Date: Thu, 15 Nov 2012 08:43:24 -0400 Subject: [PATCH 3/4] Fix whitespace errors. --- web.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web.js b/web.js index 873a4ee..b9f31ba 100644 --- a/web.js +++ b/web.js @@ -3,7 +3,7 @@ var async = require('async') , util = require('util') , path = require('path') , http = require('http'); - + // create an express webserver var app = express(); @@ -31,7 +31,7 @@ app.configure(function(){ app.use(function(req, res, next) { res.locals.url = function(path) { return res.locals.scheme + res.locals.url_no_scheme(path); - }; + }; next(); }); app.use(function(req, res, next) { From f47833ff94ee97b921a2679172b42a791b63727d Mon Sep 17 00:00:00 2001 From: Hiro Date: Thu, 29 Nov 2012 14:48:00 -0200 Subject: [PATCH 4/4] Update faceplate --- package.json | 8 ++++---- web.js | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 47f46fa..0a7cb4e 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,11 @@ "description": "Template app for Heroku / Facebook integration, Node.js language", "dependencies": { - "async": "0.1.18", - "express": "3.0.2", + "async": "0.1.22", + "express": "3.0.3", "ejs": "0.8.3", - "faceplate": "0.0.4", - "socket.io": "*" + "faceplate": "0.4.0", + "socket.io": "0.9.11" }, "engines": { diff --git a/web.js b/web.js index b9f31ba..144e64c 100644 --- a/web.js +++ b/web.js @@ -66,22 +66,22 @@ function handle_facebook_request(req, res) { async.parallel([ function(cb) { // query 4 friends and send them to the socket for this socket id - req.facebook.get('/me/friends', { limit: 4 }, function(friends) { - req.friends = friends; + req.facebook.get('/me/friends', { limit: 4 }, function(e, friends) { + req.friends = friends.data; cb(); }); }, function(cb) { // query 16 photos and send them to the socket for this socket id - req.facebook.get('/me/photos', { limit: 16 }, function(photos) { - req.photos = photos; + req.facebook.get('/me/photos', { limit: 16 }, function(e, photos) { + req.photos = photos.data; cb(); }); }, function(cb) { // query 4 likes and send them to the socket for this socket id - req.facebook.get('/me/likes', { limit: 4 }, function(likes) { - req.likes = likes; + req.facebook.get('/me/likes', { limit: 4 }, function(e, likes) { + req.likes = likes.data; cb(); }); },