├── .gitignore
├── README.md
└── examples
├── PusherNotifier.js
├── images
└── notify.png
├── index.html
├── lib
├── gritter
│ ├── README.markdown
│ ├── css
│ │ └── jquery.gritter.css
│ ├── images
│ │ ├── gritter-long.png
│ │ ├── gritter.png
│ │ ├── ie-spacer.gif
│ │ └── trees.jpg
│ ├── index.html
│ └── js
│ │ ├── jquery.gritter.js
│ │ └── jquery.gritter.min.js
├── less
│ └── less-1.1.5.min.js
└── twitter-bootstrap
│ ├── .gitignore
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── bootstrap.css
│ ├── bootstrap.min.css
│ ├── docs
│ ├── assets
│ │ ├── css
│ │ │ └── docs.css
│ │ ├── ico
│ │ │ ├── bootstrap-apple-114x114.png
│ │ │ ├── bootstrap-apple-57x57.png
│ │ │ ├── bootstrap-apple-72x72.png
│ │ │ └── favicon.ico
│ │ ├── img
│ │ │ ├── bird.png
│ │ │ ├── browsers.png
│ │ │ ├── example-diagram-01.png
│ │ │ ├── example-diagram-02.png
│ │ │ ├── example-diagram-03.png
│ │ │ ├── grid-18px.png
│ │ │ └── twitter-logo-no-bird.png
│ │ └── js
│ │ │ ├── application.js
│ │ │ └── google-code-prettify
│ │ │ ├── prettify.css
│ │ │ └── prettify.js
│ ├── index.html
│ └── javascript.html
│ ├── examples
│ ├── container-app.html
│ ├── fluid.html
│ └── hero.html
│ ├── js
│ ├── bootstrap-alerts.js
│ ├── bootstrap-buttons.js
│ ├── bootstrap-dropdown.js
│ ├── bootstrap-modal.js
│ ├── bootstrap-popover.js
│ ├── bootstrap-scrollspy.js
│ ├── bootstrap-tabs.js
│ ├── bootstrap-twipsy.js
│ └── tests
│ │ ├── index.html
│ │ ├── unit
│ │ ├── bootstrap-alerts.js
│ │ ├── bootstrap-buttons.js
│ │ ├── bootstrap-dropdown.js
│ │ ├── bootstrap-modal.js
│ │ ├── bootstrap-popover.js
│ │ ├── bootstrap-scrollspy.js
│ │ ├── bootstrap-tabs.js
│ │ └── bootstrap-twipsy.js
│ │ └── vendor
│ │ ├── qunit.css
│ │ └── qunit.js
│ └── lib
│ ├── bootstrap.less
│ ├── forms.less
│ ├── mixins.less
│ ├── patterns.less
│ ├── reset.less
│ ├── scaffolding.less
│ ├── tables.less
│ ├── type.less
│ └── variables.less
├── minimal.html
├── nodejs
├── app.js
├── config.example.js
├── node_modules
│ ├── body-parser
│ │ ├── .npmignore
│ │ ├── HISTORY.md
│ │ ├── README.md
│ │ ├── index.js
│ │ ├── lib
│ │ │ ├── read.js
│ │ │ └── types
│ │ │ │ ├── json.js
│ │ │ │ ├── raw.js
│ │ │ │ ├── text.js
│ │ │ │ └── urlencoded.js
│ │ ├── node_modules
│ │ │ ├── bytes
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── Makefile
│ │ │ │ ├── Readme.md
│ │ │ │ ├── component.json
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── depd
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Readme.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── iconv-lite
│ │ │ │ ├── .npmignore
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── Changelog.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── README.md~
│ │ │ │ ├── encodings
│ │ │ │ │ ├── dbcs-codec.js
│ │ │ │ │ ├── dbcs-data.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── internal.js
│ │ │ │ │ ├── sbcs-codec.js
│ │ │ │ │ ├── sbcs-data-generated.js
│ │ │ │ │ ├── sbcs-data.js
│ │ │ │ │ ├── tables
│ │ │ │ │ │ ├── big5-added.json
│ │ │ │ │ │ ├── cp936.json
│ │ │ │ │ │ ├── cp949.json
│ │ │ │ │ │ ├── cp950.json
│ │ │ │ │ │ ├── eucjp.json
│ │ │ │ │ │ ├── gb18030-ranges.json
│ │ │ │ │ │ ├── gbk-added.json
│ │ │ │ │ │ └── shiftjis.json
│ │ │ │ │ ├── utf16.js
│ │ │ │ │ └── utf7.js
│ │ │ │ ├── lib
│ │ │ │ │ ├── extend-node.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── streams.js
│ │ │ │ └── package.json
│ │ │ ├── media-typer
│ │ │ │ ├── .npmignore
│ │ │ │ ├── HISTORY.md
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── qs
│ │ │ │ ├── .gitmodules
│ │ │ │ ├── .npmignore
│ │ │ │ ├── Readme.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── raw-body
│ │ │ │ ├── .npmignore
│ │ │ │ ├── HISTORY.md
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ └── type-is
│ │ │ │ ├── .npmignore
│ │ │ │ ├── HISTORY.md
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ ├── node_modules
│ │ │ │ └── mime-types
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── .travis.yml
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── SOURCES.md
│ │ │ │ │ ├── component.json
│ │ │ │ │ ├── lib
│ │ │ │ │ ├── custom.json
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── mime.json
│ │ │ │ │ └── node.json
│ │ │ │ │ └── package.json
│ │ │ │ └── package.json
│ │ └── package.json
│ ├── errorhandler
│ │ ├── .npmignore
│ │ ├── History.md
│ │ ├── README.md
│ │ ├── index.js
│ │ ├── node_modules
│ │ │ ├── accepts
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ ├── node_modules
│ │ │ │ │ ├── mime-types
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── SOURCES.md
│ │ │ │ │ │ ├── component.json
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ │ ├── custom.json
│ │ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ │ ├── mime.json
│ │ │ │ │ │ │ └── node.json
│ │ │ │ │ │ └── package.json
│ │ │ │ │ └── negotiator
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ ├── charset.js
│ │ │ │ │ │ ├── encoding.js
│ │ │ │ │ │ ├── language.js
│ │ │ │ │ │ ├── mediaType.js
│ │ │ │ │ │ └── negotiator.js
│ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ └── readme.md
│ │ │ │ └── package.json
│ │ │ └── escape-html
│ │ │ │ ├── .npmignore
│ │ │ │ ├── Makefile
│ │ │ │ ├── Readme.md
│ │ │ │ ├── component.json
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ ├── package.json
│ │ └── public
│ │ │ ├── error.html
│ │ │ └── style.css
│ ├── escape-html
│ │ ├── .npmignore
│ │ ├── Makefile
│ │ ├── Readme.md
│ │ ├── component.json
│ │ ├── index.js
│ │ └── package.json
│ ├── express
│ │ ├── .npmignore
│ │ ├── History.md
│ │ ├── LICENSE
│ │ ├── Readme.md
│ │ ├── index.js
│ │ ├── lib
│ │ │ ├── application.js
│ │ │ ├── express.js
│ │ │ ├── middleware
│ │ │ │ ├── init.js
│ │ │ │ └── query.js
│ │ │ ├── request.js
│ │ │ ├── response.js
│ │ │ ├── router
│ │ │ │ ├── index.js
│ │ │ │ ├── layer.js
│ │ │ │ ├── match.js
│ │ │ │ └── route.js
│ │ │ ├── utils.js
│ │ │ └── view.js
│ │ ├── node_modules
│ │ │ ├── accepts
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ ├── node_modules
│ │ │ │ │ ├── mime-types
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── SOURCES.md
│ │ │ │ │ │ ├── component.json
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ │ ├── custom.json
│ │ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ │ ├── mime.json
│ │ │ │ │ │ │ └── node.json
│ │ │ │ │ │ └── package.json
│ │ │ │ │ └── negotiator
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ ├── charset.js
│ │ │ │ │ │ ├── encoding.js
│ │ │ │ │ │ ├── language.js
│ │ │ │ │ │ ├── mediaType.js
│ │ │ │ │ │ └── negotiator.js
│ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ └── readme.md
│ │ │ │ └── package.json
│ │ │ ├── buffer-crc32
│ │ │ │ ├── .npmignore
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ ├── package.json
│ │ │ │ └── tests
│ │ │ │ │ └── crc.test.js
│ │ │ ├── cookie-signature
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── Makefile
│ │ │ │ ├── Readme.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── cookie
│ │ │ │ ├── .npmignore
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── debug
│ │ │ │ ├── .jshintrc
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── Makefile
│ │ │ │ ├── Readme.md
│ │ │ │ ├── browser.js
│ │ │ │ ├── component.json
│ │ │ │ ├── debug.js
│ │ │ │ ├── node.js
│ │ │ │ ├── node_modules
│ │ │ │ │ └── ms
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ └── package.json
│ │ │ │ └── package.json
│ │ │ ├── depd
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Readme.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── escape-html
│ │ │ │ ├── .npmignore
│ │ │ │ ├── Makefile
│ │ │ │ ├── Readme.md
│ │ │ │ ├── component.json
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── finalhandler
│ │ │ │ ├── .npmignore
│ │ │ │ ├── HISTORY.md
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── fresh
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── Makefile
│ │ │ │ ├── Readme.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── media-typer
│ │ │ │ ├── .npmignore
│ │ │ │ ├── HISTORY.md
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── merge-descriptors
│ │ │ │ ├── .npmignore
│ │ │ │ ├── README.md
│ │ │ │ ├── component.json
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── methods
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Readme.md
│ │ │ │ ├── index.js
│ │ │ │ ├── package.json
│ │ │ │ └── test
│ │ │ │ │ └── methods.js
│ │ │ ├── parseurl
│ │ │ │ ├── .npmignore
│ │ │ │ ├── HISTORY.md
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── path-to-regexp
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── Readme.md
│ │ │ │ ├── component.json
│ │ │ │ ├── index.js
│ │ │ │ ├── package.json
│ │ │ │ └── test.js
│ │ │ ├── proxy-addr
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ ├── node_modules
│ │ │ │ │ └── ipaddr.js
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── Cakefile
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── ipaddr.min.js
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ └── ipaddr.js
│ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ ├── src
│ │ │ │ │ │ └── ipaddr.coffee
│ │ │ │ │ │ └── test
│ │ │ │ │ │ └── ipaddr.test.coffee
│ │ │ │ └── package.json
│ │ │ ├── qs
│ │ │ │ ├── .gitmodules
│ │ │ │ ├── .npmignore
│ │ │ │ ├── Readme.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── range-parser
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── Makefile
│ │ │ │ ├── Readme.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── send
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── Readme.md
│ │ │ │ ├── index.js
│ │ │ │ ├── lib
│ │ │ │ │ ├── send.js
│ │ │ │ │ └── utils.js
│ │ │ │ ├── node_modules
│ │ │ │ │ ├── finished
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── HISTORY.md
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ ├── node_modules
│ │ │ │ │ │ │ └── ee-first
│ │ │ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ │ │ └── test.js
│ │ │ │ │ │ └── package.json
│ │ │ │ │ ├── mime
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── mime.js
│ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ ├── test.js
│ │ │ │ │ │ └── types
│ │ │ │ │ │ │ ├── mime.types
│ │ │ │ │ │ │ └── node.types
│ │ │ │ │ └── ms
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ └── package.json
│ │ │ │ └── package.json
│ │ │ ├── serve-static
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Readme.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── type-is
│ │ │ │ ├── .npmignore
│ │ │ │ ├── HISTORY.md
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ ├── node_modules
│ │ │ │ │ └── mime-types
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── SOURCES.md
│ │ │ │ │ │ ├── component.json
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ ├── custom.json
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ ├── mime.json
│ │ │ │ │ │ └── node.json
│ │ │ │ │ │ └── package.json
│ │ │ │ └── package.json
│ │ │ ├── utils-merge
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ └── vary
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ └── package.json
│ └── pusher
│ │ ├── .npmignore
│ │ ├── README.md
│ │ ├── examples
│ │ └── webhook_endpoint.js
│ │ ├── lib
│ │ ├── auth.js
│ │ ├── config.js
│ │ ├── errors.js
│ │ ├── events.js
│ │ ├── pusher.js
│ │ ├── requests.js
│ │ ├── token.js
│ │ ├── util.js
│ │ └── webhook.js
│ │ ├── node_modules
│ │ └── request
│ │ │ ├── .npmignore
│ │ │ ├── .travis.yml
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── index.js
│ │ │ ├── lib
│ │ │ ├── cookies.js
│ │ │ ├── copy.js
│ │ │ ├── debug.js
│ │ │ ├── getSafe.js
│ │ │ └── optional.js
│ │ │ ├── node_modules
│ │ │ ├── aws-sign2
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── forever-agent
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── form-data
│ │ │ │ ├── License
│ │ │ │ ├── Readme.md
│ │ │ │ ├── lib
│ │ │ │ │ └── form_data.js
│ │ │ │ ├── node_modules
│ │ │ │ │ ├── async
│ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── component.json
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ │ └── async.js
│ │ │ │ │ │ └── package.json
│ │ │ │ │ └── combined-stream
│ │ │ │ │ │ ├── License
│ │ │ │ │ │ ├── Readme.md
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ └── combined_stream.js
│ │ │ │ │ │ ├── node_modules
│ │ │ │ │ │ └── delayed-stream
│ │ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ │ ├── License
│ │ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ │ ├── Readme.md
│ │ │ │ │ │ │ ├── lib
│ │ │ │ │ │ │ └── delayed_stream.js
│ │ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ │ └── test
│ │ │ │ │ │ │ ├── common.js
│ │ │ │ │ │ │ ├── integration
│ │ │ │ │ │ │ ├── test-delayed-http-upload.js
│ │ │ │ │ │ │ ├── test-delayed-stream-auto-pause.js
│ │ │ │ │ │ │ ├── test-delayed-stream-pause.js
│ │ │ │ │ │ │ ├── test-delayed-stream.js
│ │ │ │ │ │ │ ├── test-handle-source-errors.js
│ │ │ │ │ │ │ ├── test-max-data-size.js
│ │ │ │ │ │ │ ├── test-pipe-resumes.js
│ │ │ │ │ │ │ └── test-proxy-readable.js
│ │ │ │ │ │ │ └── run.js
│ │ │ │ │ │ └── package.json
│ │ │ │ └── package.json
│ │ │ ├── hawk
│ │ │ │ ├── .npmignore
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Makefile
│ │ │ │ ├── README.md
│ │ │ │ ├── example
│ │ │ │ │ └── usage.js
│ │ │ │ ├── images
│ │ │ │ │ ├── hawk.png
│ │ │ │ │ └── logo.png
│ │ │ │ ├── index.js
│ │ │ │ ├── lib
│ │ │ │ │ ├── browser.js
│ │ │ │ │ ├── client.js
│ │ │ │ │ ├── crypto.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── server.js
│ │ │ │ │ └── utils.js
│ │ │ │ ├── node_modules
│ │ │ │ │ ├── boom
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── images
│ │ │ │ │ │ │ └── boom.png
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ │ └── index.js
│ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ └── test
│ │ │ │ │ │ │ └── index.js
│ │ │ │ │ ├── cryptiles
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ │ └── index.js
│ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ └── test
│ │ │ │ │ │ │ └── index.js
│ │ │ │ │ ├── hoek
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── images
│ │ │ │ │ │ │ └── hoek.png
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ │ ├── escape.js
│ │ │ │ │ │ │ └── index.js
│ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ └── test
│ │ │ │ │ │ │ ├── escaper.js
│ │ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ │ └── modules
│ │ │ │ │ │ │ ├── test1.js
│ │ │ │ │ │ │ ├── test2.js
│ │ │ │ │ │ │ └── test3.js
│ │ │ │ │ └── sntp
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── examples
│ │ │ │ │ │ ├── offset.js
│ │ │ │ │ │ └── time.js
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ └── index.js
│ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ └── test
│ │ │ │ │ │ └── index.js
│ │ │ │ ├── package.json
│ │ │ │ └── test
│ │ │ │ │ ├── browser.js
│ │ │ │ │ ├── client.js
│ │ │ │ │ ├── crypto.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── message.js
│ │ │ │ │ ├── readme.js
│ │ │ │ │ ├── server.js
│ │ │ │ │ ├── uri.js
│ │ │ │ │ └── utils.js
│ │ │ ├── http-signature
│ │ │ │ ├── .dir-locals.el
│ │ │ │ ├── .npmignore
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── http_signing.md
│ │ │ │ ├── lib
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── parser.js
│ │ │ │ │ ├── signer.js
│ │ │ │ │ ├── util.js
│ │ │ │ │ └── verify.js
│ │ │ │ ├── node_modules
│ │ │ │ │ ├── asn1
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ │ ├── ber
│ │ │ │ │ │ │ │ ├── errors.js
│ │ │ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ │ │ ├── reader.js
│ │ │ │ │ │ │ │ ├── types.js
│ │ │ │ │ │ │ │ └── writer.js
│ │ │ │ │ │ │ └── index.js
│ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ └── tst
│ │ │ │ │ │ │ └── ber
│ │ │ │ │ │ │ ├── reader.test.js
│ │ │ │ │ │ │ └── writer.test.js
│ │ │ │ │ ├── assert-plus
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── assert.js
│ │ │ │ │ │ └── package.json
│ │ │ │ │ └── ctype
│ │ │ │ │ │ ├── CHANGELOG
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── README
│ │ │ │ │ │ ├── README.old
│ │ │ │ │ │ ├── ctf.js
│ │ │ │ │ │ ├── ctio.js
│ │ │ │ │ │ ├── ctype.js
│ │ │ │ │ │ ├── man
│ │ │ │ │ │ └── man3ctype
│ │ │ │ │ │ │ └── ctio.3ctype
│ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ ├── tools
│ │ │ │ │ │ ├── jsl.conf
│ │ │ │ │ │ └── jsstyle
│ │ │ │ │ │ └── tst
│ │ │ │ │ │ ├── ctf
│ │ │ │ │ │ ├── float.json
│ │ │ │ │ │ ├── int.json
│ │ │ │ │ │ ├── psinfo.json
│ │ │ │ │ │ ├── struct.json
│ │ │ │ │ │ ├── tst.fail.js
│ │ │ │ │ │ ├── tst.float.js
│ │ │ │ │ │ ├── tst.int.js
│ │ │ │ │ │ ├── tst.psinfo.js
│ │ │ │ │ │ ├── tst.struct.js
│ │ │ │ │ │ ├── tst.typedef.js
│ │ │ │ │ │ └── typedef.json
│ │ │ │ │ │ ├── ctio
│ │ │ │ │ │ ├── float
│ │ │ │ │ │ │ ├── tst.rfloat.js
│ │ │ │ │ │ │ └── tst.wfloat.js
│ │ │ │ │ │ ├── int
│ │ │ │ │ │ │ ├── tst.64.js
│ │ │ │ │ │ │ ├── tst.rint.js
│ │ │ │ │ │ │ ├── tst.wbounds.js
│ │ │ │ │ │ │ └── tst.wint.js
│ │ │ │ │ │ └── uint
│ │ │ │ │ │ │ ├── tst.64.js
│ │ │ │ │ │ │ ├── tst.roundtrip.js
│ │ │ │ │ │ │ ├── tst.ruint.js
│ │ │ │ │ │ │ └── tst.wuint.js
│ │ │ │ │ │ └── ctype
│ │ │ │ │ │ ├── tst.basicr.js
│ │ │ │ │ │ ├── tst.basicw.js
│ │ │ │ │ │ ├── tst.char.js
│ │ │ │ │ │ ├── tst.endian.js
│ │ │ │ │ │ ├── tst.oldwrite.js
│ │ │ │ │ │ ├── tst.readSize.js
│ │ │ │ │ │ ├── tst.structw.js
│ │ │ │ │ │ └── tst.writeStruct.js
│ │ │ │ └── package.json
│ │ │ ├── json-stringify-safe
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── package.json
│ │ │ │ ├── stringify.js
│ │ │ │ └── test.js
│ │ │ ├── mime
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── mime.js
│ │ │ │ ├── package.json
│ │ │ │ ├── test.js
│ │ │ │ └── types
│ │ │ │ │ ├── mime.types
│ │ │ │ │ └── node.types
│ │ │ ├── node-uuid
│ │ │ │ ├── .npmignore
│ │ │ │ ├── LICENSE.md
│ │ │ │ ├── README.md
│ │ │ │ ├── benchmark
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── bench.gnu
│ │ │ │ │ ├── bench.sh
│ │ │ │ │ ├── benchmark-native.c
│ │ │ │ │ └── benchmark.js
│ │ │ │ ├── component.json
│ │ │ │ ├── package.json
│ │ │ │ ├── test
│ │ │ │ │ ├── compare_v1.js
│ │ │ │ │ ├── test.html
│ │ │ │ │ └── test.js
│ │ │ │ └── uuid.js
│ │ │ ├── oauth-sign
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ ├── package.json
│ │ │ │ └── test.js
│ │ │ ├── qs
│ │ │ │ ├── .gitmodules
│ │ │ │ ├── .npmignore
│ │ │ │ ├── Readme.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── tough-cookie
│ │ │ │ ├── .jshintrc
│ │ │ │ ├── .npmignore
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── generate-pubsuffix.js
│ │ │ │ ├── lib
│ │ │ │ │ ├── cookie.js
│ │ │ │ │ ├── memstore.js
│ │ │ │ │ ├── pubsuffix.js
│ │ │ │ │ └── store.js
│ │ │ │ ├── node_modules
│ │ │ │ │ └── punycode
│ │ │ │ │ │ ├── LICENSE-MIT.txt
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ └── punycode.js
│ │ │ │ ├── package.json
│ │ │ │ ├── public-suffix.txt
│ │ │ │ └── test.js
│ │ │ └── tunnel-agent
│ │ │ │ ├── .jshintrc
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── package.json
│ │ │ └── request.js
│ │ ├── package.json
│ │ └── tests
│ │ ├── helpers
│ │ └── http_proxy.js
│ │ ├── integration
│ │ ├── pusher
│ │ │ ├── authenticate.js
│ │ │ ├── constructor.js
│ │ │ ├── create_signed_query_string.js
│ │ │ ├── exports.js
│ │ │ ├── for_cluster.js
│ │ │ ├── for_url.js
│ │ │ ├── get.js
│ │ │ ├── post.js
│ │ │ ├── trigger.js
│ │ │ └── webhook.js
│ │ └── webhook.js
│ │ └── remote
│ │ └── pusher
│ │ ├── get.js
│ │ ├── keepalive.js
│ │ ├── proxy.js
│ │ └── trigger.js
└── package.json
├── notify.html
├── php
├── config.example.php
├── lastfm_example
│ ├── recent_tracks.php
│ └── recent_tracks_notification.php
├── lib
│ └── squeeks-Pusher-PHP
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── composer.json
│ │ ├── lib
│ │ └── Pusher.php
│ │ └── test
│ │ ├── TestLogger.php
│ │ ├── acceptance
│ │ ├── channelQueryTest.php
│ │ └── triggerTest.php
│ │ ├── config.example.php
│ │ ├── test_includes.php
│ │ └── unit
│ │ ├── authQueryStringTest.php
│ │ └── socketAuthTest.php
└── notify.php
├── ruby-sinatra
├── Gemfile
├── Gemfile.lock
├── config_example.rb
└── notify.rb
└── styles.css
/.gitignore:
--------------------------------------------------------------------------------
1 | *.DS_Store
2 | examples/php/config.php
3 | examples/ruby-sinatra/config.rb
4 | examples/nodejs/config.js
--------------------------------------------------------------------------------
/examples/PusherNotifier.js:
--------------------------------------------------------------------------------
1 | function PusherNotifier(channel, options) {
2 | options = options || {};
3 |
4 | this.settings = {
5 | eventName: 'notification',
6 | title: 'Notification',
7 | titleEventProperty: null, // if set the 'title' will not be used and the title will be taken from the event
8 | image: 'images/notify.png',
9 | eventTextProperty: 'message',
10 | gritterOptions: {}
11 | };
12 |
13 | $.extend(this.settings, options);
14 |
15 | var self = this;
16 | channel.bind(this.settings.eventName, function(data){ self._handleNotification(data); });
17 | };
18 | PusherNotifier.prototype._handleNotification = function(data) {
19 | var gritterOptions = {
20 | title: (this.settings.titleEventProperty? data[this.settings.titleEventProperty] : this.settings.title),
21 | text: data[this.settings.eventTextProperty].replace(/\\/g, ''),
22 | image: this.settings.image
23 | };
24 |
25 | $.extend(gritterOptions, this.settings.gritterOptions);
26 |
27 | $.gritter.add(gritterOptions);
28 | };
--------------------------------------------------------------------------------
/examples/images/notify.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/images/notify.png
--------------------------------------------------------------------------------
/examples/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HTML5 Push Notifications using Pusher - Frameset
6 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/lib/gritter/images/gritter-long.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/gritter/images/gritter-long.png
--------------------------------------------------------------------------------
/examples/lib/gritter/images/gritter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/gritter/images/gritter.png
--------------------------------------------------------------------------------
/examples/lib/gritter/images/ie-spacer.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/gritter/images/ie-spacer.gif
--------------------------------------------------------------------------------
/examples/lib/gritter/images/trees.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/gritter/images/trees.jpg
--------------------------------------------------------------------------------
/examples/lib/twitter-bootstrap/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | .DS_Store
3 | thumbs.db
4 | js/min
--------------------------------------------------------------------------------
/examples/lib/twitter-bootstrap/docs/assets/ico/bootstrap-apple-114x114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/twitter-bootstrap/docs/assets/ico/bootstrap-apple-114x114.png
--------------------------------------------------------------------------------
/examples/lib/twitter-bootstrap/docs/assets/ico/bootstrap-apple-57x57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/twitter-bootstrap/docs/assets/ico/bootstrap-apple-57x57.png
--------------------------------------------------------------------------------
/examples/lib/twitter-bootstrap/docs/assets/ico/bootstrap-apple-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/twitter-bootstrap/docs/assets/ico/bootstrap-apple-72x72.png
--------------------------------------------------------------------------------
/examples/lib/twitter-bootstrap/docs/assets/ico/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/twitter-bootstrap/docs/assets/ico/favicon.ico
--------------------------------------------------------------------------------
/examples/lib/twitter-bootstrap/docs/assets/img/bird.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/twitter-bootstrap/docs/assets/img/bird.png
--------------------------------------------------------------------------------
/examples/lib/twitter-bootstrap/docs/assets/img/browsers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/twitter-bootstrap/docs/assets/img/browsers.png
--------------------------------------------------------------------------------
/examples/lib/twitter-bootstrap/docs/assets/img/example-diagram-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/twitter-bootstrap/docs/assets/img/example-diagram-01.png
--------------------------------------------------------------------------------
/examples/lib/twitter-bootstrap/docs/assets/img/example-diagram-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/twitter-bootstrap/docs/assets/img/example-diagram-02.png
--------------------------------------------------------------------------------
/examples/lib/twitter-bootstrap/docs/assets/img/example-diagram-03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/twitter-bootstrap/docs/assets/img/example-diagram-03.png
--------------------------------------------------------------------------------
/examples/lib/twitter-bootstrap/docs/assets/img/grid-18px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/twitter-bootstrap/docs/assets/img/grid-18px.png
--------------------------------------------------------------------------------
/examples/lib/twitter-bootstrap/docs/assets/img/twitter-logo-no-bird.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/lib/twitter-bootstrap/docs/assets/img/twitter-logo-no-bird.png
--------------------------------------------------------------------------------
/examples/lib/twitter-bootstrap/js/tests/unit/bootstrap-scrollspy.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-scrollspy")
4 |
5 | test("should be defined on jquery object", function () {
6 | ok($(document.body).scrollspy, 'scrollspy method is defined')
7 | })
8 |
9 | test("should return element", function () {
10 | ok($(document.body).scrollspy()[0] == document.body, 'document.body returned')
11 | })
12 |
13 | test("should switch active class on scroll", function () {
14 | var sectionHTML = ''
15 | , $section = $(sectionHTML).append('#qunit-runoff')
16 | , topbarHTML =''
17 | + '
'
18 | + '
'
19 | + '
'
20 | + '
'
23 | + '
'
24 | + '
'
25 | + '
'
26 | , $topbar = $(topbarHTML).topbar()
27 |
28 | ok(topbar.find('.active', true)
29 | })
30 |
31 | })
--------------------------------------------------------------------------------
/examples/lib/twitter-bootstrap/lib/bootstrap.less:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap @VERSION
3 | *
4 | * Copyright 2011 Twitter, Inc
5 | * Licensed under the Apache License v2.0
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Designed and built with all the love in the world @twitter by @mdo and @fat.
9 | * Date: @DATE
10 | */
11 |
12 | // CSS Reset
13 | @import "reset.less";
14 |
15 | // Core variables and mixins
16 | @import "variables.less"; // Modify this for custom colors, font-sizes, etc
17 | @import "mixins.less";
18 |
19 | // Grid system and page structure
20 | @import "scaffolding.less";
21 |
22 | // Styled patterns and elements
23 | @import "type.less";
24 | @import "forms.less";
25 | @import "tables.less";
26 | @import "patterns.less";
--------------------------------------------------------------------------------
/examples/minimal.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Minimal HTML5 Realtime Push Notification Example
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
18 |
19 |
20 | Example HTML5 Realtime Push Notification page. Go here to trigger notifications.
21 |
22 |
--------------------------------------------------------------------------------
/examples/nodejs/config.example.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | app_id: "YOUR_APP_ID",
3 | key: "YOUR_APP_KEY",
4 | secret: "YOUR_APP_SECRET"
5 | }
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | test/
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/lib/types/raw.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * body-parser
3 | * MIT Licensed
4 | */
5 |
6 | /**
7 | * Module dependencies.
8 | */
9 |
10 | var bytes = require('bytes')
11 | var read = require('../read')
12 | var typeis = require('type-is')
13 |
14 | /**
15 | * Module exports.
16 | */
17 |
18 | module.exports = raw
19 |
20 | /**
21 | * Create a middleware to parse raw bodies.
22 | *
23 | * @param {object} [options]
24 | * @return {function}
25 | * @api public
26 | */
27 |
28 | function raw(options) {
29 | options = options || {};
30 |
31 | var inflate = options.inflate !== false
32 | var limit = typeof options.limit !== 'number'
33 | ? bytes(options.limit || '100kb')
34 | : options.limit
35 | var type = options.type || 'application/octet-stream'
36 | var verify = options.verify || false
37 |
38 | if (verify !== false && typeof verify !== 'function') {
39 | throw new TypeError('option verify must be function')
40 | }
41 |
42 | function parse(buf) {
43 | return buf
44 | }
45 |
46 | return function rawParser(req, res, next) {
47 | if (req._body) return next()
48 | req.body = req.body || {}
49 |
50 | if (!typeis(req, type)) return next()
51 |
52 | // read
53 | read(req, res, next, parse, {
54 | encoding: null,
55 | inflate: inflate,
56 | limit: limit,
57 | verify: verify
58 | })
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/bytes/.npmignore:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/bytes/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.0 / 2014-05-05
3 | ==================
4 |
5 | * add negative support. fixes #6
6 |
7 | 0.3.0 / 2014-03-19
8 | ==================
9 |
10 | * added terabyte support
11 |
12 | 0.2.1 / 2013-04-01
13 | ==================
14 |
15 | * add .component
16 |
17 | 0.2.0 / 2012-10-28
18 | ==================
19 |
20 | * bytes(200).should.eql('200b')
21 |
22 | 0.1.0 / 2012-07-04
23 | ==================
24 |
25 | * add bytes to string conversion [yields]
26 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/bytes/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha \
4 | --reporter spec \
5 | --require should
6 |
7 | .PHONY: test
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/bytes/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bytes",
3 | "description": "byte size string parser / serializer",
4 | "keywords": ["bytes", "utility"],
5 | "version": "0.2.1",
6 | "scripts": ["index.js"]
7 | }
8 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/bytes/index.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Parse byte `size` string.
4 | *
5 | * @param {String} size
6 | * @return {Number}
7 | * @api public
8 | */
9 |
10 | module.exports = function(size) {
11 | if ('number' == typeof size) return convert(size);
12 | var parts = size.match(/^(\d+(?:\.\d+)?) *(kb|mb|gb|tb)$/)
13 | , n = parseFloat(parts[1])
14 | , type = parts[2];
15 |
16 | var map = {
17 | kb: 1 << 10
18 | , mb: 1 << 20
19 | , gb: 1 << 30
20 | , tb: ((1 << 30) * 1024)
21 | };
22 |
23 | return map[type] * n;
24 | };
25 |
26 | /**
27 | * convert bytes into string.
28 | *
29 | * @param {Number} b - bytes to convert
30 | * @return {String}
31 | * @api public
32 | */
33 |
34 | function convert (b) {
35 | var tb = ((1 << 30) * 1024), gb = 1 << 30, mb = 1 << 20, kb = 1 << 10, abs = Math.abs(b);
36 | if (abs >= tb) return (Math.round(b / tb * 100) / 100) + 'tb';
37 | if (abs >= gb) return (Math.round(b / gb * 100) / 100) + 'gb';
38 | if (abs >= mb) return (Math.round(b / mb * 100) / 100) + 'mb';
39 | if (abs >= kb) return (Math.round(b / kb * 100) / 100) + 'kb';
40 | return b + 'b';
41 | }
42 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/depd/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | files/
3 | test/
4 | .travis.yml
5 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/depd/History.md:
--------------------------------------------------------------------------------
1 | 0.4.2 / 2014-07-19
2 | ==================
3 |
4 | * Correct call site for wrapped functions and properties
5 |
6 | 0.4.1 / 2014-07-19
7 | ==================
8 |
9 | * Improve automatic message generation for function properties
10 |
11 | 0.4.0 / 2014-07-19
12 | ==================
13 |
14 | * Add `TRACE_DEPRECATION` environment variable
15 | * Remove non-standard grey color from color output
16 | * Support `--no-deprecation` argument
17 | * Support `--trace-deprecation` argument
18 | * Support `deprecate.property(fn, prop, message)`
19 |
20 | 0.3.0 / 2014-06-16
21 | ==================
22 |
23 | * Add `NO_DEPRECATION` environment variable
24 |
25 | 0.2.0 / 2014-06-15
26 | ==================
27 |
28 | * Add `deprecate.property(obj, prop, message)`
29 | * Remove `supports-color` dependency for node.js 0.8
30 |
31 | 0.1.0 / 2014-06-15
32 | ==================
33 |
34 | * Add `deprecate.function(fn, message)`
35 | * Add `process.on('deprecation', fn)` emitter
36 | * Automatically generate message when omitted from `deprecate()`
37 |
38 | 0.0.1 / 2014-06-15
39 | ==================
40 |
41 | * Fix warning for dynamic calls at singe call site
42 |
43 | 0.0.0 / 2014-06-15
44 | ==================
45 |
46 | * Initial implementation
47 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/depd/LICENSE:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2014 Douglas Christopher Wilson
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.
23 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/iconv-lite/.npmignore:
--------------------------------------------------------------------------------
1 | *~
2 | *sublime-*
3 | generation
4 | test
5 | wiki
6 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/iconv-lite/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 0.8
4 | - 0.10
5 | - 0.11
6 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/iconv-lite/Changelog.md:
--------------------------------------------------------------------------------
1 |
2 | # 0.4.4 / 2014-07-16
3 |
4 | * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3)
5 | * fixed streaming base64 encoding
6 |
7 | # 0.4.3 / 2014-06-14
8 |
9 | * added encodings UTF-16BE and UTF-16 with BOM
10 |
11 | # 0.4.2 / 2014-06-12
12 |
13 | * don't throw exception if `extendNodeEncodings()` is called more than once
14 |
15 | # 0.4.1 / 2014-06-11
16 |
17 | * codepage 808 added
18 |
19 |
20 | # 0.4.0 / 2014-06-10
21 |
22 | * code is rewritten from scratch
23 | * all widespread encodings are supported
24 | * streaming interface added
25 | * browserify compatibility added
26 | * (optional) extend core primitive encodings to make usage even simpler
27 | * moved from vows to mocha as the testing framework
28 |
29 |
30 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/iconv-lite/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011 Alexander Shtuchkin
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 |
22 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/iconv-lite/encodings/index.js:
--------------------------------------------------------------------------------
1 |
2 | // Update this array if you add/rename/remove files in this directory.
3 | // We support Browserify by skipping automatic module discovery and requiring modules directly.
4 | var modules = [
5 | require("./internal"),
6 | require("./utf16"),
7 | require("./utf7"),
8 | require("./sbcs-codec"),
9 | require("./sbcs-data"),
10 | require("./sbcs-data-generated"),
11 | require("./dbcs-codec"),
12 | require("./dbcs-data"),
13 | ];
14 |
15 | // Put all encoding/alias/codec definitions to single object and export it.
16 | for (var i = 0; i < modules.length; i++) {
17 | var module = modules[i];
18 | for (var enc in module)
19 | exports[enc] = module[enc];
20 | }
21 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gbk-added.json:
--------------------------------------------------------------------------------
1 | [
2 | ["a140","",62],
3 | ["a180","",32],
4 | ["a240","",62],
5 | ["a280","",32],
6 | ["a2ab","",5],
7 | ["a2e3","€"],
8 | ["a2ef",""],
9 | ["a2fd",""],
10 | ["a340","",62],
11 | ["a380","",31," "],
12 | ["a440","",62],
13 | ["a480","",32],
14 | ["a4f4","",10],
15 | ["a540","",62],
16 | ["a580","",32],
17 | ["a5f7","",7],
18 | ["a640","",62],
19 | ["a680","",32],
20 | ["a6b9","",7],
21 | ["a6d9","",6],
22 | ["a6ec",""],
23 | ["a6f3",""],
24 | ["a6f6","",8],
25 | ["a740","",62],
26 | ["a780","",32],
27 | ["a7c2","",14],
28 | ["a7f2","",12],
29 | ["a896","",10],
30 | ["a8bc",""],
31 | ["a8bf","ǹ"],
32 | ["a8c1",""],
33 | ["a8ea","",20],
34 | ["a958",""],
35 | ["a95b",""],
36 | ["a95d",""],
37 | ["a989","〾⿰",11],
38 | ["a997","",12],
39 | ["a9f0","",14],
40 | ["aaa1","",93],
41 | ["aba1","",93],
42 | ["aca1","",93],
43 | ["ada1","",93],
44 | ["aea1","",93],
45 | ["afa1","",93],
46 | ["d7fa","",4],
47 | ["f8a1","",93],
48 | ["f9a1","",93],
49 | ["faa1","",93],
50 | ["fba1","",93],
51 | ["fca1","",93],
52 | ["fda1","",93],
53 | ["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"],
54 | ["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93]
55 | ]
56 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/media-typer/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | test/
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/media-typer/HISTORY.md:
--------------------------------------------------------------------------------
1 | 0.2.0 / 2014-06-18
2 | ==================
3 |
4 | * Add `typer.format()` to format media types
5 |
6 | 0.1.0 / 2014-06-17
7 | ==================
8 |
9 | * Accept `req` as argument to `parse`
10 | * Accept `res` as argument to `parse`
11 | * Parse media type with extra LWS between type and first parameter
12 |
13 | 0.0.0 / 2014-06-13
14 | ==================
15 |
16 | * Initial implementation
17 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/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 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/qs/.npmignore:
--------------------------------------------------------------------------------
1 | test
2 | .travis.yml
3 | benchmark.js
4 | component.json
5 | examples.js
6 | History.md
7 | Makefile
8 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/raw-body/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | test/
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/type-is/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | test/
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/type-is/HISTORY.md:
--------------------------------------------------------------------------------
1 |
2 | 1.3.2 / 2014-06-24
3 | ==================
4 |
5 | * use `~` range on mime-types
6 |
7 | 1.3.1 / 2014-06-19
8 | ==================
9 |
10 | * fix global variable leak
11 |
12 | 1.3.0 / 2014-06-19
13 | ==================
14 |
15 | * improve type parsing
16 |
17 | - invalid media type never matches
18 | - media type not case-sensitive
19 | - extra LWS does not affect results
20 |
21 | 1.2.2 / 2014-06-19
22 | ==================
23 |
24 | * fix behavior on unknown type argument
25 |
26 | 1.2.1 / 2014-06-03
27 | ==================
28 |
29 | * switch dependency from `mime` to `mime-types@1.0.0`
30 |
31 | 1.2.0 / 2014-05-11
32 | ==================
33 |
34 | * support suffix matching:
35 |
36 | - `+json` matches `application/vnd+json`
37 | - `*/vnd+json` matches `application/vnd+json`
38 | - `application/*+json` matches `application/vnd+json`
39 |
40 | 1.1.0 / 2014-04-12
41 | ==================
42 |
43 | * add non-array values support
44 | * expose internal utilities:
45 |
46 | - `.is()`
47 | - `.hasBody()`
48 | - `.normalize()`
49 | - `.match()`
50 |
51 | 1.0.1 / 2014-03-30
52 | ==================
53 |
54 | * add `multipart` as a shorthand
55 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/.npmignore:
--------------------------------------------------------------------------------
1 | test
2 | build.js
3 |
4 | # OS generated files #
5 | ######################
6 | .DS_Store*
7 | # Icon?
8 | ehthumbs.db
9 | Thumbs.db
10 |
11 | # Node.js #
12 | ###########
13 | node_modules
14 | npm-debug.log
15 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "0.8"
4 | - "0.10"
5 | - "0.11"
6 | matrix:
7 | allow_failures:
8 | - node_js: "0.11"
9 | fast_finish: true
10 | before_install:
11 | # remove build script deps before install
12 | - node -pe 'f="./package.json";p=require(f);d=p.devDependencies;for(k in d){if("co"===k.substr(0,2))delete d[k]}require("fs").writeFileSync(f,JSON.stringify(p,null,2))'
13 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | The MIT License (MIT)
3 |
4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com
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.
23 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/Makefile:
--------------------------------------------------------------------------------
1 |
2 | build:
3 | node --harmony-generators build.js
4 |
5 | test:
6 | node test/mime.js
7 | mocha --require should --reporter spec test/test.js
8 |
9 | .PHONY: build test
10 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/SOURCES.md:
--------------------------------------------------------------------------------
1 |
2 | ### Sources for custom types
3 |
4 | This is a list of sources for any custom mime types.
5 | When adding custom mime types, please link to where you found the mime type,
6 | even if it's from an unofficial source.
7 |
8 | - `text/coffeescript` - http://coffeescript.org/#scripts
9 | - `text/x-handlebars-template` - https://handlebarsjs.com/#getting-started
10 | - `text/x-sass` & `text/x-scss` - https://github.com/janlelis/rubybuntu-mime/blob/master/sass.xml
11 | - `text.jsx` - http://facebook.github.io/react/docs/getting-started.html [[2]](https://github.com/facebook/react/blob/f230e0a03154e6f8a616e0da1fb3d97ffa1a6472/vendor/browser-transforms.js#L210)
12 |
13 | [Sources for node.json types](https://github.com/broofa/node-mime/blob/master/types/node.types)
14 |
15 | ### Notes on weird types
16 |
17 | - `font/opentype` - This type is technically invalid according to the spec. No valid types begin with `font/`. No-one uses the official type of `application/vnd.ms-opentype` as the community standardized `application/x-font-otf`. However, chrome logs nonsense warnings unless opentype fonts are served with `font/opentype`. [[1]](http://stackoverflow.com/questions/2871655/proper-mime-type-for-fonts)
18 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mime-types",
3 | "description": "The ultimate javascript content-type utility.",
4 | "version": "0.1.0",
5 | "author": {
6 | "name": "Jonathan Ong",
7 | "email": "me@jongleberry.com",
8 | "url": "http://jongleberry.com",
9 | "twitter": "https://twitter.com/jongleberry"
10 | },
11 | "repository": "expressjs/mime-types",
12 | "license": "MIT",
13 | "main": "lib/index.js",
14 | "scripts": ["lib/index.js"],
15 | "json": ["mime.json", "node.json", "custom.json"]
16 | }
17 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/lib/custom.json:
--------------------------------------------------------------------------------
1 | {
2 | "text/jade": [
3 | "jade"
4 | ],
5 | "text/stylus": [
6 | "stylus",
7 | "styl"
8 | ],
9 | "text/less": [
10 | "less"
11 | ],
12 | "text/x-sass": [
13 | "sass"
14 | ],
15 | "text/x-scss": [
16 | "scss"
17 | ],
18 | "text/coffeescript": [
19 | "coffee"
20 | ],
21 | "text/x-handlebars-template": [
22 | "hbs"
23 | ],
24 | "text/jsx": [
25 | "jsx"
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/lib/node.json:
--------------------------------------------------------------------------------
1 | {
2 | "text/vtt": [
3 | "vtt"
4 | ],
5 | "application/x-chrome-extension": [
6 | "crx"
7 | ],
8 | "text/x-component": [
9 | "htc"
10 | ],
11 | "text/cache-manifest": [
12 | "manifest"
13 | ],
14 | "application/octet-stream": [
15 | "buffer"
16 | ],
17 | "application/mp4": [
18 | "m4p"
19 | ],
20 | "audio/mp4": [
21 | "m4a"
22 | ],
23 | "video/MP2T": [
24 | "ts"
25 | ],
26 | "application/x-web-app-manifest+json": [
27 | "webapp"
28 | ],
29 | "text/x-lua": [
30 | "lua"
31 | ],
32 | "application/x-lua-bytecode": [
33 | "luac"
34 | ],
35 | "text/x-markdown": [
36 | "markdown",
37 | "md",
38 | "mkd"
39 | ],
40 | "text/plain": [
41 | "ini"
42 | ],
43 | "application/dash+xml": [
44 | "mdp"
45 | ],
46 | "font/opentype": [
47 | "otf"
48 | ],
49 | "application/json": [
50 | "map"
51 | ],
52 | "application/xml": [
53 | "xsd"
54 | ]
55 | }
56 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | test/
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/History.md:
--------------------------------------------------------------------------------
1 | 1.1.1 / 2014-06-20
2 | ==================
3 |
4 | * deps: accepts@~1.0.4
5 | - use `mime-types`
6 |
7 | 1.1.0 / 2014-06-16
8 | ==================
9 |
10 | * Display error on console formatted like `throw`
11 | * Escape HTML with `escape-html` module
12 | * Escape HTML in stack trace
13 | * Escape HTML in title
14 | * Fix up edge cases with error sent in response
15 | * Set `X-Content-Type-Options: nosniff` header
16 | * Use accepts for negotiation
17 |
18 | 1.0.2 / 2014-06-05
19 | ==================
20 |
21 | * Pass on errors from reading error files
22 |
23 | 1.0.1 / 2014-04-29
24 | ==================
25 |
26 | * Clean up error CSS
27 | * Do not respond after headers sent
28 |
29 | 1.0.0 / 2014-03-03
30 | ==================
31 |
32 | * Genesis from `connect`
33 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/accepts/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | test/
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/accepts/History.md:
--------------------------------------------------------------------------------
1 | 1.0.7 / 2014-07-04
2 | ==================
3 |
4 | * Fix wrong type returned from `type` when match after unknown extension
5 |
6 | 1.0.6 / 2014-06-24
7 | ==================
8 |
9 | * deps: negotiator@0.4.7
10 |
11 | 1.0.5 / 2014-06-20
12 | ==================
13 |
14 | * fix crash when unknown extension given
15 |
16 | 1.0.4 / 2014-06-19
17 | ==================
18 |
19 | * use `mime-types`
20 |
21 | 1.0.3 / 2014-06-11
22 | ==================
23 |
24 | * deps: negotiator@0.4.6
25 | - Order by specificity when quality is the same
26 |
27 | 1.0.2 / 2014-05-29
28 | ==================
29 |
30 | * Fix interpretation when header not in request
31 | * deps: pin negotiator@0.4.5
32 |
33 | 1.0.1 / 2014-01-18
34 | ==================
35 |
36 | * Identity encoding isn't always acceptable
37 | * deps: negotiator@~0.4.0
38 |
39 | 1.0.0 / 2013-12-27
40 | ==================
41 |
42 | * Genesis
43 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/accepts/node_modules/mime-types/.npmignore:
--------------------------------------------------------------------------------
1 | test
2 | build.js
3 |
4 | # OS generated files #
5 | ######################
6 | .DS_Store*
7 | # Icon?
8 | ehthumbs.db
9 | Thumbs.db
10 |
11 | # Node.js #
12 | ###########
13 | node_modules
14 | npm-debug.log
15 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/accepts/node_modules/mime-types/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "0.8"
4 | - "0.10"
5 | - "0.11"
6 | matrix:
7 | allow_failures:
8 | - node_js: "0.11"
9 | fast_finish: true
10 | before_install:
11 | # remove build script deps before install
12 | - node -pe 'f="./package.json";p=require(f);d=p.devDependencies;for(k in d){if("co"===k.substr(0,2))delete d[k]}require("fs").writeFileSync(f,JSON.stringify(p,null,2))'
13 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/accepts/node_modules/mime-types/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | The MIT License (MIT)
3 |
4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com
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.
23 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/accepts/node_modules/mime-types/Makefile:
--------------------------------------------------------------------------------
1 |
2 | build:
3 | node --harmony-generators build.js
4 |
5 | test:
6 | node test/mime.js
7 | mocha --require should --reporter spec test/test.js
8 |
9 | .PHONY: build test
10 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/accepts/node_modules/mime-types/SOURCES.md:
--------------------------------------------------------------------------------
1 |
2 | ### Sources for custom types
3 |
4 | This is a list of sources for any custom mime types.
5 | When adding custom mime types, please link to where you found the mime type,
6 | even if it's from an unofficial source.
7 |
8 | - `text/coffeescript` - http://coffeescript.org/#scripts
9 | - `text/x-handlebars-template` - https://handlebarsjs.com/#getting-started
10 | - `text/x-sass` & `text/x-scss` - https://github.com/janlelis/rubybuntu-mime/blob/master/sass.xml
11 | - `text.jsx` - http://facebook.github.io/react/docs/getting-started.html [[2]](https://github.com/facebook/react/blob/f230e0a03154e6f8a616e0da1fb3d97ffa1a6472/vendor/browser-transforms.js#L210)
12 |
13 | [Sources for node.json types](https://github.com/broofa/node-mime/blob/master/types/node.types)
14 |
15 | ### Notes on weird types
16 |
17 | - `font/opentype` - This type is technically invalid according to the spec. No valid types begin with `font/`. No-one uses the official type of `application/vnd.ms-opentype` as the community standardized `application/x-font-otf`. However, chrome logs nonsense warnings unless opentype fonts are served with `font/opentype`. [[1]](http://stackoverflow.com/questions/2871655/proper-mime-type-for-fonts)
18 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/accepts/node_modules/mime-types/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mime-types",
3 | "description": "The ultimate javascript content-type utility.",
4 | "version": "0.1.0",
5 | "author": {
6 | "name": "Jonathan Ong",
7 | "email": "me@jongleberry.com",
8 | "url": "http://jongleberry.com",
9 | "twitter": "https://twitter.com/jongleberry"
10 | },
11 | "repository": "expressjs/mime-types",
12 | "license": "MIT",
13 | "main": "lib/index.js",
14 | "scripts": ["lib/index.js"],
15 | "json": ["mime.json", "node.json", "custom.json"]
16 | }
17 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/accepts/node_modules/mime-types/lib/custom.json:
--------------------------------------------------------------------------------
1 | {
2 | "text/jade": [
3 | "jade"
4 | ],
5 | "text/stylus": [
6 | "stylus",
7 | "styl"
8 | ],
9 | "text/less": [
10 | "less"
11 | ],
12 | "text/x-sass": [
13 | "sass"
14 | ],
15 | "text/x-scss": [
16 | "scss"
17 | ],
18 | "text/coffeescript": [
19 | "coffee"
20 | ],
21 | "text/x-handlebars-template": [
22 | "hbs"
23 | ],
24 | "text/jsx": [
25 | "jsx"
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/accepts/node_modules/mime-types/lib/node.json:
--------------------------------------------------------------------------------
1 | {
2 | "text/vtt": [
3 | "vtt"
4 | ],
5 | "application/x-chrome-extension": [
6 | "crx"
7 | ],
8 | "text/x-component": [
9 | "htc"
10 | ],
11 | "text/cache-manifest": [
12 | "manifest"
13 | ],
14 | "application/octet-stream": [
15 | "buffer"
16 | ],
17 | "application/mp4": [
18 | "m4p"
19 | ],
20 | "audio/mp4": [
21 | "m4a"
22 | ],
23 | "video/MP2T": [
24 | "ts"
25 | ],
26 | "application/x-web-app-manifest+json": [
27 | "webapp"
28 | ],
29 | "text/x-lua": [
30 | "lua"
31 | ],
32 | "application/x-lua-bytecode": [
33 | "luac"
34 | ],
35 | "text/x-markdown": [
36 | "markdown",
37 | "md",
38 | "mkd"
39 | ],
40 | "text/plain": [
41 | "ini"
42 | ],
43 | "application/dash+xml": [
44 | "mdp"
45 | ],
46 | "font/opentype": [
47 | "otf"
48 | ],
49 | "application/json": [
50 | "map"
51 | ],
52 | "application/xml": [
53 | "xsd"
54 | ]
55 | }
56 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/accepts/node_modules/negotiator/.npmignore:
--------------------------------------------------------------------------------
1 | examples
2 | test
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/accepts/node_modules/negotiator/LICENSE:
--------------------------------------------------------------------------------
1 | Original "Negotiator" program Copyright Federico Romero
2 | Port to JavaScript Copyright Isaac Z. Schlueter
3 |
4 | All rights reserved.
5 |
6 | MIT License
7 |
8 | Permission is hereby granted, free of charge, to any person
9 | obtaining a copy of this software and associated documentation
10 | files (the "Software"), to deal in the Software without
11 | restriction, including without limitation the rights to use,
12 | copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | copies of the Software, and to permit persons to whom the
14 | Software is furnished to do so, subject to the following
15 | conditions:
16 |
17 | The above copyright notice and this permission notice shall be
18 | included in all copies or substantial portions of the Software.
19 |
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | OTHER DEALINGS IN THE SOFTWARE.
28 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/accepts/node_modules/negotiator/lib/negotiator.js:
--------------------------------------------------------------------------------
1 | module.exports = Negotiator;
2 | Negotiator.Negotiator = Negotiator;
3 |
4 | function Negotiator(request) {
5 | if (!(this instanceof Negotiator)) return new Negotiator(request);
6 | this.request = request;
7 | }
8 |
9 | var set = { charset: 'accept-charset',
10 | encoding: 'accept-encoding',
11 | language: 'accept-language',
12 | mediaType: 'accept' };
13 |
14 |
15 | function capitalize(string){
16 | return string.charAt(0).toUpperCase() + string.slice(1);
17 | }
18 |
19 | Object.keys(set).forEach(function (k) {
20 | var header = set[k],
21 | method = require('./'+k+'.js'),
22 | singular = k,
23 | plural = k + 's';
24 |
25 | Negotiator.prototype[plural] = function (available) {
26 | return method(this.request.headers[header], available);
27 | };
28 |
29 | Negotiator.prototype[singular] = function(available) {
30 | var set = this[plural](available);
31 | if (set) return set[0];
32 | };
33 |
34 | // Keep preferred* methods for legacy compatibility
35 | Negotiator.prototype['preferred'+capitalize(plural)] = Negotiator.prototype[plural];
36 | Negotiator.prototype['preferred'+capitalize(singular)] = Negotiator.prototype[singular];
37 | })
38 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/escape-html/.npmignore:
--------------------------------------------------------------------------------
1 | components
2 | build
3 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/escape-html/Makefile:
--------------------------------------------------------------------------------
1 |
2 | build: components index.js
3 | @component build
4 |
5 | components:
6 | @Component install
7 |
8 | clean:
9 | rm -fr build components template.js
10 |
11 | .PHONY: clean
12 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/escape-html/Readme.md:
--------------------------------------------------------------------------------
1 |
2 | # escape-html
3 |
4 | Escape HTML entities
5 |
6 | ## Example
7 |
8 | ```js
9 | var escape = require('escape-html');
10 | escape(str);
11 | ```
12 |
13 | ## License
14 |
15 | MIT
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/escape-html/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "escape-html",
3 | "description": "Escape HTML entities",
4 | "version": "1.0.1",
5 | "keywords": ["escape", "html", "utility"],
6 | "dependencies": {},
7 | "scripts": [
8 | "index.js"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/escape-html/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Escape special characters in the given string of html.
3 | *
4 | * @param {String} html
5 | * @return {String}
6 | * @api private
7 | */
8 |
9 | module.exports = function(html) {
10 | return String(html)
11 | .replace(/&/g, '&')
12 | .replace(/"/g, '"')
13 | .replace(/'/g, ''')
14 | .replace(//g, '>');
16 | }
17 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/node_modules/escape-html/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "escape-html",
3 | "description": "Escape HTML entities",
4 | "version": "1.0.1",
5 | "keywords": [
6 | "escape",
7 | "html",
8 | "utility"
9 | ],
10 | "dependencies": {},
11 | "main": "index.js",
12 | "component": {
13 | "scripts": {
14 | "escape-html/index.js": "index.js"
15 | }
16 | },
17 | "repository": {
18 | "type": "git",
19 | "url": "https://github.com/component/escape-html.git"
20 | },
21 | "readme": "\n# escape-html\n\n Escape HTML entities\n\n## Example\n\n```js\nvar escape = require('escape-html');\nescape(str);\n```\n\n## License\n\n MIT",
22 | "readmeFilename": "Readme.md",
23 | "bugs": {
24 | "url": "https://github.com/component/escape-html/issues"
25 | },
26 | "homepage": "https://github.com/component/escape-html",
27 | "_id": "escape-html@1.0.1",
28 | "_from": "escape-html@1.0.1"
29 | }
30 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/public/error.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {error}
5 |
6 |
7 |
8 |
9 |
{title}
10 |
{statusCode} {error}
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/errorhandler/public/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | outline: 0;
5 | }
6 |
7 | body {
8 | padding: 80px 100px;
9 | font: 13px "Helvetica Neue", "Lucida Grande", "Arial";
10 | background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9));
11 | background: #ECE9E9 -moz-linear-gradient(top, #fff, #ECE9E9);
12 | background-repeat: no-repeat;
13 | color: #555;
14 | -webkit-font-smoothing: antialiased;
15 | }
16 | h1, h2 {
17 | font-size: 22px;
18 | color: #343434;
19 | }
20 | h1 em, h2 em {
21 | padding: 0 5px;
22 | font-weight: normal;
23 | }
24 | h1 {
25 | font-size: 60px;
26 | }
27 | h2 {
28 | margin-top: 10px;
29 | }
30 | ul li {
31 | list-style: none;
32 | }
33 | #stacktrace {
34 | margin-left: 60px;
35 | }
36 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/escape-html/.npmignore:
--------------------------------------------------------------------------------
1 | components
2 | build
3 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/escape-html/Makefile:
--------------------------------------------------------------------------------
1 |
2 | build: components index.js
3 | @component build
4 |
5 | components:
6 | @Component install
7 |
8 | clean:
9 | rm -fr build components template.js
10 |
11 | .PHONY: clean
12 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/escape-html/Readme.md:
--------------------------------------------------------------------------------
1 |
2 | # escape-html
3 |
4 | Escape HTML entities
5 |
6 | ## Example
7 |
8 | ```js
9 | var escape = require('escape-html');
10 | escape(str);
11 | ```
12 |
13 | ## License
14 |
15 | MIT
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/escape-html/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "escape-html",
3 | "description": "Escape HTML entities",
4 | "version": "1.0.1",
5 | "keywords": ["escape", "html", "utility"],
6 | "dependencies": {},
7 | "scripts": [
8 | "index.js"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/escape-html/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Escape special characters in the given string of html.
3 | *
4 | * @param {String} html
5 | * @return {String}
6 | * @api private
7 | */
8 |
9 | module.exports = function(html) {
10 | return String(html)
11 | .replace(/&/g, '&')
12 | .replace(/"/g, '"')
13 | .replace(/'/g, ''')
14 | .replace(//g, '>');
16 | }
17 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/escape-html/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "escape-html",
3 | "description": "Escape HTML entities",
4 | "version": "1.0.1",
5 | "keywords": [
6 | "escape",
7 | "html",
8 | "utility"
9 | ],
10 | "dependencies": {},
11 | "main": "index.js",
12 | "component": {
13 | "scripts": {
14 | "escape-html/index.js": "index.js"
15 | }
16 | },
17 | "repository": {
18 | "type": "git",
19 | "url": "https://github.com/component/escape-html.git"
20 | },
21 | "readme": "\n# escape-html\n\n Escape HTML entities\n\n## Example\n\n```js\nvar escape = require('escape-html');\nescape(str);\n```\n\n## License\n\n MIT",
22 | "readmeFilename": "Readme.md",
23 | "bugs": {
24 | "url": "https://github.com/component/escape-html/issues"
25 | },
26 | "homepage": "https://github.com/component/escape-html",
27 | "_id": "escape-html@1.0.1",
28 | "_from": "escape-html@"
29 | }
30 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/.npmignore:
--------------------------------------------------------------------------------
1 | .git*
2 | benchmarks/
3 | coverage/
4 | docs/
5 | examples/
6 | support/
7 | test/
8 | testing.js
9 | .DS_Store
10 | .travis.yml
11 | Contributing.md
12 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/LICENSE:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2009-2014 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.
23 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/index.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = require('./lib/express');
3 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/lib/middleware/init.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Initialization middleware, exposing the
3 | * request and response to eachother, as well
4 | * as defaulting the X-Powered-By header field.
5 | *
6 | * @param {Function} app
7 | * @return {Function}
8 | * @api private
9 | */
10 |
11 | exports.init = function(app){
12 | return function expressInit(req, res, next){
13 | if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express');
14 | req.res = res;
15 | res.req = req;
16 | req.next = next;
17 |
18 | req.__proto__ = app.request;
19 | res.__proto__ = app.response;
20 |
21 | res.locals = res.locals || Object.create(null);
22 |
23 | next();
24 | };
25 | };
26 |
27 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/lib/middleware/query.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Module dependencies.
3 | */
4 |
5 | var qs = require('qs');
6 | var parseUrl = require('parseurl');
7 |
8 | /**
9 | * Query:
10 | *
11 | * Automatically parse the query-string when available,
12 | * populating the `req.query` object using
13 | * [qs](https://github.com/visionmedia/node-querystring).
14 | *
15 | * Examples:
16 | *
17 | * .use(connect.query())
18 | * .use(function(req, res){
19 | * res.end(JSON.stringify(req.query));
20 | * });
21 | *
22 | * The `options` passed are provided to qs.parse function.
23 | *
24 | * @param {Object} options
25 | * @return {Function}
26 | * @api public
27 | */
28 |
29 | module.exports = function query(options){
30 | return function query(req, res, next){
31 | if (!req.query) {
32 | req.query = ~req.url.indexOf('?')
33 | ? qs.parse(parseUrl(req).query, options)
34 | : {};
35 | }
36 |
37 | next();
38 | };
39 | };
40 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/lib/router/match.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Module dependencies.
3 | */
4 |
5 | var pathRegexp = require('path-to-regexp');
6 |
7 | /**
8 | * Expose `Layer`.
9 | */
10 |
11 | module.exports = Match;
12 |
13 | function Match(layer, path, params) {
14 | this.layer = layer;
15 | this.params = {};
16 | this.path = path || '';
17 |
18 | if (!params) {
19 | return this;
20 | }
21 |
22 | var keys = layer.keys;
23 | var n = 0;
24 | var prop;
25 | var key;
26 | var val;
27 |
28 | for (var i = 0; i < params.length; i++) {
29 | key = keys[i];
30 | val = decode_param(params[i]);
31 | prop = key
32 | ? key.name
33 | : n++;
34 |
35 | this.params[prop] = val;
36 | }
37 |
38 | return this;
39 | };
40 |
41 | /**
42 | * Decode param value.
43 | *
44 | * @param {string} val
45 | * @return {string}
46 | * @api private
47 | */
48 |
49 | function decode_param(val){
50 | if (typeof val !== 'string') {
51 | return val;
52 | }
53 |
54 | try {
55 | return decodeURIComponent(val);
56 | } catch (e) {
57 | var err = new TypeError("Failed to decode param '" + val + "'");
58 | err.status = 400;
59 | throw err;
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/accepts/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | test/
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/accepts/History.md:
--------------------------------------------------------------------------------
1 | 1.0.7 / 2014-07-04
2 | ==================
3 |
4 | * Fix wrong type returned from `type` when match after unknown extension
5 |
6 | 1.0.6 / 2014-06-24
7 | ==================
8 |
9 | * deps: negotiator@0.4.7
10 |
11 | 1.0.5 / 2014-06-20
12 | ==================
13 |
14 | * fix crash when unknown extension given
15 |
16 | 1.0.4 / 2014-06-19
17 | ==================
18 |
19 | * use `mime-types`
20 |
21 | 1.0.3 / 2014-06-11
22 | ==================
23 |
24 | * deps: negotiator@0.4.6
25 | - Order by specificity when quality is the same
26 |
27 | 1.0.2 / 2014-05-29
28 | ==================
29 |
30 | * Fix interpretation when header not in request
31 | * deps: pin negotiator@0.4.5
32 |
33 | 1.0.1 / 2014-01-18
34 | ==================
35 |
36 | * Identity encoding isn't always acceptable
37 | * deps: negotiator@~0.4.0
38 |
39 | 1.0.0 / 2013-12-27
40 | ==================
41 |
42 | * Genesis
43 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/accepts/node_modules/mime-types/.npmignore:
--------------------------------------------------------------------------------
1 | test
2 | build.js
3 |
4 | # OS generated files #
5 | ######################
6 | .DS_Store*
7 | # Icon?
8 | ehthumbs.db
9 | Thumbs.db
10 |
11 | # Node.js #
12 | ###########
13 | node_modules
14 | npm-debug.log
15 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/accepts/node_modules/mime-types/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "0.8"
4 | - "0.10"
5 | - "0.11"
6 | matrix:
7 | allow_failures:
8 | - node_js: "0.11"
9 | fast_finish: true
10 | before_install:
11 | # remove build script deps before install
12 | - node -pe 'f="./package.json";p=require(f);d=p.devDependencies;for(k in d){if("co"===k.substr(0,2))delete d[k]}require("fs").writeFileSync(f,JSON.stringify(p,null,2))'
13 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | The MIT License (MIT)
3 |
4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com
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.
23 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/accepts/node_modules/mime-types/Makefile:
--------------------------------------------------------------------------------
1 |
2 | build:
3 | node --harmony-generators build.js
4 |
5 | test:
6 | node test/mime.js
7 | mocha --require should --reporter spec test/test.js
8 |
9 | .PHONY: build test
10 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/accepts/node_modules/mime-types/SOURCES.md:
--------------------------------------------------------------------------------
1 |
2 | ### Sources for custom types
3 |
4 | This is a list of sources for any custom mime types.
5 | When adding custom mime types, please link to where you found the mime type,
6 | even if it's from an unofficial source.
7 |
8 | - `text/coffeescript` - http://coffeescript.org/#scripts
9 | - `text/x-handlebars-template` - https://handlebarsjs.com/#getting-started
10 | - `text/x-sass` & `text/x-scss` - https://github.com/janlelis/rubybuntu-mime/blob/master/sass.xml
11 | - `text.jsx` - http://facebook.github.io/react/docs/getting-started.html [[2]](https://github.com/facebook/react/blob/f230e0a03154e6f8a616e0da1fb3d97ffa1a6472/vendor/browser-transforms.js#L210)
12 |
13 | [Sources for node.json types](https://github.com/broofa/node-mime/blob/master/types/node.types)
14 |
15 | ### Notes on weird types
16 |
17 | - `font/opentype` - This type is technically invalid according to the spec. No valid types begin with `font/`. No-one uses the official type of `application/vnd.ms-opentype` as the community standardized `application/x-font-otf`. However, chrome logs nonsense warnings unless opentype fonts are served with `font/opentype`. [[1]](http://stackoverflow.com/questions/2871655/proper-mime-type-for-fonts)
18 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/accepts/node_modules/mime-types/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mime-types",
3 | "description": "The ultimate javascript content-type utility.",
4 | "version": "0.1.0",
5 | "author": {
6 | "name": "Jonathan Ong",
7 | "email": "me@jongleberry.com",
8 | "url": "http://jongleberry.com",
9 | "twitter": "https://twitter.com/jongleberry"
10 | },
11 | "repository": "expressjs/mime-types",
12 | "license": "MIT",
13 | "main": "lib/index.js",
14 | "scripts": ["lib/index.js"],
15 | "json": ["mime.json", "node.json", "custom.json"]
16 | }
17 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/accepts/node_modules/mime-types/lib/custom.json:
--------------------------------------------------------------------------------
1 | {
2 | "text/jade": [
3 | "jade"
4 | ],
5 | "text/stylus": [
6 | "stylus",
7 | "styl"
8 | ],
9 | "text/less": [
10 | "less"
11 | ],
12 | "text/x-sass": [
13 | "sass"
14 | ],
15 | "text/x-scss": [
16 | "scss"
17 | ],
18 | "text/coffeescript": [
19 | "coffee"
20 | ],
21 | "text/x-handlebars-template": [
22 | "hbs"
23 | ],
24 | "text/jsx": [
25 | "jsx"
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/accepts/node_modules/mime-types/lib/node.json:
--------------------------------------------------------------------------------
1 | {
2 | "text/vtt": [
3 | "vtt"
4 | ],
5 | "application/x-chrome-extension": [
6 | "crx"
7 | ],
8 | "text/x-component": [
9 | "htc"
10 | ],
11 | "text/cache-manifest": [
12 | "manifest"
13 | ],
14 | "application/octet-stream": [
15 | "buffer"
16 | ],
17 | "application/mp4": [
18 | "m4p"
19 | ],
20 | "audio/mp4": [
21 | "m4a"
22 | ],
23 | "video/MP2T": [
24 | "ts"
25 | ],
26 | "application/x-web-app-manifest+json": [
27 | "webapp"
28 | ],
29 | "text/x-lua": [
30 | "lua"
31 | ],
32 | "application/x-lua-bytecode": [
33 | "luac"
34 | ],
35 | "text/x-markdown": [
36 | "markdown",
37 | "md",
38 | "mkd"
39 | ],
40 | "text/plain": [
41 | "ini"
42 | ],
43 | "application/dash+xml": [
44 | "mdp"
45 | ],
46 | "font/opentype": [
47 | "otf"
48 | ],
49 | "application/json": [
50 | "map"
51 | ],
52 | "application/xml": [
53 | "xsd"
54 | ]
55 | }
56 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/accepts/node_modules/negotiator/.npmignore:
--------------------------------------------------------------------------------
1 | examples
2 | test
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE:
--------------------------------------------------------------------------------
1 | Original "Negotiator" program Copyright Federico Romero
2 | Port to JavaScript Copyright Isaac Z. Schlueter
3 |
4 | All rights reserved.
5 |
6 | MIT License
7 |
8 | Permission is hereby granted, free of charge, to any person
9 | obtaining a copy of this software and associated documentation
10 | files (the "Software"), to deal in the Software without
11 | restriction, including without limitation the rights to use,
12 | copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | copies of the Software, and to permit persons to whom the
14 | Software is furnished to do so, subject to the following
15 | conditions:
16 |
17 | The above copyright notice and this permission notice shall be
18 | included in all copies or substantial portions of the Software.
19 |
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | OTHER DEALINGS IN THE SOFTWARE.
28 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/negotiator.js:
--------------------------------------------------------------------------------
1 | module.exports = Negotiator;
2 | Negotiator.Negotiator = Negotiator;
3 |
4 | function Negotiator(request) {
5 | if (!(this instanceof Negotiator)) return new Negotiator(request);
6 | this.request = request;
7 | }
8 |
9 | var set = { charset: 'accept-charset',
10 | encoding: 'accept-encoding',
11 | language: 'accept-language',
12 | mediaType: 'accept' };
13 |
14 |
15 | function capitalize(string){
16 | return string.charAt(0).toUpperCase() + string.slice(1);
17 | }
18 |
19 | Object.keys(set).forEach(function (k) {
20 | var header = set[k],
21 | method = require('./'+k+'.js'),
22 | singular = k,
23 | plural = k + 's';
24 |
25 | Negotiator.prototype[plural] = function (available) {
26 | return method(this.request.headers[header], available);
27 | };
28 |
29 | Negotiator.prototype[singular] = function(available) {
30 | var set = this[plural](available);
31 | if (set) return set[0];
32 | };
33 |
34 | // Keep preferred* methods for legacy compatibility
35 | Negotiator.prototype['preferred'+capitalize(plural)] = Negotiator.prototype[plural];
36 | Negotiator.prototype['preferred'+capitalize(singular)] = Negotiator.prototype[singular];
37 | })
38 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/buffer-crc32/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/buffer-crc32/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 0.6
4 | - 0.8
5 | notifications:
6 | email:
7 | recipients:
8 | - brianloveswords@gmail.com
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/buffer-crc32/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013 Brian J. Brennan
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 in
5 | the Software without restriction, including without limitation the rights to use,
6 | copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
7 | Software, and to permit persons to whom the Software is furnished to do so,
8 | subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
14 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
15 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
16 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/cookie-signature/.npmignore:
--------------------------------------------------------------------------------
1 | support
2 | test
3 | examples
4 | *.sock
5 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/cookie-signature/History.md:
--------------------------------------------------------------------------------
1 | 1.0.4 / 2014-06-25
2 | ==================
3 |
4 | * corrected avoidance of timing attacks (thanks @tenbits!)
5 |
6 |
7 | 1.0.3 / 2014-01-28
8 | ==================
9 |
10 | * [incorrect] fix for timing attacks
11 |
12 | 1.0.2 / 2014-01-28
13 | ==================
14 |
15 | * fix missing repository warning
16 | * fix typo in test
17 |
18 | 1.0.1 / 2013-04-15
19 | ==================
20 |
21 | * Revert "Changed underlying HMAC algo. to sha512."
22 | * Revert "Fix for timing attacks on MAC verification."
23 |
24 | 0.0.1 / 2010-01-03
25 | ==================
26 |
27 | * Initial release
28 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/cookie-signature/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha \
4 | --require should \
5 | --reporter spec
6 |
7 | .PHONY: test
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/cookie-signature/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Module dependencies.
3 | */
4 |
5 | var crypto = require('crypto');
6 |
7 | /**
8 | * Sign the given `val` with `secret`.
9 | *
10 | * @param {String} val
11 | * @param {String} secret
12 | * @return {String}
13 | * @api private
14 | */
15 |
16 | exports.sign = function(val, secret){
17 | if ('string' != typeof val) throw new TypeError('cookie required');
18 | if ('string' != typeof secret) throw new TypeError('secret required');
19 | return val + '.' + crypto
20 | .createHmac('sha256', secret)
21 | .update(val)
22 | .digest('base64')
23 | .replace(/\=+$/, '');
24 | };
25 |
26 | /**
27 | * Unsign and decode the given `val` with `secret`,
28 | * returning `false` if the signature is invalid.
29 | *
30 | * @param {String} val
31 | * @param {String} secret
32 | * @return {String|Boolean}
33 | * @api private
34 | */
35 |
36 | exports.unsign = function(val, secret){
37 | if ('string' != typeof val) throw new TypeError('cookie required');
38 | if ('string' != typeof secret) throw new TypeError('secret required');
39 | var str = val.slice(0, val.lastIndexOf('.'))
40 | , mac = exports.sign(str, secret);
41 |
42 | return sha1(mac) == sha1(val) ? str : false;
43 | };
44 |
45 | /**
46 | * Private
47 | */
48 |
49 | function sha1(str){
50 | return crypto.createHash('sha1').update(str).digest('hex');
51 | }
52 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/cookie/.npmignore:
--------------------------------------------------------------------------------
1 | test
2 | .travis.yml
3 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/cookie/LICENSE:
--------------------------------------------------------------------------------
1 | // MIT License
2 |
3 | Copyright (C) Roman Shtylman
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/cookie/README.md:
--------------------------------------------------------------------------------
1 | # cookie [](http://travis-ci.org/defunctzombie/node-cookie) #
2 |
3 | cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers.
4 |
5 | See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies.
6 |
7 | ## how?
8 |
9 | ```
10 | npm install cookie
11 | ```
12 |
13 | ```javascript
14 | var cookie = require('cookie');
15 |
16 | var hdr = cookie.serialize('foo', 'bar');
17 | // hdr = 'foo=bar';
18 |
19 | var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff');
20 | // cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' };
21 | ```
22 |
23 | ## more
24 |
25 | The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values.
26 |
27 | ### path
28 | > cookie path
29 |
30 | ### expires
31 | > absolute expiration date for the cookie (Date object)
32 |
33 | ### maxAge
34 | > relative max age of the cookie from when the client receives it (seconds)
35 |
36 | ### domain
37 | > domain for the cookie
38 |
39 | ### secure
40 | > true or false
41 |
42 | ### httpOnly
43 | > true or false
44 |
45 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/debug/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "laxbreak": true
3 | }
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/debug/.npmignore:
--------------------------------------------------------------------------------
1 | support
2 | test
3 | examples
4 | example
5 | *.sock
6 | dist
7 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/debug/Makefile:
--------------------------------------------------------------------------------
1 |
2 | # get Makefile directory name: http://stackoverflow.com/a/5982798/376773
3 | THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
4 | THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
5 |
6 | # BIN directory
7 | BIN := $(THIS_DIR)/node_modules/.bin
8 |
9 | # applications
10 | NODE ?= $(shell which node)
11 | NPM ?= $(NODE) $(shell which npm)
12 | BROWSERIFY ?= $(NODE) $(BIN)/browserify
13 |
14 | all: dist/debug.js
15 |
16 | install: node_modules
17 |
18 | clean:
19 | @rm -rf node_modules dist
20 |
21 | dist:
22 | @mkdir -p $@
23 |
24 | dist/debug.js: node_modules browser.js debug.js dist
25 | @$(BROWSERIFY) \
26 | --standalone debug \
27 | . > $@
28 |
29 | node_modules: package.json
30 | @NODE_ENV= $(NPM) install
31 | @touch node_modules
32 |
33 | .PHONY: all install clean
34 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/debug/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "debug",
3 | "repo": "visionmedia/debug",
4 | "description": "small debugging utility",
5 | "version": "1.0.3",
6 | "keywords": [
7 | "debug",
8 | "log",
9 | "debugger"
10 | ],
11 | "main": "browser.js",
12 | "scripts": [
13 | "browser.js",
14 | "debug.js"
15 | ],
16 | "dependencies": {
17 | "guille/ms.js": "0.6.1"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/debug/node_modules/ms/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | test
3 | History.md
4 | Makefile
5 | component.json
6 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/debug/node_modules/ms/README.md:
--------------------------------------------------------------------------------
1 | # ms.js: miliseconds conversion utility
2 |
3 | ```js
4 | ms('1d') // 86400000
5 | ms('10h') // 36000000
6 | ms('2h') // 7200000
7 | ms('1m') // 60000
8 | ms('5s') // 5000
9 | ms('100') // 100
10 | ```
11 |
12 | ```js
13 | ms(60000) // "1m"
14 | ms(2 * 60000) // "2m"
15 | ms(ms('10 hours')) // "10h"
16 | ```
17 |
18 | ```js
19 | ms(60000, { long: true }) // "1 minute"
20 | ms(2 * 60000, { long: true }) // "2 minutes"
21 | ms(ms('10 hours', { long: true })) // "10 hours"
22 | ```
23 |
24 | - Node/Browser compatible. Published as `ms` in NPM.
25 | - If a number is supplied to `ms`, a string with a unit is returned.
26 | - If a string that contains the number is supplied, it returns it as
27 | a number (e.g: it returns `100` for `'100'`).
28 | - If you pass a string with a number and a valid unit, the number of
29 | equivalent ms is returned.
30 |
31 | ## License
32 |
33 | MIT
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/depd/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | files/
3 | test/
4 | .travis.yml
5 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/depd/History.md:
--------------------------------------------------------------------------------
1 | 0.3.0 / 2014-06-16
2 | ==================
3 |
4 | * Add `NO_DEPRECATION` environment variable
5 |
6 | 0.2.0 / 2014-06-15
7 | ==================
8 |
9 | * Add `deprecate.property(obj, prop, message)`
10 | * Remove `supports-color` dependency for node.js 0.8
11 |
12 | 0.1.0 / 2014-06-15
13 | ==================
14 |
15 | * Add `deprecate.function(fn, message)`
16 | * Add `process.on('deprecation', fn)` emitter
17 | * Automatically generate message when omitted from `deprecate()`
18 |
19 | 0.0.1 / 2014-06-15
20 | ==================
21 |
22 | * Fix warning for dynamic calls at singe call site
23 |
24 | 0.0.0 / 2014-06-15
25 | ==================
26 |
27 | * Initial implementation
28 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/depd/LICENSE:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2014 Douglas Christopher Wilson
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.
23 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/escape-html/.npmignore:
--------------------------------------------------------------------------------
1 | components
2 | build
3 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/escape-html/Makefile:
--------------------------------------------------------------------------------
1 |
2 | build: components index.js
3 | @component build
4 |
5 | components:
6 | @Component install
7 |
8 | clean:
9 | rm -fr build components template.js
10 |
11 | .PHONY: clean
12 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/escape-html/Readme.md:
--------------------------------------------------------------------------------
1 |
2 | # escape-html
3 |
4 | Escape HTML entities
5 |
6 | ## Example
7 |
8 | ```js
9 | var escape = require('escape-html');
10 | escape(str);
11 | ```
12 |
13 | ## License
14 |
15 | MIT
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/escape-html/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "escape-html",
3 | "description": "Escape HTML entities",
4 | "version": "1.0.1",
5 | "keywords": ["escape", "html", "utility"],
6 | "dependencies": {},
7 | "scripts": [
8 | "index.js"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/escape-html/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Escape special characters in the given string of html.
3 | *
4 | * @param {String} html
5 | * @return {String}
6 | * @api private
7 | */
8 |
9 | module.exports = function(html) {
10 | return String(html)
11 | .replace(/&/g, '&')
12 | .replace(/"/g, '"')
13 | .replace(/'/g, ''')
14 | .replace(//g, '>');
16 | }
17 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/escape-html/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "escape-html",
3 | "description": "Escape HTML entities",
4 | "version": "1.0.1",
5 | "keywords": [
6 | "escape",
7 | "html",
8 | "utility"
9 | ],
10 | "dependencies": {},
11 | "main": "index.js",
12 | "component": {
13 | "scripts": {
14 | "escape-html/index.js": "index.js"
15 | }
16 | },
17 | "repository": {
18 | "type": "git",
19 | "url": "https://github.com/component/escape-html.git"
20 | },
21 | "readme": "\n# escape-html\n\n Escape HTML entities\n\n## Example\n\n```js\nvar escape = require('escape-html');\nescape(str);\n```\n\n## License\n\n MIT",
22 | "readmeFilename": "Readme.md",
23 | "bugs": {
24 | "url": "https://github.com/component/escape-html/issues"
25 | },
26 | "homepage": "https://github.com/component/escape-html",
27 | "_id": "escape-html@1.0.1",
28 | "_from": "escape-html@1.0.1"
29 | }
30 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/finalhandler/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | test/
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/finalhandler/HISTORY.md:
--------------------------------------------------------------------------------
1 | 0.0.3 / 2014-07-11
2 | ==================
3 |
4 | * deps: debug@1.0.3
5 | - Add support for multiple wildcards in namespaces
6 |
7 | 0.0.2 / 2014-06-19
8 | ==================
9 |
10 | * Handle invalid status codes
11 |
12 | 0.0.1 / 2014-06-05
13 | ==================
14 |
15 | * deps: debug@1.0.2
16 |
17 | 0.0.0 / 2014-06-05
18 | ==================
19 |
20 | * Extracted from connect/express
21 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/fresh/.npmignore:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/fresh/History.md:
--------------------------------------------------------------------------------
1 |
2 | 0.2.1 / 2014-01-29
3 | ==================
4 |
5 | * fix: support max-age=0 for end-to-end revalidation
6 |
7 | 0.2.0 / 2013-08-11
8 | ==================
9 |
10 | * fix: return false for no-cache
11 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/fresh/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha \
4 | --reporter spec \
5 | --require should
6 |
7 | .PHONY: test
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/media-typer/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | test/
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/media-typer/HISTORY.md:
--------------------------------------------------------------------------------
1 | 0.2.0 / 2014-06-18
2 | ==================
3 |
4 | * Add `typer.format()` to format media types
5 |
6 | 0.1.0 / 2014-06-17
7 | ==================
8 |
9 | * Accept `req` as argument to `parse`
10 | * Accept `res` as argument to `parse`
11 | * Parse media type with extra LWS between type and first parameter
12 |
13 | 0.0.0 / 2014-06-13
14 | ==================
15 |
16 | * Initial implementation
17 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/merge-descriptors/.npmignore:
--------------------------------------------------------------------------------
1 | # Compiled source #
2 | ###################
3 | *.com
4 | *.class
5 | *.dll
6 | *.exe
7 | *.o
8 | *.so
9 |
10 | # Packages #
11 | ############
12 | # it's better to unpack these files and commit the raw source
13 | # git has its own built in compression methods
14 | *.7z
15 | *.dmg
16 | *.gz
17 | *.iso
18 | *.jar
19 | *.rar
20 | *.tar
21 | *.zip
22 |
23 | # Logs and databases #
24 | ######################
25 | *.log
26 | *.sql
27 | *.sqlite
28 |
29 | # OS generated files #
30 | ######################
31 | .DS_Store*
32 | ehthumbs.db
33 | Icon?
34 | Thumbs.db
35 |
36 | # Node.js #
37 | ###########
38 | lib-cov
39 | *.seed
40 | *.log
41 | *.csv
42 | *.dat
43 | *.out
44 | *.pid
45 | *.gz
46 |
47 | pids
48 | logs
49 | results
50 |
51 | node_modules
52 | npm-debug.log
53 |
54 | # Components #
55 | ##############
56 |
57 | /build
58 | /components
59 | /vendors
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/merge-descriptors/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "merge-descriptors",
3 | "description": "Merge objects using descriptors",
4 | "version": "0.0.2",
5 | "scripts": [
6 | "index.js"
7 | ],
8 | "repo": "component/merge-descriptors",
9 | "license": "MIT"
10 | }
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/merge-descriptors/index.js:
--------------------------------------------------------------------------------
1 | module.exports = function (dest, src) {
2 | Object.getOwnPropertyNames(src).forEach(function (name) {
3 | var descriptor = Object.getOwnPropertyDescriptor(src, name)
4 | Object.defineProperty(dest, name, descriptor)
5 | })
6 |
7 | return dest
8 | }
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/methods/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/methods/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.1.0 / 2014-07-05
3 | ==================
4 |
5 | * add CONNECT
6 |
7 | 1.0.1 / 2014-06-02
8 | ==================
9 |
10 | * fix index.js to work with harmony transform
11 |
12 | 1.0.0 / 2014-05-08
13 | ==================
14 |
15 | * add PURGE. Closes #9
16 |
17 | 0.1.0 / 2013-10-28
18 | ==================
19 |
20 | * add http.METHODS support
21 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/methods/LICENSE:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2013-2014 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.
23 |
24 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/methods/Readme.md:
--------------------------------------------------------------------------------
1 |
2 | # Methods
3 |
4 | HTTP verbs that node core's parser supports.
5 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/methods/index.js:
--------------------------------------------------------------------------------
1 |
2 | var http = require('http');
3 |
4 | if (http.METHODS) {
5 |
6 | module.exports = http.METHODS.map(function(method){
7 | return method.toLowerCase();
8 | });
9 |
10 | } else {
11 |
12 | module.exports = [
13 | 'get',
14 | 'post',
15 | 'put',
16 | 'head',
17 | 'delete',
18 | 'options',
19 | 'trace',
20 | 'copy',
21 | 'lock',
22 | 'mkcol',
23 | 'move',
24 | 'purge',
25 | 'propfind',
26 | 'proppatch',
27 | 'unlock',
28 | 'report',
29 | 'mkactivity',
30 | 'checkout',
31 | 'merge',
32 | 'm-search',
33 | 'notify',
34 | 'subscribe',
35 | 'unsubscribe',
36 | 'patch',
37 | 'search',
38 | 'connect'
39 | ];
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/methods/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "methods",
3 | "version": "1.1.0",
4 | "description": "HTTP methods that node supports",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "./node_modules/mocha/bin/mocha"
8 | },
9 | "keywords": [
10 | "http",
11 | "methods"
12 | ],
13 | "author": {
14 | "name": "TJ Holowaychuk"
15 | },
16 | "license": "MIT",
17 | "repository": {
18 | "type": "git",
19 | "url": "git://github.com/visionmedia/node-methods.git"
20 | },
21 | "devDependencies": {
22 | "mocha": "1.17.x"
23 | },
24 | "readme": "\n# Methods\n\n HTTP verbs that node core's parser supports.\n",
25 | "readmeFilename": "Readme.md",
26 | "bugs": {
27 | "url": "https://github.com/visionmedia/node-methods/issues"
28 | },
29 | "homepage": "https://github.com/visionmedia/node-methods",
30 | "_id": "methods@1.1.0",
31 | "_from": "methods@1.1.0"
32 | }
33 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/methods/test/methods.js:
--------------------------------------------------------------------------------
1 | var http = require('http');
2 | var assert = require('assert');
3 | var methods = require('..');
4 |
5 | describe('methods', function() {
6 |
7 | if (http.METHODS) {
8 |
9 | it('is a lowercased http.METHODS', function() {
10 | var lowercased = http.METHODS.map(function(method) {
11 | return method.toLowerCase();
12 | });
13 | assert.deepEqual(lowercased, methods);
14 | });
15 |
16 | } else {
17 |
18 | it('contains GET, POST, PUT, and DELETE', function() {
19 | assert.notEqual(methods.indexOf('get'), -1);
20 | assert.notEqual(methods.indexOf('post'), -1);
21 | assert.notEqual(methods.indexOf('put'), -1);
22 | assert.notEqual(methods.indexOf('delete'), -1);
23 | });
24 |
25 | it('is all lowercase', function() {
26 | for (var i = 0; i < methods.length; i ++) {
27 | assert(methods[i], methods[i].toLowerCase(), methods[i] + " isn't all lowercase");
28 | }
29 | });
30 |
31 | }
32 |
33 | });
34 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/parseurl/.npmignore:
--------------------------------------------------------------------------------
1 | # Compiled source #
2 | ###################
3 | *.com
4 | *.class
5 | *.dll
6 | *.exe
7 | *.o
8 | *.so
9 |
10 | # Packages #
11 | ############
12 | # it's better to unpack these files and commit the raw source
13 | # git has its own built in compression methods
14 | *.7z
15 | *.dmg
16 | *.gz
17 | *.iso
18 | *.jar
19 | *.rar
20 | *.tar
21 | *.zip
22 |
23 | # Logs and databases #
24 | ######################
25 | *.log
26 | *.sql
27 | *.sqlite
28 |
29 | # OS generated files #
30 | ######################
31 | .DS_Store*
32 | # Icon?
33 | ehthumbs.db
34 | Thumbs.db
35 |
36 | # Node.js #
37 | ###########
38 | lib-cov
39 | *.seed
40 | *.log
41 | *.csv
42 | *.dat
43 | *.out
44 | *.pid
45 | *.gz
46 |
47 | pids
48 | logs
49 | results
50 |
51 | node_modules
52 | npm-debug.log
53 |
54 | # Components #
55 | ##############
56 |
57 | /build
58 | /components
59 | /public
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/parseurl/HISTORY.md:
--------------------------------------------------------------------------------
1 | 1.1.3 / 2014-07-08
2 | ==================
3 |
4 | * Fix typo
5 |
6 | 1.1.2 / 2014-07-08
7 | ==================
8 |
9 | * Seriously fix Node.js 0.8 compatibility
10 |
11 | 1.1.1 / 2014-07-08
12 | ==================
13 |
14 | * Fix Node.js 0.8 compatibility
15 |
16 | 1.1.0 / 2014-07-08
17 | ==================
18 |
19 | * Incorporate URL href-only parse fast-path
20 |
21 | 1.0.1 / 2014-03-08
22 | ==================
23 |
24 | * Add missing `require`
25 |
26 | 1.0.0 / 2014-03-08
27 | ==================
28 |
29 | * Genesis from `connect`
30 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/path-to-regexp/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | coverage
3 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/path-to-regexp/History.md:
--------------------------------------------------------------------------------
1 | 0.1.3 / 2014-07-06
2 | ==================
3 |
4 | * Better array support
5 | * Improved support for trailing slash in non-ending mode
6 |
7 | 0.1.0 / 2014-03-06
8 | ==================
9 |
10 | * add options.end
11 |
12 | 0.0.2 / 2013-02-10
13 | ==================
14 |
15 | * Update to match current express
16 | * add .license property to component.json
17 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/path-to-regexp/Readme.md:
--------------------------------------------------------------------------------
1 |
2 | # Path-to-RegExp
3 |
4 | Turn an Express-style path string such as `/user/:name` into a regular expression.
5 |
6 | ## Usage
7 |
8 | ```javascript
9 | var pathToRegexp = require('path-to-regexp');
10 | ```
11 | ### pathToRegexp(path, keys, options)
12 |
13 | - **path** A string in the express format, an array of such strings, or a regular expression
14 | - **keys** An array to be populated with the keys present in the url. Once the function completes, this will be an array of strings.
15 | - **options**
16 | - **options.sensitive** Defaults to false, set this to true to make routes case sensitive
17 | - **options.strict** Defaults to false, set this to true to make the trailing slash matter.
18 | - **options.end** Defaults to true, set this to false to only match the prefix of the URL.
19 |
20 | ```javascript
21 | var keys = [];
22 | var exp = pathToRegexp('/foo/:bar', keys);
23 | //keys = ['bar']
24 | //exp = /^\/foo\/(?:([^\/]+?))\/?$/i
25 | ```
26 |
27 | ## Live Demo
28 |
29 | You can see a live demo of this library in use at [express-route-tester](http://forbeslindesay.github.com/express-route-tester/).
30 |
31 | ## License
32 |
33 | MIT
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/path-to-regexp/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "path-to-regexp",
3 | "description": "Express style path to RegExp utility",
4 | "version": "0.1.3",
5 | "keywords": [
6 | "express",
7 | "regexp",
8 | "route",
9 | "routing"
10 | ],
11 | "scripts": [
12 | "index.js"
13 | ],
14 | "license": "MIT"
15 | }
16 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/proxy-addr/.npmignore:
--------------------------------------------------------------------------------
1 | benchmark/
2 | coverage/
3 | test/
4 | .travis.yml
5 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/proxy-addr/History.md:
--------------------------------------------------------------------------------
1 | 1.0.1 / 2014-06-03
2 | ==================
3 |
4 | * Fix links in npm package
5 |
6 | 1.0.0 / 2014-05-08
7 | ==================
8 |
9 | * Add `trust` argument to determine proxy trust on
10 | * Accepts custom function
11 | * Accepts IPv4/IPv6 address(es)
12 | * Accepts subnets
13 | * Accepts pre-defined names
14 | * Add optional `trust` argument to `proxyaddr.all` to
15 | stop at first untrusted
16 | * Add `proxyaddr.compile` to pre-compile `trust` function
17 | to make subsequent calls faster
18 |
19 | 0.0.1 / 2014-05-04
20 | ==================
21 |
22 | * Fix bad npm publish
23 |
24 | 0.0.0 / 2014-05-04
25 | ==================
26 |
27 | * Initial release
28 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/proxy-addr/LICENSE:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2014 Douglas Christopher Wilson
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.
23 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore:
--------------------------------------------------------------------------------
1 | .idea
2 | node_modules
3 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile:
--------------------------------------------------------------------------------
1 | fs = require 'fs'
2 | CoffeeScript = require 'coffee-script'
3 | nodeunit = require 'nodeunit'
4 | UglifyJS = require 'uglify-js'
5 |
6 | task 'build', 'build the JavaScript files from CoffeeScript source', build = (cb) ->
7 | source = fs.readFileSync 'src/ipaddr.coffee'
8 | fs.writeFileSync 'lib/ipaddr.js', CoffeeScript.compile source.toString()
9 |
10 | invoke 'test'
11 | invoke 'compress'
12 |
13 | task 'test', 'run the bundled tests', (cb) ->
14 | nodeunit.reporters.default.run ['test']
15 |
16 | task 'compress', 'uglify the resulting javascript', (cb) ->
17 | result = UglifyJS.minify('lib/ipaddr.js')
18 | fs.writeFileSync('ipaddr.min.js', result.code)
19 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (C) 2011 Peter Zotov
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.
--------------------------------------------------------------------------------
/examples/nodejs/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 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/qs/.npmignore:
--------------------------------------------------------------------------------
1 | test
2 | .travis.yml
3 | benchmark.js
4 | component.json
5 | examples.js
6 | History.md
7 | Makefile
8 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/range-parser/.npmignore:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/range-parser/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.0 / 2013-12-11
3 | ==================
4 |
5 | * add repository to package.json
6 | * add MIT license
7 |
8 | 0.0.4 / 2012-06-17
9 | ==================
10 |
11 | * changed: ret -1 for unsatisfiable and -2 when invalid
12 |
13 | 0.0.3 / 2012-06-17
14 | ==================
15 |
16 | * fix last-byte-pos default to len - 1
17 |
18 | 0.0.2 / 2012-06-14
19 | ==================
20 |
21 | * add `.type`
22 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/range-parser/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha \
4 | --reporter spec \
5 | --require should
6 |
7 | .PHONY: test
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/range-parser/index.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Parse "Range" header `str` relative to the given file `size`.
4 | *
5 | * @param {Number} size
6 | * @param {String} str
7 | * @return {Array}
8 | * @api public
9 | */
10 |
11 | module.exports = function(size, str){
12 | var valid = true;
13 | var i = str.indexOf('=');
14 |
15 | if (-1 == i) return -2;
16 |
17 | var arr = str.slice(i + 1).split(',').map(function(range){
18 | var range = range.split('-')
19 | , start = parseInt(range[0], 10)
20 | , end = parseInt(range[1], 10);
21 |
22 | // -nnn
23 | if (isNaN(start)) {
24 | start = size - end;
25 | end = size - 1;
26 | // nnn-
27 | } else if (isNaN(end)) {
28 | end = size - 1;
29 | }
30 |
31 | // limit last-byte-pos to current length
32 | if (end > size - 1) end = size - 1;
33 |
34 | // invalid
35 | if (isNaN(start)
36 | || isNaN(end)
37 | || start > end
38 | || start < 0) valid = false;
39 |
40 | return {
41 | start: start,
42 | end: end
43 | };
44 | });
45 |
46 | arr.type = str.slice(0, i);
47 |
48 | return valid ? arr : -1;
49 | };
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/send/.npmignore:
--------------------------------------------------------------------------------
1 | coverage
2 | test
3 | examples
4 | .travis.yml
5 | *.sock
6 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/send/index.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = require('./lib/send');
3 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/send/lib/utils.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Module dependencies.
4 | */
5 |
6 | var crypto = require('crypto');
7 |
8 | /**
9 | * Return a weak ETag from the given `path` and `stat`.
10 | *
11 | * @param {String} path
12 | * @param {Object} stat
13 | * @return {String}
14 | * @api private
15 | */
16 |
17 | exports.etag = function etag(path, stat) {
18 | var tag = String(stat.mtime.getTime()) + ':' + String(stat.size) + ':' + path;
19 | var str = crypto
20 | .createHash('md5')
21 | .update(tag, 'utf8')
22 | .digest('base64');
23 | return 'W/"' + str + '"';
24 | };
25 |
26 | /**
27 | * decodeURIComponent.
28 | *
29 | * Allows V8 to only deoptimize this fn instead of all
30 | * of send().
31 | *
32 | * @param {String} path
33 | * @api private
34 | */
35 |
36 | exports.decode = function(path){
37 | try {
38 | return decodeURIComponent(path);
39 | } catch (err) {
40 | return -1;
41 | }
42 | };
43 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/send/node_modules/finished/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | test/
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/send/node_modules/finished/HISTORY.md:
--------------------------------------------------------------------------------
1 | 1.2.2 / 2014-06-10
2 | ==========
3 |
4 | * reduce listeners added to emitters
5 | - avoids "event emitter leak" warnings when used multiple times on same request
6 |
7 | 1.2.1 / 2014-06-08
8 | ==================
9 |
10 | * fix returned value when already finished
11 |
12 | 1.2.0 / 2014-06-05
13 | ==================
14 |
15 | * call callback when called on already-finished socket
16 |
17 | 1.1.4 / 2014-05-27
18 | ==================
19 |
20 | * support node.js 0.8
21 |
22 | 1.1.3 / 2014-04-30
23 | ==================
24 |
25 | * make sure errors passed as instanceof `Error`
26 |
27 | 1.1.2 / 2014-04-18
28 | ==================
29 |
30 | * default the `socket` to passed-in object
31 |
32 | 1.1.1 / 2014-01-16
33 | ==================
34 |
35 | * rename module to `finished`
36 |
37 | 1.1.0 / 2013-12-25
38 | ==================
39 |
40 | * call callback when called on already-errored socket
41 |
42 | 1.0.1 / 2013-12-20
43 | ==================
44 |
45 | * actually pass the error to the callback
46 |
47 | 1.0.0 / 2013-12-20
48 | ==================
49 |
50 | * Initial release
51 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/send/node_modules/finished/node_modules/ee-first/.npmignore:
--------------------------------------------------------------------------------
1 | .DS_Store*
2 | node_modules
3 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/send/node_modules/finished/node_modules/ee-first/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | The MIT License (MIT)
3 |
4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com
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.
23 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/send/node_modules/finished/node_modules/ee-first/README.md:
--------------------------------------------------------------------------------
1 |
2 | # EE First
3 |
4 | Get the first event in a set of event emitters and event pairs,
5 | then clean up after itself.
6 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/send/node_modules/finished/node_modules/ee-first/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ee-first",
3 | "description": "return the first event in a set of ee/event pairs",
4 | "version": "1.0.3",
5 | "author": {
6 | "name": "Jonathan Ong",
7 | "email": "me@jongleberry.com",
8 | "url": "http://jongleberry.com"
9 | },
10 | "license": "MIT",
11 | "repository": {
12 | "type": "git",
13 | "url": "git://github.com/jonathanong/ee-first"
14 | },
15 | "devDependencies": {
16 | "mocha": "1"
17 | },
18 | "scripts": {
19 | "test": "mocha --reporter spec"
20 | },
21 | "readme": "\n# EE First\n\nGet the first event in a set of event emitters and event pairs,\nthen clean up after itself.\n",
22 | "readmeFilename": "README.md",
23 | "bugs": {
24 | "url": "https://github.com/jonathanong/ee-first/issues"
25 | },
26 | "homepage": "https://github.com/jonathanong/ee-first",
27 | "_id": "ee-first@1.0.3",
28 | "_from": "ee-first@1.0.3"
29 | }
30 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/send/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 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/send/node_modules/ms/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | test
3 | History.md
4 | Makefile
5 | component.json
6 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/send/node_modules/ms/README.md:
--------------------------------------------------------------------------------
1 | # ms.js: miliseconds conversion utility
2 |
3 | ```js
4 | ms('1d') // 86400000
5 | ms('10h') // 36000000
6 | ms('2h') // 7200000
7 | ms('1m') // 60000
8 | ms('5s') // 5000
9 | ms('100') // 100
10 | ```
11 |
12 | ```js
13 | ms(60000) // "1m"
14 | ms(2 * 60000) // "2m"
15 | ms(ms('10 hours')) // "10h"
16 | ```
17 |
18 | ```js
19 | ms(60000, { long: true }) // "1 minute"
20 | ms(2 * 60000, { long: true }) // "2 minutes"
21 | ms(ms('10 hours', { long: true })) // "10 hours"
22 | ```
23 |
24 | - Node/Browser compatible. Published as `ms` in NPM.
25 | - If a number is supplied to `ms`, a string with a unit is returned.
26 | - If a string that contains the number is supplied, it returns it as
27 | a number (e.g: it returns `100` for `'100'`).
28 | - If you pass a string with a number and a valid unit, the number of
29 | equivalent ms is returned.
30 |
31 | ## License
32 |
33 | MIT
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/serve-static/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | test/
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/serve-static/LICENSE:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2010 Sencha Inc.
4 | Copyright (c) 2011 LearnBoost
5 | Copyright (c) 2011 TJ Holowaychuk
6 | Copyright (c) 2014 Douglas Christopher Wilson
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining
9 | a copy of this software and associated documentation files (the
10 | 'Software'), to deal in the Software without restriction, including
11 | without limitation the rights to use, copy, modify, merge, publish,
12 | distribute, sublicense, and/or sell copies of the Software, and to
13 | permit persons to whom the Software is furnished to do so, subject to
14 | the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be
17 | included in all copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/type-is/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | test/
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/type-is/HISTORY.md:
--------------------------------------------------------------------------------
1 |
2 | 1.3.2 / 2014-06-24
3 | ==================
4 |
5 | * use `~` range on mime-types
6 |
7 | 1.3.1 / 2014-06-19
8 | ==================
9 |
10 | * fix global variable leak
11 |
12 | 1.3.0 / 2014-06-19
13 | ==================
14 |
15 | * improve type parsing
16 |
17 | - invalid media type never matches
18 | - media type not case-sensitive
19 | - extra LWS does not affect results
20 |
21 | 1.2.2 / 2014-06-19
22 | ==================
23 |
24 | * fix behavior on unknown type argument
25 |
26 | 1.2.1 / 2014-06-03
27 | ==================
28 |
29 | * switch dependency from `mime` to `mime-types@1.0.0`
30 |
31 | 1.2.0 / 2014-05-11
32 | ==================
33 |
34 | * support suffix matching:
35 |
36 | - `+json` matches `application/vnd+json`
37 | - `*/vnd+json` matches `application/vnd+json`
38 | - `application/*+json` matches `application/vnd+json`
39 |
40 | 1.1.0 / 2014-04-12
41 | ==================
42 |
43 | * add non-array values support
44 | * expose internal utilities:
45 |
46 | - `.is()`
47 | - `.hasBody()`
48 | - `.normalize()`
49 | - `.match()`
50 |
51 | 1.0.1 / 2014-03-30
52 | ==================
53 |
54 | * add `multipart` as a shorthand
55 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/type-is/node_modules/mime-types/.npmignore:
--------------------------------------------------------------------------------
1 | test
2 | build.js
3 |
4 | # OS generated files #
5 | ######################
6 | .DS_Store*
7 | # Icon?
8 | ehthumbs.db
9 | Thumbs.db
10 |
11 | # Node.js #
12 | ###########
13 | node_modules
14 | npm-debug.log
15 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/type-is/node_modules/mime-types/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "0.8"
4 | - "0.10"
5 | - "0.11"
6 | matrix:
7 | allow_failures:
8 | - node_js: "0.11"
9 | fast_finish: true
10 | before_install:
11 | # remove build script deps before install
12 | - node -pe 'f="./package.json";p=require(f);d=p.devDependencies;for(k in d){if("co"===k.substr(0,2))delete d[k]}require("fs").writeFileSync(f,JSON.stringify(p,null,2))'
13 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | The MIT License (MIT)
3 |
4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com
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.
23 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/type-is/node_modules/mime-types/Makefile:
--------------------------------------------------------------------------------
1 |
2 | build:
3 | node --harmony-generators build.js
4 |
5 | test:
6 | node test/mime.js
7 | mocha --require should --reporter spec test/test.js
8 |
9 | .PHONY: build test
10 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/type-is/node_modules/mime-types/SOURCES.md:
--------------------------------------------------------------------------------
1 |
2 | ### Sources for custom types
3 |
4 | This is a list of sources for any custom mime types.
5 | When adding custom mime types, please link to where you found the mime type,
6 | even if it's from an unofficial source.
7 |
8 | - `text/coffeescript` - http://coffeescript.org/#scripts
9 | - `text/x-handlebars-template` - https://handlebarsjs.com/#getting-started
10 | - `text/x-sass` & `text/x-scss` - https://github.com/janlelis/rubybuntu-mime/blob/master/sass.xml
11 | - `text.jsx` - http://facebook.github.io/react/docs/getting-started.html [[2]](https://github.com/facebook/react/blob/f230e0a03154e6f8a616e0da1fb3d97ffa1a6472/vendor/browser-transforms.js#L210)
12 |
13 | [Sources for node.json types](https://github.com/broofa/node-mime/blob/master/types/node.types)
14 |
15 | ### Notes on weird types
16 |
17 | - `font/opentype` - This type is technically invalid according to the spec. No valid types begin with `font/`. No-one uses the official type of `application/vnd.ms-opentype` as the community standardized `application/x-font-otf`. However, chrome logs nonsense warnings unless opentype fonts are served with `font/opentype`. [[1]](http://stackoverflow.com/questions/2871655/proper-mime-type-for-fonts)
18 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/type-is/node_modules/mime-types/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mime-types",
3 | "description": "The ultimate javascript content-type utility.",
4 | "version": "0.1.0",
5 | "author": {
6 | "name": "Jonathan Ong",
7 | "email": "me@jongleberry.com",
8 | "url": "http://jongleberry.com",
9 | "twitter": "https://twitter.com/jongleberry"
10 | },
11 | "repository": "expressjs/mime-types",
12 | "license": "MIT",
13 | "main": "lib/index.js",
14 | "scripts": ["lib/index.js"],
15 | "json": ["mime.json", "node.json", "custom.json"]
16 | }
17 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/type-is/node_modules/mime-types/lib/custom.json:
--------------------------------------------------------------------------------
1 | {
2 | "text/jade": [
3 | "jade"
4 | ],
5 | "text/stylus": [
6 | "stylus",
7 | "styl"
8 | ],
9 | "text/less": [
10 | "less"
11 | ],
12 | "text/x-sass": [
13 | "sass"
14 | ],
15 | "text/x-scss": [
16 | "scss"
17 | ],
18 | "text/coffeescript": [
19 | "coffee"
20 | ],
21 | "text/x-handlebars-template": [
22 | "hbs"
23 | ],
24 | "text/jsx": [
25 | "jsx"
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/type-is/node_modules/mime-types/lib/node.json:
--------------------------------------------------------------------------------
1 | {
2 | "text/vtt": [
3 | "vtt"
4 | ],
5 | "application/x-chrome-extension": [
6 | "crx"
7 | ],
8 | "text/x-component": [
9 | "htc"
10 | ],
11 | "text/cache-manifest": [
12 | "manifest"
13 | ],
14 | "application/octet-stream": [
15 | "buffer"
16 | ],
17 | "application/mp4": [
18 | "m4p"
19 | ],
20 | "audio/mp4": [
21 | "m4a"
22 | ],
23 | "video/MP2T": [
24 | "ts"
25 | ],
26 | "application/x-web-app-manifest+json": [
27 | "webapp"
28 | ],
29 | "text/x-lua": [
30 | "lua"
31 | ],
32 | "application/x-lua-bytecode": [
33 | "luac"
34 | ],
35 | "text/x-markdown": [
36 | "markdown",
37 | "md",
38 | "mkd"
39 | ],
40 | "text/plain": [
41 | "ini"
42 | ],
43 | "application/dash+xml": [
44 | "mdp"
45 | ],
46 | "font/opentype": [
47 | "otf"
48 | ],
49 | "application/json": [
50 | "map"
51 | ],
52 | "application/xml": [
53 | "xsd"
54 | ]
55 | }
56 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/utils-merge/.travis.yml:
--------------------------------------------------------------------------------
1 | language: "node_js"
2 | node_js:
3 | - "0.4"
4 | - "0.6"
5 | - "0.8"
6 | - "0.10"
7 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/utils-merge/LICENSE:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2013 Jared Hanson
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | 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, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/utils-merge/README.md:
--------------------------------------------------------------------------------
1 | # utils-merge
2 |
3 | Merges the properties from a source object into a destination object.
4 |
5 | ## Install
6 |
7 | $ npm install utils-merge
8 |
9 | ## Usage
10 |
11 | ```javascript
12 | var a = { foo: 'bar' }
13 | , b = { bar: 'baz' };
14 |
15 | merge(a, b);
16 | // => { foo: 'bar', bar: 'baz' }
17 | ```
18 |
19 | ## Tests
20 |
21 | $ npm install
22 | $ npm test
23 |
24 | [](http://travis-ci.org/jaredhanson/utils-merge)
25 |
26 | ## Credits
27 |
28 | - [Jared Hanson](http://github.com/jaredhanson)
29 |
30 | ## License
31 |
32 | [The MIT License](http://opensource.org/licenses/MIT)
33 |
34 | Copyright (c) 2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>
35 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/utils-merge/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Merge object b with object a.
3 | *
4 | * var a = { foo: 'bar' }
5 | * , b = { bar: 'baz' };
6 | *
7 | * merge(a, b);
8 | * // => { foo: 'bar', bar: 'baz' }
9 | *
10 | * @param {Object} a
11 | * @param {Object} b
12 | * @return {Object}
13 | * @api public
14 | */
15 |
16 | exports = module.exports = function(a, b){
17 | if (a && b) {
18 | for (var key in b) {
19 | a[key] = b[key];
20 | }
21 | }
22 | return a;
23 | };
24 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/vary/.npmignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | test/
3 | .travis.yml
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/vary/History.md:
--------------------------------------------------------------------------------
1 | 0.1.0 / 2014-06-05
2 | ==================
3 |
4 | * Support array of fields to set
5 |
6 | 0.0.0 / 2014-06-04
7 | ==================
8 |
9 | * Initial release
10 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/vary/LICENSE:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2014 Douglas Christopher Wilson
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.
23 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/express/node_modules/vary/README.md:
--------------------------------------------------------------------------------
1 | # vary
2 |
3 | [](http://badge.fury.io/js/vary)
4 | [](https://travis-ci.org/expressjs/vary)
5 | [](https://coveralls.io/r/expressjs/vary)
6 |
7 | Update the Vary header of a response
8 |
9 | ## Install
10 |
11 | ```sh
12 | $ npm install vary
13 | ```
14 |
15 | ## API
16 |
17 | ```js
18 | var vary = require('vary')
19 | ```
20 |
21 | ### vary(res, field)
22 |
23 | Adds the given header `field` to the `Vary` response header of `res`.
24 | This can be a string of a single field or an array of multiple fields.
25 |
26 | This will append the header if not already listed, otherwise leaves
27 | it listed in the current location.
28 |
29 | ```js
30 | vary(res, 'Origin')
31 | vary(res, 'User-Agent')
32 | vary(res, ['Accept', 'Accept-Language', 'Accept-Encoding'])
33 | ```
34 |
35 | ## Testing
36 |
37 | ```sh
38 | $ npm test
39 | ```
40 |
41 | ## License
42 |
43 | [MIT](LICENSE)
44 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/.npmignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | Icon?
3 |
4 | # Thumbnails
5 | ._*
6 |
7 | # Files that might appear on external disk
8 | .Spotlight-V100
9 | .Trashes
10 |
11 | lib-cov
12 | *.seed
13 | *.log
14 | *.csv
15 | *.dat
16 | *.out
17 | *.pid
18 | *.gz
19 |
20 | pids
21 | logs
22 | results
23 |
24 | node_modules
25 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/examples/webhook_endpoint.js:
--------------------------------------------------------------------------------
1 | var express = require("express");
2 | var Pusher = require("../lib/pusher");
3 |
4 | // provide auth details via the PUSHER_URL environment variable
5 | var pusher = new Pusher({ url: process.env["PUSHER_URL"]});
6 |
7 | var app = express();
8 | app.use(function(req, res, next) {
9 | req.rawBody = "";
10 | req.setEncoding("utf8");
11 |
12 | req.on("data", function(chunk) {
13 | req.rawBody += chunk;
14 | });
15 |
16 | req.on("end", function() {
17 | next();
18 | });
19 | });
20 |
21 | app.post("/webhook", function(req, res){
22 | var webhook = pusher.webhook(req);
23 | console.log("data:", webhook.getData());
24 | console.log("events:", webhook.getEvents());
25 | console.log("time:", webhook.getTime());
26 | console.log("valid:", webhook.isValid());
27 | res.send("OK");
28 | });
29 |
30 | app.listen(3000);
31 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/lib/auth.js:
--------------------------------------------------------------------------------
1 | function getSocketSignature(token, channel, socketID, data) {
2 | var result = {};
3 |
4 | var signatureData = [socketID, channel];
5 | if (data) {
6 | var serializedData = JSON.stringify(data);
7 | signatureData.push(serializedData);
8 | result.channel_data = serializedData;
9 | }
10 |
11 | result.auth = token.key + ':' + token.sign(signatureData.join(":"));
12 | return result;
13 | }
14 |
15 | exports.getSocketSignature = getSocketSignature;
16 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/lib/config.js:
--------------------------------------------------------------------------------
1 | var Token = require('./token');
2 |
3 | function Config(options) {
4 | options = options || {};
5 |
6 | this.host = options.host || "api.pusherapp.com";
7 | this.scheme = options.scheme || (options.encrypted ? "https" : "http");
8 | this.port = options.port;
9 |
10 | this.appId = options.appId;
11 | this.token = new Token(options.key, options.secret);
12 |
13 | this.proxy = options.proxy;
14 | this.timeout = options.timeout;
15 | this.keepAlive = options.keepAlive;
16 | }
17 |
18 | Config.prototype.prefixPath = function(subPath) {
19 | return "/apps/" + this.appId + subPath;
20 | };
21 |
22 | Config.prototype.getBaseURL = function(subPath, queryString) {
23 | var port = this.port ? (':' + this.port) : '';
24 | return this.scheme + '://' + this.host + port;
25 | };
26 |
27 | module.exports = Config;
28 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/lib/events.js:
--------------------------------------------------------------------------------
1 | function trigger(pusher, channels, eventName, data, socketId, callback) {
2 | var event = {
3 | "name": eventName,
4 | "data": (typeof data === 'object' ? JSON.stringify(data) : data),
5 | "channels": channels
6 | };
7 | if (socketId) {
8 | event.socket_id = socketId;
9 | }
10 | pusher.post({ path: '/events', body: event }, callback);
11 | }
12 |
13 | exports.trigger = trigger;
14 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/lib/token.js:
--------------------------------------------------------------------------------
1 | var crypto = require('crypto');
2 |
3 | var util = require('./util');
4 |
5 | /** Verifies and signs data against the key and secret.
6 | *
7 | * @constructor
8 | * @param {String} key app key
9 | * @param {String} secret app secret
10 | */
11 | function Token(key, secret) {
12 | this.key = key;
13 | this.secret = secret;
14 | }
15 |
16 | /** Signs the string using the secret.
17 | *
18 | * @param {String} string
19 | * @returns {String}
20 | */
21 | Token.prototype.sign = function(string) {
22 | return crypto.createHmac('sha256', this.secret).update(string).digest('hex');
23 | };
24 |
25 | /** Checks if the string has correct signature.
26 | *
27 | * @param {String} string
28 | * @param {String} signature
29 | * @returns {Boolean}
30 | */
31 | Token.prototype.verify = function(string, signature) {
32 | return util.secureCompare(this.sign(string), signature);
33 | };
34 |
35 | module.exports = Token;
36 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/lib/util.js:
--------------------------------------------------------------------------------
1 | var crypto = require('crypto');
2 |
3 | function toOrderedArray(map) {
4 | return Object.keys(map).map(function(key) {
5 | return [key, map[key]];
6 | }).sort(function(a, b) {
7 | return a[0] > b[0];
8 | }).map(function(pair) {
9 | return pair[0] + "=" + pair[1];
10 | });
11 | }
12 |
13 | function mergeObjects(target) {
14 | for (var i = 1; i < arguments.length; i++) {
15 | var object = arguments[i];
16 | for (var key in object) {
17 | if (object.hasOwnProperty(key)) {
18 | target[key] = object[key];
19 | }
20 | }
21 | }
22 |
23 | return target;
24 | }
25 |
26 | function getMD5(body) {
27 | return crypto.createHash('md5').update(body, 'utf8').digest('hex');
28 | }
29 |
30 | function secureCompare(a, b) {
31 | if (a.length !== b.length) {
32 | return false;
33 | }
34 | var result = 0;
35 | for (var i in a) {
36 | result |= (a.charCodeAt(i) ^ b.charCodeAt(i));
37 | }
38 | return result === 0;
39 | }
40 |
41 | exports.toOrderedArray = toOrderedArray;
42 | exports.mergeObjects = mergeObjects;
43 | exports.getMD5 = getMD5;
44 | exports.secureCompare = secureCompare;
45 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/.npmignore:
--------------------------------------------------------------------------------
1 | tests
2 | node_modules
3 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 0.8
4 | - 0.10
5 |
6 | env:
7 | - OPTIONALS=Y
8 | - OPTIONALS=N
9 |
10 | install:
11 | - if [[ "$OPTIONALS" == "Y" ]]; then npm install; fi
12 | - if [[ "$OPTIONALS" == "N" ]]; then npm install --no-optional; fi
13 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/lib/cookies.js:
--------------------------------------------------------------------------------
1 | var optional = require('./optional')
2 | , tough = optional('tough-cookie')
3 | , Cookie = tough && tough.Cookie
4 | , CookieJar = tough && tough.CookieJar
5 | ;
6 |
7 | exports.parse = function(str) {
8 | if (str && str.uri) str = str.uri
9 | if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param")
10 | if (!Cookie) {
11 | return null;
12 | }
13 | return Cookie.parse(str)
14 | };
15 |
16 | // Adapt the sometimes-Async api of tough.CookieJar to our requirements
17 | function RequestJar() {
18 | this._jar = new CookieJar();
19 | }
20 | RequestJar.prototype.setCookie = function(cookieOrStr, uri, options) {
21 | return this._jar.setCookieSync(cookieOrStr, uri, options || {});
22 | };
23 | RequestJar.prototype.getCookieString = function(uri) {
24 | return this._jar.getCookieStringSync(uri);
25 | };
26 |
27 | exports.jar = function() {
28 | if (!CookieJar) {
29 | // tough-cookie not loaded, return a stub object:
30 | return {
31 | setCookie: function(){},
32 | getCookieString: function(){}
33 | };
34 | }
35 | return new RequestJar();
36 | };
37 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/lib/copy.js:
--------------------------------------------------------------------------------
1 | module.exports =
2 | function copy (obj) {
3 | var o = {}
4 | Object.keys(obj).forEach(function (i) {
5 | o[i] = obj[i]
6 | })
7 | return o
8 | }
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/lib/debug.js:
--------------------------------------------------------------------------------
1 | var util = require('util')
2 |
3 | module.exports =
4 | function debug () {
5 | if (/\brequest\b/.test(process.env.NODE_DEBUG))
6 | console.error('REQUEST %s', util.format.apply(util, arguments))
7 | }
8 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/lib/getSafe.js:
--------------------------------------------------------------------------------
1 | // Safe toJSON
2 | module.exports =
3 | function getSafe (self, uuid) {
4 | if (typeof self === 'object' || typeof self === 'function') var safe = {}
5 | if (Array.isArray(self)) var safe = []
6 |
7 | var recurse = []
8 |
9 | Object.defineProperty(self, uuid, {})
10 |
11 | var attrs = Object.keys(self).filter(function (i) {
12 | if (i === uuid) return false
13 | if ( (typeof self[i] !== 'object' && typeof self[i] !== 'function') || self[i] === null) return true
14 | return !(Object.getOwnPropertyDescriptor(self[i], uuid))
15 | })
16 |
17 |
18 | for (var i=0;i
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 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore:
--------------------------------------------------------------------------------
1 | *.un~
2 | /node_modules/*
3 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011 Debuggable Limited
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 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile:
--------------------------------------------------------------------------------
1 | SHELL := /bin/bash
2 |
3 | test:
4 | @./test/run.js
5 |
6 | .PHONY: test
7 |
8 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js:
--------------------------------------------------------------------------------
1 | var common = module.exports;
2 |
3 | common.DelayedStream = require('..');
4 | common.assert = require('assert');
5 | common.fake = require('fake');
6 | common.PORT = 49252;
7 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js:
--------------------------------------------------------------------------------
1 | var common = require('../common');
2 | var assert = common.assert;
3 | var DelayedStream = common.DelayedStream;
4 | var http = require('http');
5 |
6 | var UPLOAD = new Buffer(10 * 1024 * 1024);
7 |
8 | var server = http.createServer(function(req, res) {
9 | var delayed = DelayedStream.create(req, {maxDataSize: UPLOAD.length});
10 |
11 | setTimeout(function() {
12 | res.writeHead(200);
13 | delayed.pipe(res);
14 | }, 10);
15 | });
16 | server.listen(common.PORT, function() {
17 | var request = http.request({
18 | method: 'POST',
19 | port: common.PORT,
20 | });
21 |
22 | request.write(UPLOAD);
23 | request.end();
24 |
25 | request.on('response', function(res) {
26 | var received = 0;
27 | res
28 | .on('data', function(chunk) {
29 | received += chunk.length;
30 | })
31 | .on('end', function() {
32 | assert.equal(received, UPLOAD.length);
33 | server.close();
34 | });
35 | });
36 | });
37 |
38 |
39 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js:
--------------------------------------------------------------------------------
1 | var common = require('../common');
2 | var assert = common.assert;
3 | var fake = common.fake.create();
4 | var DelayedStream = common.DelayedStream;
5 | var Stream = require('stream').Stream;
6 |
7 | (function testAutoPause() {
8 | var source = new Stream();
9 |
10 | fake.expect(source, 'pause', 1);
11 | var delayedStream = DelayedStream.create(source);
12 | fake.verify();
13 | })();
14 |
15 | (function testDisableAutoPause() {
16 | var source = new Stream();
17 | fake.expect(source, 'pause', 0);
18 |
19 | var delayedStream = DelayedStream.create(source, {pauseStream: false});
20 | fake.verify();
21 | })();
22 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js:
--------------------------------------------------------------------------------
1 | var common = require('../common');
2 | var assert = common.assert;
3 | var fake = common.fake.create();
4 | var DelayedStream = common.DelayedStream;
5 | var Stream = require('stream').Stream;
6 |
7 | (function testDelayEventsUntilResume() {
8 | var source = new Stream();
9 | var delayedStream = DelayedStream.create(source, {pauseStream: false});
10 |
11 | fake.expect(source, 'pause');
12 | delayedStream.pause();
13 | fake.verify();
14 | })();
15 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js:
--------------------------------------------------------------------------------
1 | var common = require('../common');
2 | var assert = common.assert;
3 | var fake = common.fake.create();
4 | var DelayedStream = common.DelayedStream;
5 | var Stream = require('stream').Stream;
6 |
7 | (function testHandleSourceErrors() {
8 | var source = new Stream();
9 | var delayedStream = DelayedStream.create(source, {pauseStream: false});
10 |
11 | // We deal with this by attaching a no-op listener to 'error' on the source
12 | // when creating a new DelayedStream. This way error events on the source
13 | // won't throw.
14 | source.emit('error', new Error('something went wrong'));
15 | })();
16 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js:
--------------------------------------------------------------------------------
1 | var common = require('../common');
2 | var assert = common.assert;
3 | var fake = common.fake.create();
4 | var DelayedStream = common.DelayedStream;
5 | var Stream = require('stream').Stream;
6 |
7 | (function testMaxDataSize() {
8 | var source = new Stream();
9 | var delayedStream = DelayedStream.create(source, {maxDataSize: 1024, pauseStream: false});
10 |
11 | source.emit('data', new Buffer(1024));
12 |
13 | fake
14 | .expect(delayedStream, 'emit')
15 | .withArg(1, 'error');
16 | source.emit('data', new Buffer(1));
17 | fake.verify();
18 | })();
19 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js:
--------------------------------------------------------------------------------
1 | var common = require('../common');
2 | var assert = common.assert;
3 | var fake = common.fake.create();
4 | var DelayedStream = common.DelayedStream;
5 | var Stream = require('stream').Stream;
6 |
7 | (function testPipeReleases() {
8 | var source = new Stream();
9 | var delayedStream = DelayedStream.create(source, {pauseStream: false});
10 |
11 | fake.expect(delayedStream, 'resume');
12 | delayedStream.pipe(new Stream());
13 | })();
14 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js:
--------------------------------------------------------------------------------
1 | var common = require('../common');
2 | var assert = common.assert;
3 | var fake = common.fake.create();
4 | var DelayedStream = common.DelayedStream;
5 | var Stream = require('stream').Stream;
6 |
7 | (function testProxyReadableProperty() {
8 | var source = new Stream();
9 | var delayedStream = DelayedStream.create(source, {pauseStream: false});
10 |
11 | source.readable = fake.value('source.readable');
12 | assert.strictEqual(delayedStream.readable, source.readable);
13 | })();
14 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/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 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/.npmignore:
--------------------------------------------------------------------------------
1 | .idea
2 | *.iml
3 | npm-debug.log
4 | dump.rdb
5 | node_modules
6 | results.tap
7 | results.xml
8 | npm-shrinkwrap.json
9 | config.json
10 | .DS_Store
11 | */.DS_Store
12 | */*/.DS_Store
13 | ._*
14 | */._*
15 | */*/._*
16 | coverage.*
17 | lib-cov
18 |
19 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 |
3 | node_js:
4 | - 0.10
5 |
6 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/Makefile:
--------------------------------------------------------------------------------
1 | test:
2 | @node node_modules/lab/bin/lab
3 | test-cov:
4 | @node node_modules/lab/bin/lab -r threshold -t 100
5 | test-cov-html:
6 | @node node_modules/lab/bin/lab -r html -o coverage.html
7 | complexity:
8 | @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib
9 |
10 | .PHONY: test test-cov test-cov-html complexity
11 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/images/hawk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/images/hawk.png
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/images/logo.png
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/index.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./lib');
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/lib/index.js:
--------------------------------------------------------------------------------
1 | // Export sub-modules
2 |
3 | exports.error = exports.Error = require('boom');
4 | exports.sntp = require('sntp');
5 | exports.server = require('./server');
6 | exports.client = require('./client');
7 | exports.crypto = require('./crypto');
8 | exports.utils = require('./utils');
9 |
10 | exports.uri = {
11 | authenticate: exports.server.authenticateBewit,
12 | getBewit: exports.client.getBewit
13 | };
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore:
--------------------------------------------------------------------------------
1 | .idea
2 | *.iml
3 | npm-debug.log
4 | dump.rdb
5 | node_modules
6 | results.tap
7 | results.xml
8 | npm-shrinkwrap.json
9 | config.json
10 | .DS_Store
11 | */.DS_Store
12 | */*/.DS_Store
13 | ._*
14 | */._*
15 | */*/._*
16 | coverage.*
17 | lib-cov
18 |
19 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 |
3 | node_js:
4 | - 0.10
5 |
6 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/boom/Makefile:
--------------------------------------------------------------------------------
1 | test:
2 | @node node_modules/lab/bin/lab
3 | test-cov:
4 | @node node_modules/lab/bin/lab -r threshold -t 100
5 | test-cov-html:
6 | @node node_modules/lab/bin/lab -r html -o coverage.html
7 | complexity:
8 | @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib
9 |
10 | .PHONY: test test-cov test-cov-html complexity
11 |
12 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/boom/README.md:
--------------------------------------------------------------------------------
1 |
2 | 
3 |
4 | HTTP-friendly error objects
5 |
6 | [](http://travis-ci.org/spumko/boom)
7 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/boom/index.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./lib');
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore:
--------------------------------------------------------------------------------
1 | .idea
2 | *.iml
3 | npm-debug.log
4 | dump.rdb
5 | node_modules
6 | results.tap
7 | results.xml
8 | npm-shrinkwrap.json
9 | config.json
10 | .DS_Store
11 | */.DS_Store
12 | */*/.DS_Store
13 | ._*
14 | */._*
15 | */*/._*
16 | coverage.*
17 | lib-cov
18 |
19 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 |
3 | node_js:
4 | - 0.10
5 |
6 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile:
--------------------------------------------------------------------------------
1 | test:
2 | @./node_modules/.bin/lab
3 | test-cov:
4 | @./node_modules/.bin/lab -r threshold -t 100
5 | test-cov-html:
6 | @./node_modules/.bin/lab -r html -o coverage.html
7 | complexity:
8 | @./node_modules/.bin/cr -o complexity.md -f markdown lib
9 |
10 | .PHONY: test test-cov test-cov-html complexity
11 |
12 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md:
--------------------------------------------------------------------------------
1 | cryptiles
2 | =========
3 |
4 | General purpose crypto utilities
5 |
6 | [](http://travis-ci.org/hueniverse/cryptiles)
7 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./lib');
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore:
--------------------------------------------------------------------------------
1 | .idea
2 | *.iml
3 | npm-debug.log
4 | dump.rdb
5 | node_modules
6 | results.tap
7 | results.xml
8 | npm-shrinkwrap.json
9 | config.json
10 | .DS_Store
11 | */.DS_Store
12 | */*/.DS_Store
13 | ._*
14 | */._*
15 | */*/._*
16 | coverage.*
17 | lib-cov
18 | complexity.md
19 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 |
3 | node_js:
4 | - 0.10
5 |
6 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile:
--------------------------------------------------------------------------------
1 | test:
2 | @node node_modules/lab/bin/lab
3 | test-cov:
4 | @node node_modules/lab/bin/lab -r threshold -t 100
5 | test-cov-html:
6 | @node node_modules/lab/bin/lab -r html -o coverage.html
7 | complexity:
8 | @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib
9 |
10 | .PHONY: test test-cov test-cov-html complexity
11 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pusher-community/html5-realtime-push-notifications/8d25d9188cdf402d985ac117bc989c1747d7206f/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/hoek/index.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./lib');
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js:
--------------------------------------------------------------------------------
1 | exports.x = 1;
2 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js:
--------------------------------------------------------------------------------
1 | exports.y = 2;
2 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js:
--------------------------------------------------------------------------------
1 | exports.z = 3;
2 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore:
--------------------------------------------------------------------------------
1 | .idea
2 | *.iml
3 | npm-debug.log
4 | dump.rdb
5 | node_modules
6 | results.tap
7 | results.xml
8 | npm-shrinkwrap.json
9 | config.json
10 | .DS_Store
11 | */.DS_Store
12 | */*/.DS_Store
13 | ._*
14 | */._*
15 | */*/._*
16 | coverage.*
17 | lib-cov
18 |
19 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 |
3 | node_js:
4 | - 0.10
5 |
6 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile:
--------------------------------------------------------------------------------
1 | test:
2 | @./node_modules/.bin/lab
3 | test-cov:
4 | @./node_modules/.bin/lab -r threshold -t 100
5 | test-cov-html:
6 | @./node_modules/.bin/lab -r html -o coverage.html
7 | complexity:
8 | @./node_modules/.bin/cr -o complexity.md -f markdown lib
9 |
10 | .PHONY: test test-cov test-cov-html complexity
11 |
12 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js:
--------------------------------------------------------------------------------
1 | var Sntp = require('../lib');
2 |
3 | // Request offset once
4 |
5 | Sntp.offset(function (err, offset) {
6 |
7 | console.log(offset); // New (served fresh)
8 |
9 | // Request offset again
10 |
11 | Sntp.offset(function (err, offset) {
12 |
13 | console.log(offset); // Identical (served from cache)
14 | });
15 | });
16 |
17 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js:
--------------------------------------------------------------------------------
1 | var Sntp = require('../lib');
2 |
3 | // All options are optional
4 |
5 | var options = {
6 | host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org
7 | port: 123, // Defaults to 123 (NTP)
8 | resolveReference: true, // Default to false (not resolving)
9 | timeout: 1000 // Defaults to zero (no timeout)
10 | };
11 |
12 | // Request server time
13 |
14 | Sntp.time(options, function (err, time) {
15 |
16 | if (err) {
17 | console.log('Failed: ' + err.message);
18 | process.exit(1);
19 | }
20 |
21 | console.log(time);
22 | console.log('Local clock is off by: ' + time.t + ' milliseconds');
23 | process.exit(0);
24 | });
25 |
26 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/hawk/node_modules/sntp/index.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./lib');
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/.dir-locals.el:
--------------------------------------------------------------------------------
1 | ((nil . ((indent-tabs-mode . nil)
2 | (tab-width . 8)
3 | (fill-column . 80)))
4 | (js-mode . ((js-indent-level . 2)
5 | (indent-tabs-mode . nil)
6 | )))
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/.npmignore:
--------------------------------------------------------------------------------
1 | .gitmodules
2 | deps
3 | docs
4 | Makefile
5 | node_modules
6 | test
7 | tools
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright Joyent, Inc. All rights reserved.
2 | Permission is hereby granted, free of charge, to any person obtaining a copy
3 | of this software and associated documentation files (the "Software"), to
4 | deal in the Software without restriction, including without limitation the
5 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
6 | sell copies of the Software, and to permit persons to whom the Software is
7 | furnished to do so, subject to the following conditions:
8 |
9 | The above copyright notice and this permission notice shall be included in
10 | all copies or substantial portions of the Software.
11 |
12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
18 | IN THE SOFTWARE.
19 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/lib/index.js:
--------------------------------------------------------------------------------
1 | // Copyright 2011 Joyent, Inc. All rights reserved.
2 |
3 | var parser = require('./parser');
4 | var signer = require('./signer');
5 | var verify = require('./verify');
6 | var util = require('./util');
7 |
8 |
9 |
10 | ///--- API
11 |
12 | module.exports = {
13 |
14 | parse: parser.parseRequest,
15 | parseRequest: parser.parseRequest,
16 |
17 | sign: signer.signRequest,
18 | signRequest: signer.signRequest,
19 |
20 | sshKeyToPEM: util.sshKeyToPEM,
21 | sshKeyFingerprint: util.fingerprint,
22 |
23 | verify: verify.verifySignature,
24 | verifySignature: verify.verifySignature
25 | };
26 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | *.log
3 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011 Mark Cavage, All rights reserved.
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 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js:
--------------------------------------------------------------------------------
1 | // Copyright 2011 Mark Cavage All rights reserved.
2 |
3 |
4 | module.exports = {
5 |
6 | newInvalidAsn1Error: function(msg) {
7 | var e = new Error();
8 | e.name = 'InvalidAsn1Error';
9 | e.message = msg || '';
10 | return e;
11 | }
12 |
13 | };
14 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js:
--------------------------------------------------------------------------------
1 | // Copyright 2011 Mark Cavage All rights reserved.
2 |
3 | var errors = require('./errors');
4 | var types = require('./types');
5 |
6 | var Reader = require('./reader');
7 | var Writer = require('./writer');
8 |
9 |
10 | ///--- Exports
11 |
12 | module.exports = {
13 |
14 | Reader: Reader,
15 |
16 | Writer: Writer
17 |
18 | };
19 |
20 | for (var t in types) {
21 | if (types.hasOwnProperty(t))
22 | module.exports[t] = types[t];
23 | }
24 | for (var e in errors) {
25 | if (errors.hasOwnProperty(e))
26 | module.exports[e] = errors[e];
27 | }
28 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js:
--------------------------------------------------------------------------------
1 | // Copyright 2011 Mark Cavage All rights reserved.
2 |
3 |
4 | module.exports = {
5 | EOC: 0,
6 | Boolean: 1,
7 | Integer: 2,
8 | BitString: 3,
9 | OctetString: 4,
10 | Null: 5,
11 | OID: 6,
12 | ObjectDescriptor: 7,
13 | External: 8,
14 | Real: 9, // float
15 | Enumeration: 10,
16 | PDV: 11,
17 | Utf8String: 12,
18 | RelativeOID: 13,
19 | Sequence: 16,
20 | Set: 17,
21 | NumericString: 18,
22 | PrintableString: 19,
23 | T61String: 20,
24 | VideotexString: 21,
25 | IA5String: 22,
26 | UTCTime: 23,
27 | GeneralizedTime: 24,
28 | GraphicString: 25,
29 | VisibleString: 26,
30 | GeneralString: 28,
31 | UniversalString: 29,
32 | CharacterString: 30,
33 | BMPString: 31,
34 | Constructor: 32,
35 | Context: 128
36 | };
37 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js:
--------------------------------------------------------------------------------
1 | // Copyright 2011 Mark Cavage All rights reserved.
2 |
3 | // If you have no idea what ASN.1 or BER is, see this:
4 | // ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc
5 |
6 | var Ber = require('./ber/index');
7 |
8 |
9 |
10 | ///--- Exported API
11 |
12 | module.exports = {
13 |
14 | Ber: Ber,
15 |
16 | BerReader: Ber.Reader,
17 |
18 | BerWriter: Ber.Writer
19 |
20 | };
21 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json:
--------------------------------------------------------------------------------
1 | { "metadata":
2 | {
3 | "ctf2json_version": "1.0",
4 | "created_at": 1316563626,
5 | "derived_from": "/lib/libc.so",
6 | "ctf_version": 2,
7 | "requested_types": [ "float" ]
8 | },
9 | "data":
10 | [
11 | { "name": "float", "float": { "length": 4 } }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json:
--------------------------------------------------------------------------------
1 | { "metadata":
2 | {
3 | "ctf2json_version": "1.0",
4 | "created_at": 1316563631,
5 | "derived_from": "/lib/libc.so",
6 | "ctf_version": 2,
7 | "requested_types": [ "int" ]
8 | },
9 | "data":
10 | [
11 | { "name": "int", "integer": { "length": 4, "signed": true } }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json:
--------------------------------------------------------------------------------
1 | { "metadata":
2 | {
3 | "ctf2json_version": "1.0",
4 | "created_at": 1316563648,
5 | "derived_from": "/lib/libc.so",
6 | "ctf_version": 2,
7 | "requested_types": [ "timestruc_t" ]
8 | },
9 | "data":
10 | [
11 | { "name": "long", "integer": { "length": 4, "signed": true } },
12 | { "name": "time_t", "typedef": "long" },
13 | { "name": "struct timespec", "struct": [
14 | { "name": "tv_sec", "type": "time_t" },
15 | { "name": "tv_nsec", "type": "long" }
16 | ] },
17 | { "name": "timestruc_t", "typedef": "struct timespec" }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js:
--------------------------------------------------------------------------------
1 | var mod_fs = require('fs');
2 | var mod_ctype = require('../../ctype.js');
3 | var mod_assert = require('assert');
4 |
5 | function test()
6 | {
7 | var data, parser;
8 |
9 | data = JSON.parse(mod_fs.readFileSync('./float.json').toString());
10 | parser = mod_ctype.parseCTF(data, { endian: 'big' });
11 | mod_assert.deepEqual(parser.lstypes(), {});
12 | }
13 |
14 | test();
15 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js:
--------------------------------------------------------------------------------
1 | var mod_fs = require('fs');
2 | var mod_ctype = require('../../ctype.js');
3 | var mod_assert = require('assert');
4 |
5 | function test()
6 | {
7 | var data, parser;
8 |
9 | data = JSON.parse(mod_fs.readFileSync('./int.json').toString());
10 | parser = mod_ctype.parseCTF(data, { endian: 'big' });
11 | mod_assert.deepEqual(parser.lstypes(), { 'int': 'int32_t' });
12 | }
13 |
14 | test();
15 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js:
--------------------------------------------------------------------------------
1 | var mod_fs = require('fs');
2 | var mod_ctype = require('../../ctype.js');
3 | var mod_assert = require('assert');
4 |
5 | /*
6 | * This is too unwieldly to actually write out. Just make sure we can parse it
7 | * without errrors.
8 | */
9 | function test()
10 | {
11 | var data;
12 |
13 | data = JSON.parse(mod_fs.readFileSync('./psinfo.json').toString());
14 | mod_ctype.parseCTF(data, { endian: 'big' });
15 | }
16 |
17 | test();
18 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js:
--------------------------------------------------------------------------------
1 | var mod_fs = require('fs');
2 | var mod_ctype = require('../../ctype.js');
3 | var mod_assert = require('assert');
4 |
5 | function test()
6 | {
7 | var data, parser;
8 |
9 | data = JSON.parse(mod_fs.readFileSync('./struct.json').toString());
10 | parser = mod_ctype.parseCTF(data, { endian: 'big' });
11 | mod_assert.deepEqual(parser.lstypes(), { 'long': 'int32_t',
12 | 'time_t': 'long',
13 | 'timestruc_t': 'struct timespec',
14 | 'struct timespec': [ { 'tv_sec': { 'type': 'time_t' } },
15 | { 'tv_nsec': { 'type': 'long' } } ] });
16 | }
17 |
18 | test();
19 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js:
--------------------------------------------------------------------------------
1 | var mod_fs = require('fs');
2 | var mod_ctype = require('../../ctype.js');
3 | var mod_assert = require('assert');
4 |
5 | function test()
6 | {
7 | var data, parser;
8 |
9 | data = JSON.parse(mod_fs.readFileSync('./typedef.json').toString());
10 | parser = mod_ctype.parseCTF(data, { endian: 'big' });
11 | mod_assert.deepEqual(parser.lstypes(), { 'bar_t': 'int',
12 | 'int': 'int32_t' });
13 | }
14 |
15 | test();
16 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json:
--------------------------------------------------------------------------------
1 | { "metadata":
2 | {
3 | "ctf2json_version": "1.0",
4 | "created_at": 1316302348,
5 | "derived_from": "/lib/libc.so",
6 | "ctf_version": 2,
7 | "requested_types": [ "bar_t" ]
8 | },
9 | "data":
10 | [
11 | { "name": "int", "integer": { "length": 4, "signed": true } },
12 | { "name": "bar_t", "typedef": "int" }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Test the different forms of reading characters:
3 | *
4 | * - the default, a single element buffer
5 | * - uint8, values are uint8_ts
6 | * - int8, values are int8_ts
7 | */
8 | var mod_ctype = require('../../ctype');
9 | var mod_assert = require('assert');
10 |
11 | function test()
12 | {
13 | var p, buf, res;
14 |
15 | buf = new Buffer(1);
16 | buf[0] = 255;
17 |
18 | p = new mod_ctype.Parser({ endian: 'little'});
19 | res = p.readData([ { c: { type: 'char' }} ], buf, 0);
20 | res = res['c'];
21 | mod_assert.ok(res instanceof Buffer);
22 | mod_assert.equal(255, res[0]);
23 |
24 | p = new mod_ctype.Parser({ endian: 'little',
25 | 'char-type': 'int8' });
26 | res = p.readData([ { c: { type: 'char' }} ], buf, 0);
27 | res = res['c'];
28 | mod_assert.ok(typeof (res) == 'number', 'got typeof (res): ' +
29 | typeof (res));
30 | mod_assert.equal(-1, res);
31 |
32 | p = new mod_ctype.Parser({ endian: 'little',
33 | 'char-type': 'uint8' });
34 | res = p.readData([ { c: { type: 'char' }} ], buf, 0);
35 | res = res['c'];
36 | mod_assert.ok(typeof (res) == 'number', 'got typeof (res): ' +
37 | typeof (res));
38 | mod_assert.equal(255, res);
39 |
40 | }
41 |
42 | test();
43 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Simple test to make sure that the endian setting works.
3 | */
4 |
5 | var mod_ctype = require('../../ctype.js');
6 | var mod_assert = require('assert');
7 |
8 | function test()
9 | {
10 | var parser, buf;
11 |
12 | parser = new mod_ctype.Parser({
13 | endian: 'little'
14 | });
15 |
16 | buf = new Buffer(2);
17 | parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]);
18 | mod_assert.equal(buf[0], 0x34);
19 | mod_assert.equal(buf[1], 0x12);
20 | parser.setEndian('big');
21 |
22 | parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]);
23 | mod_assert.equal(buf[0], 0x12);
24 | mod_assert.equal(buf[1], 0x34);
25 |
26 | parser.setEndian('little');
27 | parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]);
28 | mod_assert.equal(buf[0], 0x34);
29 | mod_assert.equal(buf[1], 0x12);
30 | }
31 |
32 | function fail()
33 | {
34 | var parser;
35 |
36 | parser = new mod_ctype.Parser({
37 | endian: 'little'
38 | });
39 | mod_assert.throws(function () {
40 | parser.setEndian('littlebigwrong');
41 | });
42 | }
43 |
44 | test();
45 | fail();
46 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js:
--------------------------------------------------------------------------------
1 | /*
2 | * A long overdue test to go through and verify that we can read and write
3 | * structures as well as nested structures.
4 | */
5 |
6 | var mod_ctype = require('../../ctype.js');
7 | var mod_assert = require('assert');
8 |
9 | function test()
10 | {
11 | var parser, buf, data;
12 | parser = new mod_ctype.Parser({
13 | endian: 'little'
14 | });
15 | parser.typedef('point_t', [
16 | { x: { type: 'uint8_t' } },
17 | { y: { type: 'uint8_t' } }
18 | ]);
19 | buf = new Buffer(2);
20 | data = [
21 | { point: { type: 'point_t', value: [ 23, 42 ] } }
22 | ];
23 | parser.writeData(data, buf, 0);
24 | mod_assert.ok(buf[0] == 23);
25 | mod_assert.ok(buf[1] == 42);
26 | }
27 |
28 | test();
29 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js:
--------------------------------------------------------------------------------
1 | /*
2 | * A long overdue test to go through and verify that we can read and write
3 | * structures as well as nested structures.
4 | */
5 |
6 | var mod_ctype = require('../../ctype.js');
7 | var mod_assert = require('assert');
8 |
9 | function test()
10 | {
11 | var parser, buf, data;
12 | parser = new mod_ctype.Parser({
13 | endian: 'little'
14 | });
15 | parser.typedef('point_t', [
16 | { x: { type: 'uint8_t' } },
17 | { y: { type: 'uint8_t' } }
18 | ]);
19 | buf = new Buffer(2);
20 | data = [
21 | { point: { type: 'point_t' } }
22 | ];
23 | parser.writeData(data, buf, 0, [ [ 23, 42 ] ]);
24 | mod_assert.ok(buf[0] == 23);
25 | mod_assert.ok(buf[1] == 42);
26 | }
27 |
28 | test();
29 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Test to verify that the offset is incremented when structures are written to.
3 | * Hopefully we will not regress issue #41
4 | */
5 |
6 | var mod_ctype = require('../../ctype.js');
7 | var mod_assert = require('assert');
8 |
9 | function test()
10 | {
11 | var parser, buf, data;
12 | parser = new mod_ctype.Parser({
13 | endian: 'little'
14 | });
15 | parser.typedef('point_t', [
16 | { x: { type: 'uint8_t' } },
17 | { y: { type: 'uint8_t' } }
18 | ]);
19 | buf = new Buffer(4);
20 | data = [
21 | { point1: { type: 'point_t' } },
22 | { point2: { type: 'point_t' } }
23 | ];
24 | parser.writeData(data, buf, 0, [ [ 23, 42 ], [ 91, 18 ] ]);
25 | mod_assert.ok(buf[0] == 23);
26 | mod_assert.ok(buf[1] == 42);
27 | mod_assert.ok(buf[2] == 91);
28 | mod_assert.ok(buf[3] == 18);
29 | }
30 |
31 | test();
32 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/json-stringify-safe/stringify.js:
--------------------------------------------------------------------------------
1 | module.exports = stringify;
2 |
3 | function getSerialize (fn, decycle) {
4 | var seen = [], keys = [];
5 | decycle = decycle || function(key, value) {
6 | return '[Circular ' + getPath(value, seen, keys) + ']'
7 | };
8 | return function(key, value) {
9 | var ret = value;
10 | if (typeof value === 'object' && value) {
11 | if (seen.indexOf(value) !== -1)
12 | ret = decycle(key, value);
13 | else {
14 | seen.push(value);
15 | keys.push(key);
16 | }
17 | }
18 | if (fn) ret = fn(key, ret);
19 | return ret;
20 | }
21 | }
22 |
23 | function getPath (value, seen, keys) {
24 | var index = seen.indexOf(value);
25 | var path = [ keys[index] ];
26 | for (index--; index >= 0; index--) {
27 | if (seen[index][ path[0] ] === value) {
28 | value = seen[index];
29 | path.unshift(keys[index]);
30 | }
31 | }
32 | return '~' + path.join('.');
33 | }
34 |
35 | function stringify(obj, fn, spaces, decycle) {
36 | return JSON.stringify(obj, getSerialize(fn, decycle), spaces);
37 | }
38 |
39 | stringify.getSerialize = getSerialize;
40 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/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 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/node-uuid/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/node-uuid/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010-2012 Robert Kieffer
2 | MIT License - http://opensource.org/licenses/mit-license.php
3 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/node-uuid/benchmark/bench.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # for a given node version run:
4 | # for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done;
5 |
6 | PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte')
7 | FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es)
8 | INDICES=(2 3 2 3 2 2 2 2 2)
9 | VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " )
10 | TMPJOIN="tmp_join"
11 | OUTPUT="bench_results.txt"
12 |
13 | for I in ${!FILES[*]}; do
14 | F=${FILES[$I]}
15 | P=${PATTERNS[$I]}
16 | INDEX=${INDICES[$I]}
17 | echo "version $F" > $F
18 | for V in $VERSIONS; do
19 | (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F
20 | done
21 | if [ $I == 0 ]; then
22 | cat $F > $TMPJOIN
23 | else
24 | join $TMPJOIN $F > $OUTPUT
25 | cp $OUTPUT $TMPJOIN
26 | fi
27 | rm $F
28 | done
29 |
30 | rm $TMPJOIN
31 |
32 | gnuplot bench.gnu
33 | convert -density 200 -resize 800x560 -flatten bench.eps bench.png
34 | rm bench.eps
35 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c:
--------------------------------------------------------------------------------
1 | /*
2 | Test performance of native C UUID generation
3 |
4 | To Compile: cc -luuid benchmark-native.c -o benchmark-native
5 | */
6 |
7 | #include
8 | #include
9 | #include
10 | #include
11 |
12 | int main() {
13 | uuid_t myid;
14 | char buf[36+1];
15 | int i;
16 | struct timeval t;
17 | double start, finish;
18 |
19 | gettimeofday(&t, NULL);
20 | start = t.tv_sec + t.tv_usec/1e6;
21 |
22 | int n = 2e5;
23 | for (i = 0; i < n; i++) {
24 | uuid_generate(myid);
25 | uuid_unparse(myid, buf);
26 | }
27 |
28 | gettimeofday(&t, NULL);
29 | finish = t.tv_sec + t.tv_usec/1e6;
30 | double dur = finish - start;
31 |
32 | printf("%d uuids/sec", (int)(n/dur));
33 | return 0;
34 | }
35 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/node-uuid/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "node-uuid",
3 | "repo": "broofa/node-uuid",
4 | "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.",
5 | "version": "1.4.0",
6 | "author": "Robert Kieffer ",
7 | "contributors": [
8 | {"name": "Christoph Tavan ", "github": "https://github.com/ctavan"}
9 | ],
10 | "keywords": ["uuid", "guid", "rfc4122"],
11 | "dependencies": {},
12 | "development": {},
13 | "main": "uuid.js",
14 | "scripts": [
15 | "uuid.js"
16 | ],
17 | "license": "MIT"
18 | }
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/node-uuid/test/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/oauth-sign/README.md:
--------------------------------------------------------------------------------
1 | oauth-sign
2 | ==========
3 |
4 | OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.
5 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/oauth-sign/index.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(/!/g,'%21')
12 | .replace(/\*/g,'%2A')
13 | .replace(/\(/g,'%28')
14 | .replace(/\)/g,'%29')
15 | .replace(/'/g,'%27')
16 | ;
17 | }
18 |
19 | function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) {
20 | // adapted from https://dev.twitter.com/docs/auth/oauth and
21 | // https://dev.twitter.com/docs/auth/creating-signature
22 |
23 | var querystring = Object.keys(params).sort().map(function(key){
24 | // big WTF here with the escape + encoding but it's what twitter wants
25 | return escape(rfc3986(key)) + "%3D" + escape(rfc3986(params[key]))
26 | }).join('%26')
27 |
28 | var base = [
29 | httpMethod ? httpMethod.toUpperCase() : 'GET',
30 | rfc3986(base_uri),
31 | querystring
32 | ].join('&')
33 |
34 | var key = [
35 | consumer_secret,
36 | token_secret || ''
37 | ].map(rfc3986).join('&')
38 |
39 | return sha1(key, base)
40 | }
41 |
42 | exports.hmacsign = hmacsign
43 | exports.rfc3986 = rfc3986
44 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/oauth-sign/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": {
3 | "name": "Mikeal Rogers",
4 | "email": "mikeal.rogers@gmail.com",
5 | "url": "http://www.futurealoof.com"
6 | },
7 | "name": "oauth-sign",
8 | "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.",
9 | "version": "0.3.0",
10 | "repository": {
11 | "url": "https://github.com/mikeal/oauth-sign"
12 | },
13 | "main": "index.js",
14 | "dependencies": {},
15 | "devDependencies": {},
16 | "optionalDependencies": {},
17 | "engines": {
18 | "node": "*"
19 | },
20 | "scripts": {
21 | "test": "node test.js"
22 | },
23 | "readme": "oauth-sign\n==========\n\nOAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. \n",
24 | "readmeFilename": "README.md",
25 | "bugs": {
26 | "url": "https://github.com/mikeal/oauth-sign/issues"
27 | },
28 | "homepage": "https://github.com/mikeal/oauth-sign",
29 | "_id": "oauth-sign@0.3.0",
30 | "_from": "oauth-sign@~0.3.0"
31 | }
32 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/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 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/qs/.npmignore:
--------------------------------------------------------------------------------
1 | test
2 | .travis.yml
3 | benchmark.js
4 | component.json
5 | examples.js
6 | History.md
7 | Makefile
8 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/tough-cookie/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | .*.sw[nmop]
3 | npm-debug.log
4 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/tough-cookie/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "0.10"
4 | - "0.11"
5 | matrix:
6 | fast_finish: true
7 | allow_failures:
8 | - node_js: 0.11
9 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/tough-cookie/lib/store.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /*jshint unused:false */
3 |
4 | function Store() {
5 | }
6 | exports.Store = Store;
7 |
8 | // Stores may be synchronous, but are still required to use a
9 | // Continuation-Passing Style API. The CookieJar itself will expose a "*Sync"
10 | // API that converts from synchronous-callbacks to imperative style.
11 | Store.prototype.synchronous = false;
12 |
13 | Store.prototype.findCookie = function(domain, path, key, cb) {
14 | throw new Error('findCookie is not implemented');
15 | };
16 |
17 | Store.prototype.findCookies = function(domain, path, cb) {
18 | throw new Error('findCookies is not implemented');
19 | };
20 |
21 | Store.prototype.putCookie = function(cookie, cb) {
22 | throw new Error('putCookie is not implemented');
23 | };
24 |
25 | Store.prototype.updateCookie = function(oldCookie, newCookie, cb) {
26 | // recommended default implementation:
27 | // return this.putCookie(newCookie, cb);
28 | throw new Error('updateCookie is not implemented');
29 | };
30 |
31 | Store.prototype.removeCookie = function(domain, path, key, cb) {
32 | throw new Error('removeCookie is not implemented');
33 | };
34 |
35 | Store.prototype.removeCookies = function removeCookies(domain, path, cb) {
36 | throw new Error('removeCookies is not implemented');
37 | };
38 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt:
--------------------------------------------------------------------------------
1 | Copyright Mathias Bynens
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 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/tunnel-agent/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": true,
3 | "asi": true,
4 | "laxcomma": true
5 | }
6 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/tunnel-agent/README.md:
--------------------------------------------------------------------------------
1 | tunnel-agent
2 | ============
3 |
4 | HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.
5 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/node_modules/request/node_modules/tunnel-agent/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": {
3 | "name": "Mikeal Rogers",
4 | "email": "mikeal.rogers@gmail.com",
5 | "url": "http://www.futurealoof.com"
6 | },
7 | "name": "tunnel-agent",
8 | "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.",
9 | "version": "0.4.0",
10 | "repository": {
11 | "url": "https://github.com/mikeal/tunnel-agent"
12 | },
13 | "main": "index.js",
14 | "dependencies": {},
15 | "devDependencies": {},
16 | "optionalDependencies": {},
17 | "engines": {
18 | "node": "*"
19 | },
20 | "readme": "tunnel-agent\n============\n\nHTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.\n",
21 | "readmeFilename": "README.md",
22 | "bugs": {
23 | "url": "https://github.com/mikeal/tunnel-agent/issues"
24 | },
25 | "homepage": "https://github.com/mikeal/tunnel-agent",
26 | "_id": "tunnel-agent@0.4.0",
27 | "_from": "tunnel-agent@~0.4.0"
28 | }
29 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/tests/integration/pusher/exports.js:
--------------------------------------------------------------------------------
1 | var expect = require("expect.js");
2 |
3 | var errors = require("../../../lib/errors");
4 | var Pusher = require("../../../lib/pusher");
5 | var Token = require("../../../lib/token");
6 |
7 | describe("Pusher", function() {
8 | it("should export `Token`", function() {
9 | expect(Pusher.Token).to.be(Token);
10 | });
11 |
12 | it("should export `RequestError`", function() {
13 | expect(Pusher.RequestError).to.be(errors.RequestError);
14 | });
15 |
16 | it("should export `WebHookError`", function() {
17 | expect(Pusher.WebHookError).to.be(errors.WebHookError);
18 | });
19 | });
20 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/tests/integration/pusher/for_cluster.js:
--------------------------------------------------------------------------------
1 | var expect = require("expect.js");
2 |
3 | var Pusher = require("../../../lib/pusher");
4 |
5 | describe("Pusher", function() {
6 | describe(".forCluster", function() {
7 | it("should generate a hostname for the cluster", function() {
8 | var pusher = Pusher.forCluster("test");
9 | expect(pusher.config.host).to.equal("api-test.pusher.com");
10 | });
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/tests/integration/pusher/webhook.js:
--------------------------------------------------------------------------------
1 | var expect = require("expect.js");
2 |
3 | var Pusher = require("../../../lib/pusher");
4 | var WebHook = require("../../../lib/webhook");
5 |
6 | describe("Pusher", function() {
7 | var pusher;
8 |
9 | beforeEach(function() {
10 | pusher = new Pusher({ appId: 10000, key: "aaaa", secret: "beef" });
11 | });
12 |
13 | describe("#webhook", function() {
14 | it("should return a WebHook instance", function() {
15 | expect(pusher.webhook({ headers: {}, body: "" })).to.be.a(WebHook);
16 | });
17 |
18 | it("should pass the token to the WebHook", function() {
19 | expect(
20 | pusher.webhook({ headers: {}, body: "" }).token
21 | ).to.be(pusher.config.token);
22 | });
23 | });
24 | });
25 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/tests/remote/pusher/keepalive.js:
--------------------------------------------------------------------------------
1 | var expect = require("expect.js");
2 |
3 | var Pusher = require("../../../lib/pusher");
4 |
5 | describe("Pusher (integration)", function() {
6 | describe("with keep-alive", function() {
7 | var pusher;
8 |
9 | beforeEach(function() {
10 | pusher = new Pusher.forURL(process.env.PUSHER_URL, {
11 | keepAlive: true
12 | });
13 | });
14 |
15 | it("should send 2 sequential requests successfully", function(done) {
16 | pusher.get({ path: "/channels" }, function(error, request, response) {
17 | expect(error).to.be(null);
18 | expect(response.statusCode).to.equal(200);
19 | expect(JSON.parse(response.body).channels).to.be.an(Object);
20 | pusher.get({ path: "/channels" }, function(error, request, response) {
21 | expect(error).to.be(null);
22 | expect(response.statusCode).to.equal(200);
23 | expect(JSON.parse(response.body).channels).to.be.an(Object);
24 | done();
25 | });
26 | });
27 | });
28 | });
29 | });
30 |
--------------------------------------------------------------------------------
/examples/nodejs/node_modules/pusher/tests/remote/pusher/trigger.js:
--------------------------------------------------------------------------------
1 | var expect = require("expect.js");
2 |
3 | var Pusher = require("../../../lib/pusher");
4 |
5 | describe("Pusher (integration)", function() {
6 | var pusher;
7 |
8 | beforeEach(function() {
9 | pusher = new Pusher.forURL(process.env.PUSHER_URL);
10 | });
11 |
12 | describe("#trigger", function() {
13 | it("should return code 200", function(done) {
14 | pusher.trigger("integration", "event", "test", null, function(error, request, response) {
15 | expect(error).to.be(null);
16 | expect(response.statusCode).to.equal(200);
17 | expect(JSON.parse(response.body)).to.eql({});
18 | done();
19 | });
20 | });
21 | });
22 | });
23 |
--------------------------------------------------------------------------------
/examples/nodejs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "html5-realtime-push-notifications",
3 | "version": "0.0.0",
4 | "description": "",
5 | "main": "app.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "Robin Hawkes ",
10 | "license": "MIT",
11 | "dependencies": {
12 | "express": "^4.6.1",
13 | "body-parser": "^1.5.0",
14 | "errorhandler": "^1.1.1",
15 | "pusher": "^1.0.0",
16 | "escape-html": "^1.0.1"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/examples/php/config.example.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/php/lastfm_example/recent_tracks.php:
--------------------------------------------------------------------------------
1 | ';
9 | foreach ($scrobbler_data->track as $track) {
10 | $string = '';
11 | $string .= '';
12 | $string .= '' . $track->artist . '
' . $track->name . '
';
13 | $string .= 'Played: ' . $track->date . '
';
14 | $string .= '';
15 | echo $string;
16 | }
17 | echo '';
18 | }
19 | ?>
--------------------------------------------------------------------------------
/examples/php/lastfm_example/recent_tracks_notification.php:
--------------------------------------------------------------------------------
1 |
2 | require_once('../config.php');
3 | require_once('../../lib/pusher-php/squeeks-Pusher-PHP/lib/Pusher.php');
4 | require_once('../../lib/pusher-php/pusher_notification_helper.php');
5 |
6 | $username = 'philipnorton42';
7 | $scrobbler_url = "http://ws.audioscrobbler.com/2.0/user/" . $username . "/recenttracks";
8 |
9 | if ($scrobbler_xml = file_get_contents($scrobbler_url)) {
10 | $scrobbler_data = simplexml_load_string($scrobbler_xml);
11 |
12 | $pusher = new Pusher(APP_KEY, APP_SECRET, APP_ID);
13 | $helper = new PusherNotificationHelper($pusher);
14 |
15 | foreach ($scrobbler_data->track as $track) {
16 | $string = '';
17 | $string .= '
';
18 | $string .= '
' . $track->artist . '
' . $track->name . '
';
19 | $string .= '
Played: ' . $track->date . '
';
20 | $string .= '
';
21 |
22 | $helper->announce_notification($string);
23 | }
24 | }
25 | ?>
--------------------------------------------------------------------------------
/examples/php/lib/squeeks-Pusher-PHP/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pusher/pusher-php-server",
3 | "type": "library",
4 | "description" : "Library for interacting with the Pusher REST API",
5 | "keywords": ["php-pusher-server", "pusher", "rest", "realtime", "trigger", "publish", "events"],
6 | "homepage": "https://github.com/pusher/pusher-php-server",
7 | "license": "MIT",
8 | "require": {
9 | "php": ">=5.2",
10 | "ext-curl": "*"
11 | },
12 | "require-dev": {
13 | "phpunit/phpunit": "3.7.*"
14 | },
15 | "autoload": {
16 | "classmap": [ "lib/" ]
17 | }
18 | }
--------------------------------------------------------------------------------
/examples/php/lib/squeeks-Pusher-PHP/test/TestLogger.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/php/lib/squeeks-Pusher-PHP/test/test_includes.php:
--------------------------------------------------------------------------------
1 | pusher = new Pusher('thisisaauthkey', 'thisisasecret', 1, true);
11 | }
12 |
13 | public function testObjectConstruct()
14 | {
15 | $this->assertNotNull($this->pusher, 'Created new Pusher object');
16 | }
17 |
18 | public function testSocketAuthKey()
19 | {
20 | $socket_auth = $this->pusher->socket_auth('testing_pusher-php', 'testing_socket_auth');
21 | $this->assertEquals($socket_auth,
22 | '{"auth":"thisisaauthkey:ee548cf60217ed18281da39a8eb23609105f1bde29372650cb67bd91c284aae1"}',
23 | 'Socket auth key valid');
24 | }
25 |
26 | }
27 |
28 | ?>
29 |
--------------------------------------------------------------------------------
/examples/php/notify.php:
--------------------------------------------------------------------------------
1 | $message);
9 |
10 | $pusher->trigger('my_notifications', 'notification', $data);
11 |
12 | function sanitize($data) {
13 | return htmlspecialchars($data);
14 | }
15 | ?>
--------------------------------------------------------------------------------
/examples/ruby-sinatra/Gemfile:
--------------------------------------------------------------------------------
1 | source "http://rubygems.org"
2 | gem 'sinatra'
3 | gem 'pusher'
4 | gem 'uuid'
5 | gem 'json'
--------------------------------------------------------------------------------
/examples/ruby-sinatra/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: http://rubygems.org/
3 | specs:
4 | json (1.6.5)
5 | macaddr (1.5.0)
6 | systemu (>= 2.4.0)
7 | multi_json (1.0.4)
8 | pusher (0.9.2)
9 | multi_json (~> 1.0)
10 | ruby-hmac (~> 0.4.0)
11 | signature (~> 0.1.2)
12 | rack (1.4.1)
13 | rack-protection (1.2.0)
14 | rack
15 | ruby-hmac (0.4.0)
16 | signature (0.1.2)
17 | ruby-hmac
18 | sinatra (1.3.2)
19 | rack (~> 1.3, >= 1.3.6)
20 | rack-protection (~> 1.2)
21 | tilt (~> 1.3, >= 1.3.3)
22 | systemu (2.4.2)
23 | tilt (1.3.3)
24 | uuid (2.3.5)
25 | macaddr (~> 1.0)
26 |
27 | PLATFORMS
28 | ruby
29 |
30 | DEPENDENCIES
31 | json
32 | pusher
33 | sinatra
34 | uuid
35 |
--------------------------------------------------------------------------------
/examples/ruby-sinatra/config_example.rb:
--------------------------------------------------------------------------------
1 | require 'pusher'
2 |
3 | Pusher.app_id = 'YOUR_APP_ID'
4 | Pusher.key = 'YOUR_APP_KEY'
5 | Pusher.secret = 'YOUR_APP_SECRET'
--------------------------------------------------------------------------------
/examples/ruby-sinatra/notify.rb:
--------------------------------------------------------------------------------
1 | require './config.rb'
2 |
3 | require 'sinatra'
4 | require 'pusher'
5 | require 'json'
6 |
7 | include Rack::Utils
8 |
9 | set :public_folder, '../'
10 |
11 | get '/' do
12 | send_file('../index.html')
13 | end
14 |
15 | get '/notify' do
16 |
17 | message = params[:message]
18 |
19 | if( !message )
20 | status 400
21 | body 'message must be provided'
22 | end
23 |
24 | message = sanitise_input(message)
25 | data = {'message' => message}
26 | response = Pusher['my_notifications'].trigger('notification', data)
27 |
28 | result = {'activity' => data, 'pusherResponse' => response}
29 |
30 | status 200
31 | headers \
32 | 'Cache-Control' => 'no-cache, must-revalidate',
33 | 'Content-Type' => 'application/json'
34 |
35 | body result.to_json
36 | end
37 |
38 | def get_content_type(type)
39 | case type
40 | when "css"
41 | return 'text/css'
42 | when "js"
43 | return 'text/javascript'
44 | else
45 | return 'text/plain'
46 | end
47 | end
48 |
49 | def sanitise_input(message)
50 | return escape_html(message).slice(0, 300)
51 | end
--------------------------------------------------------------------------------
/examples/styles.css:
--------------------------------------------------------------------------------
1 | #gritter-notice-wrapper {
2 | top: 50px !important;
3 | }
4 |
5 | body {
6 | margin-left: 4px;
7 | margin-right: 4px;
8 | }
9 |
10 | section {
11 | padding-top: 60px;
12 | }
13 |
14 | section .page-header h1 {
15 | padding-left: 60px;
16 | }
17 |
18 | .container {
19 | width: 640px;
20 | }
21 |
22 | .hero-unit {
23 | padding-bottom: 30px;
24 | }
25 |
26 | .hero-unit h1 {
27 | font-size: 45px;
28 | }
29 |
30 | .hero-unit + section {
31 | padding-top: 0;
32 | }
33 |
34 | .hero-unit p:last-child {
35 | margin: 0;
36 | line-height: 11px;
37 | }
38 |
39 | .notify .btn {
40 | float: right;
41 | margin-top: 10px;
42 | }
43 |
44 | .notify textarea {
45 | height: 100px;
46 | width: 100%;
47 | font-size: 1.5em;
48 | }
--------------------------------------------------------------------------------