├── .gitignore ├── LICENSE.txt ├── NOTICE.TXT ├── README.md ├── common ├── basic-auth.js ├── container_name_check.js ├── digest-auth.js ├── json2xml.js ├── logger.js ├── s3-auth.js └── s3 │ ├── auth.js │ └── utils.js ├── config.json.default ├── doc ├── blob service driver api.md ├── blob service rest api.md └── cloudfoundry sample vblob node-js.md ├── drivers ├── fs │ ├── blob_fs.js │ ├── fs_ec.js │ ├── fs_gc.js │ ├── fs_gcfc.js │ ├── fs_gctmp.js │ └── index.js └── s3 │ ├── blob_s3.js │ ├── index.js │ └── s3client │ ├── auth.js │ ├── client.js │ └── utils.js ├── node_modules ├── .bin │ ├── express │ └── vows ├── express │ ├── .npmignore │ ├── History.md │ ├── LICENSE │ ├── Makefile │ ├── Readme.md │ ├── bin │ │ └── express │ ├── index.js │ ├── lib │ │ ├── express.js │ │ ├── http.js │ │ ├── https.js │ │ ├── request.js │ │ ├── response.js │ │ ├── router │ │ │ ├── collection.js │ │ │ ├── index.js │ │ │ ├── methods.js │ │ │ └── route.js │ │ ├── utils.js │ │ ├── view.js │ │ └── view │ │ │ ├── partial.js │ │ │ └── view.js │ ├── node_modules │ │ ├── connect │ │ │ ├── .npmignore │ │ │ ├── LICENSE │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── cache.js │ │ │ │ ├── connect.js │ │ │ │ ├── http.js │ │ │ │ ├── https.js │ │ │ │ ├── index.js │ │ │ │ ├── middleware │ │ │ │ │ ├── basicAuth.js │ │ │ │ │ ├── bodyParser.js │ │ │ │ │ ├── compiler.js │ │ │ │ │ ├── cookieParser.js │ │ │ │ │ ├── csrf.js │ │ │ │ │ ├── directory.js │ │ │ │ │ ├── errorHandler.js │ │ │ │ │ ├── favicon.js │ │ │ │ │ ├── limit.js │ │ │ │ │ ├── logger.js │ │ │ │ │ ├── methodOverride.js │ │ │ │ │ ├── profiler.js │ │ │ │ │ ├── query.js │ │ │ │ │ ├── responseTime.js │ │ │ │ │ ├── router.js │ │ │ │ │ ├── session.js │ │ │ │ │ ├── session │ │ │ │ │ │ ├── cookie.js │ │ │ │ │ │ ├── memory.js │ │ │ │ │ │ ├── session.js │ │ │ │ │ │ └── store.js │ │ │ │ │ ├── static.js │ │ │ │ │ ├── staticCache.js │ │ │ │ │ └── vhost.js │ │ │ │ ├── patch.js │ │ │ │ ├── public │ │ │ │ │ ├── directory.html │ │ │ │ │ ├── error.html │ │ │ │ │ ├── favicon.ico │ │ │ │ │ ├── icons │ │ │ │ │ │ ├── page.png │ │ │ │ │ │ ├── page_add.png │ │ │ │ │ │ ├── page_attach.png │ │ │ │ │ │ ├── page_code.png │ │ │ │ │ │ ├── page_copy.png │ │ │ │ │ │ ├── page_delete.png │ │ │ │ │ │ ├── page_edit.png │ │ │ │ │ │ ├── page_error.png │ │ │ │ │ │ ├── page_excel.png │ │ │ │ │ │ ├── page_find.png │ │ │ │ │ │ ├── page_gear.png │ │ │ │ │ │ ├── page_go.png │ │ │ │ │ │ ├── page_green.png │ │ │ │ │ │ ├── page_key.png │ │ │ │ │ │ ├── page_lightning.png │ │ │ │ │ │ ├── page_link.png │ │ │ │ │ │ ├── page_paintbrush.png │ │ │ │ │ │ ├── page_paste.png │ │ │ │ │ │ ├── page_red.png │ │ │ │ │ │ ├── page_refresh.png │ │ │ │ │ │ ├── page_save.png │ │ │ │ │ │ ├── page_white.png │ │ │ │ │ │ ├── page_white_acrobat.png │ │ │ │ │ │ ├── page_white_actionscript.png │ │ │ │ │ │ ├── page_white_add.png │ │ │ │ │ │ ├── page_white_c.png │ │ │ │ │ │ ├── page_white_camera.png │ │ │ │ │ │ ├── page_white_cd.png │ │ │ │ │ │ ├── page_white_code.png │ │ │ │ │ │ ├── page_white_code_red.png │ │ │ │ │ │ ├── page_white_coldfusion.png │ │ │ │ │ │ ├── page_white_compressed.png │ │ │ │ │ │ ├── page_white_copy.png │ │ │ │ │ │ ├── page_white_cplusplus.png │ │ │ │ │ │ ├── page_white_csharp.png │ │ │ │ │ │ ├── page_white_cup.png │ │ │ │ │ │ ├── page_white_database.png │ │ │ │ │ │ ├── page_white_delete.png │ │ │ │ │ │ ├── page_white_dvd.png │ │ │ │ │ │ ├── page_white_edit.png │ │ │ │ │ │ ├── page_white_error.png │ │ │ │ │ │ ├── page_white_excel.png │ │ │ │ │ │ ├── page_white_find.png │ │ │ │ │ │ ├── page_white_flash.png │ │ │ │ │ │ ├── page_white_freehand.png │ │ │ │ │ │ ├── page_white_gear.png │ │ │ │ │ │ ├── page_white_get.png │ │ │ │ │ │ ├── page_white_go.png │ │ │ │ │ │ ├── page_white_h.png │ │ │ │ │ │ ├── page_white_horizontal.png │ │ │ │ │ │ ├── page_white_key.png │ │ │ │ │ │ ├── page_white_lightning.png │ │ │ │ │ │ ├── page_white_link.png │ │ │ │ │ │ ├── page_white_magnify.png │ │ │ │ │ │ ├── page_white_medal.png │ │ │ │ │ │ ├── page_white_office.png │ │ │ │ │ │ ├── page_white_paint.png │ │ │ │ │ │ ├── page_white_paintbrush.png │ │ │ │ │ │ ├── page_white_paste.png │ │ │ │ │ │ ├── page_white_php.png │ │ │ │ │ │ ├── page_white_picture.png │ │ │ │ │ │ ├── page_white_powerpoint.png │ │ │ │ │ │ ├── page_white_put.png │ │ │ │ │ │ ├── page_white_ruby.png │ │ │ │ │ │ ├── page_white_stack.png │ │ │ │ │ │ ├── page_white_star.png │ │ │ │ │ │ ├── page_white_swoosh.png │ │ │ │ │ │ ├── page_white_text.png │ │ │ │ │ │ ├── page_white_text_width.png │ │ │ │ │ │ ├── page_white_tux.png │ │ │ │ │ │ ├── page_white_vector.png │ │ │ │ │ │ ├── page_white_visualstudio.png │ │ │ │ │ │ ├── page_white_width.png │ │ │ │ │ │ ├── page_white_word.png │ │ │ │ │ │ ├── page_white_world.png │ │ │ │ │ │ ├── page_white_wrench.png │ │ │ │ │ │ ├── page_white_zip.png │ │ │ │ │ │ ├── page_word.png │ │ │ │ │ │ └── page_world.png │ │ │ │ │ └── style.css │ │ │ │ └── utils.js │ │ │ ├── node_modules │ │ │ │ └── formidable │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── Readme.md │ │ │ │ │ ├── index.js │ │ │ │ │ ├── lib │ │ │ │ │ ├── file.js │ │ │ │ │ ├── incoming_form.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── multipart_parser.js │ │ │ │ │ ├── querystring_parser.js │ │ │ │ │ └── util.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── tool │ │ │ │ │ └── record.js │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── mime │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── mime.js │ │ │ ├── package.json │ │ │ ├── test.js │ │ │ └── types │ │ │ │ ├── mime.types │ │ │ │ └── node.types │ │ ├── mkdirp │ │ │ ├── .gitignore │ │ │ ├── .gitignore.orig │ │ │ ├── .gitignore.rej │ │ │ ├── LICENSE │ │ │ ├── README.markdown │ │ │ ├── examples │ │ │ │ ├── pow.js │ │ │ │ ├── pow.js.orig │ │ │ │ └── pow.js.rej │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ ├── mkdirp.js │ │ │ │ ├── race.js │ │ │ │ └── rel.js │ │ └── qs │ │ │ ├── .gitmodules │ │ │ ├── History.md │ │ │ ├── Makefile │ │ │ ├── Readme.md │ │ │ ├── benchmark.js │ │ │ ├── examples.js │ │ │ ├── index.js │ │ │ ├── lib │ │ │ └── querystring.js │ │ │ └── package.json │ ├── package.json │ └── testing │ │ ├── index.js │ │ ├── public │ │ └── test.txt │ │ └── views │ │ ├── page.html │ │ ├── page.jade │ │ ├── test.md │ │ └── user │ │ ├── index.jade │ │ └── list.jade ├── sax │ ├── AUTHORS │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── big-not-pretty.xml │ │ ├── example.js │ │ ├── not-pretty.xml │ │ ├── pretty-print.js │ │ ├── strict.dtd │ │ ├── switch-bench.js │ │ ├── test.html │ │ └── test.xml │ ├── lib │ │ └── sax.js │ ├── package.json │ └── test │ │ ├── buffer-overrun.js │ │ ├── cdata-chunked.js │ │ ├── cdata-end-split.js │ │ ├── cdata-fake-end.js │ │ ├── cdata-multiple.js │ │ ├── cdata.js │ │ ├── index.js │ │ ├── issue-23.js │ │ ├── issue-30.js │ │ ├── issue-35.js │ │ ├── parser-position.js │ │ ├── script.js │ │ ├── self-closing-child-strict.js │ │ ├── self-closing-child.js │ │ ├── self-closing-tag.js │ │ ├── stray-ending.js │ │ ├── trailing-non-whitespace.js │ │ ├── unquoted.js │ │ ├── xmlns-issue-41.js │ │ ├── xmlns-rebinding.js │ │ ├── xmlns-strict.js │ │ ├── xmlns-unbound.js │ │ ├── xmlns-xml-default-prefix-attribute.js │ │ ├── xmlns-xml-default-prefix.js │ │ └── xmlns-xml-default-redefine.js ├── vows │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── bin │ │ └── vows │ ├── lib │ │ ├── assert │ │ │ ├── error.js │ │ │ ├── macros.js │ │ │ └── utils.js │ │ ├── vows.js │ │ └── vows │ │ │ ├── console.js │ │ │ ├── context.js │ │ │ ├── coverage │ │ │ ├── file.js │ │ │ ├── fragments │ │ │ │ ├── coverage-foot.html │ │ │ │ └── coverage-head.html │ │ │ ├── report-html.js │ │ │ ├── report-json.js │ │ │ └── report-plain.js │ │ │ ├── extras.js │ │ │ ├── reporters │ │ │ ├── dot-matrix.js │ │ │ ├── json.js │ │ │ ├── silent.js │ │ │ ├── spec.js │ │ │ ├── watch.js │ │ │ └── xunit.js │ │ │ └── suite.js │ ├── node_modules │ │ └── eyes │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── lib │ │ │ └── eyes.js │ │ │ ├── package.json │ │ │ └── test │ │ │ └── eyes-test.js │ ├── package.json │ └── test │ │ ├── assert-test.js │ │ ├── fixtures │ │ ├── isolate │ │ │ ├── failing.js │ │ │ ├── log.js │ │ │ ├── passing.js │ │ │ └── stderr.js │ │ └── supress-stdout │ │ │ └── output.js │ │ ├── isolate-test.js │ │ ├── supress-stdout-test.js │ │ ├── vows-error-test.js │ │ └── vows-test.js └── winston │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── docs │ ├── docco.css │ ├── winston.html │ └── winston │ │ ├── common.html │ │ ├── config.html │ │ ├── config │ │ ├── cli-config.html │ │ ├── npm-config.html │ │ └── syslog-config.html │ │ ├── exception.html │ │ ├── logger.html │ │ ├── transports.html │ │ └── transports │ │ ├── console.html │ │ ├── couchdb.html │ │ ├── file.html │ │ ├── loggly.html │ │ ├── transport.html │ │ └── webhook.html │ ├── examples │ ├── couchdb.js │ └── webhook-post.js │ ├── lib │ ├── winston.js │ └── winston │ │ ├── common.js │ │ ├── config.js │ │ ├── config │ │ ├── cli-config.js │ │ ├── npm-config.js │ │ └── syslog-config.js │ │ ├── container.js │ │ ├── exception.js │ │ ├── logger.js │ │ ├── transports.js │ │ └── transports │ │ ├── console.js │ │ ├── couchdb.js │ │ ├── file.js │ │ ├── loggly.js │ │ ├── transport.js │ │ └── webhook.js │ ├── node_modules │ ├── async │ │ ├── .gitmodules │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── deps │ │ │ ├── nodeunit.css │ │ │ └── nodeunit.js │ │ ├── dist │ │ │ └── async.min.js │ │ ├── index.js │ │ ├── lib │ │ │ └── async.js │ │ ├── nodelint.cfg │ │ ├── package.json │ │ └── test │ │ │ ├── .swp │ │ │ ├── test-async.js │ │ │ └── test.html │ ├── colors │ │ ├── MIT-LICENSE.txt │ │ ├── ReadMe.md │ │ ├── colors.js │ │ ├── example.html │ │ ├── example.js │ │ ├── package.json │ │ └── test.js │ ├── eyes │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── lib │ │ │ └── eyes.js │ │ ├── package.json │ │ └── test │ │ │ └── eyes-test.js │ ├── loggly │ │ ├── .npmignore │ │ ├── README.md │ │ ├── docs │ │ │ ├── docco.css │ │ │ ├── loggly.html │ │ │ └── loggly │ │ │ │ ├── common.html │ │ │ │ ├── config.html │ │ │ │ ├── core.html │ │ │ │ ├── device.html │ │ │ │ ├── facet.html │ │ │ │ ├── input.html │ │ │ │ └── search.html │ │ ├── lib │ │ │ ├── loggly.js │ │ │ └── loggly │ │ │ │ ├── common.js │ │ │ │ ├── config.js │ │ │ │ ├── core.js │ │ │ │ ├── device.js │ │ │ │ ├── facet.js │ │ │ │ ├── input.js │ │ │ │ └── search.js │ │ ├── node_modules │ │ │ ├── request │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── forever.js │ │ │ │ ├── main.js │ │ │ │ ├── mimetypes.js │ │ │ │ ├── oauth.js │ │ │ │ ├── package.json │ │ │ │ ├── tests │ │ │ │ │ ├── googledoodle.png │ │ │ │ │ ├── run.sh │ │ │ │ │ ├── server.js │ │ │ │ │ ├── ssl │ │ │ │ │ │ ├── test.crt │ │ │ │ │ │ └── test.key │ │ │ │ │ ├── test-body.js │ │ │ │ │ ├── test-cookie.js │ │ │ │ │ ├── test-cookiejar.js │ │ │ │ │ ├── test-errors.js │ │ │ │ │ ├── test-httpModule.js │ │ │ │ │ ├── test-https.js │ │ │ │ │ ├── test-oauth.js │ │ │ │ │ ├── test-pipes.js │ │ │ │ │ ├── test-proxy.js │ │ │ │ │ ├── test-redirect.js │ │ │ │ │ └── test-timeout.js │ │ │ │ ├── uuid.js │ │ │ │ └── vendor │ │ │ │ │ └── cookie │ │ │ │ │ ├── index.js │ │ │ │ │ └── jar.js │ │ │ └── timespan │ │ │ │ ├── .gitignore │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── browser │ │ │ │ ├── TimeSpan-1.2.js │ │ │ │ └── TimeSpan-1.2.min.js │ │ │ │ ├── docs │ │ │ │ ├── docco.css │ │ │ │ └── time-span.html │ │ │ │ ├── lib │ │ │ │ └── time-span.js │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ ├── date-parser-test.js │ │ │ │ ├── helpers.js │ │ │ │ └── time-span-test.js │ │ ├── package.json │ │ └── test │ │ │ ├── common-test.js │ │ │ ├── device-test.js │ │ │ ├── helpers.js │ │ │ ├── input-test.js │ │ │ ├── log-test.js │ │ │ └── search-test.js │ ├── pkginfo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── docs │ │ │ ├── docco.css │ │ │ └── pkginfo.html │ │ ├── examples │ │ │ ├── all-properties.js │ │ │ ├── array-argument.js │ │ │ ├── multiple-properties.js │ │ │ ├── object-argument.js │ │ │ ├── package.json │ │ │ └── single-property.js │ │ ├── lib │ │ │ └── pkginfo.js │ │ ├── package.json │ │ └── test │ │ │ └── pkginfo-test.js │ └── stack-trace │ │ ├── .gitignore │ │ ├── License │ │ ├── Makefile │ │ ├── Readme.md │ │ ├── lib │ │ └── stack-trace.js │ │ ├── package.json │ │ └── test │ │ ├── common.js │ │ ├── integration │ │ ├── test-get.js │ │ ├── test-long-stack-trace.js │ │ └── test-parse.js │ │ └── run.js │ ├── package.json │ └── test │ ├── cli-test.js │ ├── container-test.js │ ├── custom-timestamp-test.js │ ├── exception-test.js │ ├── fixtures │ ├── .gitkeep │ ├── keys │ │ ├── agent2-cert.pem │ │ └── agent2-key.pem │ ├── logs │ │ └── .gitkeep │ └── scripts │ │ ├── default-exceptions.js │ │ ├── exit-on-error.js │ │ ├── log-exceptions.js │ │ └── unhandle-exceptions.js │ ├── helpers.js │ ├── log-exception-test.js │ ├── logger-test.js │ ├── transports │ ├── console-test.js │ ├── couchdb-test.js │ ├── file-maxsize-test.js │ ├── file-test.js │ ├── loggly-test.js │ └── webhook-test.js │ └── winston-test.js ├── server.js └── test ├── cf_test ├── testcfbinding.js └── utils.js ├── common_test ├── testbasic.js ├── testcontainername.js ├── testcopyfile.js ├── testgetfile.js ├── testjson2xml.js ├── testlistcontainers.js ├── testlistfiles.js ├── testlistfiles2.js ├── testputfile.js └── utils.js ├── file1.txt ├── file2.txt ├── filex.dat ├── fs_test ├── testobjlimit.js ├── testquotas.js └── utils.js └── utils.js /.gitignore: -------------------------------------------------------------------------------- 1 | config.json 2 | -------------------------------------------------------------------------------- /NOTICE.TXT: -------------------------------------------------------------------------------- 1 | vBlob 1.0 2 | Copyright (c) 2012 VMware, Inc. All Rights Reserved. 3 | 4 | This product is licensed to you under the Apache License, Version 2.0 (the "License"). 5 | You may not use this product except in compliance with the License. 6 | 7 | This product may include a number of subcomponents with separate copyright notices 8 | and license terms. Your use of these subcomponents is subject to the terms and 9 | conditions of the subcomponent's license, as noted in the LICENSE file. 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /common/basic-auth.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright (c) 2011 VMware, Inc. 3 | */ 4 | 5 | var validate = function(keyID, secretID, signature) { 6 | var buff = new Buffer(keyID+":"+secretID); 7 | buff = "Basic " + buff.toString("base64"); 8 | return buff === signature; 9 | } 10 | 11 | module.exports.authenticate = function(creds, method, targets, headers, signature, resp) { 12 | var key = null; 13 | if (signature) { 14 | var sub_str = signature.substr(6); 15 | sub_str = new Buffer(sub_str || '', 'base64').toString(); 16 | if (sub_str) key = sub_str.substring(0,sub_str.indexOf(':')); 17 | } 18 | if (!key || !creds[key] || validate(key, creds[key], signature) === false) { 19 | resp.resp_code = 401; resp.resp_header = {}; resp.resp_body = {Error:{Code:"Unauthorized",Message:"Signature does not match"}}; 20 | return false; 21 | } 22 | return true; 23 | } 24 | -------------------------------------------------------------------------------- /common/container_name_check.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011 VMware, Inc. 3 | 4 | Rules: 5 | 1. no capital letters 6 | 2. starting with lower case letters or numbers 7 | 3. 3 ~ 63 chars 8 | 4. no "_" 9 | 5. no "/" 10 | 6. no ".." 11 | 7. no "-." or ".-" 12 | 8. no IP address 13 | 9. no trailing "-" 14 | */ 15 | module.exports.is_valid_name = function (name) 16 | { 17 | if (name.length < 3 || name.length > 63) { return false; } 18 | if (name.match(/\.\.|-\.|\.-|_/) !== null) { return false; } 19 | if (name.match(/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/) !== null) { return false; } 20 | if (name.match(/^[a-z0-9]/) === null) { return false; } 21 | if (name.match(/[A-Z]/) !== null) { return false; } 22 | if (name.match(/\/|\\/) !== null) { return false; } 23 | if (name.match(/-$/) !== null) { return false; } 24 | return true; 25 | }; 26 | -------------------------------------------------------------------------------- /config.json.default: -------------------------------------------------------------------------------- 1 | { 2 | "drivers": [ 3 | { 4 | "fs-1": { 5 | "type": "fs", 6 | "option": { 7 | } 8 | } 9 | }, 10 | { 11 | "s3-1": { 12 | "type": "s3", 13 | "option": { 14 | "key": "dummy", 15 | "secret": "dummy" 16 | } 17 | } 18 | } 19 | ], 20 | "port": "9981", 21 | "current_driver": "fs-1", 22 | "logtype": "winston", 23 | "logfile": "./log.txt", 24 | "keyID": "dummy", 25 | "secretID": "dummy", 26 | "auth": "disabled", 27 | "account_api" : true 28 | } 29 | 30 | -------------------------------------------------------------------------------- /drivers/fs/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011 VMware, Inc. 3 | */ 4 | module.exports.createDriver = require('./blob_fs').createDriver; 5 | -------------------------------------------------------------------------------- /drivers/s3/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011 VMware, Inc. 3 | */ 4 | module.exports.createDriver = require('./blob_s3').createDriver; 5 | -------------------------------------------------------------------------------- /node_modules/.bin/express: -------------------------------------------------------------------------------- 1 | ../express/bin/express -------------------------------------------------------------------------------- /node_modules/.bin/vows: -------------------------------------------------------------------------------- 1 | ../vows/bin/vows -------------------------------------------------------------------------------- /node_modules/express/.npmignore: -------------------------------------------------------------------------------- 1 | .git* 2 | docs/ 3 | examples/ 4 | support/ 5 | test/ 6 | testing.js 7 | .DS_Store 8 | -------------------------------------------------------------------------------- /node_modules/express/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2009-2011 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/express/Makefile: -------------------------------------------------------------------------------- 1 | 2 | DOCS = $(shell find docs/*.md) 3 | HTMLDOCS = $(DOCS:.md=.html) 4 | TESTS = $(shell find test/*.test.js) 5 | 6 | test: 7 | @NODE_ENV=test ./node_modules/.bin/expresso $(TESTS) 8 | 9 | docs: $(HTMLDOCS) 10 | @ echo "... generating TOC" 11 | @./support/toc.js docs/guide.html 12 | 13 | %.html: %.md 14 | @echo "... $< -> $@" 15 | @markdown $< \ 16 | | cat docs/layout/head.html - docs/layout/foot.html \ 17 | > $@ 18 | 19 | site: 20 | rm -fr /tmp/docs \ 21 | && cp -fr docs /tmp/docs \ 22 | && git checkout gh-pages \ 23 | && cp -fr /tmp/docs/* . \ 24 | && echo "done" 25 | 26 | docclean: 27 | rm -f docs/*.{1,html} 28 | 29 | .PHONY: site test docs docclean -------------------------------------------------------------------------------- /node_modules/express/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = require('./lib/express'); -------------------------------------------------------------------------------- /node_modules/express/lib/express.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Express 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var connect = require('connect') 13 | , HTTPSServer = require('./https') 14 | , HTTPServer = require('./http') 15 | , Route = require('./router/route') 16 | 17 | /** 18 | * Re-export connect auto-loaders. 19 | * 20 | * This prevents the need to `require('connect')` in order 21 | * to access core middleware, so for example `express.logger()` instead 22 | * of `require('connect').logger()`. 23 | */ 24 | 25 | var exports = module.exports = connect.middleware; 26 | 27 | /** 28 | * Framework version. 29 | */ 30 | 31 | exports.version = '2.5.8'; 32 | 33 | /** 34 | * Shortcut for `new Server(...)`. 35 | * 36 | * @param {Function} ... 37 | * @return {Server} 38 | * @api public 39 | */ 40 | 41 | exports.createServer = function(options){ 42 | if ('object' == typeof options) { 43 | return new HTTPSServer(options, Array.prototype.slice.call(arguments, 1)); 44 | } else { 45 | return new HTTPServer(Array.prototype.slice.call(arguments)); 46 | } 47 | }; 48 | 49 | /** 50 | * Expose constructors. 51 | */ 52 | 53 | exports.HTTPServer = HTTPServer; 54 | exports.HTTPSServer = HTTPSServer; 55 | exports.Route = Route; 56 | 57 | /** 58 | * View extensions. 59 | */ 60 | 61 | exports.View = 62 | exports.view = require('./view'); 63 | 64 | /** 65 | * Response extensions. 66 | */ 67 | 68 | require('./response'); 69 | 70 | /** 71 | * Request extensions. 72 | */ 73 | 74 | require('./request'); 75 | 76 | // Error handler title 77 | 78 | exports.errorHandler.title = 'Express'; 79 | 80 | -------------------------------------------------------------------------------- /node_modules/express/lib/https.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Express - HTTPSServer 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var connect = require('connect') 13 | , HTTPServer = require('./http') 14 | , https = require('https'); 15 | 16 | /** 17 | * Expose `HTTPSServer`. 18 | */ 19 | 20 | exports = module.exports = HTTPSServer; 21 | 22 | /** 23 | * Server proto. 24 | */ 25 | 26 | var app = HTTPSServer.prototype; 27 | 28 | /** 29 | * Initialize a new `HTTPSServer` with the 30 | * given `options`, and optional `middleware`. 31 | * 32 | * @param {Object} options 33 | * @param {Array} middleware 34 | * @api public 35 | */ 36 | 37 | function HTTPSServer(options, middleware){ 38 | connect.HTTPSServer.call(this, options, []); 39 | this.init(middleware); 40 | }; 41 | 42 | /** 43 | * Inherit from `connect.HTTPSServer`. 44 | */ 45 | 46 | app.__proto__ = connect.HTTPSServer.prototype; 47 | 48 | // mixin HTTPServer methods 49 | 50 | Object.keys(HTTPServer.prototype).forEach(function(method){ 51 | app[method] = HTTPServer.prototype[method]; 52 | }); 53 | -------------------------------------------------------------------------------- /node_modules/express/lib/router/collection.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Express - router - Collection 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Expose `Collection`. 10 | */ 11 | 12 | module.exports = Collection; 13 | 14 | /** 15 | * Initialize a new route `Collection` 16 | * with the given `router`. 17 | * 18 | * @param {Router} router 19 | * @api private 20 | */ 21 | 22 | function Collection(router) { 23 | Array.apply(this, arguments); 24 | this.router = router; 25 | } 26 | 27 | /** 28 | * Inherit from `Array.prototype`. 29 | */ 30 | 31 | Collection.prototype.__proto__ = Array.prototype; 32 | 33 | /** 34 | * Remove the routes in this collection. 35 | * 36 | * @return {Collection} of routes removed 37 | * @api public 38 | */ 39 | 40 | Collection.prototype.remove = function(){ 41 | var router = this.router 42 | , len = this.length 43 | , ret = new Collection(this.router); 44 | 45 | for (var i = 0; i < len; ++i) { 46 | if (router.remove(this[i])) { 47 | ret.push(this[i]); 48 | } 49 | } 50 | 51 | return ret; 52 | }; 53 | 54 | -------------------------------------------------------------------------------- /node_modules/express/lib/router/methods.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Express - router - methods 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Hypertext Transfer Protocol -- HTTP/1.1 10 | * http://www.ietf.org/rfc/rfc2616.txt 11 | */ 12 | 13 | var RFC2616 = ['OPTIONS', 'GET', 'POST', 'PUT', 'DELETE', 'TRACE', 'CONNECT']; 14 | 15 | /** 16 | * HTTP Extensions for Distributed Authoring -- WEBDAV 17 | * http://www.ietf.org/rfc/rfc2518.txt 18 | */ 19 | 20 | var RFC2518 = ['PROPFIND', 'PROPPATCH', 'MKCOL', 'COPY', 'MOVE', 'LOCK', 'UNLOCK']; 21 | 22 | /** 23 | * Versioning Extensions to WebDAV 24 | * http://www.ietf.org/rfc/rfc3253.txt 25 | */ 26 | 27 | var RFC3253 = ['VERSION-CONTROL', 'REPORT', 'CHECKOUT', 'CHECKIN', 'UNCHECKOUT', 'MKWORKSPACE', 'UPDATE', 'LABEL', 'MERGE', 'BASELINE-CONTROL', 'MKACTIVITY']; 28 | 29 | /** 30 | * Ordered Collections Protocol (WebDAV) 31 | * http://www.ietf.org/rfc/rfc3648.txt 32 | */ 33 | 34 | var RFC3648 = ['ORDERPATCH']; 35 | 36 | /** 37 | * Web Distributed Authoring and Versioning (WebDAV) Access Control Protocol 38 | * http://www.ietf.org/rfc/rfc3744.txt 39 | */ 40 | 41 | var RFC3744 = ['ACL']; 42 | 43 | /** 44 | * Web Distributed Authoring and Versioning (WebDAV) SEARCH 45 | * http://www.ietf.org/rfc/rfc5323.txt 46 | */ 47 | 48 | var RFC5323 = ['SEARCH']; 49 | 50 | /** 51 | * PATCH Method for HTTP 52 | * http://www.ietf.org/rfc/rfc5789.txt 53 | */ 54 | 55 | var RFC5789 = ['PATCH']; 56 | 57 | /** 58 | * Expose the methods. 59 | */ 60 | 61 | module.exports = [].concat( 62 | RFC2616 63 | , RFC2518 64 | , RFC3253 65 | , RFC3648 66 | , RFC3744 67 | , RFC5323 68 | , RFC5789).map(function(method){ 69 | return method.toLowerCase(); 70 | }); 71 | -------------------------------------------------------------------------------- /node_modules/express/lib/view/partial.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Express - view - Partial 4 | * Copyright(c) 2010 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Memory cache. 10 | */ 11 | 12 | var cache = {}; 13 | 14 | /** 15 | * Resolve partial object name from the view path. 16 | * 17 | * Examples: 18 | * 19 | * "user.ejs" becomes "user" 20 | * "forum thread.ejs" becomes "forumThread" 21 | * "forum/thread/post.ejs" becomes "post" 22 | * "blog-post.ejs" becomes "blogPost" 23 | * 24 | * @return {String} 25 | * @api private 26 | */ 27 | 28 | exports.resolveObjectName = function(view){ 29 | return cache[view] || (cache[view] = view 30 | .split('/') 31 | .slice(-1)[0] 32 | .split('.')[0] 33 | .replace(/^_/, '') 34 | .replace(/[^a-zA-Z0-9 ]+/g, ' ') 35 | .split(/ +/).map(function(word, i){ 36 | return i 37 | ? word[0].toUpperCase() + word.substr(1) 38 | : word; 39 | }).join('')); 40 | }; -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/.npmignore: -------------------------------------------------------------------------------- 1 | *.markdown 2 | *.md 3 | .git* 4 | Makefile 5 | benchmarks/ 6 | docs/ 7 | examples/ 8 | install.sh 9 | support/ 10 | test/ 11 | .DS_Store 12 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2010 Sencha Inc. 4 | Copyright (c) 2011 LearnBoost 5 | Copyright (c) 2011 TJ Holowaychuk 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | 'Software'), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = require('./lib/connect'); -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/cache.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Connect - Cache 4 | * Copyright(c) 2011 Sencha Inc. 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Expose `Cache`. 10 | */ 11 | 12 | module.exports = Cache; 13 | 14 | /** 15 | * LRU cache store. 16 | * 17 | * @param {Number} limit 18 | * @api private 19 | */ 20 | 21 | function Cache(limit) { 22 | this.store = {}; 23 | this.keys = []; 24 | this.limit = limit; 25 | } 26 | 27 | /** 28 | * Touch `key`, promoting the object. 29 | * 30 | * @param {String} key 31 | * @param {Number} i 32 | * @api private 33 | */ 34 | 35 | Cache.prototype.touch = function(key, i){ 36 | this.keys.splice(i,1); 37 | this.keys.push(key); 38 | }; 39 | 40 | /** 41 | * Remove `key`. 42 | * 43 | * @param {String} key 44 | * @api private 45 | */ 46 | 47 | Cache.prototype.remove = function(key){ 48 | delete this.store[key]; 49 | }; 50 | 51 | /** 52 | * Get the object stored for `key`. 53 | * 54 | * @param {String} key 55 | * @return {Array} 56 | * @api private 57 | */ 58 | 59 | Cache.prototype.get = function(key){ 60 | return this.store[key]; 61 | }; 62 | 63 | /** 64 | * Add a cache `key`. 65 | * 66 | * @param {String} key 67 | * @return {Array} 68 | * @api private 69 | */ 70 | 71 | Cache.prototype.add = function(key){ 72 | // initialize store 73 | var len = this.keys.push(key); 74 | 75 | // limit reached, invalid LRU 76 | if (len > this.limit) this.remove(this.keys.shift()); 77 | 78 | var arr = this.store[key] = []; 79 | arr.createdAt = new Date; 80 | return arr; 81 | }; 82 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/https.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Connect - HTTPServer 4 | * Copyright(c) 2010 Sencha Inc. 5 | * Copyright(c) 2011 TJ Holowaychuk 6 | * MIT Licensed 7 | */ 8 | 9 | /** 10 | * Module dependencies. 11 | */ 12 | 13 | var HTTPServer = require('./http').Server 14 | , https = require('https'); 15 | 16 | /** 17 | * Initialize a new `Server` with the given 18 | *`options` and `middleware`. The HTTPS api 19 | * is identical to the [HTTP](http.html) server, 20 | * however TLS `options` must be provided before 21 | * passing in the optional middleware. 22 | * 23 | * @params {Object} options 24 | * @params {Array} middleawre 25 | * @return {Server} 26 | * @api public 27 | */ 28 | 29 | var Server = exports.Server = function HTTPSServer(options, middleware) { 30 | this.stack = []; 31 | middleware.forEach(function(fn){ 32 | this.use(fn); 33 | }, this); 34 | https.Server.call(this, options, this.handle); 35 | }; 36 | 37 | /** 38 | * Inherit from `http.Server.prototype`. 39 | */ 40 | 41 | Server.prototype.__proto__ = https.Server.prototype; 42 | 43 | // mixin HTTPServer methods 44 | 45 | Object.keys(HTTPServer.prototype).forEach(function(method){ 46 | Server.prototype[method] = HTTPServer.prototype[method]; 47 | }); -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/middleware/cookieParser.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Connect - cookieParser 4 | * Copyright(c) 2010 Sencha Inc. 5 | * Copyright(c) 2011 TJ Holowaychuk 6 | * MIT Licensed 7 | */ 8 | 9 | /** 10 | * Module dependencies. 11 | */ 12 | 13 | var utils = require('./../utils'); 14 | 15 | /** 16 | * Parse _Cookie_ header and populate `req.cookies` 17 | * with an object keyed by the cookie names. 18 | * 19 | * Examples: 20 | * 21 | * connect.createServer( 22 | * connect.cookieParser() 23 | * , function(req, res, next){ 24 | * res.end(JSON.stringify(req.cookies)); 25 | * } 26 | * ); 27 | * 28 | * @return {Function} 29 | * @api public 30 | */ 31 | 32 | module.exports = function cookieParser(){ 33 | return function cookieParser(req, res, next) { 34 | var cookie = req.headers.cookie; 35 | if (req.cookies) return next(); 36 | req.cookies = {}; 37 | if (cookie) { 38 | try { 39 | req.cookies = utils.parseCookie(cookie); 40 | } catch (err) { 41 | return next(err); 42 | } 43 | } 44 | next(); 45 | }; 46 | }; -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/middleware/favicon.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Connect - favicon 4 | * Copyright(c) 2010 Sencha Inc. 5 | * Copyright(c) 2011 TJ Holowaychuk 6 | * MIT Licensed 7 | */ 8 | 9 | /** 10 | * Module dependencies. 11 | */ 12 | 13 | var fs = require('fs') 14 | , utils = require('../utils'); 15 | 16 | /** 17 | * Favicon cache. 18 | */ 19 | 20 | var icon; 21 | 22 | /** 23 | * By default serves the connect favicon, or the favicon 24 | * located by the given `path`. 25 | * 26 | * Options: 27 | * 28 | * - `maxAge` cache-control max-age directive, defaulting to 1 day 29 | * 30 | * Examples: 31 | * 32 | * connect.createServer( 33 | * connect.favicon() 34 | * ); 35 | * 36 | * connect.createServer( 37 | * connect.favicon(__dirname + '/public/favicon.ico') 38 | * ); 39 | * 40 | * @param {String} path 41 | * @param {Object} options 42 | * @return {Function} 43 | * @api public 44 | */ 45 | 46 | module.exports = function favicon(path, options){ 47 | var options = options || {} 48 | , path = path || __dirname + '/../public/favicon.ico' 49 | , maxAge = options.maxAge || 86400000; 50 | 51 | return function favicon(req, res, next){ 52 | if ('/favicon.ico' == req.url) { 53 | if (icon) { 54 | res.writeHead(200, icon.headers); 55 | res.end(icon.body); 56 | } else { 57 | fs.readFile(path, function(err, buf){ 58 | if (err) return next(err); 59 | icon = { 60 | headers: { 61 | 'Content-Type': 'image/x-icon' 62 | , 'Content-Length': buf.length 63 | , 'ETag': '"' + utils.md5(buf) + '"' 64 | , 'Cache-Control': 'public, max-age=' + (maxAge / 1000) 65 | }, 66 | body: buf 67 | }; 68 | res.writeHead(200, icon.headers); 69 | res.end(icon.body); 70 | }); 71 | } 72 | } else { 73 | next(); 74 | } 75 | }; 76 | }; -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/middleware/limit.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Connect - limit 4 | * Copyright(c) 2011 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Limit request bodies to the given size in `bytes`. 10 | * 11 | * A string representation of the bytesize may also be passed, 12 | * for example "5mb", "200kb", "1gb", etc. 13 | * 14 | * Examples: 15 | * 16 | * var server = connect( 17 | * connect.limit('5.5mb') 18 | * ).listen(3000); 19 | * 20 | * TODO: pause EV_READ 21 | * 22 | * @param {Number|String} bytes 23 | * @return {Function} 24 | * @api public 25 | */ 26 | 27 | module.exports = function limit(bytes){ 28 | if ('string' == typeof bytes) bytes = parse(bytes); 29 | if ('number' != typeof bytes) throw new Error('limit() bytes required'); 30 | return function limit(req, res, next){ 31 | var received = 0 32 | , len = req.headers['content-length'] 33 | ? parseInt(req.headers['content-length'], 10) 34 | : null; 35 | 36 | // deny the request 37 | function deny() { 38 | req.destroy(); 39 | } 40 | 41 | // self-awareness 42 | if (req._limit) return next(); 43 | req._limit = true; 44 | 45 | // limit by content-length 46 | if (len && len > bytes) { 47 | res.statusCode = 413; 48 | res.end('Request Entity Too Large'); 49 | return; 50 | } 51 | 52 | // limit 53 | req.on('data', function(chunk){ 54 | received += chunk.length; 55 | if (received > bytes) deny(); 56 | }); 57 | 58 | next(); 59 | }; 60 | }; 61 | 62 | /** 63 | * Parse byte `size` string. 64 | * 65 | * @param {String} size 66 | * @return {Number} 67 | * @api private 68 | */ 69 | 70 | function parse(size) { 71 | var parts = size.match(/^(\d+(?:\.\d+)?) *(kb|mb|gb)$/) 72 | , n = parseFloat(parts[1]) 73 | , type = parts[2]; 74 | 75 | var map = { 76 | kb: 1024 77 | , mb: 1024 * 1024 78 | , gb: 1024 * 1024 * 1024 79 | }; 80 | 81 | return map[type] * n; 82 | } -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/middleware/methodOverride.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Connect - methodOverride 4 | * Copyright(c) 2010 Sencha Inc. 5 | * Copyright(c) 2011 TJ Holowaychuk 6 | * MIT Licensed 7 | */ 8 | 9 | /** 10 | * Provides faux HTTP method support. 11 | * 12 | * Pass an optional `key` to use when checking for 13 | * a method override, othewise defaults to _\_method_. 14 | * The original method is available via `req.originalMethod`. 15 | * 16 | * @param {String} key 17 | * @return {Function} 18 | * @api public 19 | */ 20 | 21 | module.exports = function methodOverride(key){ 22 | key = key || "_method"; 23 | return function methodOverride(req, res, next) { 24 | req.originalMethod = req.originalMethod || req.method; 25 | 26 | // req.body 27 | if (req.body && key in req.body) { 28 | req.method = req.body[key].toUpperCase(); 29 | delete req.body[key]; 30 | // check X-HTTP-Method-Override 31 | } else if (req.headers['x-http-method-override']) { 32 | req.method = req.headers['x-http-method-override'].toUpperCase(); 33 | } 34 | 35 | next(); 36 | }; 37 | }; 38 | 39 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/middleware/query.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Connect - query 4 | * Copyright(c) 2011 TJ Holowaychuk 5 | * Copyright(c) 2011 Sencha Inc. 6 | * MIT Licensed 7 | */ 8 | 9 | /** 10 | * Module dependencies. 11 | */ 12 | 13 | var qs = require('qs') 14 | , parse = require('url').parse; 15 | 16 | /** 17 | * Automatically parse the query-string when available, 18 | * populating the `req.query` object. 19 | * 20 | * Examples: 21 | * 22 | * connect( 23 | * connect.query() 24 | * , function(req, res){ 25 | * res.end(JSON.stringify(req.query)); 26 | * } 27 | * ).listen(3000); 28 | * 29 | * @return {Function} 30 | * @api public 31 | */ 32 | 33 | module.exports = function query(){ 34 | return function query(req, res, next){ 35 | req.query = ~req.url.indexOf('?') 36 | ? qs.parse(parse(req.url).query) 37 | : {}; 38 | next(); 39 | }; 40 | }; 41 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/middleware/responseTime.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Connect - responseTime 4 | * Copyright(c) 2011 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Adds the `X-Response-Time` header displaying the response 10 | * duration in milliseconds. 11 | * 12 | * @return {Function} 13 | * @api public 14 | */ 15 | 16 | module.exports = function responseTime(){ 17 | return function(req, res, next){ 18 | var writeHead = res.writeHead 19 | , start = new Date; 20 | 21 | if (res._responseTime) return next(); 22 | res._responseTime = true; 23 | 24 | // proxy writeHead to calculate duration 25 | res.writeHead = function(status, headers){ 26 | var duration = new Date - start; 27 | res.setHeader('X-Response-Time', duration + 'ms'); 28 | res.writeHead = writeHead; 29 | res.writeHead(status, headers); 30 | }; 31 | 32 | next(); 33 | }; 34 | }; 35 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/middleware/vhost.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Connect - vhost 4 | * Copyright(c) 2010 Sencha Inc. 5 | * Copyright(c) 2011 TJ Holowaychuk 6 | * MIT Licensed 7 | */ 8 | 9 | /** 10 | * Setup vhost for the given `hostname` and `server`. 11 | * 12 | * Examples: 13 | * 14 | * connect( 15 | * connect.vhost('foo.com', 16 | * connect.createServer(...middleware...) 17 | * ), 18 | * connect.vhost('bar.com', 19 | * connect.createServer(...middleware...) 20 | * ) 21 | * ); 22 | * 23 | * @param {String} hostname 24 | * @param {Server} server 25 | * @return {Function} 26 | * @api public 27 | */ 28 | 29 | module.exports = function vhost(hostname, server){ 30 | if (!hostname) throw new Error('vhost hostname required'); 31 | if (!server) throw new Error('vhost server required'); 32 | var regexp = new RegExp('^' + hostname.replace(/[*]/g, '(.*?)') + '$'); 33 | if (server.onvhost) server.onvhost(hostname); 34 | return function vhost(req, res, next){ 35 | if (!req.headers.host) return next(); 36 | var host = req.headers.host.split(':')[0]; 37 | if (req.subdomains = regexp.exec(host)) { 38 | req.subdomains = req.subdomains[0].split('.').slice(0, -1); 39 | server.emit("request", req, res); 40 | } else { 41 | next(); 42 | } 43 | }; 44 | }; 45 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/patch.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Connect 4 | * Copyright(c) 2011 TJ Holowaychuk 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module dependencies. 10 | */ 11 | 12 | var http = require('http') 13 | , res = http.OutgoingMessage.prototype; 14 | 15 | // original setHeader() 16 | 17 | var setHeader = res.setHeader; 18 | 19 | // original _renderHeaders() 20 | 21 | var _renderHeaders = res._renderHeaders; 22 | 23 | if (res._hasConnectPatch) return; 24 | 25 | /** 26 | * Provide a public "header sent" flag 27 | * until node does. 28 | * 29 | * @return {Boolean} 30 | * @api public 31 | */ 32 | 33 | res.__defineGetter__('headerSent', function(){ 34 | return this._headerSent; 35 | }); 36 | 37 | /** 38 | * Set header `field` to `val`, special-casing 39 | * the `Set-Cookie` field for multiple support. 40 | * 41 | * @param {String} field 42 | * @param {String} val 43 | * @api public 44 | */ 45 | 46 | res.setHeader = function(field, val){ 47 | var key = field.toLowerCase() 48 | , prev; 49 | 50 | // special-case Set-Cookie 51 | if (this._headers && 'set-cookie' == key) { 52 | if (prev = this.getHeader(field)) { 53 | val = Array.isArray(prev) 54 | ? prev.concat(val) 55 | : [prev, val]; 56 | } 57 | // charset 58 | } else if ('content-type' == key && this.charset) { 59 | val += '; charset=' + this.charset; 60 | } 61 | 62 | return setHeader.call(this, field, val); 63 | }; 64 | 65 | /** 66 | * Proxy `res.end()` to expose a 'header' event, 67 | * allowing arbitrary augmentation before the header 68 | * fields are written to the socket. 69 | * 70 | * NOTE: this _only_ supports node's progressive header 71 | * field API aka `res.setHeader()`. 72 | */ 73 | 74 | res._renderHeaders = function(){ 75 | this.emit('header'); 76 | return _renderHeaders.call(this); 77 | }; 78 | 79 | res._hasConnectPatch = true; 80 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {error} 4 | 5 | 6 | 7 |
8 |

{title}

9 |

500 {error}

10 |
    {stack}
11 |
12 | 13 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/favicon.ico -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_add.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_attach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_attach.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_code.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_copy.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_delete.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_edit.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_error.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_excel.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_find.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_gear.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_go.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_go.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_green.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_key.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_link.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_paste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_paste.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_red.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_save.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_add.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_c.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_camera.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_cd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_cd.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_compressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_compressed.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_csharp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_csharp.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_cup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_cup.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_database.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_delete.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_dvd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_dvd.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_error.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_flash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_flash.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_go.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_go.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_h.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_horizontal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_horizontal.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_lightning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_lightning.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_medal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_medal.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_paste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_paste.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_php.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_php.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_put.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_put.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_text.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_text_width.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_text_width.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_tux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_tux.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_vector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_vector.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_word.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_word.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/lib/public/icons/page_world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/express/node_modules/connect/lib/public/icons/page_world.png -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/node_modules/formidable/Makefile: -------------------------------------------------------------------------------- 1 | SHELL := /bin/bash 2 | 3 | test: 4 | @./test/run.js 5 | 6 | build: npm test 7 | 8 | npm: 9 | npm install . 10 | 11 | clean: 12 | rm test/tmp/* 13 | 14 | .PHONY: test clean build 15 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/node_modules/formidable/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/formidable'); -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js: -------------------------------------------------------------------------------- 1 | if (global.GENTLY) require = GENTLY.hijack(require); 2 | 3 | var util = require('./util'), 4 | WriteStream = require('fs').WriteStream, 5 | EventEmitter = require('events').EventEmitter; 6 | 7 | function File(properties) { 8 | EventEmitter.call(this); 9 | 10 | this.size = 0; 11 | this.path = null; 12 | this.name = null; 13 | this.type = null; 14 | this.lastModifiedDate = null; 15 | 16 | this._writeStream = null; 17 | 18 | for (var key in properties) { 19 | this[key] = properties[key]; 20 | } 21 | 22 | this._backwardsCompatibility(); 23 | } 24 | module.exports = File; 25 | util.inherits(File, EventEmitter); 26 | 27 | // @todo Next release: Show error messages when accessing these 28 | File.prototype._backwardsCompatibility = function() { 29 | var self = this; 30 | this.__defineGetter__('length', function() { 31 | return self.size; 32 | }); 33 | this.__defineGetter__('filename', function() { 34 | return self.name; 35 | }); 36 | this.__defineGetter__('mime', function() { 37 | return self.type; 38 | }); 39 | }; 40 | 41 | File.prototype.open = function() { 42 | this._writeStream = new WriteStream(this.path); 43 | }; 44 | 45 | File.prototype.write = function(buffer, cb) { 46 | var self = this; 47 | this._writeStream.write(buffer, function() { 48 | self.lastModifiedDate = new Date(); 49 | self.size += buffer.length; 50 | self.emit('progress', self.size); 51 | cb(); 52 | }); 53 | }; 54 | 55 | File.prototype.end = function(cb) { 56 | var self = this; 57 | this._writeStream.end(function() { 58 | self.emit('end'); 59 | cb(); 60 | }); 61 | }; 62 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/node_modules/formidable/lib/index.js: -------------------------------------------------------------------------------- 1 | var IncomingForm = require('./incoming_form').IncomingForm; 2 | IncomingForm.IncomingForm = IncomingForm; 3 | module.exports = IncomingForm; 4 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js: -------------------------------------------------------------------------------- 1 | if (global.GENTLY) require = GENTLY.hijack(require); 2 | 3 | // This is a buffering parser, not quite as nice as the multipart one. 4 | // If I find time I'll rewrite this to be fully streaming as well 5 | var querystring = require('querystring'); 6 | 7 | function QuerystringParser() { 8 | this.buffer = ''; 9 | }; 10 | exports.QuerystringParser = QuerystringParser; 11 | 12 | QuerystringParser.prototype.write = function(buffer) { 13 | this.buffer += buffer.toString('ascii'); 14 | return buffer.length; 15 | }; 16 | 17 | QuerystringParser.prototype.end = function() { 18 | var fields = querystring.parse(this.buffer); 19 | for (var field in fields) { 20 | this.onField(field, fields[field]); 21 | } 22 | this.buffer = ''; 23 | 24 | this.onEnd(); 25 | }; -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/node_modules/formidable/lib/util.js: -------------------------------------------------------------------------------- 1 | // Backwards compatibility ... 2 | try { 3 | module.exports = require('util'); 4 | } catch (e) { 5 | module.exports = require('sys'); 6 | } 7 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/node_modules/formidable/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "formidable", 3 | "version": "1.0.8", 4 | "dependencies": {}, 5 | "devDependencies": { 6 | "gently": "0.8.0", 7 | "findit": "0.1.1", 8 | "hashish": "0.0.4", 9 | "urun": "0.0.4", 10 | "utest": "0.0.3" 11 | }, 12 | "directories": { 13 | "lib": "./lib" 14 | }, 15 | "main": "./lib/index", 16 | "scripts": { 17 | "test": "make test" 18 | }, 19 | "engines": { 20 | "node": "*" 21 | } 22 | } -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/node_modules/formidable/tool/record.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var fs = require('fs'); 3 | var connections = 0; 4 | 5 | var server = http.createServer(function(req, res) { 6 | var socket = req.socket; 7 | console.log('Request: %s %s -> %s', req.method, req.url, socket.filename); 8 | 9 | req.on('end', function() { 10 | if (req.url !== '/') { 11 | res.end(JSON.stringify({ 12 | method: req.method, 13 | url: req.url, 14 | filename: socket.filename, 15 | })); 16 | return; 17 | } 18 | 19 | res.writeHead(200, {'content-type': 'text/html'}); 20 | res.end( 21 | '
'+ 22 | '
'+ 23 | '
'+ 24 | ''+ 25 | '
' 26 | ); 27 | }); 28 | }); 29 | 30 | server.on('connection', function(socket) { 31 | connections++; 32 | 33 | socket.id = connections; 34 | socket.filename = 'connection-' + socket.id + '.http'; 35 | socket.file = fs.createWriteStream(socket.filename); 36 | socket.pipe(socket.file); 37 | 38 | console.log('--> %s', socket.filename); 39 | socket.on('close', function() { 40 | console.log('<-- %s', socket.filename); 41 | }); 42 | }); 43 | 44 | var port = process.env.PORT || 8080; 45 | server.listen(port, function() { 46 | console.log('Recording connections on port %s', port); 47 | }); 48 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "connect", 3 | "version": "1.8.5", 4 | "description": "High performance middleware framework", 5 | "keywords": ["framework", "web", "middleware", "connect", "rack"], 6 | "repository": "git://github.com/senchalabs/connect.git", 7 | "author": "TJ Holowaychuk (http://tjholowaychuk.com)", 8 | "repository": "git://github.com/senchalabs/connect", 9 | "dependencies": { 10 | "qs": ">= 0.4.0", 11 | "mime": ">= 0.0.1", 12 | "formidable": "1.0.x" 13 | }, 14 | "devDependencies": { 15 | "expresso": "0.9.2", 16 | "koala": "0.1.2", 17 | "less": "1.1.1", 18 | "sass": "0.5.0", 19 | "markdown": "0.2.1", 20 | "ejs": "0.4.3", 21 | "should": "0.3.2" 22 | }, 23 | "main": "index", 24 | "engines": { "node": ">= 0.4.1 < 0.7.0" } 25 | } -------------------------------------------------------------------------------- /node_modules/express/node_modules/connect/test.js: -------------------------------------------------------------------------------- 1 | 2 | var connect = require('./') 3 | , http = require('http') 4 | , RedisStore = require('connect-redis')(connect); 5 | 6 | var app = connect(); 7 | app.use(connect.cookieParser('fucj')); 8 | app.use(connect.session({store:new RedisStore})); 9 | app.use(function(req, res, next){ 10 | req.session.views = (req.session.views || 0) + 1; 11 | res.writeHead(200, {"Content-Type": "text/plain"}); 12 | res.end("You've viewed this page "+req.session.views+" times."); 13 | }) 14 | 15 | http.createServer(app).listen(3000); 16 | 17 | 18 | // var set = RedisStore.prototype.set; 19 | // 20 | // function slow(sid){ 21 | // console.log('%s saving', sid); 22 | // var args = arguments; 23 | // setTimeout(function(self){ 24 | // console.log('%s saved', sid); 25 | // set.apply(self, args); 26 | // }, 2000, this); 27 | // }; 28 | // 29 | // http.createServer(connect() 30 | // .use(connect.logger('dev')) 31 | // .use(connect.cookieParser('keyboard cat')) 32 | // .use(connect.session({ store: new RedisStore })) 33 | // .use(function(req, res, next){ 34 | // var sess = req.session; 35 | // switch (req.url) { 36 | // case '/foo.js': 37 | // console.log('%s foo.js sid', sess.id); 38 | // RedisStore.prototype.set = set; 39 | // res.end('data'); 40 | // break; 41 | // default: 42 | // console.log('%s html sid', sess.id); 43 | // RedisStore.prototype.set = slow; 44 | // res.setHeader('Content-Type', 'html'); 45 | // res.write(''); 46 | // setTimeout(function(){ 47 | // res.end(''); 48 | // }, 1000); 49 | // } 50 | // })).listen(3000); 51 | // 52 | // console.log('port 3000'); -------------------------------------------------------------------------------- /node_modules/express/node_modules/mime/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Benjamin Thomas, Robert Kieffer 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/mime/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Robert Kieffer", 4 | "url": "http://github.com/broofa", 5 | "email": "robert@broofa.com" 6 | }, 7 | "contributors": [ 8 | { 9 | "name": "Benjamin Thomas", 10 | "url": "http://github.com/bentomas", 11 | "email": "benjamin@benjaminthomas.org" 12 | } 13 | ], 14 | "dependencies": {}, 15 | "description": "A comprehensive library for mime-type mapping", 16 | "devDependencies": {"async_testing": ""}, 17 | "keywords": ["util", "mime"], 18 | "main": "mime.js", 19 | "name": "mime", 20 | "repository": {"url": "http://github.com/bentomas/node-mime", "type": "git"}, 21 | "version": "1.2.4" 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/mime/types/node.types: -------------------------------------------------------------------------------- 1 | # What: Google Chrome Extension 2 | # Why: To allow apps to (work) be served with the right content type header. 3 | # http://codereview.chromium.org/2830017 4 | # Added by: niftylettuce 5 | application/x-chrome-extension crx 6 | 7 | # What: OTF Message Silencer 8 | # Why: To silence the "Resource interpreted as font but transferred with MIME 9 | # type font/otf" message that occurs in Google Chrome 10 | # Added by: niftylettuce 11 | font/opentype otf 12 | 13 | # What: HTC support 14 | # Why: To properly render .htc files such as CSS3PIE 15 | # Added by: niftylettuce 16 | text/x-component htc 17 | 18 | # What: HTML5 application cache manifest 19 | # Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps 20 | # per https://developer.mozilla.org/en/offline_resources_in_firefox 21 | # Added by: louisremi 22 | text/cache-manifest appcache manifest 23 | 24 | # What: node binary buffer format 25 | # Why: semi-standard extension w/in the node community 26 | # Added by: tootallnate 27 | application/octet-stream buffer 28 | 29 | # What: The "protected" MP-4 formats used by iTunes. 30 | # Why: Required for streaming music to browsers (?) 31 | # Added by: broofa 32 | application/mp4 m4p 33 | audio/mp4 m4a 34 | 35 | # What: Music playlist format (http://en.wikipedia.org/wiki/M3U) 36 | # Why: See https://github.com/bentomas/node-mime/pull/6 37 | # Added by: mjrusso 38 | application/x-mpegURL m3u8 39 | 40 | # What: Video format, Part of RFC1890 41 | # Why: See https://github.com/bentomas/node-mime/pull/6 42 | # Added by: mjrusso 43 | video/MP2T ts 44 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/mkdirp/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log -------------------------------------------------------------------------------- /node_modules/express/node_modules/mkdirp/.gitignore.orig: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log -------------------------------------------------------------------------------- /node_modules/express/node_modules/mkdirp/.gitignore.rej: -------------------------------------------------------------------------------- 1 | --- /dev/null 2 | +++ .gitignore 3 | @@ -0,0 +1,2 @@ 4 | +node_modules/ 5 | +npm-debug.log -------------------------------------------------------------------------------- /node_modules/express/node_modules/mkdirp/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010 James Halliday (mail@substack.net) 2 | 3 | This project is free software released under the MIT/X11 license: 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/mkdirp/README.markdown: -------------------------------------------------------------------------------- 1 | mkdirp 2 | ====== 3 | 4 | Like `mkdir -p`, but in node.js! 5 | 6 | example 7 | ======= 8 | 9 | pow.js 10 | ------ 11 | var mkdirp = require('mkdirp'); 12 | 13 | mkdirp('/tmp/foo/bar/baz', function (err) { 14 | if (err) console.error(err) 15 | else console.log('pow!') 16 | }); 17 | 18 | Output 19 | pow! 20 | 21 | And now /tmp/foo/bar/baz exists, huzzah! 22 | 23 | methods 24 | ======= 25 | 26 | var mkdirp = require('mkdirp'); 27 | 28 | mkdirp(dir, mode, cb) 29 | --------------------- 30 | 31 | Create a new directory and any necessary subdirectories at `dir` with octal 32 | permission string `mode`. 33 | 34 | If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. 35 | 36 | mkdirp.sync(dir, mode) 37 | ---------------------- 38 | 39 | Synchronously create a new directory and any necessary subdirectories at `dir` 40 | with octal permission string `mode`. 41 | 42 | If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. 43 | 44 | install 45 | ======= 46 | 47 | With [npm](http://npmjs.org) do: 48 | 49 | npm install mkdirp 50 | 51 | license 52 | ======= 53 | 54 | MIT/X11 55 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/mkdirp/examples/pow.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('mkdirp'); 2 | 3 | mkdirp('/tmp/foo/bar/baz', function (err) { 4 | if (err) console.error(err) 5 | else console.log('pow!') 6 | }); 7 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/mkdirp/examples/pow.js.orig: -------------------------------------------------------------------------------- 1 | var mkdirp = require('mkdirp'); 2 | 3 | mkdirp('/tmp/foo/bar/baz', 0755, function (err) { 4 | if (err) console.error(err) 5 | else console.log('pow!') 6 | }); 7 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/mkdirp/examples/pow.js.rej: -------------------------------------------------------------------------------- 1 | --- examples/pow.js 2 | +++ examples/pow.js 3 | @@ -1,6 +1,15 @@ 4 | -var mkdirp = require('mkdirp').mkdirp; 5 | +var mkdirp = require('../').mkdirp, 6 | + mkdirpSync = require('../').mkdirpSync; 7 | 8 | mkdirp('/tmp/foo/bar/baz', 0755, function (err) { 9 | if (err) console.error(err) 10 | else console.log('pow!') 11 | }); 12 | + 13 | +try { 14 | + mkdirpSync('/tmp/bar/foo/baz', 0755); 15 | + console.log('double pow!'); 16 | +} 17 | +catch (ex) { 18 | + console.log(ex); 19 | +} -------------------------------------------------------------------------------- /node_modules/express/node_modules/mkdirp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "mkdirp", 3 | "description" : "Recursively mkdir, like `mkdir -p`", 4 | "version" : "0.3.0", 5 | "author" : "James Halliday (http://substack.net)", 6 | "main" : "./index", 7 | "keywords" : [ 8 | "mkdir", 9 | "directory" 10 | ], 11 | "repository" : { 12 | "type" : "git", 13 | "url" : "http://github.com/substack/node-mkdirp.git" 14 | }, 15 | "scripts" : { 16 | "test" : "tap test/*.js" 17 | }, 18 | "devDependencies" : { 19 | "tap" : "0.0.x" 20 | }, 21 | "license" : "MIT/X11", 22 | "engines": { "node": "*" } 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/mkdirp/test/mkdirp.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('woo', function (t) { 7 | t.plan(2); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | mkdirp(file, 0755, function (err) { 15 | if (err) t.fail(err); 16 | else path.exists(file, function (ex) { 17 | if (!ex) t.fail('file not created') 18 | else fs.stat(file, function (err, stat) { 19 | if (err) t.fail(err) 20 | else { 21 | t.equal(stat.mode & 0777, 0755); 22 | t.ok(stat.isDirectory(), 'target not a directory'); 23 | t.end(); 24 | } 25 | }) 26 | }) 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/mkdirp/test/race.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../').mkdirp; 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('race', function (t) { 7 | t.plan(4); 8 | var ps = [ '', 'tmp' ]; 9 | 10 | for (var i = 0; i < 25; i++) { 11 | var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | ps.push(dir); 13 | } 14 | var file = ps.join('/'); 15 | 16 | var res = 2; 17 | mk(file, function () { 18 | if (--res === 0) t.end(); 19 | }); 20 | 21 | mk(file, function () { 22 | if (--res === 0) t.end(); 23 | }); 24 | 25 | function mk (file, cb) { 26 | mkdirp(file, 0755, function (err) { 27 | if (err) t.fail(err); 28 | else path.exists(file, function (ex) { 29 | if (!ex) t.fail('file not created') 30 | else fs.stat(file, function (err, stat) { 31 | if (err) t.fail(err) 32 | else { 33 | t.equal(stat.mode & 0777, 0755); 34 | t.ok(stat.isDirectory(), 'target not a directory'); 35 | if (cb) cb(); 36 | } 37 | }) 38 | }) 39 | }); 40 | } 41 | }); 42 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/mkdirp/test/rel.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('rel', function (t) { 7 | t.plan(2); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var cwd = process.cwd(); 13 | process.chdir('/tmp'); 14 | 15 | var file = [x,y,z].join('/'); 16 | 17 | mkdirp(file, 0755, function (err) { 18 | if (err) t.fail(err); 19 | else path.exists(file, function (ex) { 20 | if (!ex) t.fail('file not created') 21 | else fs.stat(file, function (err, stat) { 22 | if (err) t.fail(err) 23 | else { 24 | process.chdir(cwd); 25 | t.equal(stat.mode & 0777, 0755); 26 | t.ok(stat.isDirectory(), 'target not a directory'); 27 | t.end(); 28 | } 29 | }) 30 | }) 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "support/expresso"] 2 | path = support/expresso 3 | url = git://github.com/visionmedia/expresso.git 4 | [submodule "support/should"] 5 | path = support/should 6 | url = git://github.com/visionmedia/should.js.git 7 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.4.2 / 2012-02-08 3 | ================== 4 | 5 | * Fixed: ensure objects are created when appropriate not arrays [aheckmann] 6 | 7 | 0.4.1 / 2012-01-26 8 | ================== 9 | 10 | * Fixed stringify()ing numbers. Closes #23 11 | 12 | 0.4.0 / 2011-11-21 13 | ================== 14 | 15 | * Allow parsing of an existing object (for `bodyParser()`) [jackyz] 16 | * Replaced expresso with mocha 17 | 18 | 0.3.2 / 2011-11-08 19 | ================== 20 | 21 | * Fixed global variable leak 22 | 23 | 0.3.1 / 2011-08-17 24 | ================== 25 | 26 | * Added `try/catch` around malformed uri components 27 | * Add test coverage for Array native method bleed-though 28 | 29 | 0.3.0 / 2011-07-19 30 | ================== 31 | 32 | * Allow `array[index]` and `object[property]` syntaxes [Aria Stewart] 33 | 34 | 0.2.0 / 2011-06-29 35 | ================== 36 | 37 | * Added `qs.stringify()` [Cory Forsyth] 38 | 39 | 0.1.0 / 2011-04-13 40 | ================== 41 | 42 | * Added jQuery-ish array support 43 | 44 | 0.0.7 / 2011-03-13 45 | ================== 46 | 47 | * Fixed; handle empty string and `== null` in `qs.parse()` [dmit] 48 | allows for convenient `qs.parse(url.parse(str).query)` 49 | 50 | 0.0.6 / 2011-02-14 51 | ================== 52 | 53 | * Fixed; support for implicit arrays 54 | 55 | 0.0.4 / 2011-02-09 56 | ================== 57 | 58 | * Fixed `+` as a space 59 | 60 | 0.0.3 / 2011-02-08 61 | ================== 62 | 63 | * Fixed case when right-hand value contains "]" 64 | 65 | 0.0.2 / 2011-02-07 66 | ================== 67 | 68 | * Fixed "=" presence in key 69 | 70 | 0.0.1 / 2011-02-07 71 | ================== 72 | 73 | * Initial release -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha 4 | 5 | .PHONY: test -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/benchmark.js: -------------------------------------------------------------------------------- 1 | 2 | var qs = require('./'); 3 | 4 | var times = 100000 5 | , start = new Date 6 | , n = times; 7 | 8 | console.log('times: %d', times); 9 | 10 | while (n--) qs.parse('foo=bar'); 11 | console.log('simple: %dms', new Date - start); 12 | 13 | var start = new Date 14 | , n = times; 15 | 16 | while (n--) qs.parse('user[name][first]=tj&user[name][last]=holowaychuk'); 17 | console.log('nested: %dms', new Date - start); -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/examples.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Module dependencies. 4 | */ 5 | 6 | var qs = require('./'); 7 | 8 | var obj = qs.parse('foo'); 9 | console.log(obj) 10 | 11 | var obj = qs.parse('foo=bar=baz'); 12 | console.log(obj) 13 | 14 | var obj = qs.parse('users[]'); 15 | console.log(obj) 16 | 17 | var obj = qs.parse('name=tj&email=tj@vision-media.ca'); 18 | console.log(obj) 19 | 20 | var obj = qs.parse('users[]=tj&users[]=tobi&users[]=jane'); 21 | console.log(obj) 22 | 23 | var obj = qs.parse('user[name][first]=tj&user[name][last]=holowaychuk'); 24 | console.log(obj) 25 | 26 | var obj = qs.parse('users[][name][first]=tj&users[][name][last]=holowaychuk'); 27 | console.log(obj) 28 | 29 | var obj = qs.parse('a=a&a=b&a=c'); 30 | console.log(obj) 31 | 32 | var obj = qs.parse('user[tj]=tj&user[tj]=TJ'); 33 | console.log(obj) 34 | 35 | var obj = qs.parse('user[names]=tj&user[names]=TJ&user[names]=Tyler'); 36 | console.log(obj) 37 | 38 | var obj = qs.parse('user[name][first]=tj&user[name][first]=TJ'); 39 | console.log(obj) 40 | 41 | var obj = qs.parse('user[0]=tj&user[1]=TJ'); 42 | console.log(obj) 43 | 44 | var obj = qs.parse('user[0]=tj&user[]=TJ'); 45 | console.log(obj) 46 | 47 | var obj = qs.parse('user[0]=tj&user[foo]=TJ'); 48 | console.log(obj) 49 | 50 | var str = qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}); 51 | console.log(str); -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = require('./lib/querystring'); -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "qs", 3 | "description": "querystring parser", 4 | "version": "0.4.2", 5 | "repository": { 6 | "type" : "git", 7 | "url" : "git://github.com/visionmedia/node-querystring.git" 8 | }, 9 | "devDependencies": { 10 | "mocha": "*" 11 | , "should": "*" 12 | }, 13 | "author": "TJ Holowaychuk (http://tjholowaychuk.com)", 14 | "main": "index", 15 | "engines": { "node": "*" } 16 | } -------------------------------------------------------------------------------- /node_modules/express/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "description": "Sinatra inspired web development framework", 4 | "version": "2.5.8", 5 | "author": "TJ Holowaychuk ", 6 | "contributors": [ 7 | { "name": "TJ Holowaychuk", "email": "tj@vision-media.ca" }, 8 | { "name": "Aaron Heckmann", "email": "aaron.heckmann+github@gmail.com" }, 9 | { "name": "Ciaran Jessup", "email": "ciaranj@gmail.com" }, 10 | { "name": "Guillermo Rauch", "email": "rauchg@gmail.com" } 11 | ], 12 | "dependencies": { 13 | "connect": "1.x", 14 | "mime": "1.2.4", 15 | "qs": "0.4.x", 16 | "mkdirp": "0.3.0" 17 | }, 18 | "devDependencies": { 19 | "connect-form": "0.2.1", 20 | "ejs": "0.4.2", 21 | "expresso": "0.9.2", 22 | "hamljs": "0.6.x", 23 | "jade": "0.16.2", 24 | "stylus": "0.13.0", 25 | "should": "0.3.2", 26 | "express-messages": "0.0.2", 27 | "node-markdown": ">= 0.0.1", 28 | "connect-redis": ">= 0.0.1" 29 | }, 30 | "keywords": ["framework", "sinatra", "web", "rest", "restful"], 31 | "repository": "git://github.com/visionmedia/express", 32 | "main": "index", 33 | "bin": { "express": "./bin/express" }, 34 | "scripts": { 35 | "test": "make test", 36 | "prepublish" : "npm prune" 37 | }, 38 | "engines": { "node": ">= 0.4.1 < 0.7.0" } 39 | } -------------------------------------------------------------------------------- /node_modules/express/testing/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Module dependencies. 4 | */ 5 | 6 | var express = require('../') 7 | , http = require('http') 8 | , connect = require('connect'); 9 | 10 | var app = express.createServer(); 11 | 12 | app.get('/', function(req, res){ 13 | req.foo(); 14 | res.send('test'); 15 | }); 16 | 17 | // app.set('views', __dirname + '/views'); 18 | // app.set('view engine', 'jade'); 19 | // 20 | // app.configure(function(){ 21 | // app.use(function(req, res, next){ 22 | // debugger 23 | // res.write('first'); 24 | // console.error('first'); 25 | // next(); 26 | // }); 27 | // 28 | // app.use(app.router); 29 | // 30 | // app.use(function(req, res, next){ 31 | // console.error('last'); 32 | // res.end('last'); 33 | // }); 34 | // }); 35 | // 36 | // app.get('/', function(req, res, next){ 37 | // console.error('middle'); 38 | // res.write(' route '); 39 | // next(); 40 | // }); 41 | 42 | app.listen(3000); 43 | console.log('listening on port 3000'); -------------------------------------------------------------------------------- /node_modules/express/testing/views/page.html: -------------------------------------------------------------------------------- 1 | p register test -------------------------------------------------------------------------------- /node_modules/express/testing/views/page.jade: -------------------------------------------------------------------------------- 1 | html 2 | body 3 | h1 test -------------------------------------------------------------------------------- /node_modules/express/testing/views/test.md: -------------------------------------------------------------------------------- 1 | testing _some_ markdown -------------------------------------------------------------------------------- /node_modules/express/testing/views/user/index.jade: -------------------------------------------------------------------------------- 1 | p user page -------------------------------------------------------------------------------- /node_modules/express/testing/views/user/list.jade: -------------------------------------------------------------------------------- 1 | p user list page -------------------------------------------------------------------------------- /node_modules/sax/AUTHORS: -------------------------------------------------------------------------------- 1 | # contributors sorted by whether or not they're me. 2 | Isaac Z. Schlueter 3 | Stein Martin Hustad 4 | Mikeal Rogers 5 | Laurie Harper 6 | Jann Horn 7 | Elijah Insua 8 | Henry Rawas 9 | Justin Makeig 10 | -------------------------------------------------------------------------------- /node_modules/sax/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2009, 2010, 2011 Isaac Z. Schlueter. 2 | All rights reserved. 3 | 4 | Permission is hereby granted, free of charge, to any person 5 | obtaining a copy of this software and associated documentation 6 | files (the "Software"), to deal in the Software without 7 | restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/sax/examples/example.js: -------------------------------------------------------------------------------- 1 | 2 | var fs = require("fs"), 3 | sys = require("sys"), 4 | path = require("path"), 5 | xml = fs.cat(path.join(__dirname, "test.xml")), 6 | sax = require("../lib/sax"), 7 | strict = sax.parser(true), 8 | loose = sax.parser(false, {trim:true}), 9 | inspector = function (ev) { return function (data) { 10 | // sys.error(""); 11 | // sys.error(ev+": "+sys.inspect(data)); 12 | // for (var i in data) sys.error(i+ " "+sys.inspect(data[i])); 13 | // sys.error(this.line+":"+this.column); 14 | }}; 15 | 16 | xml.addCallback(function (xml) { 17 | // strict.write(xml); 18 | 19 | sax.EVENTS.forEach(function (ev) { 20 | loose["on"+ev] = inspector(ev); 21 | }); 22 | loose.onend = function () { 23 | // sys.error("end"); 24 | // sys.error(sys.inspect(loose)); 25 | }; 26 | 27 | // do this one char at a time to verify that it works. 28 | // (function () { 29 | // if (xml) { 30 | // loose.write(xml.substr(0,1000)); 31 | // xml = xml.substr(1000); 32 | // process.nextTick(arguments.callee); 33 | // } else loose.close(); 34 | // })(); 35 | 36 | for (var i = 0; i < 1000; i ++) { 37 | loose.write(xml); 38 | loose.close(); 39 | } 40 | 41 | }); 42 | -------------------------------------------------------------------------------- /node_modules/sax/examples/not-pretty.xml: -------------------------------------------------------------------------------- 1 | 2 | something blerm a bit down here 9 | -------------------------------------------------------------------------------- /node_modules/sax/examples/pretty-print.js: -------------------------------------------------------------------------------- 1 | var sax = require("../lib/sax") 2 | , printer = sax.createStream(false, {lowercasetags:true, trim:true}) 3 | , fs = require("fs") 4 | 5 | function entity (str) { 6 | return str.replace('"', '"') 7 | } 8 | 9 | printer.tabstop = 2 10 | printer.level = 0 11 | printer.indent = function () { 12 | print("\n") 13 | for (var i = this.level; i > 0; i --) { 14 | for (var j = this.tabstop; j > 0; j --) { 15 | print(" ") 16 | } 17 | } 18 | } 19 | printer.on("opentag", function (tag) { 20 | this.indent() 21 | this.level ++ 22 | print("<"+tag.name) 23 | for (var i in tag.attributes) { 24 | print(" "+i+"=\""+entity(tag.attributes[i])+"\"") 25 | } 26 | print(">") 27 | }) 28 | 29 | printer.on("text", ontext) 30 | printer.on("doctype", ontext) 31 | function ontext (text) { 32 | this.indent() 33 | print(text) 34 | } 35 | 36 | printer.on("closetag", function (tag) { 37 | this.level -- 38 | this.indent() 39 | print("") 40 | }) 41 | 42 | printer.on("cdata", function (data) { 43 | this.indent() 44 | print("") 45 | }) 46 | 47 | printer.on("comment", function (comment) { 48 | this.indent() 49 | print("") 50 | }) 51 | 52 | printer.on("error", function (error) { 53 | console.error(error) 54 | throw error 55 | }) 56 | 57 | if (!process.argv[2]) { 58 | throw new Error("Please provide an xml file to prettify\n"+ 59 | "TODO: read from stdin or take a file") 60 | } 61 | var xmlfile = require("path").join(process.cwd(), process.argv[2]) 62 | var fstr = fs.createReadStream(xmlfile, { encoding: "utf8" }) 63 | 64 | function print (c) { 65 | if (!process.stdout.write(c)) { 66 | fstr.pause() 67 | } 68 | } 69 | 70 | process.stdout.on("drain", function () { 71 | fstr.resume() 72 | }) 73 | 74 | fstr.pipe(printer) 75 | -------------------------------------------------------------------------------- /node_modules/sax/examples/switch-bench.js: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/node-bench 2 | 3 | var Promise = require("events").Promise; 4 | 5 | var xml = require("posix").cat("test.xml").wait(), 6 | path = require("path"), 7 | sax = require("../lib/sax"), 8 | saxT = require("../lib/sax-trampoline"), 9 | 10 | parser = sax.parser(false, {trim:true}), 11 | parserT = saxT.parser(false, {trim:true}), 12 | 13 | sys = require("sys"); 14 | 15 | 16 | var count = exports.stepsPerLap = 500, 17 | l = xml.length, 18 | runs = 0; 19 | exports.countPerLap = 1000; 20 | exports.compare = { 21 | "switch" : function () { 22 | // sys.debug("switch runs: "+runs++); 23 | // for (var x = 0; x < l; x += 1000) { 24 | // parser.write(xml.substr(x, 1000)) 25 | // } 26 | // for (var i = 0; i < count; i ++) { 27 | parser.write(xml); 28 | parser.close(); 29 | // } 30 | // done(); 31 | }, 32 | trampoline : function () { 33 | // sys.debug("trampoline runs: "+runs++); 34 | // for (var x = 0; x < l; x += 1000) { 35 | // parserT.write(xml.substr(x, 1000)) 36 | // } 37 | // for (var i = 0; i < count; i ++) { 38 | parserT.write(xml); 39 | parserT.close(); 40 | // } 41 | // done(); 42 | }, 43 | }; 44 | 45 | sys.debug("rock and roll..."); -------------------------------------------------------------------------------- /node_modules/sax/examples/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | testing the parser 6 | 7 | 8 | 9 |

hello 10 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /node_modules/sax/package.json: -------------------------------------------------------------------------------- 1 | { "name" : "sax" 2 | , "description": "An evented streaming XML parser in JavaScript" 3 | , "author" : "Isaac Z. Schlueter (http://blog.izs.me/)" 4 | , "version" : "0.3.5" 5 | , "main" : "lib/sax.js" 6 | , "license" : { "type": "MIT" 7 | , "url": "https://raw.github.com/isaacs/sax-js/master/LICENSE" } 8 | , "scripts" : { "test" : "node test/index.js" } 9 | , "repository": "git://github.com/isaacs/sax-js.git" 10 | } 11 | -------------------------------------------------------------------------------- /node_modules/sax/test/buffer-overrun.js: -------------------------------------------------------------------------------- 1 | // set this really low so that I don't have to put 64 MB of xml in here. 2 | var sax = require("../lib/sax") 3 | var bl = sax.MAX_BUFFER_LENGTH 4 | sax.MAX_BUFFER_LENGTH = 5; 5 | 6 | require(__dirname).test({ 7 | expect : [ 8 | ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 15\nChar: "], 9 | ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 30\nChar: "], 10 | ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 45\nChar: "], 11 | ["opentag", { 12 | "name": "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", 13 | "attributes": {} 14 | }], 15 | ["text", "yo"], 16 | ["closetag", "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"] 17 | ] 18 | }).write("") 22 | .write("yo") 23 | .write("") 24 | .close(); 25 | sax.MAX_BUFFER_LENGTH = bl 26 | -------------------------------------------------------------------------------- /node_modules/sax/test/cdata-chunked.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | expect : [ 4 | ["opentag", {"name": "R","attributes": {}}], 5 | ["opencdata", undefined], 6 | ["cdata", " this is character data  "], 7 | ["closecdata", undefined], 8 | ["closetag", "R"] 9 | ] 10 | }).write("").close(); 11 | 12 | -------------------------------------------------------------------------------- /node_modules/sax/test/cdata-end-split.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | expect : [ 4 | ["opentag", {"name": "R","attributes": {}}], 5 | ["opencdata", undefined], 6 | ["cdata", " this is "], 7 | ["closecdata", undefined], 8 | ["closetag", "R"] 9 | ] 10 | }) 11 | .write("") 13 | .write("") 14 | .close(); 15 | 16 | -------------------------------------------------------------------------------- /node_modules/sax/test/cdata-fake-end.js: -------------------------------------------------------------------------------- 1 | 2 | var p = require(__dirname).test({ 3 | expect : [ 4 | ["opentag", {"name": "R","attributes": {}}], 5 | ["opencdata", undefined], 6 | ["cdata", "[[[[[[[[]]]]]]]]"], 7 | ["closecdata", undefined], 8 | ["closetag", "R"] 9 | ] 10 | }) 11 | var x = "" 12 | for (var i = 0; i < x.length ; i ++) { 13 | p.write(x.charAt(i)) 14 | } 15 | p.close(); 16 | 17 | 18 | var p2 = require(__dirname).test({ 19 | expect : [ 20 | ["opentag", {"name": "R","attributes": {}}], 21 | ["opencdata", undefined], 22 | ["cdata", "[[[[[[[[]]]]]]]]"], 23 | ["closecdata", undefined], 24 | ["closetag", "R"] 25 | ] 26 | }) 27 | var x = "" 28 | p2.write(x).close(); 29 | -------------------------------------------------------------------------------- /node_modules/sax/test/cdata-multiple.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | expect : [ 4 | ["opentag", {"name": "R","attributes": {}}], 5 | ["opencdata", undefined], 6 | ["cdata", " this is "], 7 | ["closecdata", undefined], 8 | ["opencdata", undefined], 9 | ["cdata", "character data  "], 10 | ["closecdata", undefined], 11 | ["closetag", "R"] 12 | ] 13 | }).write("").write("").close(); 15 | 16 | -------------------------------------------------------------------------------- /node_modules/sax/test/cdata.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test({ 2 | xml : "", 3 | expect : [ 4 | ["opentag", {"name": "R","attributes": {}}], 5 | ["opencdata", undefined], 6 | ["cdata", " this is character data  "], 7 | ["closecdata", undefined], 8 | ["closetag", "R"] 9 | ] 10 | }); 11 | -------------------------------------------------------------------------------- /node_modules/sax/test/issue-23.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test 3 | ( { xml : 4 | ""+ 5 | ""+ 6 | "653724009"+ 7 | "-1"+ 8 | "01pG0000002KoSUIA0"+ 9 | "-1"+ 10 | "CalendarController"+ 11 | "true"+ 12 | ""+ 13 | "" 14 | 15 | , expect : 16 | [ [ "opentag", { name: "COMPILECLASSESRESPONSE", attributes: {} } ] 17 | , [ "opentag", { name : "RESULT", attributes: {} } ] 18 | , [ "opentag", { name: "BODYCRC", attributes: {} } ] 19 | , [ "text", "653724009" ] 20 | , [ "closetag", "BODYCRC" ] 21 | , [ "opentag", { name: "COLUMN", attributes: {} } ] 22 | , [ "text", "-1" ] 23 | , [ "closetag", "COLUMN" ] 24 | , [ "opentag", { name: "ID", attributes: {} } ] 25 | , [ "text", "01pG0000002KoSUIA0" ] 26 | , [ "closetag", "ID" ] 27 | , [ "opentag", {name: "LINE", attributes: {} } ] 28 | , [ "text", "-1" ] 29 | , [ "closetag", "LINE" ] 30 | , [ "opentag", {name: "NAME", attributes: {} } ] 31 | , [ "text", "CalendarController" ] 32 | , [ "closetag", "NAME" ] 33 | , [ "opentag", {name: "SUCCESS", attributes: {} } ] 34 | , [ "text", "true" ] 35 | , [ "closetag", "SUCCESS" ] 36 | , [ "closetag", "RESULT" ] 37 | , [ "closetag", "COMPILECLASSESRESPONSE" ] 38 | ] 39 | , strict : false 40 | , opt : {} 41 | } 42 | ) 43 | 44 | -------------------------------------------------------------------------------- /node_modules/sax/test/issue-30.js: -------------------------------------------------------------------------------- 1 | // https://github.com/isaacs/sax-js/issues/33 2 | require(__dirname).test 3 | ( { xml : "\n"+ 4 | "\n"+ 7 | "\n"+ 8 | "" 9 | 10 | , expect : 11 | [ [ "opentag", { name: "xml", attributes: {} } ] 12 | , [ "text", "\n" ] 13 | , [ "comment", " \n comment with a single dash- in it\n" ] 14 | , [ "text", "\n" ] 15 | , [ "opentag", { name: "data", attributes: {} } ] 16 | , [ "closetag", "data" ] 17 | , [ "text", "\n" ] 18 | , [ "closetag", "xml" ] 19 | ] 20 | , strict : true 21 | , opt : {} 22 | } 23 | ) 24 | 25 | -------------------------------------------------------------------------------- /node_modules/sax/test/issue-35.js: -------------------------------------------------------------------------------- 1 | // https://github.com/isaacs/sax-js/issues/35 2 | require(__dirname).test 3 | ( { xml : " \n"+ 4 | "" 5 | 6 | , expect : 7 | [ [ "opentag", { name: "xml", attributes: {} } ] 8 | , [ "text", "\r\r\n" ] 9 | , [ "closetag", "xml" ] 10 | ] 11 | , strict : true 12 | , opt : {} 13 | } 14 | ) 15 | 16 | -------------------------------------------------------------------------------- /node_modules/sax/test/parser-position.js: -------------------------------------------------------------------------------- 1 | var sax = require("../lib/sax"), 2 | assert = require("assert") 3 | 4 | function testPosition(chunks, expectedEvents) { 5 | var parser = sax.parser(); 6 | expectedEvents.forEach(function(expectation) { 7 | parser['on' + expectation[0]] = function() { 8 | for (var prop in expectation[1]) { 9 | assert.equal(parser[prop], expectation[1][prop]); 10 | } 11 | } 12 | }); 13 | chunks.forEach(function(chunk) { 14 | parser.write(chunk); 15 | }); 16 | }; 17 | 18 | testPosition(['

abcdefgh
'], 19 | [ ['opentag', { position: 5, startTagPosition: 1 }] 20 | , ['text', { position: 19, startTagPosition: 14 }] 21 | , ['closetag', { position: 19, startTagPosition: 14 }] 22 | ]); 23 | 24 | testPosition(['
abcde','fgh
'], 25 | [ ['opentag', { position: 5, startTagPosition: 1 }] 26 | , ['text', { position: 19, startTagPosition: 14 }] 27 | , ['closetag', { position: 19, startTagPosition: 14 }] 28 | ]); 29 | -------------------------------------------------------------------------------- /node_modules/sax/test/script.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test({ 2 | xml : "", 3 | expect : [ 4 | ["opentag", {"name": "HTML","attributes": {}}], 5 | ["opentag", {"name": "HEAD","attributes": {}}], 6 | ["opentag", {"name": "SCRIPT","attributes": {}}], 7 | ["script", "if (1 < 0) { console.log('elo there'); }"], 8 | ["closetag", "SCRIPT"], 9 | ["closetag", "HEAD"], 10 | ["closetag", "HTML"] 11 | ] 12 | }); 13 | -------------------------------------------------------------------------------- /node_modules/sax/test/self-closing-child-strict.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | xml : 4 | ""+ 5 | "" + 6 | "" + 7 | "" + 8 | "" + 9 | "=(|)" + 10 | "" + 11 | "", 12 | expect : [ 13 | ["opentag", { 14 | "name": "root", 15 | "attributes": {} 16 | }], 17 | ["opentag", { 18 | "name": "child", 19 | "attributes": {} 20 | }], 21 | ["opentag", { 22 | "name": "haha", 23 | "attributes": {} 24 | }], 25 | ["closetag", "haha"], 26 | ["closetag", "child"], 27 | ["opentag", { 28 | "name": "monkey", 29 | "attributes": {} 30 | }], 31 | ["text", "=(|)"], 32 | ["closetag", "monkey"], 33 | ["closetag", "root"], 34 | ["end"], 35 | ["ready"] 36 | ], 37 | strict : true, 38 | opt : {} 39 | }); 40 | 41 | -------------------------------------------------------------------------------- /node_modules/sax/test/self-closing-child.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | xml : 4 | ""+ 5 | "" + 6 | "" + 7 | "" + 8 | "" + 9 | "=(|)" + 10 | "" + 11 | "", 12 | expect : [ 13 | ["opentag", { 14 | "name": "ROOT", 15 | "attributes": {} 16 | }], 17 | ["opentag", { 18 | "name": "CHILD", 19 | "attributes": {} 20 | }], 21 | ["opentag", { 22 | "name": "HAHA", 23 | "attributes": {} 24 | }], 25 | ["closetag", "HAHA"], 26 | ["closetag", "CHILD"], 27 | ["opentag", { 28 | "name": "MONKEY", 29 | "attributes": {} 30 | }], 31 | ["text", "=(|)"], 32 | ["closetag", "MONKEY"], 33 | ["closetag", "ROOT"], 34 | ["end"], 35 | ["ready"] 36 | ], 37 | strict : false, 38 | opt : {} 39 | }); 40 | 41 | -------------------------------------------------------------------------------- /node_modules/sax/test/self-closing-tag.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | xml : 4 | " "+ 5 | " "+ 6 | " "+ 7 | " "+ 8 | "=(|) "+ 9 | ""+ 10 | " ", 11 | expect : [ 12 | ["opentag", {name:"ROOT", attributes:{}}], 13 | ["opentag", {name:"HAHA", attributes:{}}], 14 | ["closetag", "HAHA"], 15 | ["opentag", {name:"HAHA", attributes:{}}], 16 | ["closetag", "HAHA"], 17 | // ["opentag", {name:"HAHA", attributes:{}}], 18 | // ["closetag", "HAHA"], 19 | ["opentag", {name:"MONKEY", attributes:{}}], 20 | ["text", "=(|)"], 21 | ["closetag", "MONKEY"], 22 | ["closetag", "ROOT"] 23 | ], 24 | opt : { trim : true } 25 | }); -------------------------------------------------------------------------------- /node_modules/sax/test/stray-ending.js: -------------------------------------------------------------------------------- 1 | // stray ending tags should just be ignored in non-strict mode. 2 | // https://github.com/isaacs/sax-js/issues/32 3 | require(__dirname).test 4 | ( { xml : 5 | "" 6 | , expect : 7 | [ [ "opentag", { name: "A", attributes: {} } ] 8 | , [ "opentag", { name: "B", attributes: {} } ] 9 | , [ "text", "" ] 10 | , [ "closetag", "B" ] 11 | , [ "closetag", "A" ] 12 | ] 13 | , strict : false 14 | , opt : {} 15 | } 16 | ) 17 | 18 | -------------------------------------------------------------------------------- /node_modules/sax/test/trailing-non-whitespace.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test({ 3 | xml : "Welcome, to monkey land", 4 | expect : [ 5 | ["opentag", { 6 | "name": "SPAN", 7 | "attributes": {} 8 | }], 9 | ["text", "Welcome,"], 10 | ["closetag", "SPAN"], 11 | ["text", " to monkey land"], 12 | ["end"], 13 | ["ready"] 14 | ], 15 | strict : false, 16 | opt : {} 17 | }); 18 | -------------------------------------------------------------------------------- /node_modules/sax/test/unquoted.js: -------------------------------------------------------------------------------- 1 | // unquoted attributes should be ok in non-strict mode 2 | // https://github.com/isaacs/sax-js/issues/31 3 | require(__dirname).test 4 | ( { xml : 5 | "" 6 | , expect : 7 | [ [ "attribute", { name: "class", value: "test" } ] 8 | , [ "attribute", { name: "hello", value: "world" } ] 9 | , [ "opentag", { name: "SPAN", 10 | attributes: { class: "test", hello: "world" } } ] 11 | , [ "closetag", "SPAN" ] 12 | ] 13 | , strict : false 14 | , opt : {} 15 | } 16 | ) 17 | 18 | -------------------------------------------------------------------------------- /node_modules/sax/test/xmlns-issue-41.js: -------------------------------------------------------------------------------- 1 | var t = require(__dirname) 2 | 3 | , xmls = // should be the same both ways. 4 | [ "" 5 | , "" ] 6 | 7 | , ex1 = 8 | [ [ "opennamespace" 9 | , { prefix: "a" 10 | , uri: "http://ATTRIBUTE" 11 | } 12 | ] 13 | , [ "attribute" 14 | , { name: "xmlns:a" 15 | , value: "http://ATTRIBUTE" 16 | , prefix: "xmlns" 17 | , local: "a" 18 | , uri: "http://www.w3.org/2000/xmlns/" 19 | } 20 | ] 21 | , [ "attribute" 22 | , { name: "a:attr" 23 | , local: "attr" 24 | , prefix: "a" 25 | , uri: "http://ATTRIBUTE" 26 | , value: "value" 27 | } 28 | ] 29 | , [ "opentag" 30 | , { name: "parent" 31 | , uri: "" 32 | , prefix: "" 33 | , local: "parent" 34 | , attributes: 35 | { "a:attr": 36 | { name: "a:attr" 37 | , local: "attr" 38 | , prefix: "a" 39 | , uri: "http://ATTRIBUTE" 40 | , value: "value" 41 | } 42 | , "xmlns:a": 43 | { name: "xmlns:a" 44 | , local: "a" 45 | , prefix: "xmlns" 46 | , uri: "http://www.w3.org/2000/xmlns/" 47 | , value: "http://ATTRIBUTE" 48 | } 49 | } 50 | , ns: {"a": "http://ATTRIBUTE"} 51 | } 52 | ] 53 | , ["closetag", "parent"] 54 | , ["closenamespace", { prefix: "a", uri: "http://ATTRIBUTE" }] 55 | ] 56 | 57 | // swap the order of elements 2 and 1 58 | , ex2 = [ex1[0], ex1[2], ex1[1]].concat(ex1.slice(3)) 59 | , expected = [ex1, ex2] 60 | 61 | xmls.forEach(function (x, i) { 62 | t.test({ xml: x 63 | , expect: expected[i] 64 | , strict: true 65 | , opt: { xmlns: true } 66 | }) 67 | }) 68 | -------------------------------------------------------------------------------- /node_modules/sax/test/xmlns-unbound.js: -------------------------------------------------------------------------------- 1 | 2 | require(__dirname).test( 3 | { strict : true 4 | , opt : { xmlns: true } 5 | , expect : 6 | [ ["error", "Unbound namespace prefix: \"unbound\"\nLine: 0\nColumn: 28\nChar: >"] 7 | 8 | , [ "attribute", { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } ] 9 | , [ "opentag", { name: "root", uri: "", prefix: "", local: "root", 10 | attributes: { "unbound:attr": { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } }, 11 | ns: {} } ] 12 | , [ "closetag", "root" ] 13 | ] 14 | } 15 | ).write("") 16 | -------------------------------------------------------------------------------- /node_modules/sax/test/xmlns-xml-default-prefix-attribute.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test( 2 | { xml : "" 3 | , expect : 4 | [ [ "attribute" 5 | , { name: "xml:lang" 6 | , local: "lang" 7 | , prefix: "xml" 8 | , uri: "http://www.w3.org/XML/1998/namespace" 9 | , value: "en" 10 | } 11 | ] 12 | , [ "opentag" 13 | , { name: "root" 14 | , uri: "" 15 | , prefix: "" 16 | , local: "root" 17 | , attributes: 18 | { "xml:lang": 19 | { name: "xml:lang" 20 | , local: "lang" 21 | , prefix: "xml" 22 | , uri: "http://www.w3.org/XML/1998/namespace" 23 | , value: "en" 24 | } 25 | } 26 | , ns: {} 27 | } 28 | ] 29 | , ["closetag", "root"] 30 | ] 31 | , strict : true 32 | , opt : { xmlns: true } 33 | } 34 | ) 35 | 36 | -------------------------------------------------------------------------------- /node_modules/sax/test/xmlns-xml-default-prefix.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test( 2 | { xml : "" 3 | , expect : 4 | [ 5 | [ "opentag" 6 | , { name: "xml:root" 7 | , uri: "http://www.w3.org/XML/1998/namespace" 8 | , prefix: "xml" 9 | , local: "root" 10 | , attributes: {} 11 | , ns: {} 12 | } 13 | ] 14 | , ["closetag", "xml:root"] 15 | ] 16 | , strict : true 17 | , opt : { xmlns: true } 18 | } 19 | ) 20 | 21 | -------------------------------------------------------------------------------- /node_modules/sax/test/xmlns-xml-default-redefine.js: -------------------------------------------------------------------------------- 1 | require(__dirname).test( 2 | { xml : "" 3 | , expect : 4 | [ ["error" 5 | , "xml: prefix must be bound to http://www.w3.org/XML/1998/namespace\n" 6 | + "Actual: ERROR\n" 7 | + "Line: 0\nColumn: 27\nChar: '" 8 | ] 9 | , [ "attribute" 10 | , { name: "xmlns:xml" 11 | , local: "xml" 12 | , prefix: "xmlns" 13 | , uri: "http://www.w3.org/2000/xmlns/" 14 | , value: "ERROR" 15 | } 16 | ] 17 | , [ "opentag" 18 | , { name: "xml:root" 19 | , uri: "http://www.w3.org/XML/1998/namespace" 20 | , prefix: "xml" 21 | , local: "root" 22 | , attributes: 23 | { "xmlns:xml": 24 | { name: "xmlns:xml" 25 | , local: "xml" 26 | , prefix: "xmlns" 27 | , uri: "http://www.w3.org/2000/xmlns/" 28 | , value: "ERROR" 29 | } 30 | } 31 | , ns: {} 32 | } 33 | ] 34 | , ["closetag", "xml:root"] 35 | ] 36 | , strict : true 37 | , opt : { xmlns: true } 38 | } 39 | ) 40 | 41 | -------------------------------------------------------------------------------- /node_modules/vows/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 cloudhead 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /node_modules/vows/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Run all tests 3 | # 4 | test: 5 | @@bin/vows test/* 6 | 7 | .PHONY: test install 8 | -------------------------------------------------------------------------------- /node_modules/vows/lib/assert/error.js: -------------------------------------------------------------------------------- 1 | var stylize = require('../vows/console').stylize; 2 | var inspect = require('../vows/console').inspect; 3 | 4 | require('assert').AssertionError.prototype.toString = function () { 5 | var that = this, 6 | source; 7 | 8 | if (this.stack) { 9 | source = this.stack.match(/([a-zA-Z0-9._-]+\.(?:js|coffee))(:\d+):\d+/); 10 | } 11 | 12 | function parse(str) { 13 | var actual = inspect(that.actual, {showHidden: that.actual instanceof Error}), 14 | expected; 15 | 16 | if (that.expected instanceof Function) { 17 | expected = that.expected.name; 18 | } 19 | else { 20 | expected = inspect(that.expected, {showHidden: that.actual instanceof Error}); 21 | } 22 | 23 | return str.replace(/{actual}/g, actual). 24 | replace(/{operator}/g, stylize(that.operator, 'bold')). 25 | replace(/{expected}/g, expected); 26 | } 27 | 28 | if (this.message) { 29 | var msg = stylize(parse(this.message), 'yellow'); 30 | if (source) { 31 | msg += stylize(' // ' + source[1] + source[2], 'grey'); 32 | } 33 | return msg; 34 | } else { 35 | return stylize([ 36 | this.expected, 37 | this.operator, 38 | this.actual 39 | ].join(' '), 'yellow'); 40 | } 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /node_modules/vows/lib/vows/coverage/file.js: -------------------------------------------------------------------------------- 1 | 2 | exports.coverage = function (filename, data) { 3 | var ret = { 4 | filename: filename, 5 | coverage: 0, 6 | hits: 0, 7 | misses: 0, 8 | sloc : 0 9 | }; 10 | 11 | var source = data.source; 12 | ret.source = source.map(function (line, num) { 13 | num++; 14 | 15 | if (data[num] === 0) { 16 | ret.misses++; 17 | ret.sloc++; 18 | } else if (data[num] !== undefined) { 19 | ret.hits++; 20 | ret.sloc++; 21 | } 22 | 23 | return { line: line, coverage: (data[num] === undefined ? '' : data[num]) }; 24 | }); 25 | 26 | ret.coverage = (ret.hits / ret.sloc) * 100; 27 | 28 | return ret; 29 | }; -------------------------------------------------------------------------------- /node_modules/vows/lib/vows/coverage/fragments/coverage-foot.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /node_modules/vows/lib/vows/coverage/fragments/coverage-head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 50 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /node_modules/vows/lib/vows/coverage/report-json.js: -------------------------------------------------------------------------------- 1 | var util = require('util'), 2 | fs = require('fs'), 3 | file = require('./file'); 4 | 5 | this.name = 'coverage-report-json'; 6 | 7 | this.report = function (coverageMap) { 8 | var output = { 9 | meta: { 10 | "generator": "vowsjs", 11 | "generated": new Date().toString(), 12 | "instrumentation": "node-jscoverage", 13 | "file-version": "1.0" 14 | }, 15 | files: [ ], 16 | coverage: [ ] 17 | }; 18 | 19 | 20 | for (var filename in coverageMap) { 21 | if (coverageMap.hasOwnProperty(filename)) { 22 | var data = file.coverage(filename, coverageMap[filename]); 23 | 24 | var coverage = { 25 | file: filename, 26 | coverage: data.coverage.toFixed(2), 27 | hits: data.hits, 28 | misses: data.misses, 29 | sloc: data.sloc, 30 | source: { } 31 | }; 32 | 33 | for (var i = 0; i < data.source.length; i++) { 34 | coverage.source[i + 1] = { 35 | line: data.source[i].line, 36 | coverage: data.source[i].coverage 37 | }; 38 | } 39 | 40 | output.coverage.push(coverage); 41 | 42 | output.files.push(filename); 43 | } 44 | } 45 | 46 | try { 47 | out = fs.openSync("coverage.json", "w"); 48 | fs.writeSync(out, JSON.stringify(output)); 49 | fs.close(out); 50 | } catch (error) { 51 | util.print("Error: Unable to write to file coverage.json\n"); 52 | return; 53 | } 54 | }; 55 | -------------------------------------------------------------------------------- /node_modules/vows/lib/vows/coverage/report-plain.js: -------------------------------------------------------------------------------- 1 | var util = require('util'), 2 | file = require('./file'); 3 | 4 | this.name = 'coverage-report-plain'; 5 | 6 | function lpad(str, width) { 7 | str = String(str); 8 | var n = width - str.length; 9 | 10 | if (n < 1) { 11 | return str; 12 | } 13 | 14 | while (n--) { 15 | str = ' ' + str; 16 | } 17 | 18 | return str; 19 | } 20 | 21 | 22 | this.report = function (coverageMap) { 23 | for (var filename in coverageMap) { 24 | if (coverageMap.hasOwnProperty(filename)) { 25 | var data = file.coverage(filename, coverageMap[filename]); 26 | 27 | util.print(filename + ":\n"); 28 | util.print("[ hits: " + data.hits + ", misses: " + data.misses); 29 | util.print(", sloc: " + data.sloc + ", coverage: " + data.coverage.toFixed(2) + "% ]\n"); 30 | 31 | for (var i = 0; i < data.source.length; i++) { 32 | util.print(lpad(data.source[i].coverage, 5) + " | " + data.source[i].line + "\n"); 33 | } 34 | 35 | util.print("\n"); 36 | } 37 | } 38 | }; 39 | -------------------------------------------------------------------------------- /node_modules/vows/lib/vows/extras.js: -------------------------------------------------------------------------------- 1 | var events = require('events'); 2 | // 3 | // Wrap a Node.js style async function into an EventEmmitter 4 | // 5 | this.prepare = function (obj, targets) { 6 | targets.forEach(function (target) { 7 | if (target in obj) { 8 | obj[target] = (function (fun) { 9 | return function () { 10 | var args = Array.prototype.slice.call(arguments); 11 | var ee = new(events.EventEmitter); 12 | 13 | args.push(function (err /* [, data] */) { 14 | var args = Array.prototype.slice.call(arguments, 1); 15 | 16 | if (err) { ee.emit.apply(ee, ['error', err].concat(args)) } 17 | else { ee.emit.apply(ee, ['success'].concat(args)) } 18 | }); 19 | fun.apply(obj, args); 20 | 21 | return ee; 22 | }; 23 | })(obj[target]); 24 | } 25 | }); 26 | return obj; 27 | }; 28 | 29 | -------------------------------------------------------------------------------- /node_modules/vows/lib/vows/reporters/json.js: -------------------------------------------------------------------------------- 1 | var options = { tail: '\n', raw: true }; 2 | var console = require('../../vows/console'); 3 | var puts = console.puts(options); 4 | 5 | // 6 | // Console JSON reporter 7 | // 8 | this.name = 'json'; 9 | this.setStream = function (s) { 10 | options.stream = s; 11 | }; 12 | 13 | function removeCircularSuite(obj, suite) { 14 | var result = {}; 15 | 16 | if (typeof obj !== 'object' || obj === null) return obj; 17 | 18 | Object.keys(obj).forEach(function(key) { 19 | if (obj[key] === suite) { 20 | result[key] = {}; 21 | } else { 22 | result[key] = removeCircularSuite(obj[key], suite || obj.suite); 23 | } 24 | }); 25 | 26 | return result; 27 | }; 28 | 29 | this.report = function (obj) { 30 | puts(JSON.stringify(removeCircularSuite(obj))); 31 | }; 32 | 33 | this.print = function (str) {}; 34 | -------------------------------------------------------------------------------- /node_modules/vows/lib/vows/reporters/silent.js: -------------------------------------------------------------------------------- 1 | // 2 | // Silent reporter - "Shhh" 3 | // 4 | this.name = 'silent'; 5 | this.reset = function () {}; 6 | this.report = function () {}; 7 | this.print = function () {}; 8 | 9 | -------------------------------------------------------------------------------- /node_modules/vows/lib/vows/reporters/spec.js: -------------------------------------------------------------------------------- 1 | var util = require('util'); 2 | 3 | var options = { tail: '\n' }; 4 | var console = require('../../vows/console'); 5 | var stylize = console.stylize, 6 | puts = console.puts(options); 7 | // 8 | // Console reporter 9 | // 10 | 11 | this.name = 'spec'; 12 | this.setStream = function (s) { 13 | options.stream = s; 14 | }; 15 | this.report = function (data) { 16 | var event = data[1]; 17 | 18 | switch (data[0]) { 19 | case 'subject': 20 | puts('\n♢ ' + stylize(event, 'bold') + '\n'); 21 | break; 22 | case 'context': 23 | puts(console.contextText(event)); 24 | break; 25 | case 'vow': 26 | puts(console.vowText(event)); 27 | break; 28 | case 'end': 29 | util.print('\n'); 30 | break; 31 | case 'finish': 32 | puts(console.result(event).join('\n')); 33 | break; 34 | case 'error': 35 | puts(console.error(event)); 36 | break; 37 | } 38 | }; 39 | 40 | this.print = function (str) { 41 | util.print(str); 42 | }; 43 | -------------------------------------------------------------------------------- /node_modules/vows/lib/vows/reporters/watch.js: -------------------------------------------------------------------------------- 1 | var options = {}; 2 | var console = require('../../vows/console'); 3 | var spec = require('../../vows/reporters/spec'); 4 | var stylize = console.stylize, 5 | puts = console.puts(options); 6 | // 7 | // Console reporter 8 | // 9 | var lastContext; 10 | 11 | this.name = 'watch'; 12 | this.setStream = function (s) { 13 | options.stream = s; 14 | }; 15 | this.reset = function () { 16 | lastContext = null; 17 | }; 18 | this.report = function (data) { 19 | var event = data[1]; 20 | 21 | switch (data[0]) { 22 | case 'vow': 23 | if (['honored', 'pending'].indexOf(event.status) === -1) { 24 | if (lastContext !== event.context) { 25 | lastContext = event.context; 26 | puts(console.contextText(event.context)); 27 | } 28 | puts(console.vowText(event)); 29 | puts(''); 30 | } 31 | break; 32 | case 'error': 33 | puts(console.error(event)); 34 | break; 35 | } 36 | }; 37 | this.print = function (str) {}; 38 | -------------------------------------------------------------------------------- /node_modules/vows/node_modules/eyes/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 cloudhead 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /node_modules/vows/node_modules/eyes/Makefile: -------------------------------------------------------------------------------- 1 | test: 2 | @@node test/eyes-test.js 3 | 4 | .PHONY: test 5 | -------------------------------------------------------------------------------- /node_modules/vows/node_modules/eyes/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "eyes", 3 | "description" : "a customizable value inspector", 4 | "url" : "http://github.com/cloudhead/eyes.js", 5 | "keywords" : ["inspector", "debug", "inspect", "print"], 6 | "author" : "Alexis Sellier ", 7 | "contributors" : [{ "name": "Charlie Robbins", "email": "charlie@nodejitsu.com" }], 8 | "licenses" : ["MIT"], 9 | "dependencies" : [], 10 | "main" : "./lib/eyes", 11 | "version" : "0.1.7", 12 | "scripts" : { "test": "node test/*-test.js" }, 13 | "directories" : { "lib": "./lib", "test": "./test" }, 14 | "engines" : { "node": "> 0.1.90" } 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/vows/node_modules/eyes/test/eyes-test.js: -------------------------------------------------------------------------------- 1 | var util = require('util'); 2 | var eyes = require('../lib/eyes'); 3 | 4 | eyes.inspect({ 5 | number: 42, 6 | string: "John Galt", 7 | regexp: /[a-z]+/, 8 | array: [99, 168, 'x', {}], 9 | func: function () {}, 10 | bool: false, 11 | nil: null, 12 | undef: undefined, 13 | object: {attr: []} 14 | }, "native types"); 15 | 16 | eyes.inspect({ 17 | number: new(Number)(42), 18 | string: new(String)("John Galt"), 19 | regexp: new(RegExp)(/[a-z]+/), 20 | array: new(Array)(99, 168, 'x', {}), 21 | bool: new(Boolean)(false), 22 | object: new(Object)({attr: []}), 23 | date: new(Date) 24 | }, "wrapped types"); 25 | 26 | var obj = {}; 27 | obj.that = { self: obj }; 28 | obj.self = obj; 29 | 30 | eyes.inspect(obj, "circular object"); 31 | eyes.inspect({hello: 'moto'}, "small object"); 32 | eyes.inspect({hello: new(Array)(6) }, "big object"); 33 | eyes.inspect(["hello 'world'", 'hello "world"'], "quotes"); 34 | eyes.inspect({ 35 | recommendations: [{ 36 | id: 'a7a6576c2c822c8e2bd81a27e41437d8', 37 | key: [ 'spree', 3.764316258020699 ], 38 | value: { 39 | _id: 'a7a6576c2c822c8e2bd81a27e41437d8', 40 | _rev: '1-2e2d2f7fd858c4a5984bcf809d22ed98', 41 | type: 'domain', 42 | domain: 'spree', 43 | weight: 3.764316258020699, 44 | product_id: 30 45 | } 46 | }] 47 | }, 'complex'); 48 | 49 | eyes.inspect([null], "null in array"); 50 | 51 | var inspect = eyes.inspector({ stream: null }); 52 | 53 | util.puts(inspect('something', "something")); 54 | util.puts(inspect("something else")); 55 | 56 | util.puts(inspect(["no color"], null, { styles: false })); 57 | -------------------------------------------------------------------------------- /node_modules/vows/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "vows", 3 | "description" : "Asynchronous BDD & continuous integration for node.js", 4 | "url" : "http://vowsjs.org", 5 | "keywords" : ["testing", "spec", "test", "BDD"], 6 | "author" : "Alexis Sellier ", 7 | "contributors" : [{ "name": "Charlie Robbins", "email": "charlie.robbins@gmail.com" }], 8 | "dependencies" : {"eyes": ">=0.1.6"}, 9 | "main" : "./lib/vows", 10 | "bin" : { "vows": "./bin/vows" }, 11 | "directories" : { "test": "./test", "bin": "./bin" }, 12 | "version" : "0.6.1", 13 | "scripts" : {"test": "./bin/vows --spec"}, 14 | "engines" : {"node": ">=0.2.6"} 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/vows/test/fixtures/isolate/failing.js: -------------------------------------------------------------------------------- 1 | var vows = require('../../../lib/vows'), 2 | assert = require('assert'); 3 | 4 | var obvious; 5 | vows.describe('failing').addBatch({ 6 | 'Obvious test': obvious = { 7 | topic: function () { 8 | this.callback(null, false); 9 | }, 10 | 'should work': function (result) { 11 | assert.ok(result); 12 | } 13 | // but it won't 14 | }, 15 | 'Obvious test #2': obvious, 16 | 'Obvious test #3': obvious, 17 | 'Obvious test #4': obvious 18 | }).export(module); 19 | -------------------------------------------------------------------------------- /node_modules/vows/test/fixtures/isolate/log.js: -------------------------------------------------------------------------------- 1 | var vows = require('../../../lib/vows'), 2 | assert = require('assert'); 3 | 4 | var obvious; 5 | vows.describe('stderr').addBatch({ 6 | 'Obvious test': obvious = { 7 | topic: function () { 8 | this.callback(null, true); 9 | }, 10 | 'should work': function (result) { 11 | console.log('oh no!'); 12 | assert.ok(result); 13 | } 14 | }, 15 | 'Obvious test #2': obvious, 16 | 'Obvious test #3': obvious, 17 | 'Obvious test #4': obvious 18 | }).export(module); 19 | -------------------------------------------------------------------------------- /node_modules/vows/test/fixtures/isolate/passing.js: -------------------------------------------------------------------------------- 1 | var vows = require('../../../lib/vows'), 2 | assert = require('assert'); 3 | 4 | var obvious; 5 | vows.describe('passing').addBatch({ 6 | 'Obvious test': obvious = { 7 | topic: function () { 8 | this.callback(null, true); 9 | }, 10 | 'should work': function (result) { 11 | assert.ok(result); 12 | } 13 | }, 14 | 'Obvious test #2': obvious, 15 | 'Obvious test #3': obvious, 16 | 'Obvious test #4': obvious 17 | }).export(module); 18 | -------------------------------------------------------------------------------- /node_modules/vows/test/fixtures/isolate/stderr.js: -------------------------------------------------------------------------------- 1 | var vows = require('../../../lib/vows'), 2 | assert = require('assert'); 3 | 4 | var obvious; 5 | vows.describe('stderr').addBatch({ 6 | 'Obvious test': obvious = { 7 | topic: function () { 8 | this.callback(null, true); 9 | }, 10 | 'should work': function (result) { 11 | console.error('oh no!'); 12 | assert.ok(result); 13 | } 14 | }, 15 | 'Obvious test #2': obvious, 16 | 'Obvious test #3': obvious, 17 | 'Obvious test #4': obvious 18 | }).export(module); 19 | -------------------------------------------------------------------------------- /node_modules/vows/test/fixtures/supress-stdout/output.js: -------------------------------------------------------------------------------- 1 | var vows = require('../../../lib/vows'), 2 | assert = require('assert'); 3 | 4 | vows.describe('output').addBatch({ 5 | 'outputting': { 6 | topic: function () { 7 | console.log('goo'); 8 | this.callback(null, true); 9 | }, 10 | 'should work': function (result) { 11 | console.log('goo'); 12 | assert.ok(result); 13 | } 14 | }, 15 | }).export(module); 16 | 17 | -------------------------------------------------------------------------------- /node_modules/vows/test/supress-stdout-test.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'), 2 | path = require('path'), 3 | vows = require('../lib/vows'), 4 | exec = require('child_process').exec; 5 | 6 | function generateTopic(supress) { 7 | return function () { 8 | var cmd = './bin/vows ' + (supress ? '--supress-stdout ' : '') + 9 | './test/fixtures/supress-stdout/output.js', 10 | options = {cwd: path.resolve(__dirname + '/../')}, 11 | callback = this.callback; 12 | 13 | exec(cmd, options, function (err, stdout) { 14 | callback(null, {err: err, stdout: stdout}); 15 | }); 16 | }; 17 | } 18 | 19 | vows.describe('vows/supress-stdout').addBatch({ 20 | 'Running vows for test/fixtures/supress-stdout/output.js': { 21 | 'with --supress-stdout flag': { 22 | topic: generateTopic(true), 23 | 'should be ok': function (result) { 24 | assert.isNull(result.err); 25 | }, 26 | 'should not contain output from stdout': function (result) { 27 | assert.equal(result.stdout.toString().indexOf('goo'), -1); 28 | // console.log output? 29 | // nope, just Chuck Testa! 30 | } 31 | }, 32 | 'without --supress-stdout flag': { 33 | topic: generateTopic(), 34 | 'should be ok': function (result) { 35 | assert.isNull(result.err); 36 | }, 37 | 'should contain output from stdout': function (result) { 38 | assert.notEqual(result.stdout.toString().indexOf('goo'), -1); 39 | } 40 | } 41 | } 42 | }).export(module); 43 | 44 | -------------------------------------------------------------------------------- /node_modules/vows/test/vows-error-test.js: -------------------------------------------------------------------------------- 1 | var path = require('path'), 2 | events = require('events'), 3 | assert = require('assert'), 4 | fs = require('fs'), 5 | vows = require('../lib/vows'); 6 | 7 | function doSomethingAsync(callback) { 8 | var err = null; 9 | var testValue = 'a'; 10 | 11 | process.nextTick(function() { 12 | callback(err, testValue); 13 | }); 14 | } 15 | 16 | function doSomethingAsyncWithError(callback) { 17 | var err = true; 18 | var testValue = 'a'; 19 | 20 | process.nextTick(function() { 21 | callback(err, testValue); 22 | }); 23 | } 24 | 25 | 26 | vows.describe('vows/error').addBatch({ 27 | 'Generate success response to async function': { 28 | topic: function() { 29 | doSomethingAsync(this.callback) 30 | }, 31 | 'Validate success': function(err, testValue) { 32 | assert.ok(!err); 33 | }, 34 | 'Validate testValue': function(err, testValue) { 35 | assert.equal(testValue, 'a'); 36 | } 37 | }, 38 | 39 | 'Generate error response to async function': { 40 | topic: function() { 41 | doSomethingAsyncWithError(this.callback) 42 | }, 43 | 'Validate error': function(err, testValue) { 44 | assert.ok(err); 45 | }, 46 | 'Validate testValue': function(err, testValue) { 47 | // This assertion fails. It shouldn't. 48 | assert.equal(testValue, 'a'); 49 | } 50 | } 51 | }).export(module) -------------------------------------------------------------------------------- /node_modules/winston/.gitignore: -------------------------------------------------------------------------------- 1 | test/*.log 2 | test/fixtures/*.json 3 | test/fixtures/logs/*.log 4 | npm-debug.log 5 | -------------------------------------------------------------------------------- /node_modules/winston/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | 6 | notifications: 7 | email: 8 | - travis@nodejitsu.com 9 | irc: "irc.freenode.org#nodejitsu" 10 | 11 | -------------------------------------------------------------------------------- /node_modules/winston/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Charlie Robbins 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/winston/examples/couchdb.js: -------------------------------------------------------------------------------- 1 | var winston = require('../lib/winston'); 2 | 3 | // 4 | // Create a new winston logger instance with two tranports: Console, and Couchdb 5 | // 6 | // 7 | // The Console transport will simply output to the console screen 8 | // The Couchdb tranport will perform an HTTP POST request to the specified CouchDB instance 9 | // 10 | var logger = new (winston.Logger)({ 11 | transports: [ 12 | new (winston.transports.Console)(), 13 | new (winston.transports.Couchdb)({ 'host': 'localhost', 'db': 'logs' }) 14 | // if you need auth do this: new (winston.transports.Couchdb)({ 'user': 'admin', 'pass': 'admin', 'host': 'localhost', 'db': 'logs' }) 15 | ] 16 | }); 17 | 18 | logger.log('info', 'Hello webhook log files!', { 'foo': 'bar' }); 19 | -------------------------------------------------------------------------------- /node_modules/winston/examples/webhook-post.js: -------------------------------------------------------------------------------- 1 | var winston = require('../lib/winston'); 2 | 3 | // 4 | // Create a new winston logger instance with two tranports: Console, and Webhook 5 | // 6 | // 7 | // The Console transport will simply output to the console screen 8 | // The Webhook tranports will perform an HTTP POST request to an abritrary end-point ( for post/recieve webhooks ) 9 | // 10 | var logger = new (winston.Logger)({ 11 | transports: [ 12 | new (winston.transports.Console)(), 13 | new (winston.transports.Webhook)({ 'host': 'localhost', 'port': 8080, 'path': '/collectdata' }) 14 | ] 15 | }); 16 | 17 | logger.log('info', 'Hello webhook log files!', { 'foo': 'bar' }); 18 | -------------------------------------------------------------------------------- /node_modules/winston/lib/winston/config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * config.js: Default settings for all levels that winston knows about 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var colors = require('colors'); 10 | 11 | var config = exports, 12 | allColors = exports.allColors = {}; 13 | 14 | config.addColors = function (colors) { 15 | mixin(allColors, colors); 16 | }; 17 | 18 | config.colorize = function (level) { 19 | return level[allColors[level]]; 20 | }; 21 | 22 | // 23 | // Export config sets 24 | // 25 | config.cli = require('./config/cli-config'); 26 | config.npm = require('./config/npm-config'); 27 | config.syslog = require('./config/syslog-config'); 28 | 29 | // 30 | // Add colors for pre-defined config sets 31 | // 32 | config.addColors(config.npm.colors); 33 | config.addColors(config.syslog.colors); 34 | 35 | function mixin (target) { 36 | var args = Array.prototype.slice.call(arguments, 1); 37 | 38 | args.forEach(function (a) { 39 | var keys = Object.keys(a); 40 | for (var i = 0; i < keys.length; i++) { 41 | target[keys[i]] = a[keys[i]]; 42 | } 43 | }); 44 | return target; 45 | }; -------------------------------------------------------------------------------- /node_modules/winston/lib/winston/config/cli-config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * cli-config.js: Config that conform to commonly used CLI logging levels. 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var cliConfig = exports; 10 | 11 | cliConfig.levels = { 12 | silly: 0, 13 | input: 1, 14 | verbose: 2, 15 | prompt: 3, 16 | info: 4, 17 | data: 5, 18 | help: 6, 19 | warn: 7, 20 | debug: 8, 21 | error: 9 22 | }; 23 | 24 | cliConfig.colors = { 25 | silly: 'magenta', 26 | input: 'grey', 27 | verbose: 'cyan', 28 | prompt: 'grey', 29 | info: 'green', 30 | data: 'grey', 31 | help: 'cyan', 32 | warn: 'yellow', 33 | debug: 'blue', 34 | error: 'red' 35 | }; -------------------------------------------------------------------------------- /node_modules/winston/lib/winston/config/npm-config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * npm-config.js: Config that conform to npm logging levels. 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var npmConfig = exports; 10 | 11 | npmConfig.levels = { 12 | silly: 0, 13 | verbose: 1, 14 | info: 2, 15 | warn: 3, 16 | debug: 4, 17 | error: 5 18 | }; 19 | 20 | npmConfig.colors = { 21 | silly: 'magenta', 22 | verbose: 'cyan', 23 | info: 'green', 24 | warn: 'yellow', 25 | debug: 'blue', 26 | error: 'red' 27 | }; -------------------------------------------------------------------------------- /node_modules/winston/lib/winston/config/syslog-config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * syslog-config.js: Config that conform to syslog logging levels. 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var syslogConfig = exports; 10 | 11 | syslogConfig.levels = { 12 | debug: 0, 13 | info: 1, 14 | notice: 2, 15 | warning: 3, 16 | error: 4, 17 | crit: 5, 18 | alert: 6, 19 | emerg: 7 20 | }; 21 | 22 | syslogConfig.colors = { 23 | debug: 'blue', 24 | info: 'green', 25 | notice: 'yellow', 26 | warning: 'red', 27 | error: 'red', 28 | crit: 'red', 29 | alert: 'yellow', 30 | emerg: 'red' 31 | }; -------------------------------------------------------------------------------- /node_modules/winston/lib/winston/exception.js: -------------------------------------------------------------------------------- 1 | /* 2 | * exception.js: Utility methods for gathing information about uncaughtExceptions. 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var os = require('os'), 10 | stackTrace = require('stack-trace'); 11 | 12 | var exception = exports; 13 | 14 | exception.getAllInfo = function (err) { 15 | return { 16 | process: exception.getProcessInfo(), 17 | os: exception.getOsInfo(), 18 | trace: exception.getTrace(err), 19 | stack: err.stack.split('\n') 20 | }; 21 | }; 22 | 23 | exception.getProcessInfo = function () { 24 | return { 25 | pid: process.pid, 26 | uid: process.getuid(), 27 | gid: process.getgid(), 28 | cwd: process.cwd(), 29 | execPath: process.execPath, 30 | version: process.version, 31 | argv: process.argv, 32 | memoryUsage: process.memoryUsage() 33 | }; 34 | }; 35 | 36 | exception.getOsInfo = function () { 37 | return { 38 | loadavg: os.loadavg(), 39 | uptime: os.uptime() 40 | }; 41 | }; 42 | 43 | exception.getTrace = function (err) { 44 | var trace = err ? stackTrace.parse(err) : stackTrace.get(); 45 | return trace.map(function (site) { 46 | return { 47 | column: site.getColumnNumber(), 48 | file: site.getFileName(), 49 | function: site.getFunctionName(), 50 | line: site.getLineNumber(), 51 | method: site.getMethodName(), 52 | native: site.isNative(), 53 | } 54 | }); 55 | }; -------------------------------------------------------------------------------- /node_modules/winston/lib/winston/transports.js: -------------------------------------------------------------------------------- 1 | /* 2 | * transports.js: Set of all transports Winston knows about 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var fs = require('fs'), 10 | path = require('path'), 11 | common = require('./common'); 12 | 13 | var transports = exports; 14 | 15 | // 16 | // Setup all transports as lazy-loaded getters. 17 | // 18 | fs.readdirSync(path.join(__dirname, 'transports')).forEach(function (file) { 19 | var transport = file.replace('.js', ''), 20 | name = common.capitalize(transport); 21 | 22 | if (transport === 'transport') { 23 | return; 24 | } 25 | 26 | transports.__defineGetter__(name, function () { 27 | return require('./transports/' + transport)[name]; 28 | }); 29 | }); -------------------------------------------------------------------------------- /node_modules/winston/lib/winston/transports/transport.js: -------------------------------------------------------------------------------- 1 | /* 2 | * transport.js: Base Transport object for all Winston transports. 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var events = require('events'), 10 | util = require('util'); 11 | 12 | // 13 | // ### function Transport (options) 14 | // #### @options {Object} Options for this instance. 15 | // Constructor function for the Tranport object responsible 16 | // base functionality for all winston transports. 17 | // 18 | var Transport = exports.Transport = function (options) { 19 | events.EventEmitter.call(this); 20 | 21 | options = options || {}; 22 | this.level = options.level || 'info'; 23 | this.silent = options.silent || false; 24 | this.handleExceptions = options.handleExceptions || false; 25 | }; 26 | 27 | // 28 | // Inherit from `events.EventEmitter`. 29 | // 30 | util.inherits(Transport, events.EventEmitter); 31 | 32 | // 33 | // ### function logException (msg, meta, callback) 34 | // #### @msg {string} Message to log 35 | // #### @meta {Object} **Optional** Additional metadata to attach 36 | // #### @callback {function} Continuation to respond to when complete. 37 | // Logs the specified `msg`, `meta` and responds to the callback once the log 38 | // operation is complete to ensure that the event loop will not exit before 39 | // all logging has completed. 40 | // 41 | Transport.prototype.logException = function (msg, meta, callback) { 42 | var self = this; 43 | 44 | function onLogged () { 45 | self.removeListener('error', onError); 46 | callback(); 47 | } 48 | 49 | function onError () { 50 | self.removeListener('logged', onLogged); 51 | callback(); 52 | } 53 | 54 | this.once('logged', onLogged); 55 | this.once('error', onError); 56 | this.log('error', msg, meta, function () { }); 57 | }; -------------------------------------------------------------------------------- /node_modules/winston/node_modules/async/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "deps/nodeunit"] 2 | path = deps/nodeunit 3 | url = git://github.com/caolan/nodeunit.git 4 | [submodule "deps/UglifyJS"] 5 | path = deps/UglifyJS 6 | url = https://github.com/mishoo/UglifyJS.git 7 | [submodule "deps/nodelint"] 8 | path = deps/nodelint 9 | url = https://github.com/tav/nodelint.git 10 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/async/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Caolan McMahon 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/async/Makefile: -------------------------------------------------------------------------------- 1 | PACKAGE = asyncjs 2 | NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node) 3 | 4 | BUILDDIR = dist 5 | 6 | all: build 7 | 8 | build: $(wildcard lib/*.js) 9 | mkdir -p $(BUILDDIR) 10 | uglifyjs lib/async.js > $(BUILDDIR)/async.min.js 11 | 12 | test: 13 | nodeunit test 14 | 15 | clean: 16 | rm -rf $(BUILDDIR) 17 | 18 | lint: 19 | nodelint --config nodelint.cfg lib/async.js 20 | 21 | .PHONY: test build all 22 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/async/deps/nodeunit.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Styles taken from qunit.css 3 | */ 4 | 5 | h1#nodeunit-header, h1.nodeunit-header { 6 | padding: 15px; 7 | font-size: large; 8 | background-color: #06b; 9 | color: white; 10 | font-family: 'trebuchet ms', verdana, arial; 11 | margin: 0; 12 | } 13 | 14 | h1#nodeunit-header a { 15 | color: white; 16 | } 17 | 18 | h2#nodeunit-banner { 19 | height: 2em; 20 | border-bottom: 1px solid white; 21 | background-color: #eee; 22 | margin: 0; 23 | font-family: 'trebuchet ms', verdana, arial; 24 | } 25 | h2#nodeunit-banner.pass { 26 | background-color: green; 27 | } 28 | h2#nodeunit-banner.fail { 29 | background-color: red; 30 | } 31 | 32 | h2#nodeunit-userAgent, h2.nodeunit-userAgent { 33 | padding: 10px; 34 | background-color: #eee; 35 | color: black; 36 | margin: 0; 37 | font-size: small; 38 | font-weight: normal; 39 | font-family: 'trebuchet ms', verdana, arial; 40 | font-size: 10pt; 41 | } 42 | 43 | div#nodeunit-testrunner-toolbar { 44 | background: #eee; 45 | border-top: 1px solid black; 46 | padding: 10px; 47 | font-family: 'trebuchet ms', verdana, arial; 48 | margin: 0; 49 | font-size: 10pt; 50 | } 51 | 52 | ol#nodeunit-tests { 53 | font-family: 'trebuchet ms', verdana, arial; 54 | font-size: 10pt; 55 | } 56 | ol#nodeunit-tests li strong { 57 | cursor:pointer; 58 | } 59 | ol#nodeunit-tests .pass { 60 | color: green; 61 | } 62 | ol#nodeunit-tests .fail { 63 | color: red; 64 | } 65 | 66 | p#nodeunit-testresult { 67 | margin-left: 1em; 68 | font-size: 10pt; 69 | font-family: 'trebuchet ms', verdana, arial; 70 | } 71 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/async/index.js: -------------------------------------------------------------------------------- 1 | // This file is just added for convenience so this repository can be 2 | // directly checked out into a project's deps folder 3 | module.exports = require('./lib/async'); 4 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/async/nodelint.cfg: -------------------------------------------------------------------------------- 1 | var options = { 2 | indent: 4, 3 | onevar: false 4 | }; 5 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/async/package.json: -------------------------------------------------------------------------------- 1 | { "name": "async" 2 | , "description": "Higher-order functions and common patterns for asynchronous code" 3 | , "main": "./index" 4 | , "author": "Caolan McMahon" 5 | , "version": "0.1.16" 6 | , "repository" : 7 | { "type" : "git" 8 | , "url" : "http://github.com/caolan/async.git" 9 | } 10 | , "bugs" : { "url" : "http://github.com/caolan/async/issues" } 11 | , "licenses" : 12 | [ { "type" : "MIT" 13 | , "url" : "http://github.com/caolan/async/raw/master/LICENSE" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/async/test/.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/winston/node_modules/async/test/.swp -------------------------------------------------------------------------------- /node_modules/winston/node_modules/async/test/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Async.js Test Suite 4 | 8 | 9 | 10 | 11 | 16 | 17 | 18 | 19 |

Async.js Test Suite

20 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/colors/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 2 | 3 | Marak Squires 4 | Alexis Sellier (cloudhead) 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/winston/node_modules/colors/ReadMe.md: -------------------------------------------------------------------------------- 1 | # colors.js - get color and style in your node.js console ( and browser ) like what 2 | 3 | 4 | 5 | 6 | ## Installation 7 | 8 | npm install colors 9 | 10 | ## colors and styles! 11 | 12 | - bold 13 | - italic 14 | - underline 15 | - inverse 16 | - yellow 17 | - cyan 18 | - white 19 | - magenta 20 | - green 21 | - red 22 | - grey 23 | - blue 24 | - rainbow 25 | - zebra 26 | - random 27 | 28 | ## Usage 29 | 30 | ``` js 31 | var colors = require('./colors'); 32 | 33 | console.log('hello'.green); // outputs green text 34 | console.log('i like cake and pies'.underline.red) // outputs red underlined text 35 | console.log('inverse the color'.inverse); // inverses the color 36 | console.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces) 37 | ``` 38 | 39 | # Creating Custom themes 40 | 41 | ```js 42 | 43 | var require('colors'); 44 | 45 | colors.setTheme({ 46 | silly: 'rainbow', 47 | input: 'grey', 48 | verbose: 'cyan', 49 | prompt: 'grey', 50 | info: 'green', 51 | data: 'grey', 52 | help: 'cyan', 53 | warn: 'yellow', 54 | debug: 'blue', 55 | error: 'red' 56 | }); 57 | 58 | // outputs red text 59 | console.log("this is an error".error); 60 | 61 | // outputs yellow text 62 | console.log("this is a warning".warn); 63 | ``` 64 | 65 | 66 | ### Contributors 67 | 68 | Marak (Marak Squires) 69 | Alexis Sellier (cloudhead) 70 | mmalecki (Maciej Małecki) 71 | nicoreed (Nico Reed) 72 | morganrallen (Morgan Allen) 73 | JustinCampbell (Justin Campbell) 74 | ded (Dustin Diaz) 75 | 76 | 77 | #### , Marak Squires , Justin Campbell, Dustin Diaz (@ded) 78 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/colors/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "colors", 3 | "description": "get colors in your node.js console like what", 4 | "version": "0.6.0-1", 5 | "author": "Marak Squires", 6 | "repository": { 7 | "type": "git", 8 | "url": "http://github.com/Marak/colors.js.git" 9 | }, 10 | "engines": { 11 | "node": ">=0.1.90" 12 | }, 13 | "main": "colors" 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/eyes/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 cloudhead 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/eyes/Makefile: -------------------------------------------------------------------------------- 1 | test: 2 | @@node test/eyes-test.js 3 | 4 | .PHONY: test 5 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/eyes/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "eyes", 3 | "description" : "a customizable value inspector", 4 | "url" : "http://github.com/cloudhead/eyes.js", 5 | "keywords" : ["inspector", "debug", "inspect", "print"], 6 | "author" : "Alexis Sellier ", 7 | "contributors" : [{ "name": "Charlie Robbins", "email": "charlie@nodejitsu.com" }], 8 | "licenses" : ["MIT"], 9 | "dependencies" : [], 10 | "main" : "./lib/eyes", 11 | "version" : "0.1.7", 12 | "scripts" : { "test": "node test/*-test.js" }, 13 | "directories" : { "lib": "./lib", "test": "./test" }, 14 | "engines" : { "node": "> 0.1.90" } 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/eyes/test/eyes-test.js: -------------------------------------------------------------------------------- 1 | var util = require('util'); 2 | var eyes = require('../lib/eyes'); 3 | 4 | eyes.inspect({ 5 | number: 42, 6 | string: "John Galt", 7 | regexp: /[a-z]+/, 8 | array: [99, 168, 'x', {}], 9 | func: function () {}, 10 | bool: false, 11 | nil: null, 12 | undef: undefined, 13 | object: {attr: []} 14 | }, "native types"); 15 | 16 | eyes.inspect({ 17 | number: new(Number)(42), 18 | string: new(String)("John Galt"), 19 | regexp: new(RegExp)(/[a-z]+/), 20 | array: new(Array)(99, 168, 'x', {}), 21 | bool: new(Boolean)(false), 22 | object: new(Object)({attr: []}), 23 | date: new(Date) 24 | }, "wrapped types"); 25 | 26 | var obj = {}; 27 | obj.that = { self: obj }; 28 | obj.self = obj; 29 | 30 | eyes.inspect(obj, "circular object"); 31 | eyes.inspect({hello: 'moto'}, "small object"); 32 | eyes.inspect({hello: new(Array)(6) }, "big object"); 33 | eyes.inspect(["hello 'world'", 'hello "world"'], "quotes"); 34 | eyes.inspect({ 35 | recommendations: [{ 36 | id: 'a7a6576c2c822c8e2bd81a27e41437d8', 37 | key: [ 'spree', 3.764316258020699 ], 38 | value: { 39 | _id: 'a7a6576c2c822c8e2bd81a27e41437d8', 40 | _rev: '1-2e2d2f7fd858c4a5984bcf809d22ed98', 41 | type: 'domain', 42 | domain: 'spree', 43 | weight: 3.764316258020699, 44 | product_id: 30 45 | } 46 | }] 47 | }, 'complex'); 48 | 49 | eyes.inspect([null], "null in array"); 50 | 51 | var inspect = eyes.inspector({ stream: null }); 52 | 53 | util.puts(inspect('something', "something")); 54 | util.puts(inspect("something else")); 55 | 56 | util.puts(inspect(["no color"], null, { styles: false })); 57 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/.npmignore: -------------------------------------------------------------------------------- 1 | test/data 2 | test/data/* 3 | node_modules 4 | npm-debug.log -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/lib/loggly.js: -------------------------------------------------------------------------------- 1 | /* 2 | * loggly.js: Wrapper for node-loggly object 3 | * 4 | * (C) 2010 Nodejitsu Inc. 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var loggly = exports; 10 | 11 | // 12 | // Export node-loggly core client APIs 13 | // 14 | loggly.createClient = require('./loggly/core').createClient; 15 | loggly.serialize = require('./loggly/common').serialize; 16 | loggly.Loggly = require('./loggly/core').Loggly; 17 | loggly.Config = require('./loggly/config').Config; 18 | 19 | // 20 | // Export Resources for node-loggly 21 | // 22 | loggly.Input = require('./loggly/input').Input; 23 | loggly.Facet = require('./loggly/facet').Facet; 24 | loggly.Device = require('./loggly/device').Device; 25 | loggly.Search = require('./loggly/search').Search; -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/lib/loggly/config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * config.js: Configuration information for your Loggly account. 3 | * This information is only used for require('loggly')./\.+/ methods 4 | * 5 | * (C) 2010 Nodejitsu Inc. 6 | * MIT LICENSE 7 | * 8 | */ 9 | 10 | // 11 | // function createConfig (defaults) 12 | // Creates a new instance of the configuration 13 | // object based on default values 14 | // 15 | exports.createConfig = function (defaults) { 16 | return new Config(defaults); 17 | }; 18 | 19 | // 20 | // Config (defaults) 21 | // Constructor for the Config object 22 | // 23 | var Config = exports.Config = function (defaults) { 24 | if (!defaults.subdomain) { 25 | throw new Error('Subdomain is required to create an instance of Config'); 26 | } 27 | 28 | this.subdomain = defaults.subdomain; 29 | this.json = defaults.json || null; 30 | this.auth = defaults.auth || null; 31 | }; 32 | 33 | Config.prototype = { 34 | get subdomain () { 35 | return this._subdomain; 36 | }, 37 | 38 | set subdomain (value) { 39 | this._subdomain = value; 40 | }, 41 | 42 | get logglyUrl () { 43 | return 'https://' + [this._subdomain, 'loggly', 'com'].join('.') + '/api'; 44 | }, 45 | 46 | get inputUrl () { 47 | return 'https://logs.loggly.com/inputs/'; 48 | } 49 | }; 50 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/lib/loggly/device.js: -------------------------------------------------------------------------------- 1 | /* 2 | * device.js: Instance of a single Loggly device 3 | * 4 | * (C) 2010 Nodejitsu Inc. 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var Device = exports.Device = function (client, details) { 10 | if (!details) throw new Error("Device must be constructed with at least basic details.") 11 | 12 | this.client = client; 13 | this._setProperties(details); 14 | }; 15 | 16 | Device.prototype.addToInput = function (inputId, callback) { 17 | this.client.addDeviceToInput(inputId, this.id, callback); 18 | }; 19 | 20 | // 21 | // Sets the properties for this instance 22 | // Parameters: details 23 | // 24 | Device.prototype._setProperties = function (details) { 25 | // Copy the properties to this instance 26 | var self = this; 27 | Object.keys(details).forEach(function (key) { 28 | self[key] = details[key]; 29 | }); 30 | }; -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/lib/loggly/facet.js: -------------------------------------------------------------------------------- 1 | /* 2 | * facet.js: Chainable search functions for Loggly facet searches. 3 | * 4 | * (C) 2010 Nodejitsu Inc. 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var util = require('util'), 10 | Search = require('./search').Search; 11 | 12 | // 13 | // function Facet (facet, query, client, callback) 14 | // Chainable facet search object for Loggly API 15 | // 16 | var Facet = exports.Facet = function (facet, query, client, callback) { 17 | if (['date', 'ip', 'input'].indexOf(facet) === -1) { 18 | var error = new Error('Cannot search with unknown facet: ' + facet); 19 | 20 | if (callback) { 21 | return callback(error); 22 | } 23 | else { 24 | throw error; 25 | } 26 | } 27 | 28 | // 29 | // Set the baseUrl to be facet/:facet? 30 | // 31 | this.baseUrl = ['facets', facet + '?'].join('/'); 32 | 33 | // 34 | // Call the base constructor. 35 | // 36 | Search.call(this, query, client, callback); 37 | }; 38 | 39 | // 40 | // Inherit from `loggly.Search`. 41 | // 42 | util.inherits(Facet, Search); -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/lib/loggly/input.js: -------------------------------------------------------------------------------- 1 | /* 2 | * input.js: Instance of a single Loggly input 3 | * 4 | * (C) 2010 Nodejitsu Inc. 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var Input = exports.Input = function (client, details) { 10 | if (!details) { 11 | throw new Error("Input must be constructed with at least basic details."); 12 | } 13 | 14 | this.client = client; 15 | this._setProperties(details); 16 | }; 17 | 18 | Input.prototype.log = function (msg, callback) { 19 | return this.client.log(this.input_token, msg, callback); 20 | }; 21 | 22 | Input.prototype.addDevice = function (address, callback) { 23 | this.client.addDeviceToInput(this.id, address, callback); 24 | }; 25 | 26 | // 27 | // Sets the properties for this instance 28 | // Parameters: details 29 | // 30 | Input.prototype._setProperties = function (details) { 31 | // Copy the properties to this instance 32 | var self = this; 33 | Object.keys(details).forEach(function (key) { 34 | self[key] = details[key]; 35 | }); 36 | }; -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/request/oauth.js: -------------------------------------------------------------------------------- 1 | var crypto = require('crypto') 2 | , qs = require('querystring') 3 | ; 4 | 5 | function sha1 (key, body) { 6 | return crypto.createHmac('sha1', key).update(body).digest('base64') 7 | } 8 | 9 | function rfc3986 (str) { 10 | return encodeURIComponent(str) 11 | .replace('!','%21') 12 | .replace('*','%2A') 13 | .replace('(','%28') 14 | .replace(')','%29') 15 | .replace("'",'%27') 16 | ; 17 | } 18 | 19 | function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret, body) { 20 | // adapted from https://dev.twitter.com/docs/auth/oauth 21 | var base = 22 | httpMethod + "&" + 23 | encodeURIComponent( base_uri ) + "&" + 24 | Object.keys(params).sort().map(function (i) { 25 | // big WTF here with the escape + encoding but it's what twitter wants 26 | return escape(rfc3986(i)) + "%3D" + escape(rfc3986(params[i])) 27 | }).join("%26") 28 | var key = consumer_secret + '&' 29 | if (token_secret) key += token_secret 30 | return sha1(key, base) 31 | } 32 | 33 | exports.hmacsign = hmacsign 34 | exports.rfc3986 = rfc3986 -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/request/package.json: -------------------------------------------------------------------------------- 1 | { "name" : "request" 2 | , "description" : "Simplified HTTP request client." 3 | , "tags" : ["http", "simple", "util", "utility"] 4 | , "version" : "2.9.100" 5 | , "author" : "Mikeal Rogers " 6 | , "repository" : 7 | { "type" : "git" 8 | , "url" : "http://github.com/mikeal/request.git" 9 | } 10 | , "bugs" : 11 | { "url" : "http://github.com/mikeal/request/issues" } 12 | , "engines" : ["node >= 0.3.6"] 13 | , "main" : "./main" 14 | , "scripts": { "test": "bash tests/run.sh" } 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/request/tests/googledoodle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/winston/node_modules/loggly/node_modules/request/tests/googledoodle.png -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/request/tests/run.sh: -------------------------------------------------------------------------------- 1 | FAILS=0 2 | for i in tests/test-*.js; do 3 | echo $i 4 | node $i || let FAILS++ 5 | done 6 | exit $FAILS 7 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/request/tests/ssl/test.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQzCCAawCCQCO/XWtRFck1jANBgkqhkiG9w0BAQUFADBmMQswCQYDVQQGEwJU 3 | SDEQMA4GA1UECBMHQmFuZ2tvazEOMAwGA1UEBxMFU2lsb20xGzAZBgNVBAoTElRo 4 | ZSBSZXF1ZXN0IE1vZHVsZTEYMBYGA1UEAxMPcmVxdWVzdC5leGFtcGxlMB4XDTEx 5 | MTIwMzAyMjkyM1oXDTIxMTEzMDAyMjkyM1owZjELMAkGA1UEBhMCVEgxEDAOBgNV 6 | BAgTB0Jhbmdrb2sxDjAMBgNVBAcTBVNpbG9tMRswGQYDVQQKExJUaGUgUmVxdWVz 7 | dCBNb2R1bGUxGDAWBgNVBAMTD3JlcXVlc3QuZXhhbXBsZTCBnzANBgkqhkiG9w0B 8 | AQEFAAOBjQAwgYkCgYEAwmctddZqlA48+NXs0yOy92DijcQV1jf87zMiYAIlNUto 9 | wghVbTWgJU5r0pdKrD16AptnWJTzKanhItEX8XCCPgsNkq1afgTtJP7rNkwu3xcj 10 | eIMkhJg/ay4ZnkbnhYdsii5VTU5prix6AqWRAhbkBgoA+iVyHyof8wvZyKBoFTMC 11 | AwEAATANBgkqhkiG9w0BAQUFAAOBgQB6BybMJbpeiABgihDfEVBcAjDoQ8gUMgwV 12 | l4NulugfKTDmArqnR9aPd4ET5jX5dkMP4bwCHYsvrcYDeWEQy7x5WWuylOdKhua4 13 | L4cEi2uDCjqEErIG3cc1MCOk6Cl6Ld6tkIzQSf953qfdEACRytOeUqLNQcrXrqeE 14 | c7U8F6MWLQ== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/request/tests/ssl/test.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXgIBAAKBgQDCZy111mqUDjz41ezTI7L3YOKNxBXWN/zvMyJgAiU1S2jCCFVt 3 | NaAlTmvSl0qsPXoCm2dYlPMpqeEi0RfxcII+Cw2SrVp+BO0k/us2TC7fFyN4gySE 4 | mD9rLhmeRueFh2yKLlVNTmmuLHoCpZECFuQGCgD6JXIfKh/zC9nIoGgVMwIDAQAB 5 | AoGBALXFwfUf8vHTSmGlrdZS2AGFPvEtuvldyoxi9K5u8xmdFCvxnOcLsF2RsTHt 6 | Mu5QYWhUpNJoG+IGLTPf7RJdj/kNtEs7xXqWy4jR36kt5z5MJzqiK+QIgiO9UFWZ 7 | fjUb6oeDnTIJA9YFBdYi97MDuL89iU/UK3LkJN3hd4rciSbpAkEA+MCkowF5kSFb 8 | rkOTBYBXZfiAG78itDXN6DXmqb9XYY+YBh3BiQM28oxCeQYyFy6pk/nstnd4TXk6 9 | V/ryA2g5NwJBAMgRKTY9KvxJWbESeMEFe2iBIV0c26/72Amgi7ZKUCLukLfD4tLF 10 | +WSZdmTbbqI1079YtwaiOVfiLm45Q/3B0eUCQAaQ/0eWSGE+Yi8tdXoVszjr4GXb 11 | G81qBi91DMu6U1It+jNfIba+MPsiHLcZJMVb4/oWBNukN7bD1nhwFWdlnu0CQQCf 12 | Is9WHkdvz2RxbZDxb8verz/7kXXJQJhx5+rZf7jIYFxqX3yvTNv3wf2jcctJaWlZ 13 | fVZwB193YSivcgt778xlAkEAprYUz3jczjF5r2hrgbizPzPDR94tM5BTO3ki2v3w 14 | kbf+j2g7FNAx6kZiVN8XwfLc8xEeUGiPKwtq3ddPDFh17w== 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/request/tests/test-cookie.js: -------------------------------------------------------------------------------- 1 | var Cookie = require('../vendor/cookie') 2 | , assert = require('assert'); 3 | 4 | var str = 'sid="s543qactge.wKE61E01Bs%2BKhzmxrwrnug="; path=/; httpOnly; expires=Sat, 04 Dec 2010 23:27:28 GMT'; 5 | var cookie = new Cookie(str); 6 | 7 | // test .toString() 8 | assert.equal(cookie.toString(), str); 9 | 10 | // test .path 11 | assert.equal(cookie.path, '/'); 12 | 13 | // test .httpOnly 14 | assert.equal(cookie.httpOnly, true); 15 | 16 | // test .name 17 | assert.equal(cookie.name, 'sid'); 18 | 19 | // test .value 20 | assert.equal(cookie.value, '"s543qactge.wKE61E01Bs%2BKhzmxrwrnug="'); 21 | 22 | // test .expires 23 | assert.equal(cookie.expires instanceof Date, true); 24 | 25 | // test .path default 26 | var cookie = new Cookie('foo=bar', { url: 'http://foo.com/bar' }); 27 | assert.equal(cookie.path, '/bar'); 28 | 29 | console.log('All tests passed'); 30 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/request/tests/test-errors.js: -------------------------------------------------------------------------------- 1 | var server = require('./server') 2 | , events = require('events') 3 | , assert = require('assert') 4 | , request = require('../main.js') 5 | ; 6 | 7 | var local = 'http://localhost:8888/asdf' 8 | 9 | try { 10 | request({uri:local, body:{}}) 11 | assert.fail("Should have throw") 12 | } catch(e) { 13 | assert.equal(e.message, 'Argument error, options.body.') 14 | } 15 | 16 | try { 17 | request({uri:local, multipart: 'foo'}) 18 | assert.fail("Should have throw") 19 | } catch(e) { 20 | assert.equal(e.message, 'Argument error, options.multipart.') 21 | } 22 | 23 | try { 24 | request({uri:local, multipart: [{}]}) 25 | assert.fail("Should have throw") 26 | } catch(e) { 27 | assert.equal(e.message, 'Body attribute missing in multipart.') 28 | } 29 | 30 | console.log("All tests passed.") 31 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/request/tests/test-proxy.js: -------------------------------------------------------------------------------- 1 | var server = require('./server') 2 | , events = require('events') 3 | , stream = require('stream') 4 | , assert = require('assert') 5 | , fs = require('fs') 6 | , request = require('../main.js') 7 | , path = require('path') 8 | , util = require('util') 9 | ; 10 | 11 | var port = 6768 12 | , called = false 13 | , proxiedHost = 'google.com' 14 | ; 15 | 16 | var s = server.createServer(port) 17 | s.listen(port, function () { 18 | s.on('http://google.com/', function (req, res) { 19 | called = true 20 | assert.equal(req.headers.host, proxiedHost) 21 | res.writeHeader(200) 22 | res.end() 23 | }) 24 | request ({ 25 | url: 'http://'+proxiedHost, 26 | proxy: 'http://localhost:'+port 27 | /* 28 | //should behave as if these arguments where passed: 29 | url: 'http://localhost:'+port, 30 | headers: {host: proxiedHost} 31 | //*/ 32 | }, function (err, res, body) { 33 | s.close() 34 | }) 35 | }) 36 | 37 | process.on('exit', function () { 38 | assert.ok(called, 'the request must be made to the proxy server') 39 | }) 40 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/request/uuid.js: -------------------------------------------------------------------------------- 1 | module.exports = function () { 2 | var s = [], itoh = '0123456789ABCDEF'; 3 | 4 | // Make array of random hex digits. The UUID only has 32 digits in it, but we 5 | // allocate an extra items to make room for the '-'s we'll be inserting. 6 | for (var i = 0; i <36; i++) s[i] = Math.floor(Math.random()*0x10); 7 | 8 | // Conform to RFC-4122, section 4.4 9 | s[14] = 4; // Set 4 high bits of time_high field to version 10 | s[19] = (s[19] & 0x3) | 0x8; // Specify 2 high bits of clock sequence 11 | 12 | // Convert to hex chars 13 | for (var i = 0; i <36; i++) s[i] = itoh[s[i]]; 14 | 15 | // Insert '-'s 16 | s[8] = s[13] = s[18] = s[23] = '-'; 17 | 18 | return s.join(''); 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/request/vendor/cookie/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Tobi - Cookie 3 | * Copyright(c) 2010 LearnBoost 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module dependencies. 9 | */ 10 | 11 | var url = require('url'); 12 | 13 | /** 14 | * Initialize a new `Cookie` with the given cookie `str` and `req`. 15 | * 16 | * @param {String} str 17 | * @param {IncomingRequest} req 18 | * @api private 19 | */ 20 | 21 | var Cookie = exports = module.exports = function Cookie(str, req) { 22 | this.str = str; 23 | 24 | // First key is the name 25 | this.name = str.substr(0, str.indexOf('=')).trim(); 26 | 27 | // Map the key/val pairs 28 | str.split(/ *; */).reduce(function(obj, pair){ 29 | var p = pair.indexOf('='); 30 | if(p > 0) 31 | obj[pair.substring(0, p).trim()] = pair.substring(p + 1).trim(); 32 | else 33 | obj[pair.trim()] = true; 34 | return obj; 35 | }, this); 36 | 37 | // Assign value 38 | this.value = this[this.name]; 39 | 40 | // Expires 41 | this.expires = this.expires 42 | ? new Date(this.expires) 43 | : Infinity; 44 | 45 | // Default or trim path 46 | this.path = this.path 47 | ? this.path.trim(): req 48 | ? url.parse(req.url).pathname: '/'; 49 | }; 50 | 51 | /** 52 | * Return the original cookie string. 53 | * 54 | * @return {String} 55 | * @api public 56 | */ 57 | 58 | Cookie.prototype.toString = function(){ 59 | return this.str; 60 | }; 61 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/request/vendor/cookie/jar.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Tobi - CookieJar 3 | * Copyright(c) 2010 LearnBoost 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module dependencies. 9 | */ 10 | 11 | var url = require('url'); 12 | 13 | /** 14 | * Initialize a new `CookieJar`. 15 | * 16 | * @api private 17 | */ 18 | 19 | var CookieJar = exports = module.exports = function CookieJar() { 20 | this.cookies = []; 21 | }; 22 | 23 | /** 24 | * Add the given `cookie` to the jar. 25 | * 26 | * @param {Cookie} cookie 27 | * @api private 28 | */ 29 | 30 | CookieJar.prototype.add = function(cookie){ 31 | this.cookies = this.cookies.filter(function(c){ 32 | // Avoid duplication (same path, same name) 33 | return !(c.name == cookie.name && c.path == cookie.path); 34 | }); 35 | this.cookies.push(cookie); 36 | }; 37 | 38 | /** 39 | * Get cookies for the given `req`. 40 | * 41 | * @param {IncomingRequest} req 42 | * @return {Array} 43 | * @api private 44 | */ 45 | 46 | CookieJar.prototype.get = function(req){ 47 | var path = url.parse(req.url).pathname 48 | , now = new Date 49 | , specificity = {}; 50 | return this.cookies.filter(function(cookie){ 51 | if (0 == path.indexOf(cookie.path) && now < cookie.expires 52 | && cookie.path.length > (specificity[cookie.name] || 0)) 53 | return specificity[cookie.name] = cookie.path.length; 54 | }); 55 | }; 56 | 57 | /** 58 | * Return Cookie string for the given `req`. 59 | * 60 | * @param {IncomingRequest} req 61 | * @return {String} 62 | * @api private 63 | */ 64 | 65 | CookieJar.prototype.cookieString = function(req){ 66 | var cookies = this.get(req); 67 | if (cookies.length) { 68 | return cookies.map(function(cookie){ 69 | return cookie.name + '=' + cookie.value; 70 | }).join('; '); 71 | } 72 | }; 73 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/timespan/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | node_modules/* 3 | npm-debug.log -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/timespan/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | #VERSION HISTORY 2 | 3 | ##2.0 4 | * [Breaking] Refactored this to work in node.js. Backwards compatibility to existing browser API coming in future 2.x releases. (indexzero) 5 | 6 | ## 1.2 7 | * Added TimeSpan.FromDates Constructor to take two dates 8 | and create a TimeSpan from the difference. (mstum) 9 | 10 | ## 1.1 11 | * Changed naming to follow JavaScript standards (mstum) 12 | * Added Documentation (mstum) 13 | 14 | ## 1.0 15 | * Initial Revision (mstum) 16 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/timespan/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Michael Stum, Charlie Robbins 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/timespan/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "timespan", 3 | "description": "A JavaScript TimeSpan library for node.js (and soon the browser)", 4 | "version": "2.2.0", 5 | "author": "Michael Stum ", 6 | "contributors": [ 7 | { "name": "Charlie Robbins", "email": "charlie.robbins@gmail.com" } 8 | ], 9 | "repository": { 10 | "type": "git", 11 | "url": "http://github.com/indexzero/timespan.git" 12 | }, 13 | "keywords": ["time", "dates", "utilities", "timespan"], 14 | "devDependencies": { 15 | "vows": ">= 0.5.2" 16 | }, 17 | "main": "./lib/time-span.js", 18 | "scripts": { "test": "vows test/*-test.js --spec" }, 19 | "engines": { "node": ">= 0.2.0" } 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/node_modules/timespan/test/helpers.js: -------------------------------------------------------------------------------- 1 | /* 2 | * helpers.js: Tests helpers for the TimeSpan module. 3 | * 4 | * (C) Charlie Robbins 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var assert = require('assert'), 10 | timeSpan = require('../lib/time-span') 11 | 12 | function capitalize(str) { 13 | return str.charAt(0).toUpperCase() + str.slice(1); 14 | } 15 | 16 | var helpers = exports, 17 | components = ['milliseconds', 'seconds', 'minutes', 'hours', 'days']; 18 | 19 | // 20 | // Tests all of the factory methods for the `TimeSpan` object: 21 | // `fromMilliseconds`, `fromSeconds`, etc. 22 | // 23 | exports.testFactories = function (num) { 24 | var context = {}; 25 | 26 | components.forEach(function (component) { 27 | var method = 'from' + capitalize(component); 28 | 29 | context['the ' + method + '() method'] = function () { 30 | var value = timeSpan[method](num); 31 | assert.equal(value[component], num); 32 | } 33 | }); 34 | 35 | return context; 36 | }; -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "loggly", 3 | "description": "A client implementation for Loggly cloud Logging-as-a-Service API", 4 | "version": "0.3.11", 5 | "author": "Charlie Robbins ", 6 | "contributors": [ 7 | { "name": "Marak Squires", "email": "marak.squires@gmail.com" }, 8 | { "name": "hij1nx", "email": "hij1nx@me.com" }, 9 | { "name": "Kord Campbell", "email": "kordless@loggly.com" }, 10 | { "name": "Erik Hedenstrom", "email": "erik@hedenstroem.com" } 11 | ], 12 | "repository": { 13 | "type": "git", 14 | "url": "http://github.com/nodejitsu/node-loggly.git" 15 | }, 16 | "keywords": ["cloud computing", "api", "logging", "loggly"], 17 | "dependencies": { 18 | "request": "2.9.x", 19 | "timespan": "2.x.x" 20 | }, 21 | "devDependencies": { 22 | "vows": "0.6.x" 23 | }, 24 | "main": "./lib/loggly", 25 | "scripts": { "test": "vows test/*-test.js --spec" }, 26 | "engines": { "node": ">= 0.4.0" } 27 | } -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/test/common-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * common-test.js: Tests for Loggly `common` utility module 3 | * 4 | * (C) 2010 Nodejitsu Inc. 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | vows = require('vows'), 11 | assert = require('assert'), 12 | common = require('../lib/loggly/common'); 13 | 14 | vows.describe('node-loggly/common').addBatch({ 15 | "When using the common module": { 16 | "the clone() method": { 17 | topic: function () { 18 | this.obj = { 19 | name: 'common', 20 | deep: { 21 | first: 'first', 22 | second: 'second' 23 | } 24 | }; 25 | return common.clone(this.obj); 26 | }, 27 | "should return a deep clone of the object": function (clone) { 28 | assert.isFalse(this.obj.deep === clone.deep); 29 | } 30 | } 31 | } 32 | }).export(module); -------------------------------------------------------------------------------- /node_modules/winston/node_modules/loggly/test/device-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * device-test.js: Tests for Loggly device requests 3 | * 4 | * (C) 2010 Nodejitsu Inc. 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | vows = require('vows'), 11 | assert = require('assert'), 12 | helpers = require('./helpers'); 13 | 14 | var options = {}, 15 | config = helpers.loadConfig(), 16 | loggly = require('../lib/loggly').createClient(config); 17 | 18 | vows.describe('node-loggly/devices').addBatch({ 19 | "When using the node-loggly client": { 20 | "the getDevices() method": { 21 | topic: function () { 22 | loggly.getDevices(this.callback); 23 | }, 24 | "should return a list of valid devices": function (err, devices) { 25 | assert.isNull(err); 26 | devices.forEach(function (device) { 27 | helpers.assertDevice(device); 28 | }); 29 | } 30 | }, 31 | "the addDeviceToInput() method": { 32 | topic: function () { 33 | loggly.addDeviceToInput(config.inputs.test.id, '127.0.0.1', this.callback); 34 | }, 35 | "should respond with 200 status code": function (err, res) { 36 | assert.isNull(err); 37 | assert.equal(res.statusCode, 200); 38 | } 39 | } 40 | } 41 | }).export(module); -------------------------------------------------------------------------------- /node_modules/winston/node_modules/pkginfo/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log -------------------------------------------------------------------------------- /node_modules/winston/node_modules/pkginfo/examples/all-properties.js: -------------------------------------------------------------------------------- 1 | /* 2 | * all-properties.js: Sample of including all properties from a package.json file 3 | * 4 | * (C) 2011, Charlie Robbins 5 | * 6 | */ 7 | 8 | var util = require('util'), 9 | pkginfo = require('../lib/pkginfo')(module); 10 | 11 | exports.someFunction = function () { 12 | console.log('some of your custom logic here'); 13 | }; 14 | 15 | console.log('Inspecting module:'); 16 | console.dir(module.exports); 17 | 18 | console.log('\nAll exports exposed:'); 19 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /node_modules/winston/node_modules/pkginfo/examples/array-argument.js: -------------------------------------------------------------------------------- 1 | /* 2 | * array-argument.js: Sample of including specific properties from a package.json file 3 | * using Array argument syntax. 4 | * 5 | * (C) 2011, Charlie Robbins 6 | * 7 | */ 8 | 9 | var util = require('util'), 10 | pkginfo = require('../lib/pkginfo')(module, ['version', 'author']); 11 | 12 | exports.someFunction = function () { 13 | console.log('some of your custom logic here'); 14 | }; 15 | 16 | console.log('Inspecting module:'); 17 | console.dir(module.exports); 18 | 19 | console.log('\nAll exports exposed:'); 20 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /node_modules/winston/node_modules/pkginfo/examples/multiple-properties.js: -------------------------------------------------------------------------------- 1 | /* 2 | * multiple-properties.js: Sample of including multiple properties from a package.json file 3 | * 4 | * (C) 2011, Charlie Robbins 5 | * 6 | */ 7 | 8 | var util = require('util'), 9 | pkginfo = require('../lib/pkginfo')(module, 'version', 'author'); 10 | 11 | exports.someFunction = function () { 12 | console.log('some of your custom logic here'); 13 | }; 14 | 15 | console.log('Inspecting module:'); 16 | console.dir(module.exports); 17 | 18 | console.log('\nAll exports exposed:'); 19 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /node_modules/winston/node_modules/pkginfo/examples/object-argument.js: -------------------------------------------------------------------------------- 1 | /* 2 | * object-argument.js: Sample of including specific properties from a package.json file 3 | * using Object argument syntax. 4 | * 5 | * (C) 2011, Charlie Robbins 6 | * 7 | */ 8 | 9 | var util = require('util'), 10 | pkginfo = require('../lib/pkginfo')(module, { 11 | include: ['version', 'author'] 12 | }); 13 | 14 | exports.someFunction = function () { 15 | console.log('some of your custom logic here'); 16 | }; 17 | 18 | console.log('Inspecting module:'); 19 | console.dir(module.exports); 20 | 21 | console.log('\nAll exports exposed:'); 22 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /node_modules/winston/node_modules/pkginfo/examples/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "simple-app", 3 | "description": "A test fixture for pkginfo", 4 | "version": "0.1.0", 5 | "author": "Charlie Robbins ", 6 | "keywords": ["test", "fixture"], 7 | "main": "./index.js", 8 | "scripts": { "test": "vows test/*-test.js --spec" }, 9 | "engines": { "node": ">= 0.4.0" } 10 | } 11 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/pkginfo/examples/single-property.js: -------------------------------------------------------------------------------- 1 | /* 2 | * single-property.js: Sample of including a single specific properties from a package.json file 3 | * 4 | * (C) 2011, Charlie Robbins 5 | * 6 | */ 7 | 8 | var util = require('util'), 9 | pkginfo = require('../lib/pkginfo')(module, 'version'); 10 | 11 | exports.someFunction = function () { 12 | console.log('some of your custom logic here'); 13 | }; 14 | 15 | console.log('Inspecting module:'); 16 | console.dir(module.exports); 17 | 18 | console.log('\nAll exports exposed:'); 19 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /node_modules/winston/node_modules/pkginfo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pkginfo", 3 | "version": "0.2.3", 4 | "description": "An easy way to expose properties on a module from a package.json", 5 | "author": "Charlie Robbins ", 6 | "repository": { 7 | "type": "git", 8 | "url": "http://github.com/indexzero/node-pkginfo.git" 9 | }, 10 | "keywords": ["info", "tools", "package.json"], 11 | "devDependencies": { 12 | "vows": "0.6.x" 13 | }, 14 | "main": "./lib/pkginfo", 15 | "scripts": { "test": "vows test/*-test.js --spec" }, 16 | "engines": { "node": ">= 0.4.0" } 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/stack-trace/.gitignore: -------------------------------------------------------------------------------- 1 | *.un~ 2 | /node_modules 3 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/stack-trace/License: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Felix Geisendörfer (felix@debuggable.com) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/stack-trace/Makefile: -------------------------------------------------------------------------------- 1 | SHELL := /bin/bash 2 | 3 | test: 4 | @./test/run.js 5 | 6 | release: 7 | git push 8 | git push --tags 9 | npm publish . 10 | 11 | .PHONY: test 12 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/stack-trace/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Felix Geisendörfer (http://debuggable.com/)", 3 | "name": "stack-trace", 4 | "description": "Get v8 stack traces as an array of CallSite objects.", 5 | "version": "0.0.6", 6 | "homepage": "https://github.com/felixge/node-stack-trace", 7 | "repository": { 8 | "type": "git", 9 | "url": "git://github.com/felixge/node-stack-trace.git" 10 | }, 11 | "main": "./lib/stack-trace", 12 | "engines": { 13 | "node": "*" 14 | }, 15 | "dependencies": {}, 16 | "devDependencies": { 17 | "far": "0.0.3", 18 | "long-stack-traces": "0.1.2" 19 | } 20 | } -------------------------------------------------------------------------------- /node_modules/winston/node_modules/stack-trace/test/common.js: -------------------------------------------------------------------------------- 1 | var common = exports; 2 | 3 | var path = require('path'); 4 | var root = path.dirname(__dirname); 5 | 6 | common.dir = { 7 | lib: root + '/lib', 8 | }; 9 | 10 | common.assert = require('assert'); 11 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/stack-trace/test/integration/test-get.js: -------------------------------------------------------------------------------- 1 | var common = require('../common'); 2 | var assert = common.assert; 3 | var stackTrace = require(common.dir.lib + '/stack-trace'); 4 | 5 | (function testBasic() { 6 | var trace = stackTrace.get(); 7 | 8 | assert.strictEqual(trace[0].getFunction(), testBasic); 9 | assert.strictEqual(trace[0].getFunctionName(), 'testBasic'); 10 | assert.strictEqual(trace[0].getFileName(), __filename); 11 | })(); 12 | 13 | (function testWrapper() { 14 | (function testBelowFn() { 15 | var trace = stackTrace.get(testBelowFn); 16 | assert.strictEqual(trace[0].getFunction(), testWrapper); 17 | assert.strictEqual(trace[0].getFunctionName(), 'testWrapper'); 18 | })(); 19 | })(); 20 | 21 | 22 | (function deep1() { 23 | (function deep2() { 24 | (function deep3() { 25 | (function deep4() { 26 | (function deep5() { 27 | (function deep6() { 28 | (function deep7() { 29 | (function deep8() { 30 | (function deep9() { 31 | (function deep10() { 32 | (function deep10() { 33 | var trace = stackTrace.get(); 34 | var hasFirstCallSite = trace.some(function(callSite) { 35 | return callSite.getFunctionName() === 'deep1'; 36 | }); 37 | 38 | assert.ok(hasFirstCallSite); 39 | })(); 40 | })(); 41 | })(); 42 | })(); 43 | })(); 44 | })(); 45 | })(); 46 | })(); 47 | })(); 48 | })(); 49 | })(); 50 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/stack-trace/test/integration/test-long-stack-trace.js: -------------------------------------------------------------------------------- 1 | var common = require('../common'); 2 | 3 | require('long-stack-traces'); 4 | var assert = common.assert; 5 | var stackTrace = require(common.dir.lib + '/stack-trace'); 6 | 7 | function badFn() { 8 | var err = new Error('oh no'); 9 | var trace = stackTrace.parse(err); 10 | 11 | assert.ok(trace[2].getFileName().match(/-----/)); 12 | }; 13 | 14 | setTimeout(badFn, 10); 15 | -------------------------------------------------------------------------------- /node_modules/winston/node_modules/stack-trace/test/run.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var far = require('far').create(); 3 | 4 | far.add(__dirname); 5 | far.include(/test-.*\.js$/); 6 | 7 | far.execute(); 8 | -------------------------------------------------------------------------------- /node_modules/winston/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "winston", 3 | "description": "A multi-transport async logging library for Node.js", 4 | "version": "0.5.9", 5 | "author": "Charlie Robbins ", 6 | "contributors": [ 7 | { "name": "Matthew Bergman", "email": "mzbphoto@gmail.com" }, 8 | { "name": "Marak Squires", "email": "marak@nodejitsu.com" } 9 | ], 10 | "repository": { 11 | "type": "git", 12 | "url": "http://github.com/indexzero/winston.git" 13 | }, 14 | "keywords": ["logging", "sysadmin", "tools"], 15 | "dependencies": { 16 | "async": "0.1.x", 17 | "colors": "0.x.x", 18 | "eyes": "0.1.x", 19 | "loggly": "0.3.x >=0.3.7", 20 | "pkginfo": "0.2.x", 21 | "stack-trace": "0.0.x" 22 | }, 23 | "devDependencies": { 24 | "vows": "0.5.x >=0.5.11" 25 | }, 26 | "main": "./lib/winston", 27 | "scripts": { "test": "vows --spec --isolate" }, 28 | "engines": { "node": ">= 0.4.0" } 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/winston/test/cli-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * cli-test.js: Tests for the cli levels available in winston. 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | vows = require('vows'), 11 | assert = require('assert'), 12 | winston = require('../lib/winston'), 13 | helpers = require('./helpers'); 14 | 15 | vows.describe('winston/logger/cli').addBatch({ 16 | "When an instance of winston.Logger": { 17 | topic: function () { 18 | return new winston.Logger({ 19 | transports: [ 20 | new winston.transports.Console() 21 | ] 22 | }) 23 | }, 24 | "the cli() method": { 25 | "should set the appropriate values on the logger": function (logger) { 26 | logger.cli(); 27 | assert.isTrue(logger.padLevels); 28 | assert.isTrue(logger.transports.console.colorize); 29 | assert.isFalse(logger.transports.console.timestamp); 30 | Object.keys(winston.config.cli.levels).forEach(function (level) { 31 | assert.isNumber(logger.levels[level]); 32 | }); 33 | 34 | Object.keys(winston.config.cli.colors).forEach(function (color) { 35 | assert.isString(winston.config.allColors[color]); 36 | }); 37 | } 38 | } 39 | } 40 | }).export(module); -------------------------------------------------------------------------------- /node_modules/winston/test/exception-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * exception-test.js: Tests for exception data gathering in winston. 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | vows = require('vows'), 11 | assert = require('assert'), 12 | winston = require('../lib/winston'), 13 | helpers = require('./helpers'); 14 | 15 | vows.describe('winston/exception').addBatch({ 16 | "When using the winston exception module": { 17 | "the getProcessInfo() method": { 18 | topic: winston.exception.getProcessInfo(), 19 | "should respond with the appropriate data": function (info) { 20 | helpers.assertProcessInfo(info); 21 | } 22 | }, 23 | "the getOsInfo() method": { 24 | topic: winston.exception.getOsInfo(), 25 | "should respond with the appropriate data": function (info) { 26 | helpers.assertOsInfo(info); 27 | } 28 | }, 29 | "the getTrace() method": { 30 | topic: winston.exception.getTrace(new Error()), 31 | "should have the appropriate info": function (trace) { 32 | helpers.assertTrace(trace); 33 | } 34 | }, 35 | "the getAllInfo() method": { 36 | topic: winston.exception.getAllInfo(new Error()), 37 | "should have the appropriate info": function (info) { 38 | assert.isObject(info); 39 | assert.isArray(info.stack); 40 | helpers.assertProcessInfo(info.process); 41 | helpers.assertOsInfo(info.os); 42 | helpers.assertTrace(info.trace); 43 | } 44 | } 45 | } 46 | }).export(module); -------------------------------------------------------------------------------- /node_modules/winston/test/fixtures/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/winston/test/fixtures/.gitkeep -------------------------------------------------------------------------------- /node_modules/winston/test/fixtures/keys/agent2-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB7DCCAZYCCQC7gs0MDNn6MTANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJV 3 | UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO 4 | BgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MjEgMB4GCSqGSIb3DQEJARYR 5 | cnlAdGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEy 6 | WjB9MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYD 7 | VQQKEwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MjEg 8 | MB4GCSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEF 9 | AANLADBIAkEAyXb8FrRdKbhrKLgLSsn61i1C7w7fVVVd7OQsmV/7p9WB2lWFiDlC 10 | WKGU9SiIz/A6wNZDUAuc2E+VwtpCT561AQIDAQABMA0GCSqGSIb3DQEBBQUAA0EA 11 | C8HzpuNhFLCI3A5KkBS5zHAQax6TFUOhbpBCR0aTDbJ6F1liDTK1lmU/BjvPoj+9 12 | 1LHwrmh29rK8kBPEjmymCQ== 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /node_modules/winston/test/fixtures/keys/agent2-key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIBOgIBAAJBAMl2/Ba0XSm4ayi4C0rJ+tYtQu8O31VVXezkLJlf+6fVgdpVhYg5 3 | QlihlPUoiM/wOsDWQ1ALnNhPlcLaQk+etQECAwEAAQJBAMT6Bf34+UHKY1ObpsbH 4 | 9u2jsVblFq1rWvs8GPMY6oertzvwm3DpuSUp7PTgOB1nLTLYtCERbQ4ovtN8tn3p 5 | OHUCIQDzIEGsoCr5vlxXvy2zJwu+fxYuhTZWMVuo1397L0VyhwIhANQh+yzqUgaf 6 | WRtSB4T2W7ADtJI35ET61jKBty3CqJY3AiAIwju7dVW3A5WeD6Qc1SZGKZvp9yCb 7 | AFI2BfVwwaY11wIgXF3PeGcvACMyMWsuSv7aPXHfliswAbkWuzcwA4TW01ECIGWa 8 | cgsDvVFxmfM5NPSuT/UDTa6R5BFISB5ea0N0AR3I 9 | -----END RSA PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /node_modules/winston/test/fixtures/logs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/node_modules/winston/test/fixtures/logs/.gitkeep -------------------------------------------------------------------------------- /node_modules/winston/test/fixtures/scripts/default-exceptions.js: -------------------------------------------------------------------------------- 1 | /* 2 | * default-exceptions.js: A test fixture for logging exceptions with the default winston logger. 3 | * 4 | * (C) 2011 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | winston = require('../../../lib/winston'); 11 | 12 | winston.handleExceptions([ 13 | new (winston.transports.File)({ 14 | filename: path.join(__dirname, '..', 'logs', 'default-exception.log'), 15 | handleExceptions: true 16 | }) 17 | ]); 18 | 19 | setTimeout(function () { 20 | throw new Error('OH NOES! It failed!'); 21 | }, 1000); -------------------------------------------------------------------------------- /node_modules/winston/test/fixtures/scripts/exit-on-error.js: -------------------------------------------------------------------------------- 1 | /* 2 | * default-exceptions.js: A test fixture for logging exceptions with the default winston logger. 3 | * 4 | * (C) 2011 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | winston = require('../../../lib/winston'); 11 | 12 | winston.exitOnError = function (err) { 13 | return err.message !== 'Ignore this error'; 14 | }; 15 | 16 | winston.handleExceptions([ 17 | new (winston.transports.File)({ 18 | filename: path.join(__dirname, '..', 'logs', 'exit-on-error.log'), 19 | handleExceptions: true 20 | }) 21 | ]); 22 | 23 | setTimeout(function () { 24 | throw new Error('Ignore this error'); 25 | }, 1000); -------------------------------------------------------------------------------- /node_modules/winston/test/fixtures/scripts/log-exceptions.js: -------------------------------------------------------------------------------- 1 | /* 2 | * log-exceptions.js: A test fixture for logging exceptions in winston. 3 | * 4 | * (C) 2011 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | winston = require('../../../lib/winston'); 11 | 12 | var logger = new (winston.Logger)({ 13 | transports: [ 14 | new (winston.transports.File)({ 15 | filename: path.join(__dirname, '..', 'logs', 'exception.log'), 16 | handleExceptions: true 17 | }) 18 | ] 19 | }); 20 | 21 | logger.handleExceptions(); 22 | 23 | setTimeout(function () { 24 | throw new Error('OH NOES! It failed!'); 25 | }, 1000); -------------------------------------------------------------------------------- /node_modules/winston/test/fixtures/scripts/unhandle-exceptions.js: -------------------------------------------------------------------------------- 1 | /* 2 | * unhandle-exceptions.js: A test fixture for using `.unhandleExceptions()` winston. 3 | * 4 | * (C) 2011 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | winston = require('../../../lib/winston'); 11 | 12 | var logger = new (winston.Logger)({ 13 | transports: [ 14 | new (winston.transports.File)({ 15 | filename: path.join(__dirname, '..', 'logs', 'unhandle-exception.log'), 16 | handleExceptions: true 17 | }) 18 | ] 19 | }); 20 | 21 | logger.handleExceptions(); 22 | logger.unhandleExceptions(); 23 | 24 | setTimeout(function () { 25 | throw new Error('OH NOES! It failed!'); 26 | }, 1000); -------------------------------------------------------------------------------- /node_modules/winston/test/transports/console-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * console-test.js: Tests for instances of the Console transport 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | vows = require('vows'), 11 | assert = require('assert'), 12 | winston = require('../../lib/winston'), 13 | helpers = require('../helpers'); 14 | 15 | var npmTransport = new (winston.transports.Console)(), 16 | syslogTransport = new (winston.transports.Console)({ levels: winston.config.syslog.levels }); 17 | 18 | vows.describe('winston/transports/console').addBatch({ 19 | "An instance of the Console Transport": { 20 | "with npm levels": { 21 | "should have the proper methods defined": function () { 22 | helpers.assertConsole(npmTransport); 23 | }, 24 | "the log() method": helpers.testNpmLevels(npmTransport, "should respond with true", function (ign, err, logged) { 25 | assert.isNull(err); 26 | assert.isTrue(logged); 27 | }) 28 | }, 29 | "with syslog levels": { 30 | "should have the proper methods defined": function () { 31 | helpers.assertConsole(syslogTransport); 32 | }, 33 | "the log() method": helpers.testSyslogLevels(syslogTransport, "should respond with true", function (ign, err, logged) { 34 | assert.isNull(err); 35 | assert.isTrue(logged); 36 | }) 37 | } 38 | } 39 | }).export(module); -------------------------------------------------------------------------------- /node_modules/winston/test/transports/couchdb-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * couchdb-test.js: Tests for instances of the Couchdb transport 3 | * 4 | * (C) 2011 Max Ogden 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | vows = require('vows'), 11 | fs = require('fs'), 12 | http = require('http'), 13 | assert = require('assert'), 14 | winston = require('../../lib/winston'), 15 | helpers = require('../helpers'); 16 | 17 | var couchdbTransport = new (winston.transports.Couchdb)({ 18 | "host": "localhost", 19 | "port": 1337, 20 | "db": "logs" 21 | }); 22 | 23 | var server = http.createServer(function (req, res) { 24 | res.end(); 25 | }); 26 | 27 | server.listen(1337); 28 | 29 | vows.describe('winston/transports/couchdb').addBatch({ 30 | "An instance of the Couchdb Transport": { 31 | "when passed valid options": { 32 | "should have the proper methods defined": function () { 33 | helpers.assertCouchdb(couchdbTransport); 34 | }, 35 | "the log() method": helpers.testNpmLevels(couchdbTransport, "should respond with true", function (ign, err, logged) { 36 | assert.isNull(err); 37 | assert.isTrue(logged); 38 | }) 39 | } 40 | } 41 | }).addBatch({ 42 | "When the tests are over": { 43 | "the server should cleanup": function () { 44 | server.close(); 45 | } 46 | } 47 | }).export(module); -------------------------------------------------------------------------------- /node_modules/winston/test/transports/file-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * file-test.js: Tests for instances of the File transport 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | vows = require('vows'), 11 | fs = require('fs'), 12 | assert = require('assert'), 13 | winston = require('../../lib/winston'), 14 | helpers = require('../helpers'); 15 | 16 | var stream = fs.createWriteStream(path.join(__dirname, '..', 'fixtures', 'logs', 'testfile.log')), 17 | fileTransport = new (winston.transports.File)({ filename: path.join(__dirname, '..', 'fixtures', 'logs', 'testfilename.log') }), 18 | streamTransport = new (winston.transports.File)({ stream: stream }); 19 | 20 | vows.describe('winston/transports/file').addBatch({ 21 | "An instance of the File Transport": { 22 | "when passed a valid filename": { 23 | "should have the proper methods defined": function () { 24 | helpers.assertFile(fileTransport); 25 | }, 26 | "the log() method": helpers.testNpmLevels(fileTransport, "should respond with true", function (ign, err, logged) { 27 | assert.isNull(err); 28 | assert.isTrue(logged); 29 | }) 30 | }, 31 | "when passed a valid file stream": { 32 | "should have the proper methods defined": function () { 33 | helpers.assertFile(streamTransport); 34 | }, 35 | "the log() method": helpers.testNpmLevels(streamTransport, "should respond with true", function (ign, err, logged) { 36 | assert.isNull(err); 37 | assert.isTrue(logged); 38 | }) 39 | } 40 | } 41 | }).addBatch({ 42 | "These tests have a non-deterministic end": { 43 | topic: function () { 44 | setTimeout(this.callback, 200); 45 | }, 46 | "and this should be fixed before releasing": function () { 47 | assert.isTrue(true); 48 | } 49 | } 50 | }).export(module); -------------------------------------------------------------------------------- /test/cf_test/utils.js: -------------------------------------------------------------------------------- 1 | ../utils.js -------------------------------------------------------------------------------- /test/common_test/utils.js: -------------------------------------------------------------------------------- 1 | ../utils.js -------------------------------------------------------------------------------- /test/file1.txt: -------------------------------------------------------------------------------- 1 | jurgen was here 2 | -------------------------------------------------------------------------------- /test/file2.txt: -------------------------------------------------------------------------------- 1 | {"user1":"password1"} -------------------------------------------------------------------------------- /test/filex.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-attic/vblob/0a38aa13c31cdf49c30b32bd24e4243e29c759eb/test/filex.dat -------------------------------------------------------------------------------- /test/fs_test/utils.js: -------------------------------------------------------------------------------- 1 | ../utils.js --------------------------------------------------------------------------------