├── .gitignore ├── .idea ├── .name ├── angular-restful-auth.iml ├── encodings.xml ├── misc.xml ├── modules.xml ├── scopes │ └── scope_settings.xml ├── vcs.xml └── workspace.xml ├── Procfile ├── README.md ├── app ├── index.html ├── lib │ └── ngStorage.js ├── partials │ ├── home.html │ ├── me.html │ ├── signin.html │ └── signup.html └── scripts │ ├── app.js │ ├── controllers.js │ └── services.js ├── client.js ├── models └── User.js ├── node_modules ├── body-parser │ ├── .npmignore │ ├── .travis.yml │ ├── HISTORY.md │ ├── Makefile │ ├── README.md │ ├── index.js │ ├── node_modules │ │ ├── qs │ │ │ ├── .gitmodules │ │ │ ├── .npmignore │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── raw-body │ │ │ ├── .npmignore │ │ │ ├── HISTORY.md │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ ├── bytes │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── History.md │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── Readme.md │ │ │ │ │ ├── component.json │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ │ └── string_decoder │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ └── package.json │ │ └── type-is │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── HISTORY.md │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ └── mime │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── mime.js │ │ │ │ ├── package.json │ │ │ │ ├── test.js │ │ │ │ └── types │ │ │ │ ├── mime.types │ │ │ │ └── node.types │ │ │ └── package.json │ └── package.json ├── express-jwt │ ├── .npmignore │ ├── .travis.yml │ ├── README.md │ ├── lib │ │ ├── errors │ │ │ └── UnauthorizedError.js │ │ └── index.js │ ├── package.json │ └── test │ │ └── jwt.test.js ├── 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 │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ ├── mime-types │ │ │ │ │ ├── HISTORY.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ ├── node_modules │ │ │ │ │ │ └── mime-db │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── db.json │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── package.json │ │ │ │ │ └── package.json │ │ │ │ └── negotiator │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── lib │ │ │ │ │ ├── charset.js │ │ │ │ │ ├── encoding.js │ │ │ │ │ ├── language.js │ │ │ │ │ ├── mediaType.js │ │ │ │ │ └── negotiator.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── readme.md │ │ │ └── package.json │ │ ├── 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 │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ └── compat │ │ │ │ │ ├── buffer-concat.js │ │ │ │ │ ├── callsite-tostring.js │ │ │ │ │ └── index.js │ │ │ └── package.json │ │ ├── escape-html │ │ │ ├── .npmignore │ │ │ ├── Makefile │ │ │ ├── Readme.md │ │ │ ├── component.json │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── etag │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ └── crc │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── lib │ │ │ │ │ ├── crc.js │ │ │ │ │ ├── crc1.js │ │ │ │ │ ├── crc16.js │ │ │ │ │ ├── crc16_ccitt.js │ │ │ │ │ ├── crc16_modbus.js │ │ │ │ │ ├── crc24.js │ │ │ │ │ ├── crc32.js │ │ │ │ │ ├── crc8.js │ │ │ │ │ ├── crc8_1wire.js │ │ │ │ │ ├── create.js │ │ │ │ │ ├── hex.js │ │ │ │ │ └── index.js │ │ │ │ │ └── package.json │ │ │ └── package.json │ │ ├── finalhandler │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── fresh │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── media-typer │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── 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 │ │ ├── on-finished │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ └── ee-first │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ └── package.json │ │ ├── parseurl │ │ │ ├── .npmignore │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── path-to-regexp │ │ │ ├── .npmignore │ │ │ ├── History.md │ │ │ ├── Readme.md │ │ │ ├── component.json │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── proxy-addr │ │ │ ├── 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 │ │ │ ├── .jshintignore │ │ │ ├── .jshintrc │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── index.js │ │ │ │ ├── parse.js │ │ │ │ ├── stringify.js │ │ │ │ └── utils.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ ├── parse.js │ │ │ │ └── stringify.js │ │ ├── range-parser │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── send │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ ├── destroy │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.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 │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── type-is │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ └── mime-types │ │ │ │ │ ├── HISTORY.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ ├── node_modules │ │ │ │ │ └── mime-db │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── db.json │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── package.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 ├── jsonwebtoken │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE.md │ ├── README.md │ ├── index.js │ ├── node_modules │ │ └── jws │ │ │ ├── .jshintrc │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ ├── base64url │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ ├── readme.md │ │ │ │ └── test │ │ │ │ │ ├── base64url.test.js │ │ │ │ │ └── test.jpg │ │ │ └── jwa │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ └── jwa.test.js │ │ │ ├── package.json │ │ │ ├── readme.md │ │ │ └── test │ │ │ ├── data.txt │ │ │ └── jws.test.js │ ├── package.json │ └── test │ │ ├── invalid_pub.pem │ │ ├── jwt.hs.tests.js │ │ ├── jwt.rs.tests.js │ │ ├── priv.pem │ │ └── pub.pem ├── mongoose │ ├── .npmignore │ ├── .travis.yml │ ├── CONTRIBUTING.md │ ├── History.md │ ├── README.md │ ├── contRun.sh │ ├── examples │ │ ├── README.md │ │ ├── aggregate │ │ │ ├── aggregate.js │ │ │ ├── package.json │ │ │ └── person.js │ │ ├── doc-methods.js │ │ ├── express │ │ │ ├── README.md │ │ │ └── connection-sharing │ │ │ │ ├── README.md │ │ │ │ ├── app.js │ │ │ │ ├── modelA.js │ │ │ │ ├── package.json │ │ │ │ └── routes.js │ │ ├── geospatial │ │ │ ├── geoJSONSchema.js │ │ │ ├── geoJSONexample.js │ │ │ ├── geospatial.js │ │ │ ├── package.json │ │ │ └── person.js │ │ ├── globalschemas │ │ │ ├── gs_example.js │ │ │ └── person.js │ │ ├── lean │ │ │ ├── lean.js │ │ │ ├── package.json │ │ │ └── person.js │ │ ├── mapreduce │ │ │ ├── mapreduce.js │ │ │ ├── package.json │ │ │ └── person.js │ │ ├── population │ │ │ ├── population-across-three-collections.js │ │ │ ├── population-basic.js │ │ │ ├── population-of-existing-doc.js │ │ │ ├── population-of-multiple-existing-docs.js │ │ │ ├── population-options.js │ │ │ └── population-plain-objects.js │ │ ├── promises │ │ │ ├── package.json │ │ │ ├── person.js │ │ │ └── promise.js │ │ ├── querybuilder │ │ │ ├── package.json │ │ │ ├── person.js │ │ │ └── querybuilder.js │ │ ├── replicasets │ │ │ ├── package.json │ │ │ ├── person.js │ │ │ └── replica-sets.js │ │ ├── schema │ │ │ ├── schema.js │ │ │ └── storing-schemas-as-json │ │ │ │ ├── index.js │ │ │ │ └── schema.json │ │ └── statics │ │ │ ├── person.js │ │ │ └── statics.js │ ├── index.js │ ├── lib │ │ ├── aggregate.js │ │ ├── collection.js │ │ ├── connection.js │ │ ├── connectionstate.js │ │ ├── document.js │ │ ├── drivers │ │ │ ├── SPEC.md │ │ │ └── node-mongodb-native │ │ │ │ ├── binary.js │ │ │ │ ├── collection.js │ │ │ │ ├── connection.js │ │ │ │ └── objectid.js │ │ ├── error.js │ │ ├── error │ │ │ ├── cast.js │ │ │ ├── divergentArray.js │ │ │ ├── messages.js │ │ │ ├── missingSchema.js │ │ │ ├── overwriteModel.js │ │ │ ├── validation.js │ │ │ ├── validator.js │ │ │ └── version.js │ │ ├── index.js │ │ ├── internal.js │ │ ├── model.js │ │ ├── promise.js │ │ ├── query.js │ │ ├── queryhelpers.js │ │ ├── querystream.js │ │ ├── schema.js │ │ ├── schema │ │ │ ├── array.js │ │ │ ├── boolean.js │ │ │ ├── buffer.js │ │ │ ├── date.js │ │ │ ├── documentarray.js │ │ │ ├── index.js │ │ │ ├── mixed.js │ │ │ ├── number.js │ │ │ ├── objectid.js │ │ │ └── string.js │ │ ├── schemadefault.js │ │ ├── schematype.js │ │ ├── statemachine.js │ │ ├── types │ │ │ ├── array.js │ │ │ ├── buffer.js │ │ │ ├── documentarray.js │ │ │ ├── embedded.js │ │ │ ├── index.js │ │ │ └── objectid.js │ │ ├── utils.js │ │ └── virtualtype.js │ ├── node_modules │ │ ├── hooks │ │ │ ├── .npmignore │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── hooks.alt.js │ │ │ ├── hooks.js │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── mongodb │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ └── mongodb │ │ │ │ │ ├── admin.js │ │ │ │ │ ├── aggregation_cursor.js │ │ │ │ │ ├── auth │ │ │ │ │ ├── mongodb_cr.js │ │ │ │ │ ├── mongodb_gssapi.js │ │ │ │ │ ├── mongodb_plain.js │ │ │ │ │ ├── mongodb_sspi.js │ │ │ │ │ └── mongodb_x509.js │ │ │ │ │ ├── collection.js │ │ │ │ │ ├── collection │ │ │ │ │ ├── aggregation.js │ │ │ │ │ ├── commands.js │ │ │ │ │ ├── core.js │ │ │ │ │ ├── geo.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── query.js │ │ │ │ │ └── shared.js │ │ │ │ │ ├── command_cursor.js │ │ │ │ │ ├── commands │ │ │ │ │ ├── base_command.js │ │ │ │ │ ├── db_command.js │ │ │ │ │ ├── delete_command.js │ │ │ │ │ ├── get_more_command.js │ │ │ │ │ ├── insert_command.js │ │ │ │ │ ├── kill_cursor_command.js │ │ │ │ │ ├── query_command.js │ │ │ │ │ └── update_command.js │ │ │ │ │ ├── connection │ │ │ │ │ ├── base.js │ │ │ │ │ ├── connection.js │ │ │ │ │ ├── connection_pool.js │ │ │ │ │ ├── connection_utils.js │ │ │ │ │ ├── mongos.js │ │ │ │ │ ├── read_preference.js │ │ │ │ │ ├── repl_set │ │ │ │ │ │ ├── ha.js │ │ │ │ │ │ ├── options.js │ │ │ │ │ │ ├── repl_set.js │ │ │ │ │ │ ├── repl_set_state.js │ │ │ │ │ │ └── strategies │ │ │ │ │ │ │ ├── ping_strategy.js │ │ │ │ │ │ │ └── statistics_strategy.js │ │ │ │ │ ├── server.js │ │ │ │ │ ├── server_capabilities.js │ │ │ │ │ └── url_parser.js │ │ │ │ │ ├── cursor.js │ │ │ │ │ ├── cursorstream.js │ │ │ │ │ ├── db.js │ │ │ │ │ ├── gridfs │ │ │ │ │ ├── chunk.js │ │ │ │ │ ├── grid.js │ │ │ │ │ ├── gridstore.js │ │ │ │ │ └── readstream.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── mongo_client.js │ │ │ │ │ ├── responses │ │ │ │ │ └── mongo_reply.js │ │ │ │ │ ├── scope.js │ │ │ │ │ └── utils.js │ │ │ ├── node_modules │ │ │ │ ├── bson │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── README.md │ │ │ │ │ ├── binding.gyp │ │ │ │ │ ├── browser_build │ │ │ │ │ │ ├── bson.js │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── build │ │ │ │ │ │ ├── Makefile │ │ │ │ │ │ ├── Release │ │ │ │ │ │ │ ├── .deps │ │ │ │ │ │ │ │ └── Release │ │ │ │ │ │ │ │ │ ├── bson.node.d │ │ │ │ │ │ │ │ │ └── obj.target │ │ │ │ │ │ │ │ │ ├── bson.node.d │ │ │ │ │ │ │ │ │ └── bson │ │ │ │ │ │ │ │ │ └── ext │ │ │ │ │ │ │ │ │ └── bson.o.d │ │ │ │ │ │ │ ├── bson.node │ │ │ │ │ │ │ ├── linker.lock │ │ │ │ │ │ │ └── obj.target │ │ │ │ │ │ │ │ ├── bson.node │ │ │ │ │ │ │ │ └── bson │ │ │ │ │ │ │ │ └── ext │ │ │ │ │ │ │ │ └── bson.o │ │ │ │ │ │ ├── binding.Makefile │ │ │ │ │ │ ├── bson.target.mk │ │ │ │ │ │ └── config.gypi │ │ │ │ │ ├── build_browser.js │ │ │ │ │ ├── builderror.log │ │ │ │ │ ├── ext │ │ │ │ │ │ ├── Makefile │ │ │ │ │ │ ├── bson.cc │ │ │ │ │ │ ├── bson.h │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── nan.h │ │ │ │ │ │ ├── win32 │ │ │ │ │ │ │ ├── ia32 │ │ │ │ │ │ │ │ └── bson.node │ │ │ │ │ │ │ └── x64 │ │ │ │ │ │ │ │ └── bson.node │ │ │ │ │ │ └── wscript │ │ │ │ │ ├── lib │ │ │ │ │ │ └── bson │ │ │ │ │ │ │ ├── binary.js │ │ │ │ │ │ │ ├── binary_parser.js │ │ │ │ │ │ │ ├── bson.js │ │ │ │ │ │ │ ├── code.js │ │ │ │ │ │ │ ├── db_ref.js │ │ │ │ │ │ │ ├── double.js │ │ │ │ │ │ │ ├── float_parser.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── long.js │ │ │ │ │ │ │ ├── max_key.js │ │ │ │ │ │ │ ├── min_key.js │ │ │ │ │ │ │ ├── objectid.js │ │ │ │ │ │ │ ├── symbol.js │ │ │ │ │ │ │ └── timestamp.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── tools │ │ │ │ │ │ ├── gleak.js │ │ │ │ │ │ └── jasmine-1.1.0 │ │ │ │ │ │ ├── MIT.LICENSE │ │ │ │ │ │ ├── jasmine-html.js │ │ │ │ │ │ ├── jasmine.css │ │ │ │ │ │ ├── jasmine.js │ │ │ │ │ │ └── jasmine_favicon.png │ │ │ │ └── kerberos │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── binding.gyp │ │ │ │ │ ├── build │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── Release │ │ │ │ │ │ ├── .deps │ │ │ │ │ │ │ └── Release │ │ │ │ │ │ │ │ ├── kerberos.node.d │ │ │ │ │ │ │ │ └── obj.target │ │ │ │ │ │ │ │ └── kerberos.node.d │ │ │ │ │ │ ├── kerberos.node │ │ │ │ │ │ ├── linker.lock │ │ │ │ │ │ └── obj.target │ │ │ │ │ │ │ └── kerberos.node │ │ │ │ │ ├── binding.Makefile │ │ │ │ │ ├── config.gypi │ │ │ │ │ └── kerberos.target.mk │ │ │ │ │ ├── builderror.log │ │ │ │ │ ├── index.js │ │ │ │ │ ├── lib │ │ │ │ │ ├── auth_processes │ │ │ │ │ │ └── mongodb.js │ │ │ │ │ ├── base64.c │ │ │ │ │ ├── base64.h │ │ │ │ │ ├── kerberos.cc │ │ │ │ │ ├── kerberos.h │ │ │ │ │ ├── kerberos.js │ │ │ │ │ ├── kerberos_context.cc │ │ │ │ │ ├── kerberos_context.h │ │ │ │ │ ├── kerberosgss.c │ │ │ │ │ ├── kerberosgss.h │ │ │ │ │ ├── sspi.js │ │ │ │ │ ├── win32 │ │ │ │ │ │ ├── base64.c │ │ │ │ │ │ ├── base64.h │ │ │ │ │ │ ├── kerberos.cc │ │ │ │ │ │ ├── kerberos.h │ │ │ │ │ │ ├── kerberos_sspi.c │ │ │ │ │ │ ├── kerberos_sspi.h │ │ │ │ │ │ ├── worker.cc │ │ │ │ │ │ ├── worker.h │ │ │ │ │ │ └── wrappers │ │ │ │ │ │ │ ├── security_buffer.cc │ │ │ │ │ │ │ ├── security_buffer.h │ │ │ │ │ │ │ ├── security_buffer.js │ │ │ │ │ │ │ ├── security_buffer_descriptor.cc │ │ │ │ │ │ │ ├── security_buffer_descriptor.h │ │ │ │ │ │ │ ├── security_buffer_descriptor.js │ │ │ │ │ │ │ ├── security_context.cc │ │ │ │ │ │ │ ├── security_context.h │ │ │ │ │ │ │ ├── security_context.js │ │ │ │ │ │ │ ├── security_credentials.cc │ │ │ │ │ │ │ ├── security_credentials.h │ │ │ │ │ │ │ └── security_credentials.js │ │ │ │ │ ├── worker.cc │ │ │ │ │ └── worker.h │ │ │ │ │ ├── package.json │ │ │ │ │ └── test │ │ │ │ │ ├── kerberos_tests.js │ │ │ │ │ ├── kerberos_win32_test.js │ │ │ │ │ └── win32 │ │ │ │ │ ├── security_buffer_descriptor_tests.js │ │ │ │ │ ├── security_buffer_tests.js │ │ │ │ │ └── security_credentials_tests.js │ │ │ ├── package.json │ │ │ └── t.js │ │ ├── mpath │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ └── index.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ └── index.js │ │ ├── mpromise │ │ │ ├── .idea │ │ │ │ ├── .name │ │ │ │ ├── codeStyleSettings.xml │ │ │ │ ├── encodings.xml │ │ │ │ ├── inspectionProfiles │ │ │ │ │ ├── Project_Default.xml │ │ │ │ │ └── profiles_settings.xml │ │ │ │ ├── jsLibraryMappings.xml │ │ │ │ ├── libraries │ │ │ │ │ └── Node_js_Dependencies_for_mpromise.xml │ │ │ │ ├── misc.xml │ │ │ │ ├── modules.xml │ │ │ │ ├── mpromise.iml │ │ │ │ ├── other.xml │ │ │ │ ├── scopes │ │ │ │ │ └── scope_settings.xml │ │ │ │ ├── vcs.xml │ │ │ │ └── workspace.xml │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ └── promise.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ ├── promise.domain.test.js │ │ │ │ ├── promise.test.js │ │ │ │ └── promises.Aplus.js │ │ ├── mquery │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── collection │ │ │ │ │ ├── collection.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── node.js │ │ │ │ ├── env.js │ │ │ │ ├── mquery.js │ │ │ │ ├── permissions.js │ │ │ │ └── utils.js │ │ │ ├── node_modules │ │ │ │ └── debug │ │ │ │ │ ├── Readme.md │ │ │ │ │ ├── debug.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── lib │ │ │ │ │ └── debug.js │ │ │ │ │ └── package.json │ │ │ ├── package.json │ │ │ └── test │ │ │ │ ├── collection │ │ │ │ ├── browser.js │ │ │ │ ├── mongo.js │ │ │ │ └── node.js │ │ │ │ ├── env.js │ │ │ │ ├── index.js │ │ │ │ ├── utils.js │ │ │ │ └── utils.test.js │ │ ├── ms │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── ms.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ ├── index.html │ │ │ │ ├── support │ │ │ │ └── jquery.js │ │ │ │ └── test.js │ │ ├── muri │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ └── index.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ └── index.js │ │ ├── regexp-clone │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ └── index.js │ │ └── sliced │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── bench.js │ │ │ ├── component.json │ │ │ ├── index.js │ │ │ ├── lib │ │ │ └── sliced.js │ │ │ ├── package.json │ │ │ └── test │ │ │ └── index.js │ ├── package.json │ ├── release-items.md │ ├── static.js │ └── website.js └── morgan │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── node_modules │ ├── basic-auth │ │ ├── Readme.md │ │ ├── index.js │ │ └── package.json │ ├── depd │ │ ├── History.md │ │ ├── LICENSE │ │ ├── Readme.md │ │ ├── index.js │ │ ├── lib │ │ │ └── compat │ │ │ │ ├── buffer-concat.js │ │ │ │ ├── callsite-tostring.js │ │ │ │ └── index.js │ │ └── package.json │ └── on-finished │ │ ├── HISTORY.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.js │ │ ├── node_modules │ │ └── ee-first │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ └── package.json │ └── package.json ├── package.json └── server.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .c9 4 | .tmp 5 | .sass-cache 6 | bower_components 7 | lib-cov 8 | *.seed 9 | *.log 10 | *.csv 11 | *.dat 12 | *.out 13 | *.pid 14 | *.gz 15 | *.idea 16 | *.idea/ 17 | .idea/ 18 | .bower-cache/* 19 | .bower-registry/* 20 | public/bower/* 21 | config/runtime.json 22 | pids 23 | logs 24 | results 25 | npm-debug.log 26 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | angular-restful-auth -------------------------------------------------------------------------------- /.idea/angular-restful-auth.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node server.js -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | token-based-auth-backend 2 | ======================== 3 | 4 | Token Based Authentication Backend Project Written in NodeJS 5 | -------------------------------------------------------------------------------- /app/lib/ngStorage.js: -------------------------------------------------------------------------------- 1 | /*! ngStorage 0.3.0 | Copyright (c) 2013 Gias Kay Lee | MIT License */"use strict";!function(){function a(a){return["$rootScope","$window",function(b,c){for(var d,e,f,g=c[a]||(console.warn("This browser does not support Web Storage!"),{}),h={$default:function(a){for(var b in a)angular.isDefined(h[b])||(h[b]=a[b]);return h},$reset:function(a){for(var b in h)"$"===b[0]||delete h[b];return h.$default(a)}},i=0;i 2 | 3 | 4 | 5 | Restful Authentication System with AngularJS & NodeJS Example 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/partials/me.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{myDetails.data.email}} 4 | {{myDetails.data.password}} 5 | 6 | -------------------------------------------------------------------------------- /app/partials/signin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Email 6 | 7 | 8 | 9 | 10 | 11 | Password 12 | 13 | 14 | 15 | 16 | 17 | 18 | Sign in 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/partials/signup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Email 6 | 7 | 8 | 9 | 10 | 11 | Password 12 | 13 | 14 | 15 | 16 | 17 | 18 | Sign up 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /client.js: -------------------------------------------------------------------------------- 1 | // Required Modules 2 | var express = require("express"); 3 | var morgan = require("morgan"); 4 | var app = express(); 5 | 6 | var port = process.env.PORT || 3000; 7 | 8 | app.use(morgan("dev")); 9 | app.use(express.static("./app")); 10 | 11 | app.get("/", function(req, res) { 12 | res.sendFile("./app/index.html"); 13 | }); 14 | 15 | // Start Server 16 | app.listen(port, function () { 17 | console.log( "Express server listening on port " + port); 18 | }); -------------------------------------------------------------------------------- /models/User.js: -------------------------------------------------------------------------------- 1 | var mongoose = require('mongoose'); 2 | var Schema = mongoose.Schema; 3 | 4 | var UserSchema = new Schema({ 5 | email: String, 6 | password: String, 7 | token: String 8 | }); 9 | 10 | module.exports = mongoose.model('User', UserSchema); -------------------------------------------------------------------------------- /node_modules/body-parser/.npmignore: -------------------------------------------------------------------------------- 1 | test/ -------------------------------------------------------------------------------- /node_modules/body-parser/.travis.yml: -------------------------------------------------------------------------------- 1 | node_js: 2 | - "0.10" 3 | language: node_js -------------------------------------------------------------------------------- /node_modules/body-parser/HISTORY.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.1 / 2014-04-14 3 | ================== 4 | 5 | * use `type-is` module 6 | 7 | 1.0.1 / 2014-03-20 8 | ================== 9 | 10 | * lower default limits to 100kb 11 | -------------------------------------------------------------------------------- /node_modules/body-parser/Makefile: -------------------------------------------------------------------------------- 1 | BIN = ./node_modules/.bin/ 2 | 3 | test: 4 | @$(BIN)mocha \ 5 | --require should \ 6 | --reporter spec \ 7 | --bail 8 | 9 | .PHONY: test -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/body-parser/node_modules/raw-body/.npmignore: -------------------------------------------------------------------------------- 1 | coverage/ 2 | test/ 3 | .travis.yml 4 | -------------------------------------------------------------------------------- /node_modules/body-parser/node_modules/raw-body/node_modules/bytes/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /node_modules/body-parser/node_modules/raw-body/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 | -------------------------------------------------------------------------------- /node_modules/body-parser/node_modules/raw-body/node_modules/bytes/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --reporter spec \ 5 | --require should 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /node_modules/body-parser/node_modules/raw-body/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 | -------------------------------------------------------------------------------- /node_modules/body-parser/node_modules/raw-body/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 | -------------------------------------------------------------------------------- /node_modules/body-parser/node_modules/raw-body/node_modules/string_decoder/.npmignore: -------------------------------------------------------------------------------- 1 | build 2 | test 3 | -------------------------------------------------------------------------------- /node_modules/body-parser/node_modules/raw-body/node_modules/string_decoder/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Joyent, Inc. and other Node contributors. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | 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 permit 8 | persons to whom the Software is furnished to do so, subject to the 9 | following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 17 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 18 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 19 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 20 | USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /node_modules/body-parser/node_modules/raw-body/node_modules/string_decoder/README.md: -------------------------------------------------------------------------------- 1 | **string_decoder.js** (`require('string_decoder')`) from Node.js core 2 | 3 | Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. 4 | 5 | Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** 6 | 7 | The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. -------------------------------------------------------------------------------- /node_modules/body-parser/node_modules/type-is/.npmignore: -------------------------------------------------------------------------------- 1 | test.js -------------------------------------------------------------------------------- /node_modules/body-parser/node_modules/type-is/.travis.yml: -------------------------------------------------------------------------------- 1 | node_js: 2 | - "0.10" 3 | - "0.11" 4 | language: node_js -------------------------------------------------------------------------------- /node_modules/body-parser/node_modules/type-is/HISTORY.md: -------------------------------------------------------------------------------- 1 | 2 | 1.1.0 / 2014-04-12 3 | ================== 4 | 5 | * add non-array values support 6 | * expose internal utilities: 7 | 8 | - `.is()` 9 | - `.hasBody()` 10 | - `.normalize()` 11 | - `.match()` 12 | 13 | 1.0.1 / 2014-03-30 14 | ================== 15 | 16 | * add `multipart` as a shorthand 17 | -------------------------------------------------------------------------------- /node_modules/body-parser/node_modules/type-is/node_modules/mime/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Benjamin Thomas, Robert Kieffer 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/express-jwt/.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/* 3 | -------------------------------------------------------------------------------- /node_modules/express-jwt/.travis.yml: -------------------------------------------------------------------------------- 1 | language: "node_js" 2 | node_js: 3 | - "0.8" 4 | - "0.10" -------------------------------------------------------------------------------- /node_modules/express-jwt/lib/errors/UnauthorizedError.js: -------------------------------------------------------------------------------- 1 | function UnauthorizedError (code, error) { 2 | Error.call(this, error.message); 3 | this.name = "UnauthorizedError"; 4 | this.message = error.message; 5 | this.code = code; 6 | this.status = 401; 7 | this.inner = error; 8 | } 9 | 10 | UnauthorizedError.prototype = Object.create(Error.prototype); 11 | UnauthorizedError.prototype.constructor = UnauthorizedError; 12 | 13 | module.exports = UnauthorizedError; 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = require('./lib/express'); 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/lib/middleware/query.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | 5 | var parseUrl = require('parseurl'); 6 | var qs = require('qs'); 7 | 8 | /** 9 | * @param {Object} options 10 | * @return {Function} 11 | * @api public 12 | */ 13 | 14 | module.exports = function query(options) { 15 | var queryparse = qs.parse; 16 | 17 | if (typeof options === 'function') { 18 | queryparse = options; 19 | options = undefined; 20 | } 21 | 22 | return function query(req, res, next){ 23 | if (!req.query) { 24 | var val = parseUrl(req).query; 25 | req.query = queryparse(val, options); 26 | } 27 | 28 | next(); 29 | }; 30 | }; 31 | -------------------------------------------------------------------------------- /node_modules/express/lib/router/match.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Expose `Layer`. 4 | */ 5 | 6 | module.exports = Match; 7 | 8 | function Match(layer, path, params) { 9 | this.layer = layer; 10 | this.params = {}; 11 | this.path = path || ''; 12 | 13 | if (!params) { 14 | return this; 15 | } 16 | 17 | var keys = layer.keys; 18 | var n = 0; 19 | var prop; 20 | var key; 21 | var val; 22 | 23 | for (var i = 0; i < params.length; i++) { 24 | key = keys[i]; 25 | val = decode_param(params[i]); 26 | prop = key 27 | ? key.name 28 | : n++; 29 | 30 | this.params[prop] = val; 31 | } 32 | 33 | return this; 34 | }; 35 | 36 | /** 37 | * Decode param value. 38 | * 39 | * @param {string} val 40 | * @return {string} 41 | * @api private 42 | */ 43 | 44 | function decode_param(val){ 45 | if (typeof val !== 'string') { 46 | return val; 47 | } 48 | 49 | try { 50 | return decodeURIComponent(val); 51 | } catch (e) { 52 | var err = new TypeError("Failed to decode param '" + val + "'"); 53 | err.status = 400; 54 | throw err; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md: -------------------------------------------------------------------------------- 1 | 2.0.1 / 2014-09-07 2 | ================== 3 | 4 | * Support Node.js 0.6 5 | 6 | 2.0.0 / 2014-09-02 7 | ================== 8 | 9 | * Use `mime-db` 10 | * Remove `.define()` 11 | 12 | 1.0.2 / 2014-08-04 13 | ================== 14 | 15 | * Set charset=utf-8 for `text/javascript` 16 | 17 | 1.0.1 / 2014-06-24 18 | ================== 19 | 20 | * Add `text/jsx` type 21 | 22 | 1.0.0 / 2014-05-12 23 | ================== 24 | 25 | * Return `false` for unknown types 26 | * Set charset=utf-8 for `application/json` 27 | 28 | 0.1.0 / 2014-05-02 29 | ================== 30 | 31 | * Initial release 32 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * mime-db 3 | * Copyright(c) 2014 Jonathan Ong 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module exports. 9 | */ 10 | 11 | module.exports = require('./db.json') 12 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/accepts/node_modules/negotiator/.npmignore: -------------------------------------------------------------------------------- 1 | examples 2 | test 3 | .travis.yml 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/cookie-signature/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /node_modules/express/node_modules/cookie/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | .travis.yml 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/debug/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "laxbreak": true 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/debug/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "repo": "visionmedia/debug", 4 | "description": "small debugging utility", 5 | "version": "2.0.0", 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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/debug/node_modules/ms/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | test 3 | History.md 4 | Makefile 5 | component.json 6 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/depd/lib/compat/buffer-concat.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2014 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module exports. 9 | */ 10 | 11 | module.exports = bufferConcat 12 | 13 | /** 14 | * Concatenate an array of Buffers. 15 | */ 16 | 17 | function bufferConcat(bufs) { 18 | var length = 0 19 | 20 | for (var i = 0, len = bufs.length; i < len; i++) { 21 | length += bufs[i].length 22 | } 23 | 24 | var buf = new Buffer(length) 25 | var pos = 0 26 | 27 | for (var i = 0, len = bufs.length; i < len; i++) { 28 | bufs[i].copy(buf, pos) 29 | pos += bufs[i].length 30 | } 31 | 32 | return buf 33 | } 34 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/escape-html/.npmignore: -------------------------------------------------------------------------------- 1 | components 2 | build 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/etag/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.3.1 / 2014-09-14 2 | ================== 3 | 4 | * Use the (new and improved) `crc` for crc32 5 | 6 | 1.3.0 / 2014-08-29 7 | ================== 8 | 9 | * Default strings to strong ETags 10 | * Improve speed for weak ETags over 1KB 11 | 12 | 1.2.1 / 2014-08-29 13 | ================== 14 | 15 | * Use the (much faster) `buffer-crc32` for crc32 16 | 17 | 1.2.0 / 2014-08-24 18 | ================== 19 | 20 | * Add support for file stat objects 21 | 22 | 1.1.0 / 2014-08-24 23 | ================== 24 | 25 | * Add fast-path for empty entity 26 | * Add weak ETag generation 27 | * Shrink size of generated ETags 28 | 29 | 1.0.1 / 2014-08-24 30 | ================== 31 | 32 | * Fix behavior of string containing Unicode 33 | 34 | 1.0.0 / 2014-05-18 35 | ================== 36 | 37 | * Initial release 38 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/etag/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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/etag/node_modules/crc/.npmignore: -------------------------------------------------------------------------------- 1 | benchmark 2 | src 3 | test 4 | .travis.yml 5 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/etag/node_modules/crc/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright 2014 Alex Gorbatchev 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 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/etag/node_modules/crc/lib/crc1.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.7.1 2 | var Buffer, create; 3 | 4 | Buffer = require('buffer').Buffer; 5 | 6 | create = require('./create'); 7 | 8 | module.exports = create(function(buf, previous) { 9 | var accum, byte, crc, _i, _len; 10 | if (!Buffer.isBuffer(buf)) { 11 | buf = Buffer(buf); 12 | } 13 | crc = ~~previous; 14 | accum = 0; 15 | for (_i = 0, _len = buf.length; _i < _len; _i++) { 16 | byte = buf[_i]; 17 | accum += byte; 18 | } 19 | crc += accum % 256; 20 | return crc % 256; 21 | }); 22 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/etag/node_modules/crc/lib/create.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.7.1 2 | module.exports = function(calc) { 3 | var fn; 4 | fn = function(buf, previous) { 5 | return calc(buf, previous) >>> 0; 6 | }; 7 | fn.signed = calc; 8 | fn.unsigned = fn; 9 | return fn; 10 | }; 11 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/etag/node_modules/crc/lib/hex.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.7.1 2 | module.exports = function(number) { 3 | var result; 4 | result = number.toString(16); 5 | while (result.length % 2) { 6 | result = "0" + result; 7 | } 8 | return result; 9 | }; 10 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/etag/node_modules/crc/lib/index.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.7.1 2 | module.exports = { 3 | crc1: require('./crc1'), 4 | crc8: require('./crc8'), 5 | crc81wire: require('./crc8_1wire'), 6 | crc16: require('./crc16'), 7 | crc16ccitt: require('./crc16_ccitt'), 8 | crc16modbus: require('./crc16_modbus'), 9 | crc24: require('./crc24'), 10 | crc32: require('./crc32') 11 | }; 12 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/finalhandler/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.2.0 / 2014-09-03 2 | ================== 3 | 4 | * Set `X-Content-Type-Options: nosniff` header 5 | * deps: debug@~2.0.0 6 | 7 | 0.1.0 / 2014-07-16 8 | ================== 9 | 10 | * Respond after request fully read 11 | - prevents hung responses and socket hang ups 12 | * deps: debug@1.0.4 13 | 14 | 0.0.3 / 2014-07-11 15 | ================== 16 | 17 | * deps: debug@1.0.3 18 | - Add support for multiple wildcards in namespaces 19 | 20 | 0.0.2 / 2014-06-19 21 | ================== 22 | 23 | * Handle invalid status codes 24 | 25 | 0.0.1 / 2014-06-05 26 | ================== 27 | 28 | * deps: debug@1.0.2 29 | 30 | 0.0.0 / 2014-06-05 31 | ================== 32 | 33 | * Extracted from connect/express 34 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/finalhandler/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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/fresh/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.2.4 / 2014-09-07 2 | ================== 3 | 4 | * Support Node.js 0.6 5 | 6 | 0.2.3 / 2014-09-07 7 | ================== 8 | 9 | * Move repository to jshttp 10 | 11 | 0.2.2 / 2014-02-19 12 | ================== 13 | 14 | * Revert "Fix for blank page on Safari reload" 15 | 16 | 0.2.1 / 2014-01-29 17 | ================== 18 | 19 | * fix: support max-age=0 for end-to-end revalidation 20 | 21 | 0.2.0 / 2013-08-11 22 | ================== 23 | 24 | * fix: return false for no-cache 25 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/fresh/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012 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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/media-typer/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.3.0 / 2014-09-07 2 | ================== 3 | 4 | * Support Node.js 0.6 5 | * Throw error when parameter format invalid on parse 6 | 7 | 0.2.0 / 2014-06-18 8 | ================== 9 | 10 | * Add `typer.format()` to format media types 11 | 12 | 0.1.0 / 2014-06-17 13 | ================== 14 | 15 | * Accept `req` as argument to `parse` 16 | * Accept `res` as argument to `parse` 17 | * Parse media type with extra LWS between type and first parameter 18 | 19 | 0.0.0 / 2014-06-13 20 | ================== 21 | 22 | * Initial implementation 23 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/media-typer/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 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /node_modules/express/node_modules/methods/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/methods/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | # Methods 3 | 4 | HTTP verbs that node core's parser supports. 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/on-finished/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2013 Jonathan Ong 4 | Copyright (c) 2014 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/on-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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/parseurl/.npmignore: -------------------------------------------------------------------------------- 1 | benchmark/ 2 | coverage/ 3 | test/ 4 | .travis.yml 5 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/parseurl/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.3.0 / 2014-08-09 2 | ================== 3 | 4 | * Add `parseurl.original` for parsing `req.originalUrl` with fallback 5 | * Return `undefined` if `req.url` is `undefined` 6 | 7 | 1.2.0 / 2014-07-21 8 | ================== 9 | 10 | * Cache URLs based on original value 11 | * Remove no-longer-needed URL mis-parse work-around 12 | * Simplify the "fast-path" `RegExp` 13 | 14 | 1.1.3 / 2014-07-08 15 | ================== 16 | 17 | * Fix typo 18 | 19 | 1.1.2 / 2014-07-08 20 | ================== 21 | 22 | * Seriously fix Node.js 0.8 compatibility 23 | 24 | 1.1.1 / 2014-07-08 25 | ================== 26 | 27 | * Fix Node.js 0.8 compatibility 28 | 29 | 1.1.0 / 2014-07-08 30 | ================== 31 | 32 | * Incorporate URL href-only parse fast-path 33 | 34 | 1.0.1 / 2014-03-08 35 | ================== 36 | 37 | * Add missing `require` 38 | 39 | 1.0.0 / 2014-03-08 40 | ================== 41 | 42 | * Genesis from `connect` 43 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/parseurl/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | (The MIT License) 3 | 4 | Copyright (c) 2014 Jonathan Ong 5 | Copyright (c) 2014 Douglas Christopher Wilson 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | 'Software'), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/path-to-regexp/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/proxy-addr/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.2 / 2014-09-18 2 | ================== 3 | 4 | * Fix a global leak when multiple subnets are trusted 5 | * Support Node.js 0.6 6 | * deps: ipaddr.js@0.1.3 7 | 8 | 1.0.1 / 2014-06-03 9 | ================== 10 | 11 | * Fix links in npm package 12 | 13 | 1.0.0 / 2014-05-08 14 | ================== 15 | 16 | * Add `trust` argument to determine proxy trust on 17 | * Accepts custom function 18 | * Accepts IPv4/IPv6 address(es) 19 | * Accepts subnets 20 | * Accepts pre-defined names 21 | * Add optional `trust` argument to `proxyaddr.all` to 22 | stop at first untrusted 23 | * Add `proxyaddr.compile` to pre-compile `trust` function 24 | to make subsequent calls faster 25 | 26 | 0.0.1 / 2014-05-04 27 | ================== 28 | 29 | * Fix bad npm publish 30 | 31 | 0.0.0 / 2014-05-04 32 | ================== 33 | 34 | * Initial release 35 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/.jshintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | 4 | "curly": true, 5 | "latedef": true, 6 | "quotmark": true, 7 | "undef": true, 8 | "unused": true, 9 | "trailing": true 10 | } 11 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/.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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - 0.10 -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md). 2 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/Makefile: -------------------------------------------------------------------------------- 1 | test: 2 | @node node_modules/lab/bin/lab 3 | test-cov: 4 | @node node_modules/lab/bin/lab -t 100 5 | test-cov-html: 6 | @node node_modules/lab/bin/lab -r html -o coverage.html 7 | 8 | .PHONY: test test-cov test-cov-html -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib'); 2 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/lib/index.js: -------------------------------------------------------------------------------- 1 | // Load modules 2 | 3 | var Stringify = require('./stringify'); 4 | var Parse = require('./parse'); 5 | 6 | 7 | // Declare internals 8 | 9 | var internals = {}; 10 | 11 | 12 | module.exports = { 13 | stringify: Stringify, 14 | parse: Parse 15 | }; 16 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/range-parser/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.2 / 2014-09-08 2 | ================== 3 | 4 | * Support Node.js 0.6 5 | 6 | 1.0.1 / 2014-09-07 7 | ================== 8 | 9 | * Move repository to jshttp 10 | 11 | 1.0.0 / 2013-12-11 12 | ================== 13 | 14 | * Add repository to package.json 15 | * Add MIT license 16 | 17 | 0.0.4 / 2012-06-17 18 | ================== 19 | 20 | * Change ret -1 for unsatisfiable and -2 when invalid 21 | 22 | 0.0.3 / 2012-06-17 23 | ================== 24 | 25 | * Fix last-byte-pos default to len - 1 26 | 27 | 0.0.2 / 2012-06-14 28 | ================== 29 | 30 | * Add `.type` 31 | 32 | 0.0.1 / 2012-06-11 33 | ================== 34 | 35 | * Initial release 36 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/range-parser/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012-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 | -------------------------------------------------------------------------------- /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 | }; 50 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012 TJ Holowaychuk 4 | Copyright (c) 2014 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/node_modules/destroy/index.js: -------------------------------------------------------------------------------- 1 | var ReadStream = require('fs').ReadStream 2 | var Stream = require('stream') 3 | 4 | module.exports = function destroy(stream) { 5 | if (stream instanceof ReadStream) { 6 | return destroyReadStream(stream) 7 | } 8 | 9 | if (!(stream instanceof Stream)) { 10 | return stream 11 | } 12 | 13 | if (typeof stream.destroy === 'function') { 14 | stream.destroy() 15 | } 16 | 17 | return stream 18 | } 19 | 20 | function destroyReadStream(stream) { 21 | stream.destroy() 22 | 23 | if (typeof stream.close === 'function') { 24 | // node.js core bug work-around 25 | stream.on('open', onopenClose) 26 | } 27 | 28 | return stream 29 | } 30 | 31 | function onopenClose() { 32 | if (typeof this.fd === 'number') { 33 | // actually close down the fd 34 | this.close() 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/node_modules/ms/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | test 3 | History.md 4 | Makefile 5 | component.json 6 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/type-is/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md: -------------------------------------------------------------------------------- 1 | 2.0.1 / 2014-09-07 2 | ================== 3 | 4 | * Support Node.js 0.6 5 | 6 | 2.0.0 / 2014-09-02 7 | ================== 8 | 9 | * Use `mime-db` 10 | * Remove `.define()` 11 | 12 | 1.0.2 / 2014-08-04 13 | ================== 14 | 15 | * Set charset=utf-8 for `text/javascript` 16 | 17 | 1.0.1 / 2014-06-24 18 | ================== 19 | 20 | * Add `text/jsx` type 21 | 22 | 1.0.0 / 2014-05-12 23 | ================== 24 | 25 | * Return `false` for unknown types 26 | * Set charset=utf-8 for `application/json` 27 | 28 | 0.1.0 / 2014-05-02 29 | ================== 30 | 31 | * Initial release 32 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * mime-db 3 | * Copyright(c) 2014 Jonathan Ong 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module exports. 9 | */ 10 | 11 | module.exports = require('./db.json') 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/vary/.npmignore: -------------------------------------------------------------------------------- 1 | coverage/ 2 | test/ 3 | .travis.yml 4 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/vary/History.md: -------------------------------------------------------------------------------- 1 | 1.0.0 / 2014-08-10 2 | ================== 3 | 4 | * Accept valid `Vary` header string as `field` 5 | * Add `vary.append` for low-level string manipulation 6 | * Move to `jshttp` orgainzation 7 | 8 | 0.1.0 / 2014-06-05 9 | ================== 10 | 11 | * Support array of fields to set 12 | 13 | 0.0.0 / 2014-06-04 14 | ================== 15 | 16 | * Initial release 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - 0.10 -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Auth0, Inc. 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 | -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/node_modules/jws/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "freeze": true, 3 | "latedef": "nofunc", 4 | "undef": true, 5 | "unused": true, 6 | "trailing": true, 7 | "immed": true, 8 | "predef": ["console", "require", "__dirname"], 9 | "esnext": true, 10 | "lastsemic": true 11 | } 12 | -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/node_modules/jws/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | /test/keys 3 | /test/*.pem 4 | -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/node_modules/jws/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.10 4 | -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/node_modules/jws/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 | -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/node_modules/jws/node_modules/base64url/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/node_modules/jws/node_modules/base64url/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/node_modules/jws/node_modules/base64url/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Brian J. Brennan 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | 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 included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/node_modules/jws/node_modules/base64url/test/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/jsonwebtoken/node_modules/jws/node_modules/base64url/test/test.jpg -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | test/*.pem 3 | test/keys -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | notifications: 5 | email: 6 | recipients: 7 | - brianloveswords@gmail.com -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/node_modules/jws/test/data.txt: -------------------------------------------------------------------------------- 1 | one, two, three 2 | -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/test/invalid_pub.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDJjCCAg6gAwIBAgIJAMyz3mSPlaW4MA0GCSqGSIb3DQEBBQUAMBYxFDASBgNV 3 | BAMUCyouYXV0aDAuY29tMB4XDTEzMDQxODE3MDE1MFoXDTI2MTIyNjE3MDE1MFow 4 | FjEUMBIGA1UEAxQLKi5hdXRoMC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw 5 | ggEKAoIBAQDZq1Ua0/BGm+TaBFoftKWeYMWrQG9Fx3g7ikErxljmyOvlwqkiat3q 6 | ixX+Dxw9TFb5gbBjNJ+L3nt4YefJgLsYvsHqkOUxWsB+HM/ulJRVnVrZm1tI3Nbg 7 | xO1BQ7DrGfBpq2KCxtQCaQFRlQJw1+qS5LwrdIvihB7Kc142VElCFFHJ6+09eMUy 8 | jy00Z5pfQr4Am6W6eEOS9ObDbNs4XgKOcWe5khWXj3UStou+VgbAg40XcYht2IbY 9 | gMfKF+VUZOy3+e+aRTqPOBU3MAeb0tvCCPUQJbNAUHgSKVhAvNf8mRwttVsOLT70 10 | anjjeCOd7RKS8fVKBwc2KtgNkghYdPY9AgMBAAGjdzB1MB0GA1UdDgQWBBSi4+X0 11 | +MvCKDdd375mDhx/ZBbJ4DBGBgNVHSMEPzA9gBSi4+X0+MvCKDdd375mDhx/ZBbJ 12 | 4KEapBgwFjEUMBIGA1UEAxQLKi5hdXRoMC5jb22CCQDMs95kj5WluDAMBgNVHRME 13 | BTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQBi0qPe0DzlPSufq+Gdk2Fwf1pGEtjA 14 | D34IxxJ9SX6r1DS/NIP7IOLUnNU8cP8BQWl7i413v29jJsNV457pjdmqf8J7OE9O 15 | eF5Yz1x91gY/27561Iga/TQeIVOlFQAgx66eLfUFFoAig3hz2srZo5TzYBixMJsS 16 | fYMXHPiU7KoLUqYXvpSXIllstQCu51KCC6t9H7wZ92lTES1v76hFY4edQ30sftPo 17 | kjAYWGEhMjPo/r4THcdSMqKXoRtCGEun4pTXid7MJcTgdGDrAJddLWi6SxKecEVB 18 | MhMu4XfUCdxCwqQPjHeJ+zE49A1CUdBB2FN3BNLbmTTwEBgmuwyGRzhj 19 | -----END CERTIFICATE----- 20 | -------------------------------------------------------------------------------- /node_modules/jsonwebtoken/test/jwt.hs.tests.js: -------------------------------------------------------------------------------- 1 | var jwt = require('../index'); 2 | 3 | var expect = require('chai').expect; 4 | var assert = require('chai').assert; 5 | 6 | describe('HS256', function() { 7 | 8 | describe('when signing a token', function() { 9 | var secret = 'shhhhhh'; 10 | 11 | var token = jwt.sign({ foo: 'bar' }, secret, { algorithm: 'HS256' }); 12 | 13 | it('should be syntactically valid', function() { 14 | expect(token).to.be.a('string'); 15 | expect(token.split('.')).to.have.length(3); 16 | }); 17 | 18 | it('should validate with secret', function(done) { 19 | jwt.verify(token, secret, function(err, decoded) { 20 | assert.ok(decoded.foo); 21 | assert.equal('bar', decoded.foo); 22 | done(); 23 | }); 24 | }); 25 | 26 | it('should throw with invalid secret', function(done) { 27 | jwt.verify(token, 'invalid secret', function(err, decoded) { 28 | assert.isUndefined(decoded); 29 | assert.isNotNull(err); 30 | done(); 31 | }); 32 | }); 33 | 34 | }); 35 | }); -------------------------------------------------------------------------------- /node_modules/mongoose/.npmignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | **.swp 3 | *.sw* 4 | *.orig 5 | .DS_Store 6 | node_modules/ 7 | benchmarks/ 8 | docs/ 9 | test/ 10 | Makefile 11 | CNAME 12 | index.html 13 | index.jade 14 | -------------------------------------------------------------------------------- /node_modules/mongoose/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - 0.10 5 | services: 6 | - mongodb 7 | -------------------------------------------------------------------------------- /node_modules/mongoose/contRun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | make test 4 | 5 | ret=$? 6 | 7 | while [ $ret == 0 ]; do 8 | make test 9 | ret=$? 10 | done 11 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/README.md: -------------------------------------------------------------------------------- 1 | This directory contains runnable sample mongoose programs. 2 | 3 | To run: 4 | 5 | - first install [Node.js](http://nodejs.org/) 6 | - from the root of the project, execute `npm install -d` 7 | - in the example directory, run `npm install -d` 8 | - from the command line, execute: `node example.js`, replacing "example.js" with the name of a program. 9 | 10 | 11 | Goal is to show: 12 | 13 | - ~~global schemas~~ 14 | - ~~GeoJSON schemas / use (with crs)~~ 15 | - text search (once MongoDB removes the "Experimental/beta" label) 16 | - ~~lean queries~~ 17 | - ~~statics~~ 18 | - methods and statics on subdocs 19 | - custom types 20 | - ~~querybuilder~~ 21 | - ~~promises~~ 22 | - accessing driver collection, db 23 | - ~~connecting to replica sets~~ 24 | - connecting to sharded clusters 25 | - enabling a fail fast mode 26 | - on the fly schemas 27 | - storing files 28 | - ~~map reduce~~ 29 | - ~~aggregation~~ 30 | - advanced hooks 31 | - using $elemMatch to return a subset of an array 32 | - query casting 33 | - upserts 34 | - pagination 35 | - express + mongoose session handling 36 | - ~~group by (use aggregation)~~ 37 | - authentication 38 | - schema migration techniques 39 | - converting documents to plain objects (show transforms) 40 | - how to $unset 41 | 42 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/aggregate/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aggregate-example", 3 | "private": "true", 4 | "version": "0.0.0", 5 | "description": "deps for aggregate example", 6 | "main": "aggregate.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "dependencies": { "async": "*" }, 11 | "repository": "", 12 | "author": "", 13 | "license": "BSD" 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/aggregate/person.js: -------------------------------------------------------------------------------- 1 | 2 | // import the necessary modules 3 | var mongoose = require('../../lib'); 4 | var Schema = mongoose.Schema; 5 | 6 | // create an export function to encapsulate the model creation 7 | module.exports = function() { 8 | // define schema 9 | var PersonSchema = new Schema({ 10 | name : String, 11 | age : Number, 12 | birthday : Date, 13 | gender: String, 14 | likes: [String] 15 | }); 16 | mongoose.model('Person', PersonSchema); 17 | }; 18 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/express/README.md: -------------------------------------------------------------------------------- 1 | Mongoose + Express examples 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/express/connection-sharing/README.md: -------------------------------------------------------------------------------- 1 | 2 | To run: 3 | 4 | - Execute `npm install` from this directory 5 | - Execute `node app.js` 6 | - Navigate to `localhost:8000` 7 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/express/connection-sharing/app.js: -------------------------------------------------------------------------------- 1 | 2 | var express = require('express') 3 | var mongoose = require('../../../lib') 4 | 5 | var uri = 'mongodb://localhost/mongoose-shared-connection'; 6 | global.db = mongoose.createConnection(uri); 7 | 8 | var routes = require('./routes') 9 | 10 | var app = express(); 11 | app.get('/', routes.home); 12 | app.get('/insert', routes.insert); 13 | app.get('/name', routes.modelName); 14 | 15 | app.listen(8000, function () { 16 | console.log('listening on http://localhost:8000'); 17 | }) 18 | 19 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/express/connection-sharing/modelA.js: -------------------------------------------------------------------------------- 1 | 2 | var Schema = require('../../../lib').Schema; 3 | var mySchema = Schema({ name: String }); 4 | 5 | // db is global 6 | module.exports = db.model('MyModel', mySchema); 7 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/express/connection-sharing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "connection-sharing", 3 | "private": "true", 4 | "version": "0.0.0", 5 | "description": "ERROR: No README.md file found!", 6 | "main": "app.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "dependencies": { "express": "3.1.1" }, 11 | "repository": "", 12 | "author": "", 13 | "license": "BSD" 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/express/connection-sharing/routes.js: -------------------------------------------------------------------------------- 1 | 2 | var model = require('./modelA') 3 | 4 | exports.home = function (req, res, next) { 5 | model.find(function (err, docs) { 6 | if (err) return next(err); 7 | res.send(docs); 8 | }) 9 | } 10 | 11 | exports.modelName = function (req, res) { 12 | res.send('my model name is ' + model.modelName); 13 | } 14 | 15 | exports.insert = function (req, res, next) { 16 | model.create({ name: 'inserting ' + Date.now() }, function (err, doc) { 17 | if (err) return next(err); 18 | res.send(doc); 19 | }) 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/geospatial/geoJSONSchema.js: -------------------------------------------------------------------------------- 1 | 2 | // import the necessary modules 3 | var mongoose = require('../../lib'); 4 | var Schema = mongoose.Schema; 5 | 6 | // create an export function to encapsulate the model creation 7 | module.exports = function() { 8 | // define schema 9 | // NOTE : This object must conform *precisely* to the geoJSON specification 10 | // you cannot embed a geoJSON doc inside a model or anything like that- IT 11 | // MUST BE VANILLA 12 | var LocationObject = new Schema({ 13 | loc: { 14 | type: { type: String }, 15 | coordinates: [] 16 | } 17 | }); 18 | // define the index 19 | LocationObject.index({ loc : '2dsphere' }); 20 | 21 | mongoose.model('Location', LocationObject); 22 | }; 23 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/geospatial/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "geospatial-example", 3 | "private": "true", 4 | "version": "0.0.0", 5 | "description": "deps for geospatial example", 6 | "main": "geospatial.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "dependencies": { "async": "*" }, 11 | "repository": "", 12 | "author": "", 13 | "license": "BSD" 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/geospatial/person.js: -------------------------------------------------------------------------------- 1 | 2 | // import the necessary modules 3 | var mongoose = require('../../lib'); 4 | var Schema = mongoose.Schema; 5 | 6 | // create an export function to encapsulate the model creation 7 | module.exports = function() { 8 | // define schema 9 | var PersonSchema = new Schema({ 10 | name : String, 11 | age : Number, 12 | birthday : Date, 13 | gender: String, 14 | likes: [String], 15 | // define the geospatial field 16 | loc: { type : [Number], index: '2d' } 17 | }); 18 | 19 | // define a method to find the closest person 20 | PersonSchema.methods.findClosest = function(cb) { 21 | return this.model('Person').find({ 22 | loc : { $nearSphere : this.loc }, 23 | name : { $ne : this.name } 24 | }).limit(1).exec(cb); 25 | }; 26 | 27 | mongoose.model('Person', PersonSchema); 28 | }; 29 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/globalschemas/gs_example.js: -------------------------------------------------------------------------------- 1 | 2 | var mongoose = require('../../lib'); 3 | 4 | 5 | // import the global schema, this can be done in any file that needs the model 6 | require('./person.js')(); 7 | 8 | // grab the person model object 9 | var Person = mongoose.model("Person"); 10 | 11 | // connect to a server to do a quick write / read example 12 | 13 | mongoose.connect('mongodb://localhost/persons', function(err) { 14 | if (err) throw err; 15 | 16 | Person.create({ 17 | name : 'bill', 18 | age : 25, 19 | birthday : new Date().setFullYear((new Date().getFullYear() - 25)) 20 | }, function (err, bill) { 21 | if (err) throw err; 22 | console.log("People added to db: %s", bill.toString()); 23 | Person.find({}, function(err, people) { 24 | if (err) throw err; 25 | 26 | people.forEach(function(person) { 27 | console.log("People in the db: %s", person.toString()); 28 | }); 29 | 30 | // make sure to clean things up after we're done 31 | setTimeout(function () { cleanup(); }, 2000); 32 | }); 33 | }); 34 | }); 35 | 36 | function cleanup() { 37 | Person.remove(function() { 38 | mongoose.disconnect(); 39 | }); 40 | } 41 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/globalschemas/person.js: -------------------------------------------------------------------------------- 1 | 2 | // import the necessary modules 3 | var mongoose = require('../../lib'); 4 | var Schema = mongoose.Schema; 5 | 6 | // create an export function to encapsulate the model creation 7 | module.exports = function() { 8 | // define schema 9 | var PersonSchema = new Schema({ 10 | name : String, 11 | age : Number, 12 | birthday : Date 13 | }); 14 | mongoose.model('Person', PersonSchema); 15 | }; 16 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/lean/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lean-example", 3 | "private": "true", 4 | "version": "0.0.0", 5 | "description": "deps for lean example", 6 | "main": "lean.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "dependencies": { "async": "*" }, 11 | "repository": "", 12 | "author": "", 13 | "license": "BSD" 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/lean/person.js: -------------------------------------------------------------------------------- 1 | 2 | // import the necessary modules 3 | var mongoose = require('../../lib'); 4 | var Schema = mongoose.Schema; 5 | 6 | // create an export function to encapsulate the model creation 7 | module.exports = function() { 8 | // define schema 9 | var PersonSchema = new Schema({ 10 | name : String, 11 | age : Number, 12 | birthday : Date, 13 | gender: String, 14 | likes: [String] 15 | }); 16 | mongoose.model('Person', PersonSchema); 17 | }; 18 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/mapreduce/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "map-reduce-example", 3 | "private": "true", 4 | "version": "0.0.0", 5 | "description": "deps for map reduce example", 6 | "main": "mapreduce.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "dependencies": { "async": "*" }, 11 | "repository": "", 12 | "author": "", 13 | "license": "BSD" 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/mapreduce/person.js: -------------------------------------------------------------------------------- 1 | 2 | // import the necessary modules 3 | var mongoose = require('../../lib'); 4 | var Schema = mongoose.Schema; 5 | 6 | // create an export function to encapsulate the model creation 7 | module.exports = function() { 8 | // define schema 9 | var PersonSchema = new Schema({ 10 | name : String, 11 | age : Number, 12 | birthday : Date, 13 | gender: String 14 | }); 15 | mongoose.model('Person', PersonSchema); 16 | }; 17 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/promises/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "promise-example", 3 | "private": "true", 4 | "version": "0.0.0", 5 | "description": "deps for promise example", 6 | "main": "promise.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "dependencies": { "async": "*" }, 11 | "repository": "", 12 | "author": "", 13 | "license": "BSD" 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/promises/person.js: -------------------------------------------------------------------------------- 1 | 2 | // import the necessary modules 3 | var mongoose = require('../../lib'); 4 | var Schema = mongoose.Schema; 5 | 6 | // create an export function to encapsulate the model creation 7 | module.exports = function() { 8 | // define schema 9 | var PersonSchema = new Schema({ 10 | name : String, 11 | age : Number, 12 | birthday : Date 13 | }); 14 | mongoose.model('Person', PersonSchema); 15 | }; 16 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/querybuilder/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "query-builder-example", 3 | "private": "true", 4 | "version": "0.0.0", 5 | "description": "deps for query builder example", 6 | "main": "querybuilder.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "dependencies": { "async": "*" }, 11 | "repository": "", 12 | "author": "", 13 | "license": "BSD" 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/querybuilder/person.js: -------------------------------------------------------------------------------- 1 | 2 | // import the necessary modules 3 | var mongoose = require('../../lib'); 4 | var Schema = mongoose.Schema; 5 | 6 | // create an export function to encapsulate the model creation 7 | module.exports = function() { 8 | // define schema 9 | var PersonSchema = new Schema({ 10 | name : String, 11 | age : Number, 12 | birthday : Date 13 | }); 14 | mongoose.model('Person', PersonSchema); 15 | }; 16 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/replicasets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "replica-set-example", 3 | "private": "true", 4 | "version": "0.0.0", 5 | "description": "deps for replica set example", 6 | "main": "querybuilder.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "dependencies": { "async": "*" }, 11 | "repository": "", 12 | "author": "", 13 | "license": "BSD" 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/replicasets/person.js: -------------------------------------------------------------------------------- 1 | 2 | // import the necessary modules 3 | var mongoose = require('../../lib'); 4 | var Schema = mongoose.Schema; 5 | 6 | // create an export function to encapsulate the model creation 7 | module.exports = function() { 8 | // define schema 9 | var PersonSchema = new Schema({ 10 | name : String, 11 | age : Number, 12 | birthday : Date 13 | }); 14 | mongoose.model('Person', PersonSchema); 15 | }; 16 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/schema/storing-schemas-as-json/index.js: -------------------------------------------------------------------------------- 1 | 2 | // modules 3 | var mongoose = require('../../../lib') 4 | var Schema = mongoose.Schema; 5 | 6 | // parse json 7 | var raw = require('./schema.json'); 8 | 9 | // create a schema 10 | var timeSignatureSchema = Schema(raw); 11 | 12 | // compile the model 13 | var TimeSignature = mongoose.model('TimeSignatures', timeSignatureSchema); 14 | 15 | // create a TimeSignature document 16 | var threeFour = new TimeSignature({ 17 | count: 3 18 | , unit: 4 19 | , description: "3/4" 20 | , additive: false 21 | , created: new Date 22 | , links: ["http://en.wikipedia.org/wiki/Time_signature"] 23 | , user_id: "518d31a0ef32bbfa853a9814" 24 | }); 25 | 26 | // print its description 27 | console.log(threeFour) 28 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/schema/storing-schemas-as-json/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": "number", 3 | "unit": "number", 4 | "description": "string", 5 | "links": ["string"], 6 | "created": "date", 7 | "additive": "boolean", 8 | "user_id": "ObjectId" 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/statics/person.js: -------------------------------------------------------------------------------- 1 | 2 | // import the necessary modules 3 | var mongoose = require('../../lib'); 4 | var Schema = mongoose.Schema; 5 | 6 | // create an export function to encapsulate the model creation 7 | module.exports = function() { 8 | // define schema 9 | var PersonSchema = new Schema({ 10 | name : String, 11 | age : Number, 12 | birthday : Date 13 | }); 14 | 15 | // define a static 16 | PersonSchema.statics.findPersonByName = function (name, cb) { 17 | this.find({ name : new RegExp(name, 'i') }, cb); 18 | }; 19 | 20 | mongoose.model('Person', PersonSchema); 21 | }; 22 | -------------------------------------------------------------------------------- /node_modules/mongoose/examples/statics/statics.js: -------------------------------------------------------------------------------- 1 | 2 | var mongoose = require('../../lib'); 3 | 4 | 5 | // import the schema 6 | require('./person.js')(); 7 | 8 | // grab the person model object 9 | var Person = mongoose.model("Person"); 10 | 11 | // connect to a server to do a quick write / read example 12 | 13 | mongoose.connect('mongodb://localhost/persons', function(err) { 14 | if (err) throw err; 15 | 16 | Person.create({ 17 | name : 'bill', 18 | age : 25, 19 | birthday : new Date().setFullYear((new Date().getFullYear() - 25)) 20 | }, function (err, bill) { 21 | if (err) throw err; 22 | console.log("People added to db: %s", bill.toString()); 23 | 24 | // using the static 25 | Person.findPersonByName('bill', function(err, result) { 26 | if (err) throw err; 27 | 28 | console.log(result); 29 | cleanup(); 30 | }); 31 | }); 32 | }); 33 | 34 | function cleanup() { 35 | Person.remove(function() { 36 | mongoose.disconnect(); 37 | }); 38 | } 39 | -------------------------------------------------------------------------------- /node_modules/mongoose/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Export lib/mongoose 4 | * 5 | */ 6 | 7 | module.exports = require('./lib/'); 8 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/connectionstate.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Connection states 4 | */ 5 | 6 | var STATES = module.exports = exports = Object.create(null); 7 | 8 | var disconnected = 'disconnected'; 9 | var connected = 'connected'; 10 | var connecting = 'connecting'; 11 | var disconnecting = 'disconnecting'; 12 | var uninitialized = 'uninitialized'; 13 | 14 | STATES[0] = disconnected; 15 | STATES[1] = connected; 16 | STATES[2] = connecting; 17 | STATES[3] = disconnecting; 18 | STATES[99] = uninitialized; 19 | 20 | STATES[disconnected] = 0; 21 | STATES[connected] = 1; 22 | STATES[connecting] = 2; 23 | STATES[disconnecting] = 3; 24 | STATES[uninitialized] = 99; 25 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/drivers/SPEC.md: -------------------------------------------------------------------------------- 1 | 2 | # Driver Spec 3 | 4 | TODO 5 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/drivers/node-mongodb-native/binary.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module dependencies. 4 | */ 5 | 6 | var Binary = require('mongodb').BSONPure.Binary; 7 | 8 | module.exports = exports = Binary; 9 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * [node-mongodb-native](https://github.com/mongodb/node-mongodb-native) ObjectId 4 | * @constructor NodeMongoDbObjectId 5 | * @see ObjectId 6 | */ 7 | 8 | var ObjectId = require('mongodb').BSONPure.ObjectID; 9 | 10 | /*! 11 | * ignore 12 | */ 13 | 14 | module.exports = exports = ObjectId; 15 | 16 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/cast.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Module dependencies. 3 | */ 4 | 5 | var MongooseError = require('../error.js'); 6 | 7 | /** 8 | * Casting Error constructor. 9 | * 10 | * @param {String} type 11 | * @param {String} value 12 | * @inherits MongooseError 13 | * @api private 14 | */ 15 | 16 | function CastError (type, value, path) { 17 | MongooseError.call(this, 'Cast to ' + type + ' failed for value "' + value + '" at path "' + path + '"'); 18 | Error.captureStackTrace(this, arguments.callee); 19 | this.name = 'CastError'; 20 | this.type = type; 21 | this.value = value; 22 | this.path = path; 23 | }; 24 | 25 | /*! 26 | * Inherits from MongooseError. 27 | */ 28 | 29 | CastError.prototype.__proto__ = MongooseError.prototype; 30 | 31 | /*! 32 | * exports 33 | */ 34 | 35 | module.exports = CastError; 36 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/divergentArray.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module dependencies. 4 | */ 5 | 6 | var MongooseError = require('../error.js'); 7 | 8 | /*! 9 | * DivergentArrayError constructor. 10 | * 11 | * @inherits MongooseError 12 | */ 13 | 14 | function DivergentArrayError (paths) { 15 | var msg = 'For your own good, using `document.save()` to update an array ' 16 | + 'which was selected using an $elemMatch projection OR ' 17 | + 'populated using skip, limit, query conditions, or exclusion of ' 18 | + 'the _id field when the operation results in a $pop or $set of ' 19 | + 'the entire array is not supported. The following ' 20 | + 'path(s) would have been modified unsafely:\n' 21 | + ' ' + paths.join('\n ') + '\n' 22 | + 'Use Model.update() to update these arrays instead.' 23 | // TODO write up a docs page (FAQ) and link to it 24 | 25 | MongooseError.call(this, msg); 26 | Error.captureStackTrace(this, arguments.callee); 27 | this.name = 'DivergentArrayError'; 28 | }; 29 | 30 | /*! 31 | * Inherits from MongooseError. 32 | */ 33 | 34 | DivergentArrayError.prototype.__proto__ = MongooseError.prototype; 35 | 36 | /*! 37 | * exports 38 | */ 39 | 40 | module.exports = DivergentArrayError; 41 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/missingSchema.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module dependencies. 4 | */ 5 | 6 | var MongooseError = require('../error.js'); 7 | 8 | /*! 9 | * MissingSchema Error constructor. 10 | * 11 | * @inherits MongooseError 12 | */ 13 | 14 | function MissingSchemaError (name) { 15 | var msg = 'Schema hasn\'t been registered for model "' + name + '".\n' 16 | + 'Use mongoose.model(name, schema)'; 17 | MongooseError.call(this, msg); 18 | Error.captureStackTrace(this, arguments.callee); 19 | this.name = 'MissingSchemaError'; 20 | }; 21 | 22 | /*! 23 | * Inherits from MongooseError. 24 | */ 25 | 26 | MissingSchemaError.prototype.__proto__ = MongooseError.prototype; 27 | 28 | /*! 29 | * exports 30 | */ 31 | 32 | module.exports = MissingSchemaError; 33 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/overwriteModel.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module dependencies. 4 | */ 5 | 6 | var MongooseError = require('../error.js'); 7 | 8 | /*! 9 | * OverwriteModel Error constructor. 10 | * 11 | * @inherits MongooseError 12 | */ 13 | 14 | function OverwriteModelError (name) { 15 | MongooseError.call(this, 'Cannot overwrite `' + name + '` model once compiled.'); 16 | Error.captureStackTrace(this, arguments.callee); 17 | this.name = 'OverwriteModelError'; 18 | }; 19 | 20 | /*! 21 | * Inherits from MongooseError. 22 | */ 23 | 24 | OverwriteModelError.prototype.__proto__ = MongooseError.prototype; 25 | 26 | /*! 27 | * exports 28 | */ 29 | 30 | module.exports = OverwriteModelError; 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/validation.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module requirements 4 | */ 5 | 6 | var MongooseError = require('../error.js') 7 | 8 | /** 9 | * Document Validation Error 10 | * 11 | * @api private 12 | * @param {Document} instance 13 | * @inherits MongooseError 14 | */ 15 | 16 | function ValidationError (instance) { 17 | MongooseError.call(this, "Validation failed"); 18 | Error.captureStackTrace(this, arguments.callee); 19 | this.name = 'ValidationError'; 20 | this.errors = instance.errors = {}; 21 | }; 22 | 23 | /** 24 | * Console.log helper 25 | */ 26 | 27 | ValidationError.prototype.toString = function () { 28 | var ret = this.name + ': '; 29 | var msgs = []; 30 | 31 | Object.keys(this.errors).forEach(function (key) { 32 | if (this == this.errors[key]) return; 33 | msgs.push(String(this.errors[key])); 34 | }, this) 35 | 36 | return ret + msgs.join(', '); 37 | }; 38 | 39 | /*! 40 | * Inherits from MongooseError. 41 | */ 42 | 43 | ValidationError.prototype.__proto__ = MongooseError.prototype; 44 | 45 | /*! 46 | * Module exports 47 | */ 48 | 49 | module.exports = exports = ValidationError; 50 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/validator.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Module dependencies. 3 | */ 4 | 5 | var MongooseError = require('../error.js'); 6 | var errorMessages = MongooseError.messages; 7 | 8 | /** 9 | * Schema validator error 10 | * 11 | * @param {String} path 12 | * @param {String} msg 13 | * @param {String|Number|any} val 14 | * @inherits MongooseError 15 | * @api private 16 | */ 17 | 18 | function ValidatorError (path, msg, type, val) { 19 | if (!msg) msg = errorMessages.general.default; 20 | var message = this.formatMessage(msg, path, type, val); 21 | MongooseError.call(this, message); 22 | Error.captureStackTrace(this, arguments.callee); 23 | this.name = 'ValidatorError'; 24 | this.path = path; 25 | this.type = type; 26 | this.value = val; 27 | }; 28 | 29 | /*! 30 | * toString helper 31 | */ 32 | 33 | ValidatorError.prototype.toString = function () { 34 | return this.message; 35 | } 36 | 37 | /*! 38 | * Inherits from MongooseError 39 | */ 40 | 41 | ValidatorError.prototype.__proto__ = MongooseError.prototype; 42 | 43 | /*! 44 | * exports 45 | */ 46 | 47 | module.exports = ValidatorError; 48 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/version.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module dependencies. 4 | */ 5 | 6 | var MongooseError = require('../error.js'); 7 | 8 | /** 9 | * Version Error constructor. 10 | * 11 | * @inherits MongooseError 12 | * @api private 13 | */ 14 | 15 | function VersionError () { 16 | MongooseError.call(this, 'No matching document found.'); 17 | Error.captureStackTrace(this, arguments.callee); 18 | this.name = 'VersionError'; 19 | }; 20 | 21 | /*! 22 | * Inherits from MongooseError. 23 | */ 24 | 25 | VersionError.prototype.__proto__ = MongooseError.prototype; 26 | 27 | /*! 28 | * exports 29 | */ 30 | 31 | module.exports = VersionError; 32 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/internal.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Dependencies 3 | */ 4 | 5 | var StateMachine = require('./statemachine') 6 | var ActiveRoster = StateMachine.ctor('require', 'modify', 'init', 'default') 7 | 8 | module.exports = exports = InternalCache; 9 | 10 | function InternalCache () { 11 | this.strictMode = undefined; 12 | this.selected = undefined; 13 | this.shardval = undefined; 14 | this.saveError = undefined; 15 | this.validationError = undefined; 16 | this.adhocPaths = undefined; 17 | this.removing = undefined; 18 | this.inserting = undefined; 19 | this.version = undefined; 20 | this.getters = {}; 21 | this._id = undefined; 22 | this.populate = undefined; // what we want to populate in this doc 23 | this.populated = undefined;// the _ids that have been populated 24 | this.wasPopulated = false; // if this doc was the result of a population 25 | this.scope = undefined; 26 | this.activePaths = new ActiveRoster; 27 | 28 | // embedded docs 29 | this.ownerDocument = undefined; 30 | this.fullPath = undefined; 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/schema/index.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module exports. 4 | */ 5 | 6 | exports.String = require('./string'); 7 | 8 | exports.Number = require('./number'); 9 | 10 | exports.Boolean = require('./boolean'); 11 | 12 | exports.DocumentArray = require('./documentarray'); 13 | 14 | exports.Array = require('./array'); 15 | 16 | exports.Buffer = require('./buffer'); 17 | 18 | exports.Date = require('./date'); 19 | 20 | exports.ObjectId = require('./objectid'); 21 | 22 | exports.Mixed = require('./mixed'); 23 | 24 | // alias 25 | 26 | exports.Oid = exports.ObjectId; 27 | exports.Object = exports.Mixed; 28 | exports.Bool = exports.Boolean; 29 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/schemadefault.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module dependencies. 4 | */ 5 | 6 | var Schema = require('./schema') 7 | 8 | /** 9 | * Default model for querying the system.profiles collection. 10 | * 11 | * @property system.profile 12 | * @receiver exports 13 | * @api private 14 | */ 15 | 16 | exports['system.profile'] = new Schema({ 17 | ts: Date 18 | , info: String // deprecated 19 | , millis: Number 20 | , op: String 21 | , ns: String 22 | , query: Schema.Types.Mixed 23 | , updateobj: Schema.Types.Mixed 24 | , ntoreturn: Number 25 | , nreturned: Number 26 | , nscanned: Number 27 | , responseLength: Number 28 | , client: String 29 | , user: String 30 | , idhack: Boolean 31 | , scanAndOrder: Boolean 32 | , keyUpdates: Number 33 | , cursorid: Number 34 | }, { noVirtualId: true, noId: true }); 35 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/types/index.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module exports. 4 | */ 5 | 6 | exports.Array = require('./array'); 7 | exports.Buffer = require('./buffer'); 8 | 9 | exports.Document = // @deprecate 10 | exports.Embedded = require('./embedded'); 11 | 12 | exports.DocumentArray = require('./documentarray'); 13 | exports.ObjectId = require('./objectid'); 14 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/types/objectid.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Access driver. 4 | */ 5 | 6 | var driver = global.MONGOOSE_DRIVER_PATH || '../drivers/node-mongodb-native'; 7 | 8 | /** 9 | * ObjectId type constructor 10 | * 11 | * ####Example 12 | * 13 | * var id = new mongoose.Types.ObjectId; 14 | * 15 | * @constructor ObjectId 16 | */ 17 | 18 | var ObjectId = require(driver + '/objectid'); 19 | module.exports = ObjectId; 20 | 21 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/hooks/.npmignore: -------------------------------------------------------------------------------- 1 | **.swp 2 | node_modules 3 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/hooks/Makefile: -------------------------------------------------------------------------------- 1 | test: 2 | @NODE_ENV=test ./node_modules/expresso/bin/expresso \ 3 | $(TESTFLAGS) \ 4 | ./test.js 5 | 6 | test-cov: 7 | @TESTFLAGS=--cov $(MAKE) test 8 | 9 | .PHONY: test test-cov 10 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 4 | - 0.8 5 | - 0.10 6 | - 0.11 -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/Makefile: -------------------------------------------------------------------------------- 1 | NODE = node 2 | NPM = npm 3 | NODEUNIT = node_modules/nodeunit/bin/nodeunit 4 | DOX = node_modules/dox/bin/dox 5 | name = all 6 | 7 | total: build_native 8 | 9 | test_functional: 10 | node test/runner.js -t functional 11 | 12 | test_ssl: 13 | node test/runner.js -t ssl 14 | 15 | test_replicaset: 16 | node test/runner.js -t replicaset 17 | 18 | test_sharded: 19 | node test/runner.js -t sharded 20 | 21 | test_auth: 22 | node test/runner.js -t auth 23 | 24 | generate_docs: 25 | $(NODE) dev/tools/build-docs.js 26 | make --directory=./docs/sphinx-docs --file=Makefile html 27 | 28 | .PHONY: total 29 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/mongodb'); 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/base_command.js: -------------------------------------------------------------------------------- 1 | /** 2 | Base object used for common functionality 3 | **/ 4 | var BaseCommand = exports.BaseCommand = function BaseCommand() { 5 | }; 6 | 7 | var id = 1; 8 | BaseCommand.prototype.getRequestId = function getRequestId() { 9 | if (!this.requestId) this.requestId = id++; 10 | return this.requestId; 11 | }; 12 | 13 | BaseCommand.prototype.setMongosReadPreference = function setMongosReadPreference(readPreference, tags) {} 14 | 15 | BaseCommand.prototype.updateRequestId = function() { 16 | this.requestId = id++; 17 | return this.requestId; 18 | }; 19 | 20 | // OpCodes 21 | BaseCommand.OP_REPLY = 1; 22 | BaseCommand.OP_MSG = 1000; 23 | BaseCommand.OP_UPDATE = 2001; 24 | BaseCommand.OP_INSERT = 2002; 25 | BaseCommand.OP_GET_BY_OID = 2003; 26 | BaseCommand.OP_QUERY = 2004; 27 | BaseCommand.OP_GET_MORE = 2005; 28 | BaseCommand.OP_DELETE = 2006; 29 | BaseCommand.OP_KILL_CURSORS = 2007; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_utils.js: -------------------------------------------------------------------------------- 1 | exports.setIntegerParameter = function(object, field, defaultValue) { 2 | if(object[field] == null) { 3 | object[field] = defaultValue; 4 | } else if(typeof object[field] !== "number" && object[field] !== parseInt(object[field], 10)) { 5 | throw "object field [" + field + "] must be a numeric integer value, attempted to set to [" + object[field] + "] type of [" + typeof object[field] + "]"; 6 | } 7 | } 8 | 9 | exports.setBooleanParameter = function(object, field, defaultValue) { 10 | if(object[field] == null) { 11 | object[field] = defaultValue; 12 | } else if(typeof object[field] !== "boolean") { 13 | throw "object field [" + field + "] must be a boolean value, attempted to set to [" + object[field] + "] type of [" + typeof object[field] + "]"; 14 | } 15 | } 16 | 17 | exports.setStringParameter = function(object, field, defaultValue) { 18 | if(object[field] == null) { 19 | object[field] = defaultValue; 20 | } else if(typeof object[field] !== "string") { 21 | throw "object field [" + field + "] must be a string value, attempted to set to [" + object[field] + "] type of [" + typeof object[field] + "]"; 22 | } 23 | } -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - 0.10 # development version of 0.8, may be unstable 5 | - 0.11 -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/Makefile: -------------------------------------------------------------------------------- 1 | NODE = node 2 | NPM = npm 3 | NODEUNIT = node_modules/nodeunit/bin/nodeunit 4 | 5 | all: clean node_gyp 6 | 7 | test: clean node_gyp 8 | npm test 9 | 10 | node_gyp: clean 11 | node-gyp configure build 12 | 13 | clean: 14 | node-gyp clean 15 | 16 | browserify: 17 | node_modules/.bin/onejs build browser_build/package.json browser_build/bson.js 18 | 19 | .PHONY: all 20 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/binding.gyp: -------------------------------------------------------------------------------- 1 | { 2 | 'targets': [ 3 | { 4 | 'target_name': 'bson', 5 | 'sources': [ 'ext/bson.cc' ], 6 | 'cflags!': [ '-fno-exceptions' ], 7 | 'cflags_cc!': [ '-fno-exceptions' ], 8 | 'conditions': [ 9 | ['OS=="mac"', { 10 | 'xcode_settings': { 11 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES' 12 | } 13 | }] 14 | ] 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/browser_build/package.json: -------------------------------------------------------------------------------- 1 | { "name" : "bson" 2 | , "description" : "A bson parser for node.js and the browser" 3 | , "main": "../lib/bson/bson" 4 | , "directories" : { "lib" : "../lib/bson" } 5 | , "engines" : { "node" : ">=0.6.0" } 6 | , "licenses" : [ { "type" : "Apache License, Version 2.0" 7 | , "url" : "http://www.apache.org/licenses/LICENSE-2.0" } ] 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/build/Release/.deps/Release/bson.node.d: -------------------------------------------------------------------------------- 1 | cmd_Release/bson.node := rm -rf "Release/bson.node" && cp -af "Release/obj.target/bson.node" "Release/bson.node" 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/build/Release/.deps/Release/obj.target/bson.node.d: -------------------------------------------------------------------------------- 1 | cmd_Release/obj.target/bson.node := flock ./Release/linker.lock g++ -shared -pthread -rdynamic -m64 -Wl,-soname=bson.node -o Release/obj.target/bson.node -Wl,--start-group Release/obj.target/bson/ext/bson.o -Wl,--end-group 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/build/Release/bson.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build/Release/bson.node -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/build/Release/linker.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build/Release/linker.lock -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/build/Release/obj.target/bson.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build/Release/obj.target/bson.node -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/build/Release/obj.target/bson/ext/bson.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build/Release/obj.target/bson/ext/bson.o -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/build/binding.Makefile: -------------------------------------------------------------------------------- 1 | # This file is generated by gyp; do not edit. 2 | 3 | export builddir_name ?= ./build/. 4 | .PHONY: all 5 | all: 6 | $(MAKE) bson 7 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/build_browser.js: -------------------------------------------------------------------------------- 1 | require('one'); 2 | 3 | one('./package.json') 4 | .tie('bson', BSON) 5 | // .exclude('buffer') 6 | .tie('buffer', {}) 7 | .save('./browser_build/bson.js') -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/builderror.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/mongoose/node_modules/mongodb/node_modules/bson/builderror.log -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/ext/Makefile: -------------------------------------------------------------------------------- 1 | NODE = node 2 | name = all 3 | JOBS = 1 4 | 5 | all: 6 | rm -rf build .lock-wscript bson.node 7 | node-waf configure build 8 | cp -R ./build/Release/bson.node . || true 9 | 10 | all_debug: 11 | rm -rf build .lock-wscript bson.node 12 | node-waf --debug configure build 13 | cp -R ./build/Release/bson.node . || true 14 | 15 | clang: 16 | rm -rf build .lock-wscript bson.node 17 | CXX=clang node-waf configure build 18 | cp -R ./build/Release/bson.node . || true 19 | 20 | clang_debug: 21 | rm -rf build .lock-wscript bson.node 22 | CXX=clang node-waf --debug configure build 23 | cp -R ./build/Release/bson.node . || true 24 | 25 | clean: 26 | rm -rf build .lock-wscript bson.node 27 | 28 | .PHONY: all -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/ext/win32/ia32/bson.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/mongoose/node_modules/mongodb/node_modules/bson/ext/win32/ia32/bson.node -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/ext/win32/x64/bson.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/mongoose/node_modules/mongodb/node_modules/bson/ext/win32/x64/bson.node -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/ext/wscript: -------------------------------------------------------------------------------- 1 | import Options 2 | from os import unlink, symlink, popen 3 | from os.path import exists 4 | 5 | srcdir = "." 6 | blddir = "build" 7 | VERSION = "0.1.0" 8 | 9 | def set_options(opt): 10 | opt.tool_options("compiler_cxx") 11 | opt.add_option( '--debug' 12 | , action='store_true' 13 | , default=False 14 | , help='Build debug variant [Default: False]' 15 | , dest='debug' 16 | ) 17 | 18 | def configure(conf): 19 | conf.check_tool("compiler_cxx") 20 | conf.check_tool("node_addon") 21 | conf.env.append_value('CXXFLAGS', ['-O3', '-funroll-loops']) 22 | 23 | # conf.env.append_value('CXXFLAGS', ['-DDEBUG', '-g', '-O0', '-Wall', '-Wextra']) 24 | # conf.check(lib='node', libpath=['/usr/lib', '/usr/local/lib'], uselib_store='NODE') 25 | 26 | def build(bld): 27 | obj = bld.new_task_gen("cxx", "shlib", "node_addon") 28 | obj.target = "bson" 29 | obj.source = ["bson.cc"] 30 | # obj.uselib = "NODE" 31 | 32 | def shutdown(): 33 | # HACK to get compress.node out of build directory. 34 | # better way to do this? 35 | if Options.commands['clean']: 36 | if exists('bson.node'): unlink('bson.node') 37 | else: 38 | if exists('build/default/bson.node') and not exists('bson.node'): 39 | symlink('build/default/bson.node', 'bson.node') 40 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/lib/bson/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A class representation of the BSON Code type. 3 | * 4 | * @class Represents the BSON Code type. 5 | * @param {String|Function} code a string or function. 6 | * @param {Object} [scope] an optional scope for the function. 7 | * @return {Code} 8 | */ 9 | function Code(code, scope) { 10 | if(!(this instanceof Code)) return new Code(code, scope); 11 | 12 | this._bsontype = 'Code'; 13 | this.code = code; 14 | this.scope = scope == null ? {} : scope; 15 | }; 16 | 17 | /** 18 | * @ignore 19 | * @api private 20 | */ 21 | Code.prototype.toJSON = function() { 22 | return {scope:this.scope, code:this.code}; 23 | } 24 | 25 | exports.Code = Code; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/lib/bson/db_ref.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A class representation of the BSON DBRef type. 3 | * 4 | * @class Represents the BSON DBRef type. 5 | * @param {String} namespace the collection name. 6 | * @param {ObjectID} oid the reference ObjectID. 7 | * @param {String} [db] optional db name, if omitted the reference is local to the current db. 8 | * @return {DBRef} 9 | */ 10 | function DBRef(namespace, oid, db) { 11 | if(!(this instanceof DBRef)) return new DBRef(namespace, oid, db); 12 | 13 | this._bsontype = 'DBRef'; 14 | this.namespace = namespace; 15 | this.oid = oid; 16 | this.db = db; 17 | }; 18 | 19 | /** 20 | * @ignore 21 | * @api private 22 | */ 23 | DBRef.prototype.toJSON = function() { 24 | return { 25 | '$ref':this.namespace, 26 | '$id':this.oid, 27 | '$db':this.db == null ? '' : this.db 28 | }; 29 | } 30 | 31 | exports.DBRef = DBRef; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/lib/bson/double.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A class representation of the BSON Double type. 3 | * 4 | * @class Represents the BSON Double type. 5 | * @param {Number} value the number we want to represent as a double. 6 | * @return {Double} 7 | */ 8 | function Double(value) { 9 | if(!(this instanceof Double)) return new Double(value); 10 | 11 | this._bsontype = 'Double'; 12 | this.value = value; 13 | } 14 | 15 | /** 16 | * Access the number value. 17 | * 18 | * @return {Number} returns the wrapped double number. 19 | * @api public 20 | */ 21 | Double.prototype.valueOf = function() { 22 | return this.value; 23 | }; 24 | 25 | /** 26 | * @ignore 27 | * @api private 28 | */ 29 | Double.prototype.toJSON = function() { 30 | return this.value; 31 | } 32 | 33 | exports.Double = Double; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/lib/bson/max_key.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A class representation of the BSON MaxKey type. 3 | * 4 | * @class Represents the BSON MaxKey type. 5 | * @return {MaxKey} 6 | */ 7 | function MaxKey() { 8 | if(!(this instanceof MaxKey)) return new MaxKey(); 9 | 10 | this._bsontype = 'MaxKey'; 11 | } 12 | 13 | exports.MaxKey = MaxKey; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/lib/bson/min_key.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A class representation of the BSON MinKey type. 3 | * 4 | * @class Represents the BSON MinKey type. 5 | * @return {MinKey} 6 | */ 7 | function MinKey() { 8 | if(!(this instanceof MinKey)) return new MinKey(); 9 | 10 | this._bsontype = 'MinKey'; 11 | } 12 | 13 | exports.MinKey = MinKey; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/lib/bson/symbol.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A class representation of the BSON Symbol type. 3 | * 4 | * @class Represents the BSON Symbol type. 5 | * @param {String} value the string representing the symbol. 6 | * @return {Symbol} 7 | */ 8 | function Symbol(value) { 9 | if(!(this instanceof Symbol)) return new Symbol(value); 10 | this._bsontype = 'Symbol'; 11 | this.value = value; 12 | } 13 | 14 | /** 15 | * Access the wrapped string value. 16 | * 17 | * @return {String} returns the wrapped string. 18 | * @api public 19 | */ 20 | Symbol.prototype.valueOf = function() { 21 | return this.value; 22 | }; 23 | 24 | /** 25 | * @ignore 26 | * @api private 27 | */ 28 | Symbol.prototype.toString = function() { 29 | return this.value; 30 | } 31 | 32 | /** 33 | * @ignore 34 | * @api private 35 | */ 36 | Symbol.prototype.inspect = function() { 37 | return this.value; 38 | } 39 | 40 | /** 41 | * @ignore 42 | * @api private 43 | */ 44 | Symbol.prototype.toJSON = function() { 45 | return this.value; 46 | } 47 | 48 | exports.Symbol = Symbol; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/tools/gleak.js: -------------------------------------------------------------------------------- 1 | 2 | var gleak = require('gleak')(); 3 | gleak.ignore('AssertionError'); 4 | gleak.ignore('testFullSpec_param_found'); 5 | gleak.ignore('events'); 6 | gleak.ignore('Uint8Array'); 7 | gleak.ignore('Uint8ClampedArray'); 8 | gleak.ignore('TAP_Global_Harness'); 9 | gleak.ignore('setImmediate'); 10 | gleak.ignore('clearImmediate'); 11 | 12 | gleak.ignore('DTRACE_NET_SERVER_CONNECTION'); 13 | gleak.ignore('DTRACE_NET_STREAM_END'); 14 | gleak.ignore('DTRACE_NET_SOCKET_READ'); 15 | gleak.ignore('DTRACE_NET_SOCKET_WRITE'); 16 | gleak.ignore('DTRACE_HTTP_SERVER_REQUEST'); 17 | gleak.ignore('DTRACE_HTTP_SERVER_RESPONSE'); 18 | gleak.ignore('DTRACE_HTTP_CLIENT_REQUEST'); 19 | gleak.ignore('DTRACE_HTTP_CLIENT_RESPONSE'); 20 | 21 | module.exports = gleak; 22 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/tools/jasmine-1.1.0/MIT.LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2011 Pivotal Labs 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/bson/tools/jasmine-1.1.0/jasmine_favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/mongoose/node_modules/mongodb/node_modules/bson/tools/jasmine-1.1.0/jasmine_favicon.png -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/README.md: -------------------------------------------------------------------------------- 1 | kerberos 2 | ======== 3 | 4 | Kerberos library for node.js -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/binding.gyp: -------------------------------------------------------------------------------- 1 | { 2 | 'targets': [ 3 | { 4 | 'target_name': 'kerberos', 5 | 'cflags!': [ '-fno-exceptions' ], 6 | 'cflags_cc!': [ '-fno-exceptions' ], 7 | 'conditions': [ 8 | ['OS=="mac"', { 9 | 'sources': [ 'lib/kerberos.cc', 'lib/worker.cc', 'lib/kerberosgss.c', 'lib/base64.c', 'lib/kerberos_context.cc' ], 10 | 'defines': [ 11 | '__MACOSX_CORE__' 12 | ], 13 | 'xcode_settings': { 14 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES' 15 | }, 16 | "link_settings": { 17 | "libraries": [ 18 | "-lkrb5" 19 | ] 20 | } 21 | }], 22 | ['OS=="win"', { 23 | 'sources': [ 24 | 'lib/win32/kerberos.cc', 25 | 'lib/win32/base64.c', 26 | 'lib/win32/worker.cc', 27 | 'lib/win32/kerberos_sspi.c', 28 | 'lib/win32/wrappers/security_buffer.cc', 29 | 'lib/win32/wrappers/security_buffer_descriptor.cc', 30 | 'lib/win32/wrappers/security_context.cc', 31 | 'lib/win32/wrappers/security_credentials.cc' 32 | ], 33 | "link_settings": { 34 | "libraries": [ 35 | ] 36 | } 37 | }] 38 | ] 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build/Release/.deps/Release/kerberos.node.d: -------------------------------------------------------------------------------- 1 | cmd_Release/kerberos.node := rm -rf "Release/kerberos.node" && cp -af "Release/obj.target/kerberos.node" "Release/kerberos.node" 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build/Release/.deps/Release/obj.target/kerberos.node.d: -------------------------------------------------------------------------------- 1 | cmd_Release/obj.target/kerberos.node := flock ./Release/linker.lock g++ -shared -pthread -rdynamic -m64 -Wl,-soname=kerberos.node -o Release/obj.target/kerberos.node -Wl,--start-group -Wl,--end-group 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build/Release/kerberos.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build/Release/kerberos.node -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build/Release/linker.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build/Release/linker.lock -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build/Release/obj.target/kerberos.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build/Release/obj.target/kerberos.node -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build/binding.Makefile: -------------------------------------------------------------------------------- 1 | # This file is generated by gyp; do not edit. 2 | 3 | export builddir_name ?= ./build/. 4 | .PHONY: all 5 | all: 6 | $(MAKE) kerberos 7 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build/kerberos.target.mk: -------------------------------------------------------------------------------- 1 | # This file is generated by gyp; do not edit. 2 | 3 | TOOLSET := target 4 | TARGET := kerberos 5 | ### Rules for final target. 6 | LDFLAGS_Debug := \ 7 | -pthread \ 8 | -rdynamic \ 9 | -m64 10 | 11 | LDFLAGS_Release := \ 12 | -pthread \ 13 | -rdynamic \ 14 | -m64 15 | 16 | LIBS := 17 | 18 | $(obj).target/kerberos.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE)) 19 | $(obj).target/kerberos.node: LIBS := $(LIBS) 20 | $(obj).target/kerberos.node: TOOLSET := $(TOOLSET) 21 | $(obj).target/kerberos.node: FORCE_DO_CMD 22 | $(call do_cmd,solink_module) 23 | 24 | all_deps += $(obj).target/kerberos.node 25 | # Add target alias 26 | .PHONY: kerberos 27 | kerberos: $(builddir)/kerberos.node 28 | 29 | # Copy this to the executable output path. 30 | $(builddir)/kerberos.node: TOOLSET := $(TOOLSET) 31 | $(builddir)/kerberos.node: $(obj).target/kerberos.node FORCE_DO_CMD 32 | $(call do_cmd,copy) 33 | 34 | all_deps += $(builddir)/kerberos.node 35 | # Short alias for building this executable. 36 | .PHONY: kerberos.node 37 | kerberos.node: $(obj).target/kerberos.node $(builddir)/kerberos.node 38 | 39 | # Add executable to "all" target. 40 | .PHONY: all 41 | all: $(builddir)/kerberos.node 42 | 43 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/builderror.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/builderror.log -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/index.js: -------------------------------------------------------------------------------- 1 | // Get the Kerberos library 2 | module.exports = require('./lib/kerberos'); 3 | // Set up the auth processes 4 | module.exports['processes'] = { 5 | MongoAuthProcess: require('./lib/auth_processes/mongodb').MongoAuthProcess 6 | } -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/lib/base64.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006-2008 Apple Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | char *base64_encode(const unsigned char *value, int vlen); 18 | unsigned char *base64_decode(const char *value, int *rlen); 19 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/lib/kerberos_context.h: -------------------------------------------------------------------------------- 1 | #ifndef KERBEROS_CONTEXT_H 2 | #define KERBEROS_CONTEXT_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | extern "C" { 13 | #include "kerberosgss.h" 14 | } 15 | 16 | using namespace v8; 17 | using namespace node; 18 | 19 | class KerberosContext : public ObjectWrap { 20 | 21 | public: 22 | KerberosContext(); 23 | ~KerberosContext(); 24 | 25 | static inline bool HasInstance(Handle val) { 26 | if (!val->IsObject()) return false; 27 | Local obj = val->ToObject(); 28 | return constructor_template->HasInstance(obj); 29 | }; 30 | 31 | // Constructor used for creating new Kerberos objects from C++ 32 | static Persistent constructor_template; 33 | 34 | // Initialize function for the object 35 | static void Initialize(Handle target); 36 | 37 | // Public constructor 38 | static KerberosContext* New(); 39 | 40 | // Handle to the kerberos context 41 | gss_client_state *state; 42 | 43 | private: 44 | static Handle New(const Arguments &args); 45 | 46 | static Handle ResponseGetter(Local property, const AccessorInfo& info); 47 | }; 48 | #endif -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/lib/sspi.js: -------------------------------------------------------------------------------- 1 | // Load the native SSPI classes 2 | var kerberos = require('../build/Release/kerberos') 3 | , Kerberos = kerberos.Kerberos 4 | , SecurityBuffer = require('./win32/wrappers/security_buffer').SecurityBuffer 5 | , SecurityBufferDescriptor = require('./win32/wrappers/security_buffer_descriptor').SecurityBufferDescriptor 6 | , SecurityCredentials = require('./win32/wrappers/security_credentials').SecurityCredentials 7 | , SecurityContext = require('./win32/wrappers/security_context').SecurityContext; 8 | var SSPI = function() { 9 | } 10 | 11 | exports.SSPI = SSPI; 12 | exports.SecurityBuffer = SecurityBuffer; 13 | exports.SecurityBufferDescriptor = SecurityBufferDescriptor; 14 | exports.SecurityCredentials = SecurityCredentials; 15 | exports.SecurityContext = SecurityContext; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/lib/win32/base64.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2006-2008 Apple Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | char *base64_encode(const unsigned char *value, int vlen); 18 | unsigned char *base64_decode(const char *value, int *rlen); 19 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/lib/win32/worker.cc: -------------------------------------------------------------------------------- 1 | #include "worker.h" 2 | 3 | Worker::Worker() { 4 | } 5 | 6 | Worker::~Worker() { 7 | } -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/lib/win32/worker.h: -------------------------------------------------------------------------------- 1 | #ifndef WORKER_H_ 2 | #define WORKER_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace node; 9 | using namespace v8; 10 | 11 | class Worker { 12 | public: 13 | Worker(); 14 | virtual ~Worker(); 15 | 16 | // libuv's request struct. 17 | uv_work_t request; 18 | // Callback 19 | v8::Persistent callback; 20 | // Parameters 21 | void *parameters; 22 | // Results 23 | void *return_value; 24 | // Did we raise an error 25 | bool error; 26 | // The error message 27 | char *error_message; 28 | // Error code if not message 29 | int error_code; 30 | // Any return code 31 | int return_code; 32 | // Method we are going to fire 33 | void (*execute)(Worker *worker); 34 | Handle (*mapper)(Worker *worker); 35 | }; 36 | 37 | #endif // WORKER_H_ 38 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/lib/win32/wrappers/security_buffer.js: -------------------------------------------------------------------------------- 1 | var SecurityBufferNative = require('../../../build/Release/kerberos').SecurityBuffer; 2 | 3 | // Add some attributes 4 | SecurityBufferNative.VERSION = 0; 5 | SecurityBufferNative.EMPTY = 0; 6 | SecurityBufferNative.DATA = 1; 7 | SecurityBufferNative.TOKEN = 2; 8 | SecurityBufferNative.PADDING = 9; 9 | SecurityBufferNative.STREAM = 10; 10 | 11 | // Export the modified class 12 | exports.SecurityBuffer = SecurityBufferNative; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/lib/win32/wrappers/security_buffer_descriptor.h: -------------------------------------------------------------------------------- 1 | #ifndef SECURITY_BUFFER_DESCRIPTOR_H 2 | #define SECURITY_BUFFER_DESCRIPTOR_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | #include 10 | 11 | using namespace v8; 12 | using namespace node; 13 | 14 | class SecurityBufferDescriptor : public ObjectWrap { 15 | public: 16 | Persistent arrayObject; 17 | SecBufferDesc secBufferDesc; 18 | 19 | SecurityBufferDescriptor(); 20 | SecurityBufferDescriptor(Persistent arrayObject); 21 | ~SecurityBufferDescriptor(); 22 | 23 | // Has instance check 24 | static inline bool HasInstance(Handle val) { 25 | if (!val->IsObject()) return false; 26 | Local obj = val->ToObject(); 27 | return constructor_template->HasInstance(obj); 28 | }; 29 | 30 | char *toBuffer(); 31 | size_t bufferSize(); 32 | 33 | // Functions available from V8 34 | static void Initialize(Handle target); 35 | static Handle ToBuffer(const Arguments &args); 36 | 37 | // Constructor used for creating new Long objects from C++ 38 | static Persistent constructor_template; 39 | 40 | private: 41 | static Handle New(const Arguments &args); 42 | }; 43 | 44 | #endif -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/lib/win32/wrappers/security_buffer_descriptor.js: -------------------------------------------------------------------------------- 1 | var SecurityBufferDescriptorNative = require('../../../build/Release/kerberos').SecurityBufferDescriptor; 2 | // Export the modified class 3 | exports.SecurityBufferDescriptor = SecurityBufferDescriptorNative; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/lib/win32/wrappers/security_context.js: -------------------------------------------------------------------------------- 1 | var SecurityContextNative = require('../../../build/Release/kerberos').SecurityContext; 2 | // Export the modified class 3 | exports.SecurityContext = SecurityContextNative; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/lib/win32/wrappers/security_credentials.js: -------------------------------------------------------------------------------- 1 | var SecurityCredentialsNative = require('../../../build/Release/kerberos').SecurityCredentials; 2 | 3 | // Add simple kebros helper 4 | SecurityCredentialsNative.aquire_kerberos = function(username, password, domain, callback) { 5 | if(typeof password == 'function') { 6 | callback = password; 7 | password = null; 8 | } else if(typeof domain == 'function') { 9 | callback = domain; 10 | domain = null; 11 | } 12 | 13 | // We are going to use the async version 14 | if(typeof callback == 'function') { 15 | return SecurityCredentialsNative.aquire('Kerberos', username, password, domain, callback); 16 | } else { 17 | return SecurityCredentialsNative.aquireSync('Kerberos', username, password, domain); 18 | } 19 | } 20 | 21 | // Export the modified class 22 | exports.SecurityCredentials = SecurityCredentialsNative; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/lib/worker.cc: -------------------------------------------------------------------------------- 1 | #include "worker.h" 2 | 3 | Worker::Worker() { 4 | } 5 | 6 | Worker::~Worker() { 7 | } -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/lib/worker.h: -------------------------------------------------------------------------------- 1 | #ifndef WORKER_H_ 2 | #define WORKER_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace node; 9 | using namespace v8; 10 | 11 | class Worker { 12 | public: 13 | Worker(); 14 | virtual ~Worker(); 15 | 16 | // libuv's request struct. 17 | uv_work_t request; 18 | // Callback 19 | v8::Persistent callback; 20 | // // Arguments 21 | // v8::Persistent arguments; 22 | // Parameters 23 | void *parameters; 24 | // Results 25 | void *return_value; 26 | // Did we raise an error 27 | bool error; 28 | // The error message 29 | char *error_message; 30 | // Error code if not message 31 | int error_code; 32 | // Any return code 33 | int return_code; 34 | // Method we are going to fire 35 | void (*execute)(Worker *worker); 36 | Handle (*mapper)(Worker *worker); 37 | }; 38 | 39 | #endif // WORKER_H_ 40 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/test/kerberos_tests.js: -------------------------------------------------------------------------------- 1 | exports.setUp = function(callback) { 2 | callback(); 3 | } 4 | 5 | exports.tearDown = function(callback) { 6 | callback(); 7 | } 8 | 9 | exports['Simple initialize of Kerberos object'] = function(test) { 10 | var Kerberos = require('../lib/kerberos.js').Kerberos; 11 | var kerberos = new Kerberos(); 12 | // console.dir(kerberos) 13 | 14 | // Initiate kerberos client 15 | kerberos.authGSSClientInit('mongodb@kdc.10gen.me', Kerberos.GSS_C_MUTUAL_FLAG, function(err, context) { 16 | console.log("===================================== authGSSClientInit") 17 | test.equal(null, err); 18 | test.ok(context != null && typeof context == 'object'); 19 | // console.log("===================================== authGSSClientInit") 20 | console.dir(err) 21 | console.dir(context) 22 | // console.dir(typeof result) 23 | 24 | // Perform the first step 25 | kerberos.authGSSClientStep(context, function(err, result) { 26 | console.log("===================================== authGSSClientStep") 27 | console.dir(err) 28 | console.dir(result) 29 | console.dir(context) 30 | 31 | test.done(); 32 | }); 33 | }); 34 | } -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/test/kerberos_win32_test.js: -------------------------------------------------------------------------------- 1 | exports.setUp = function(callback) { 2 | callback(); 3 | } 4 | 5 | exports.tearDown = function(callback) { 6 | callback(); 7 | } 8 | 9 | exports['Simple initialize of Kerberos win32 object'] = function(test) { 10 | var KerberosNative = require('../build/Release/kerberos').Kerberos; 11 | // console.dir(KerberosNative) 12 | var kerberos = new KerberosNative(); 13 | console.log("=========================================== 0") 14 | console.dir(kerberos.acquireAlternateCredentials("dev1@10GEN.ME", "a")); 15 | console.log("=========================================== 1") 16 | console.dir(kerberos.prepareOutboundPackage("mongodb/kdc.10gen.com")); 17 | console.log("=========================================== 2") 18 | test.done(); 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/test/win32/security_buffer_tests.js: -------------------------------------------------------------------------------- 1 | exports.setUp = function(callback) { 2 | callback(); 3 | } 4 | 5 | exports.tearDown = function(callback) { 6 | callback(); 7 | } 8 | 9 | exports['Initialize a security Buffer'] = function(test) { 10 | var SecurityBuffer = require('../../lib/sspi.js').SecurityBuffer; 11 | // Create empty buffer 12 | var securityBuffer = new SecurityBuffer(SecurityBuffer.DATA, 100); 13 | var buffer = securityBuffer.toBuffer(); 14 | test.equal(100, buffer.length); 15 | 16 | // Access data passed in 17 | var allocated_buffer = new Buffer(256); 18 | securityBuffer = new SecurityBuffer(SecurityBuffer.DATA, allocated_buffer); 19 | buffer = securityBuffer.toBuffer(); 20 | test.deepEqual(allocated_buffer, buffer); 21 | test.done(); 22 | } -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpath/.npmignore: -------------------------------------------------------------------------------- 1 | *.sw* 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpath/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 4 | - 0.8 5 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpath/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.1.1 / 2012-12-21 3 | ================== 4 | 5 | * added; map support 6 | 7 | 0.1.0 / 2012-12-13 8 | ================== 9 | 10 | * added; set('array.property', val, object) support 11 | * added; get('array.property', object) support 12 | 13 | 0.0.1 / 2012-11-03 14 | ================== 15 | 16 | * initial release 17 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpath/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012 [Aaron Heckmann](aaron.heckmann+github@gmail.com) 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 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpath/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @node_modules/mocha/bin/mocha -A $(T) 4 | 5 | .PHONY: test 6 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpath/index.js: -------------------------------------------------------------------------------- 1 | module.exports = exports = require('./lib'); 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/.idea/.name: -------------------------------------------------------------------------------- 1 | mpromise -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/.idea/jsLibraryMappings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/.idea/libraries/Node_js_Dependencies_for_mpromise.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/.idea/mpromise.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/.idea/other.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/.npmignore: -------------------------------------------------------------------------------- 1 | *.sw* 2 | node_modules/ 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - 0.10 5 | - 0.11 6 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012 [Aaron Heckmann](aaron.heckmann+github@gmail.com) 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 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/index.js: -------------------------------------------------------------------------------- 1 | module.exports = exports = require('./lib/promise'); 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/test/promise.domain.test.js: -------------------------------------------------------------------------------- 1 | var Promise = require('../') 2 | , Domain = require('domain') 3 | , assert = require('assert'); 4 | 5 | var next = 'function' == typeof setImmediate 6 | ? setImmediate 7 | : process.nextTick; 8 | 9 | describe("domains", function () { 10 | it("exceptions should not breakout of domain bounderies", function (done) { 11 | if (process.version.indexOf('v0.8') == 0) return done(); 12 | var d = Domain.create(); 13 | d.once('error', function (err) { 14 | assert.equal(err.message, 'gaga'); 15 | done() 16 | }); 17 | 18 | var p = new Promise(); 19 | 20 | d.run(function () { 21 | p.then(function () { 22 | 23 | }).then(function () { 24 | throw new Error('gaga'); 25 | }).end(); 26 | }); 27 | 28 | next(function () { 29 | p.fulfill(); 30 | }) 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/test/promises.Aplus.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | 5 | var Promise = require('../lib/promise'); 6 | var aplus = require('promises-aplus-tests'); 7 | 8 | // tests 9 | 10 | var adapter = {}; 11 | adapter.fulfilled = function (value) { 12 | var p = new Promise; 13 | p.fulfill(value); 14 | return p; 15 | }; 16 | adapter.rejected = function (reason) { 17 | var p = new Promise; 18 | p.reject(reason); 19 | return p; 20 | } 21 | adapter.deferred = function () { 22 | var p = new Promise; 23 | return { 24 | promise: p, reject: p.reject.bind(p), resolve: p.fulfill.bind(p) 25 | } 26 | } 27 | 28 | it("run A+ suite", function (done) { 29 | this.timeout(60000); 30 | aplus(adapter, { 31 | reporter: 'spec', slow: 1 32 | 33 | // , bail:true 34 | // , grep:'2.3.1: If `promise` and `x` refer to the same object, reject `promise` with a `TypeError` as the reason. via return from a fulfilled promise' 35 | }, function (err) { 36 | done(err); 37 | }); 38 | }); 39 | 40 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/.npmignore: -------------------------------------------------------------------------------- 1 | *.sw* 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - 0.10 5 | - 0.11 6 | services: 7 | - mongodb 8 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012 [Aaron Heckmann](aaron.heckmann+github@gmail.com) 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 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha $(T) $(TESTS) 4 | 5 | .PHONY: test 6 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/index.js: -------------------------------------------------------------------------------- 1 | module.exports = exports = require('./lib/mquery'); 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/lib/collection/collection.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * methods a collection must implement 5 | */ 6 | 7 | var names = 'find findOne update remove count distict findAndModify aggregate'; 8 | var methods = names.split(' '); 9 | 10 | /** 11 | * Collection base class from which implementations inherit 12 | */ 13 | 14 | function Collection () {} 15 | 16 | for (var i = 0, len = methods.length; i < len; ++i) { 17 | var method = methods[i]; 18 | Collection.prototype[method] = notImplemented(method); 19 | } 20 | 21 | module.exports = exports = Collection; 22 | Collection.methods = methods; 23 | 24 | /** 25 | * creates a function which throws an implementation error 26 | */ 27 | 28 | function notImplemented (method) { 29 | return function () { 30 | throw new Error('collection.' + method + ' not implemented'); 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/lib/collection/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var env = require('../env') 4 | 5 | if ('unknown' == env.type) { 6 | throw new Error('Unknown environment') 7 | } 8 | 9 | module.exports = 10 | env.isNode ? require('./node') : 11 | env.isMongo ? require('./mongo') : 12 | require('./browser'); 13 | 14 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/lib/env.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.isNode = 'undefined' != typeof process 4 | && 'object' == typeof module 5 | && 'object' == typeof global 6 | && 'function' == typeof Buffer 7 | && process.argv 8 | 9 | exports.isMongo = !exports.isNode 10 | && 'function' == typeof printjson 11 | && 'function' == typeof ObjectId 12 | && 'function' == typeof rs 13 | && 'function' == typeof sh; 14 | 15 | exports.isBrowser = !exports.isNode 16 | && !exports.isMongo 17 | && 'undefined' != typeof window; 18 | 19 | exports.type = exports.isNode ? 'node' 20 | : exports.isMongo ? 'mongo' 21 | : exports.isBrowser ? 'browser' 22 | : 'unknown' 23 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/node_modules/debug/index.js: -------------------------------------------------------------------------------- 1 | if ('undefined' == typeof window) { 2 | module.exports = require('./lib/debug'); 3 | } else { 4 | module.exports = require('./debug'); 5 | } 6 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/test/collection/browser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/mongoose/node_modules/mquery/test/collection/browser.js -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/test/collection/mongo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huseyinbabal/token-based-auth-backend/0d6b650cddcee0a7448d062764288353d35dda01/node_modules/mongoose/node_modules/mquery/test/collection/mongo.js -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/test/collection/node.js: -------------------------------------------------------------------------------- 1 | 2 | var assert = require('assert') 3 | var slice = require('sliced') 4 | var mongo = require('mongodb') 5 | var utils = require('../../').utils; 6 | 7 | var uri = process.env.MQUERY_URI || 'mongodb://localhost/mquery'; 8 | var db; 9 | 10 | exports.getCollection = function (cb) { 11 | mongo.Db.connect(uri, function (err, db_) { 12 | assert.ifError(err); 13 | db = db_; 14 | 15 | var collection = db.collection('stuff'); 16 | collection.opts.safe = true; 17 | 18 | // clean test db before starting 19 | db.dropDatabase(function () { 20 | cb(null, collection); 21 | }); 22 | }) 23 | } 24 | 25 | exports.dropCollection = function (cb) { 26 | db.dropDatabase(function () { 27 | db.close(cb); 28 | }) 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/test/env.js: -------------------------------------------------------------------------------- 1 | 2 | var assert = require('assert') 3 | var env = require('../').env; 4 | 5 | console.log('environment: %s', env.type); 6 | 7 | var col; 8 | switch (env.type) { 9 | case 'node': 10 | col = require('./collection/node'); 11 | break; 12 | case 'mongo': 13 | col = require('./collection/mongo'); 14 | case 'browser': 15 | col = require('./collection/browser'); 16 | default: 17 | throw new Error('missing collection implementation for environment: ' + env.type); 18 | } 19 | 20 | module.exports = exports = col; 21 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/test/utils.js: -------------------------------------------------------------------------------- 1 | 2 | var utils = require('../lib/utils'); 3 | 4 | describe('utils', function(){ 5 | // TODO 6 | }) 7 | 8 | 9 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/ms/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/ms/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | ./node_modules/.bin/mocha test/test.js 4 | 5 | test-browser: 6 | ./node_modules/.bin/serve test/ 7 | 8 | .PHONY: test 9 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/ms/ms.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | # ms.js 4 | 5 | No more painful `setTimeout(fn, 60 * 4 * 3 * 2 * 1 * Infinity * NaN * '☃')`. 6 | 7 | ms('2d') // 172800000 8 | ms('1.5h') // 5400000 9 | ms('1h') // 3600000 10 | ms('1m') // 60000 11 | ms('5s') // 5000 12 | ms('500ms') // 500 13 | ms('100') // '100' 14 | ms(100) // 100 15 | 16 | **/ 17 | 18 | (function (g) { 19 | var r = /(\d*.?\d+)([mshd]+)/ 20 | , _ = {} 21 | 22 | _.ms = 1; 23 | _.s = 1000; 24 | _.m = _.s * 60; 25 | _.h = _.m * 60; 26 | _.d = _.h * 24; 27 | 28 | function ms (s) { 29 | if (s == Number(s)) return Number(s); 30 | r.exec(s.toLowerCase()); 31 | return RegExp.$1 * _[RegExp.$2]; 32 | } 33 | 34 | g.top ? g.ms = ms : module.exports = ms; 35 | })(this); 36 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/ms/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ms", 3 | "version": "0.1.0", 4 | "description": "Tiny ms conversion utility", 5 | "main": "./ms", 6 | "devDependencies": { 7 | "mocha": "*", 8 | "expect.js": "*", 9 | "serve": "*" 10 | }, 11 | "_npmUser": { 12 | "name": "rauchg", 13 | "email": "rauchg@gmail.com" 14 | }, 15 | "_id": "ms@0.1.0", 16 | "dependencies": {}, 17 | "engines": { 18 | "node": "*" 19 | }, 20 | "_engineSupported": true, 21 | "_npmVersion": "1.0.106", 22 | "_nodeVersion": "v0.4.12", 23 | "_defaultsLoaded": true, 24 | "dist": { 25 | "shasum": "f21fac490daf1d7667fd180fe9077389cc9442b2", 26 | "tarball": "http://registry.npmjs.org/ms/-/ms-0.1.0.tgz" 27 | }, 28 | "maintainers": [ 29 | { 30 | "name": "rauchg", 31 | "email": "rauchg@gmail.com" 32 | } 33 | ], 34 | "directories": {}, 35 | "_shasum": "f21fac490daf1d7667fd180fe9077389cc9442b2", 36 | "_from": "ms@0.1.0", 37 | "_resolved": "https://registry.npmjs.org/ms/-/ms-0.1.0.tgz", 38 | "readme": "ERROR: No README data found!" 39 | } 40 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/ms/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ms.js tests 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/muri/.npmignore: -------------------------------------------------------------------------------- 1 | *.sw* 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/muri/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 4 | - 0.8 5 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/muri/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.3.1 / 2013-02-17 3 | ================== 4 | 5 | * fixed; allow '#' in username and password #3 6 | 7 | 0.3.0 / 2013-01-14 8 | ================== 9 | 10 | * fixed; default db logic #2 11 | 12 | 0.2.0 / 2013-01-09 13 | ================== 14 | 15 | * changed; default db is now 'test' 16 | 17 | 0.1.0 / 2012-12-18 18 | ================== 19 | 20 | * changed; include .sock in UDS 21 | 22 | 0.0.5 / 2012-12-18 23 | ================== 24 | 25 | * fixed; unix domain sockets used with db names 26 | 27 | 0.0.4 / 2012-12-01 28 | ================== 29 | 30 | * handle multple specified protocols 31 | 32 | 0.0.3 / 2012-11-29 33 | ================== 34 | 35 | * validate mongodb:///db 36 | * more detailed error message 37 | 38 | 0.0.2 / 2012-11-02 39 | ================== 40 | 41 | * add readPreferenceTags support 42 | * add unix domain support 43 | 44 | 0.0.1 / 2012-11-01 45 | ================== 46 | 47 | * initial release 48 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/muri/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012 [Aaron Heckmann](aaron.heckmann+github@gmail.com) 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 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/muri/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @node_modules/mocha/bin/mocha $(T) 4 | 5 | .PHONY: test 6 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/muri/index.js: -------------------------------------------------------------------------------- 1 | module.exports = exports = require('./lib'); 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/regexp-clone/.npmignore: -------------------------------------------------------------------------------- 1 | *.sw* 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/regexp-clone/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 4 | - 0.8 5 | - 0.10 6 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/regexp-clone/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.0.1 / 2013-04-17 3 | ================== 4 | 5 | * initial commit 6 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/regexp-clone/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2013 [Aaron Heckmann](aaron.heckmann+github@gmail.com) 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 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/regexp-clone/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha $(T) --async-only $(TESTS) 4 | 5 | .PHONY: test 6 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/regexp-clone/README.md: -------------------------------------------------------------------------------- 1 | #regexp-clone 2 | ============== 3 | 4 | Clones RegExps with flag preservation 5 | 6 | ```js 7 | var regexpClone = require('regexp-clone'); 8 | 9 | var a = /somethin/g; 10 | console.log(a.global); // true 11 | 12 | var b = regexpClone(a); 13 | console.log(b.global); // true 14 | ``` 15 | 16 | ## License 17 | 18 | [MIT](https://github.com/aheckmann/regexp-clone/blob/master/LICENSE) 19 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/regexp-clone/index.js: -------------------------------------------------------------------------------- 1 | 2 | var toString = Object.prototype.toString; 3 | 4 | function isRegExp (o) { 5 | return 'object' == typeof o 6 | && '[object RegExp]' == toString.call(o); 7 | } 8 | 9 | module.exports = exports = function (regexp) { 10 | if (!isRegExp(regexp)) { 11 | throw new TypeError('Not a RegExp'); 12 | } 13 | 14 | var flags = []; 15 | if (regexp.global) flags.push('g'); 16 | if (regexp.multiline) flags.push('m'); 17 | if (regexp.ignoreCase) flags.push('i'); 18 | return new RegExp(regexp.source, flags.join('')); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/sliced/.npmignore: -------------------------------------------------------------------------------- 1 | *.sw* 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/sliced/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 4 | - 0.8 5 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/sliced/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.0.5 / 2013-02-05 3 | ================== 4 | 5 | * optimization: remove use of arguments [jkroso](https://github.com/jkroso) 6 | * add scripts to component.json [jkroso](https://github.com/jkroso) 7 | * tests; remove time for travis 8 | 9 | 0.0.4 / 2013-01-07 10 | ================== 11 | 12 | * added component.json #1 [jkroso](https://github.com/jkroso) 13 | * reversed array loop #1 [jkroso](https://github.com/jkroso) 14 | * remove fn params 15 | 16 | 0.0.3 / 2012-09-29 17 | ================== 18 | 19 | * faster with negative start args 20 | 21 | 0.0.2 / 2012-09-29 22 | ================== 23 | 24 | * support full [].slice semantics 25 | 26 | 0.0.1 / 2012-09-29 27 | =================== 28 | 29 | * initial release 30 | 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/sliced/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012 [Aaron Heckmann](aaron.heckmann+github@gmail.com) 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 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/sliced/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha $(T) $(TESTS) 4 | 5 | .PHONY: test 6 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/sliced/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sliced", 3 | "version": "0.0.5", 4 | "description": "A faster Node.js alternative to Array.prototype.slice.call(arguments)", 5 | "repo" : "aheckmann/sliced", 6 | "keywords": [ 7 | "arguments", 8 | "slice", 9 | "array" 10 | ], 11 | "scripts": ["lib/sliced.js", "index.js"], 12 | "author": "Aaron Heckmann ", 13 | "license": "MIT" 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/sliced/index.js: -------------------------------------------------------------------------------- 1 | module.exports = exports = require('./lib/sliced'); 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/sliced/lib/sliced.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * An Array.prototype.slice.call(arguments) alternative 4 | * 5 | * @param {Object} args something with a length 6 | * @param {Number} slice 7 | * @param {Number} sliceEnd 8 | * @api public 9 | */ 10 | 11 | module.exports = function (args, slice, sliceEnd) { 12 | var ret = []; 13 | var len = args.length; 14 | 15 | if (0 === len) return ret; 16 | 17 | var start = slice < 0 18 | ? Math.max(0, slice + len) 19 | : slice || 0; 20 | 21 | if (sliceEnd !== undefined) { 22 | len = sliceEnd < 0 23 | ? sliceEnd + len 24 | : sliceEnd 25 | } 26 | 27 | while (len-- > start) { 28 | ret[len - start] = args[len]; 29 | } 30 | 31 | return ret; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /node_modules/mongoose/static.js: -------------------------------------------------------------------------------- 1 | 2 | var static = require('node-static'); 3 | var server = new static.Server('.', { cache: 0 }); 4 | var open = require('open') 5 | 6 | require('http').createServer(function (req, res) { 7 | if ('/favicon.ico' == req.url) { 8 | req.destroy(); 9 | res.statusCode = 204 10 | return res.end(); 11 | } 12 | 13 | req.on('end', function () { 14 | server.serve(req, res, function (err) { 15 | if (err) { 16 | console.error(err, req.url); 17 | res.writeHead(err.status, err.headers); 18 | res.end(); 19 | } 20 | }); 21 | }); 22 | req.resume(); 23 | }).listen(8088); 24 | 25 | console.error('now listening on http://localhost:8088'); 26 | open('http://localhost:8088'); 27 | -------------------------------------------------------------------------------- /node_modules/morgan/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Jonathan Ong 4 | Copyright (c) 2014 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/morgan/node_modules/basic-auth/Readme.md: -------------------------------------------------------------------------------- 1 | # basic-auth 2 | 3 | Generic basic auth Authorization header field parser for whatever. 4 | 5 | ## Installation 6 | 7 | ``` 8 | $ npm install basic-auth 9 | ``` 10 | 11 | ## Example 12 | 13 | Pass a node request or koa Context object to the module exported. If 14 | parsing fails `undefined` is returned, otherwise an object with 15 | `.name` and `.pass`. 16 | 17 | ```js 18 | var auth = require('basic-auth'); 19 | var user = auth(req); 20 | // => { name: 'something', pass: 'whatever' } 21 | 22 | ``` 23 | 24 | # License 25 | 26 | MIT 27 | -------------------------------------------------------------------------------- /node_modules/morgan/node_modules/basic-auth/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Parse the Authorization header field of `req`. 4 | * 5 | * @param {Request} req 6 | * @return {Object} with .name and .pass 7 | * @api public 8 | */ 9 | 10 | module.exports = function(req){ 11 | req = req.req || req; 12 | 13 | var auth = req.headers.authorization; 14 | if (!auth) return; 15 | 16 | // malformed 17 | var parts = auth.split(' '); 18 | if ('basic' != parts[0].toLowerCase()) return; 19 | if (!parts[1]) return; 20 | auth = parts[1]; 21 | 22 | // credentials 23 | auth = new Buffer(auth, 'base64').toString(); 24 | auth = auth.match(/^([^:]*):(.*)$/); 25 | if (!auth) return; 26 | 27 | return { name: auth[1], pass: auth[2] }; 28 | }; 29 | -------------------------------------------------------------------------------- /node_modules/morgan/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 | -------------------------------------------------------------------------------- /node_modules/morgan/node_modules/depd/lib/compat/buffer-concat.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2014 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module exports. 9 | */ 10 | 11 | module.exports = bufferConcat 12 | 13 | /** 14 | * Concatenate an array of Buffers. 15 | */ 16 | 17 | function bufferConcat(bufs) { 18 | var length = 0 19 | 20 | for (var i = 0, len = bufs.length; i < len; i++) { 21 | length += bufs[i].length 22 | } 23 | 24 | var buf = new Buffer(length) 25 | var pos = 0 26 | 27 | for (var i = 0, len = bufs.length; i < len; i++) { 28 | bufs[i].copy(buf, pos) 29 | pos += bufs[i].length 30 | } 31 | 32 | return buf 33 | } 34 | -------------------------------------------------------------------------------- /node_modules/morgan/node_modules/on-finished/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2013 Jonathan Ong 4 | Copyright (c) 2014 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/morgan/node_modules/on-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 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-restful-auth", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "express": "4.x", 6 | "body-parser": "~1.0.0", 7 | "morgan": "latest", 8 | "mongoose": "3.8.8", 9 | "express-jwt": "0.2.1", 10 | "jsonwebtoken": "0.4.0" 11 | }, 12 | "engines": { 13 | "node": ">=0.10.0" 14 | } 15 | } --------------------------------------------------------------------------------
5 | Restful Authentication System with AngularJS & NodeJS Example 6 |
{{myDetails.data.email}}
{{myDetails.data.password}}