├── README.md ├── Server.js ├── explanation.png ├── node_modules ├── async │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── component.json │ ├── lib │ │ └── async.js │ └── package.json ├── 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 │ │ ├── browser.js │ │ ├── browserDocument.js │ │ ├── cast.js │ │ ├── collection.js │ │ ├── connection.js │ │ ├── connectionstate.js │ │ ├── document.js │ │ ├── document_provider.js │ │ ├── drivers │ │ │ ├── SPEC.md │ │ │ └── node-mongodb-native │ │ │ │ ├── binary.js │ │ │ │ ├── collection.js │ │ │ │ ├── connection.js │ │ │ │ └── objectid.js │ │ ├── error.js │ │ ├── error │ │ │ ├── browserMissingSchema.js │ │ │ ├── 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 │ │ ├── schematype.js │ │ ├── services │ │ │ └── updateValidators.js │ │ ├── statemachine.js │ │ ├── types │ │ │ ├── array.js │ │ │ ├── buffer.js │ │ │ ├── documentarray.js │ │ │ ├── embedded.js │ │ │ ├── index.js │ │ │ └── objectid.js │ │ ├── utils.js │ │ └── virtualtype.js │ ├── node_modules │ │ ├── hooks-fixed │ │ │ ├── .npmignore │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── hooks.alt.js │ │ │ ├── hooks.js │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── kareem │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── docs.js │ │ │ ├── gulpfile.js │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ ├── examples.test.js │ │ │ │ ├── post.test.js │ │ │ │ ├── pre.test.js │ │ │ │ └── wrap.test.js │ │ ├── mongodb │ │ │ ├── .travis.yml │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── conf.json │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── admin.js │ │ │ │ ├── aggregation_cursor.js │ │ │ │ ├── bulk │ │ │ │ │ ├── common.js │ │ │ │ │ ├── ordered.js │ │ │ │ │ └── unordered.js │ │ │ │ ├── collection.js │ │ │ │ ├── command_cursor.js │ │ │ │ ├── cursor.js │ │ │ │ ├── db.js │ │ │ │ ├── gridfs │ │ │ │ │ ├── chunk.js │ │ │ │ │ └── grid_store.js │ │ │ │ ├── mongo_client.js │ │ │ │ ├── mongos.js │ │ │ │ ├── read_preference.js │ │ │ │ ├── replset.js │ │ │ │ ├── server.js │ │ │ │ ├── topology_base.js │ │ │ │ ├── url_parser.js │ │ │ │ └── utils.js │ │ │ ├── node_modules │ │ │ │ ├── mongodb-core │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── HISTORY.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── README.md │ │ │ │ │ ├── TESTING.md │ │ │ │ │ ├── conf.json │ │ │ │ │ ├── index.js │ │ │ │ │ ├── lib │ │ │ │ │ │ ├── auth │ │ │ │ │ │ │ ├── gssapi.js │ │ │ │ │ │ │ ├── mongocr.js │ │ │ │ │ │ │ ├── plain.js │ │ │ │ │ │ │ ├── scram.js │ │ │ │ │ │ │ ├── sspi.js │ │ │ │ │ │ │ └── x509.js │ │ │ │ │ │ ├── connection │ │ │ │ │ │ │ ├── commands.js │ │ │ │ │ │ │ ├── connection.js │ │ │ │ │ │ │ ├── logger.js │ │ │ │ │ │ │ ├── pool.js │ │ │ │ │ │ │ └── utils.js │ │ │ │ │ │ ├── cursor.js │ │ │ │ │ │ ├── error.js │ │ │ │ │ │ ├── tools │ │ │ │ │ │ │ └── smoke_plugin.js │ │ │ │ │ │ ├── topologies │ │ │ │ │ │ │ ├── command_result.js │ │ │ │ │ │ │ ├── mongos.js │ │ │ │ │ │ │ ├── read_preference.js │ │ │ │ │ │ │ ├── replset.js │ │ │ │ │ │ │ ├── replset_state.js │ │ │ │ │ │ │ ├── server.js │ │ │ │ │ │ │ ├── session.js │ │ │ │ │ │ │ └── strategies │ │ │ │ │ │ │ │ └── ping.js │ │ │ │ │ │ └── wireprotocol │ │ │ │ │ │ │ ├── 2_4_support.js │ │ │ │ │ │ │ ├── 2_6_support.js │ │ │ │ │ │ │ └── commands.js │ │ │ │ │ ├── node_modules │ │ │ │ │ │ ├── .bin │ │ │ │ │ │ │ ├── mkdirp │ │ │ │ │ │ │ └── rimraf │ │ │ │ │ │ ├── bson │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ ├── HISTORY │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ │ │ │ ├── win32 │ │ │ │ │ │ │ │ │ ├── ia32 │ │ │ │ │ │ │ │ │ │ └── bson.node │ │ │ │ │ │ │ │ │ └── x64 │ │ │ │ │ │ │ │ │ │ └── bson.node │ │ │ │ │ │ │ │ └── wscript │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ └── bson │ │ │ │ │ │ │ │ │ ├── binary.js │ │ │ │ │ │ │ │ │ ├── binary_parser.js │ │ │ │ │ │ │ │ │ ├── bson.js │ │ │ │ │ │ │ │ │ ├── bson_new.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 │ │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ │ │ └── nan │ │ │ │ │ │ │ │ │ ├── .dntrc │ │ │ │ │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ │ │ │ │ ├── LICENSE.md │ │ │ │ │ │ │ │ │ ├── appveyor.yml │ │ │ │ │ │ │ │ │ ├── include_dirs.js │ │ │ │ │ │ │ │ │ ├── nan.h │ │ │ │ │ │ │ │ │ ├── nan_implementation_12_inl.h │ │ │ │ │ │ │ │ │ ├── nan_implementation_pre_12_inl.h │ │ │ │ │ │ │ │ │ ├── nan_new.h │ │ │ │ │ │ │ │ │ ├── nan_string_bytes.h │ │ │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ │ │ │ │ │ │ └── lib │ │ │ │ │ │ │ │ │ │ │ ├── base64.o.d │ │ │ │ │ │ │ │ │ │ │ ├── kerberos.o.d │ │ │ │ │ │ │ │ │ │ │ ├── kerberos_context.o.d │ │ │ │ │ │ │ │ │ │ │ ├── kerberosgss.o.d │ │ │ │ │ │ │ │ │ │ │ └── worker.o.d │ │ │ │ │ │ │ │ │ ├── kerberos.node │ │ │ │ │ │ │ │ │ ├── linker.lock │ │ │ │ │ │ │ │ │ └── obj.target │ │ │ │ │ │ │ │ │ │ ├── kerberos.node │ │ │ │ │ │ │ │ │ │ └── kerberos │ │ │ │ │ │ │ │ │ │ └── lib │ │ │ │ │ │ │ │ │ │ ├── base64.o │ │ │ │ │ │ │ │ │ │ ├── kerberos.o │ │ │ │ │ │ │ │ │ │ ├── kerberos_context.o │ │ │ │ │ │ │ │ │ │ ├── kerberosgss.o │ │ │ │ │ │ │ │ │ │ └── worker.o │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ │ │ └── nan │ │ │ │ │ │ │ │ │ ├── .dntrc │ │ │ │ │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ │ │ │ │ ├── LICENSE.md │ │ │ │ │ │ │ │ │ ├── appveyor.yml │ │ │ │ │ │ │ │ │ ├── include_dirs.js │ │ │ │ │ │ │ │ │ ├── nan.h │ │ │ │ │ │ │ │ │ ├── nan_implementation_12_inl.h │ │ │ │ │ │ │ │ │ ├── nan_implementation_pre_12_inl.h │ │ │ │ │ │ │ │ │ ├── nan_new.h │ │ │ │ │ │ │ │ │ ├── nan_string_bytes.h │ │ │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ │ ├── kerberos_tests.js │ │ │ │ │ │ │ │ ├── kerberos_win32_test.js │ │ │ │ │ │ │ │ └── win32 │ │ │ │ │ │ │ │ ├── security_buffer_descriptor_tests.js │ │ │ │ │ │ │ │ ├── security_buffer_tests.js │ │ │ │ │ │ │ │ └── security_credentials_tests.js │ │ │ │ │ │ ├── mkdirp │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── bin │ │ │ │ │ │ │ │ ├── cmd.js │ │ │ │ │ │ │ │ └── usage.txt │ │ │ │ │ │ │ ├── examples │ │ │ │ │ │ │ │ └── pow.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ │ │ └── minimist │ │ │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ │ │ ├── example │ │ │ │ │ │ │ │ │ └── parse.js │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ │ │ ├── readme.markdown │ │ │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ │ │ ├── dash.js │ │ │ │ │ │ │ │ │ ├── default_bool.js │ │ │ │ │ │ │ │ │ ├── dotted.js │ │ │ │ │ │ │ │ │ ├── long.js │ │ │ │ │ │ │ │ │ ├── parse.js │ │ │ │ │ │ │ │ │ ├── parse_modified.js │ │ │ │ │ │ │ │ │ ├── short.js │ │ │ │ │ │ │ │ │ └── whitespace.js │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ ├── readme.markdown │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ │ ├── chmod.js │ │ │ │ │ │ │ │ ├── clobber.js │ │ │ │ │ │ │ │ ├── mkdirp.js │ │ │ │ │ │ │ │ ├── opts_fs.js │ │ │ │ │ │ │ │ ├── opts_fs_sync.js │ │ │ │ │ │ │ │ ├── perm.js │ │ │ │ │ │ │ │ ├── perm_sync.js │ │ │ │ │ │ │ │ ├── race.js │ │ │ │ │ │ │ │ ├── rel.js │ │ │ │ │ │ │ │ ├── return.js │ │ │ │ │ │ │ │ ├── return_sync.js │ │ │ │ │ │ │ │ ├── root.js │ │ │ │ │ │ │ │ ├── sync.js │ │ │ │ │ │ │ │ ├── umask.js │ │ │ │ │ │ │ │ └── umask_sync.js │ │ │ │ │ │ └── rimraf │ │ │ │ │ │ │ ├── AUTHORS │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── bin.js │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ ├── rimraf.js │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ ├── run.sh │ │ │ │ │ │ │ ├── setup.sh │ │ │ │ │ │ │ ├── test-async.js │ │ │ │ │ │ │ └── test-sync.js │ │ │ │ │ └── package.json │ │ │ │ └── readable-stream │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── duplex.js │ │ │ │ │ ├── lib │ │ │ │ │ ├── _stream_duplex.js │ │ │ │ │ ├── _stream_passthrough.js │ │ │ │ │ ├── _stream_readable.js │ │ │ │ │ ├── _stream_transform.js │ │ │ │ │ └── _stream_writable.js │ │ │ │ │ ├── node_modules │ │ │ │ │ ├── core-util-is │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── float.patch │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ └── util.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── util.js │ │ │ │ │ ├── inherits │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── inherits.js │ │ │ │ │ │ ├── inherits_browser.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── isarray │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── build │ │ │ │ │ │ │ └── build.js │ │ │ │ │ │ ├── component.json │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── package.json │ │ │ │ │ └── string_decoder │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── package.json │ │ │ │ │ ├── passthrough.js │ │ │ │ │ ├── readable.js │ │ │ │ │ ├── transform.js │ │ │ │ │ └── writable.js │ │ │ ├── package.json │ │ │ ├── t.js │ │ │ └── wercker.yml │ │ ├── mpath │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ └── index.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ └── index.js │ │ ├── mpromise │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── 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 │ │ │ ├── lib │ │ │ │ ├── collection │ │ │ │ │ ├── collection.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── node.js │ │ │ │ ├── env.js │ │ │ │ ├── mquery.js │ │ │ │ ├── permissions.js │ │ │ │ └── utils.js │ │ │ ├── node_modules │ │ │ │ ├── bluebird │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── js │ │ │ │ │ │ ├── main │ │ │ │ │ │ │ ├── any.js │ │ │ │ │ │ │ ├── assert.js │ │ │ │ │ │ │ ├── async.js │ │ │ │ │ │ │ ├── bluebird.js │ │ │ │ │ │ │ ├── call_get.js │ │ │ │ │ │ │ ├── cancel.js │ │ │ │ │ │ │ ├── captured_trace.js │ │ │ │ │ │ │ ├── catch_filter.js │ │ │ │ │ │ │ ├── direct_resolve.js │ │ │ │ │ │ │ ├── each.js │ │ │ │ │ │ │ ├── errors.js │ │ │ │ │ │ │ ├── errors_api_rejection.js │ │ │ │ │ │ │ ├── es5.js │ │ │ │ │ │ │ ├── filter.js │ │ │ │ │ │ │ ├── finally.js │ │ │ │ │ │ │ ├── generators.js │ │ │ │ │ │ │ ├── join.js │ │ │ │ │ │ │ ├── map.js │ │ │ │ │ │ │ ├── nodeify.js │ │ │ │ │ │ │ ├── progress.js │ │ │ │ │ │ │ ├── promise.js │ │ │ │ │ │ │ ├── promise_array.js │ │ │ │ │ │ │ ├── promise_resolver.js │ │ │ │ │ │ │ ├── promisify.js │ │ │ │ │ │ │ ├── props.js │ │ │ │ │ │ │ ├── queue.js │ │ │ │ │ │ │ ├── race.js │ │ │ │ │ │ │ ├── reduce.js │ │ │ │ │ │ │ ├── schedule.js │ │ │ │ │ │ │ ├── settle.js │ │ │ │ │ │ │ ├── some.js │ │ │ │ │ │ │ ├── synchronous_inspection.js │ │ │ │ │ │ │ ├── thenables.js │ │ │ │ │ │ │ ├── timers.js │ │ │ │ │ │ │ ├── using.js │ │ │ │ │ │ │ └── util.js │ │ │ │ │ │ └── zalgo │ │ │ │ │ │ │ ├── any.js │ │ │ │ │ │ │ ├── assert.js │ │ │ │ │ │ │ ├── async.js │ │ │ │ │ │ │ ├── bluebird.js │ │ │ │ │ │ │ ├── call_get.js │ │ │ │ │ │ │ ├── cancel.js │ │ │ │ │ │ │ ├── captured_trace.js │ │ │ │ │ │ │ ├── catch_filter.js │ │ │ │ │ │ │ ├── direct_resolve.js │ │ │ │ │ │ │ ├── each.js │ │ │ │ │ │ │ ├── errors.js │ │ │ │ │ │ │ ├── errors_api_rejection.js │ │ │ │ │ │ │ ├── es5.js │ │ │ │ │ │ │ ├── filter.js │ │ │ │ │ │ │ ├── finally.js │ │ │ │ │ │ │ ├── generators.js │ │ │ │ │ │ │ ├── join.js │ │ │ │ │ │ │ ├── map.js │ │ │ │ │ │ │ ├── nodeify.js │ │ │ │ │ │ │ ├── progress.js │ │ │ │ │ │ │ ├── promise.js │ │ │ │ │ │ │ ├── promise_array.js │ │ │ │ │ │ │ ├── promise_resolver.js │ │ │ │ │ │ │ ├── promisify.js │ │ │ │ │ │ │ ├── props.js │ │ │ │ │ │ │ ├── queue.js │ │ │ │ │ │ │ ├── race.js │ │ │ │ │ │ │ ├── reduce.js │ │ │ │ │ │ │ ├── schedule.js │ │ │ │ │ │ │ ├── settle.js │ │ │ │ │ │ │ ├── some.js │ │ │ │ │ │ │ ├── synchronous_inspection.js │ │ │ │ │ │ │ ├── thenables.js │ │ │ │ │ │ │ ├── timers.js │ │ │ │ │ │ │ ├── using.js │ │ │ │ │ │ │ └── util.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── zalgo.js │ │ │ │ └── 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.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 │ │ │ ├── strict.js │ │ │ └── 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 └── nodemailer │ ├── .jshintrc │ ├── .npmignore │ ├── CHANGELOG.md │ ├── Gruntfile.js │ ├── LICENSE │ ├── README.md │ ├── node_modules │ ├── buildmail │ │ ├── .jshintrc │ │ ├── .npmignore │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── Gruntfile.js │ │ ├── LICENSE │ │ ├── README.md │ │ ├── node_modules │ │ │ ├── addressparser │ │ │ │ ├── .jshintrc │ │ │ │ ├── .npmignore │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── package.json │ │ │ │ └── src │ │ │ │ │ └── addressparser.js │ │ │ ├── libbase64 │ │ │ │ ├── .npmignore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── lib │ │ │ │ │ └── libbase64.js │ │ │ │ └── package.json │ │ │ └── libqp │ │ │ │ ├── .npmignore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── lib │ │ │ │ └── libqp.js │ │ │ │ └── package.json │ │ ├── package.json │ │ ├── src │ │ │ └── buildmail.js │ │ └── test │ │ │ └── libbuildmail-unit.js │ ├── hyperquest │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── example │ │ │ ├── many_hyperquest.js │ │ │ ├── many_request.js │ │ │ └── req.js │ │ ├── index.js │ │ ├── node_modules │ │ │ ├── duplexer2 │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE.md │ │ │ │ ├── README.md │ │ │ │ ├── example.js │ │ │ │ ├── index.js │ │ │ │ ├── node_modules │ │ │ │ │ └── readable-stream │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── duplex.js │ │ │ │ │ │ ├── float.patch │ │ │ │ │ │ ├── lib │ │ │ │ │ │ ├── _stream_duplex.js │ │ │ │ │ │ ├── _stream_passthrough.js │ │ │ │ │ │ ├── _stream_readable.js │ │ │ │ │ │ ├── _stream_transform.js │ │ │ │ │ │ └── _stream_writable.js │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ ├── core-util-is │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── float.patch │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ └── util.js │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ └── util.js │ │ │ │ │ │ ├── inherits │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── inherits.js │ │ │ │ │ │ │ ├── inherits_browser.js │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ └── test.js │ │ │ │ │ │ ├── isarray │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── build │ │ │ │ │ │ │ │ └── build.js │ │ │ │ │ │ │ ├── component.json │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ └── string_decoder │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── passthrough.js │ │ │ │ │ │ ├── readable.js │ │ │ │ │ │ ├── transform.js │ │ │ │ │ │ └── writable.js │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ │ └── tests.js │ │ │ └── through2 │ │ │ │ ├── .npmignore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── node_modules │ │ │ │ ├── readable-stream │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── duplex.js │ │ │ │ │ ├── lib │ │ │ │ │ │ ├── _stream_duplex.js │ │ │ │ │ │ ├── _stream_passthrough.js │ │ │ │ │ │ ├── _stream_readable.js │ │ │ │ │ │ ├── _stream_transform.js │ │ │ │ │ │ └── _stream_writable.js │ │ │ │ │ ├── node_modules │ │ │ │ │ │ ├── core-util-is │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── float.patch │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ └── util.js │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ └── util.js │ │ │ │ │ │ ├── inherits │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── inherits.js │ │ │ │ │ │ │ ├── inherits_browser.js │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ └── test.js │ │ │ │ │ │ ├── isarray │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── build │ │ │ │ │ │ │ │ └── build.js │ │ │ │ │ │ │ ├── component.json │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ └── string_decoder │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── package.json │ │ │ │ │ ├── passthrough.js │ │ │ │ │ ├── readable.js │ │ │ │ │ ├── transform.js │ │ │ │ │ └── writable.js │ │ │ │ └── xtend │ │ │ │ │ ├── .jshintrc │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── LICENCE │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── README.md │ │ │ │ │ ├── immutable.js │ │ │ │ │ ├── mutable.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── test.js │ │ │ │ ├── package.json │ │ │ │ └── through2.js │ │ ├── package.json │ │ ├── readme.markdown │ │ └── test │ │ │ ├── auth.js │ │ │ ├── auth_encoded.js │ │ │ ├── auth_opt.js │ │ │ ├── get.js │ │ │ ├── many.js │ │ │ ├── opts.js │ │ │ ├── post.js │ │ │ ├── post_immediate.js │ │ │ ├── readable.js │ │ │ └── set_header.js │ ├── libmime │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── node_modules │ │ │ ├── iconv-lite │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── Changelog.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── encodings │ │ │ │ │ ├── dbcs-codec.js │ │ │ │ │ ├── dbcs-data.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── internal.js │ │ │ │ │ ├── sbcs-codec.js │ │ │ │ │ ├── sbcs-data-generated.js │ │ │ │ │ ├── sbcs-data.js │ │ │ │ │ ├── tables │ │ │ │ │ │ ├── big5-added.json │ │ │ │ │ │ ├── cp936.json │ │ │ │ │ │ ├── cp949.json │ │ │ │ │ │ ├── cp950.json │ │ │ │ │ │ ├── eucjp.json │ │ │ │ │ │ ├── gb18030-ranges.json │ │ │ │ │ │ ├── gbk-added.json │ │ │ │ │ │ └── shiftjis.json │ │ │ │ │ ├── utf16.js │ │ │ │ │ └── utf7.js │ │ │ │ ├── lib │ │ │ │ │ ├── extend-node.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── streams.js │ │ │ │ └── package.json │ │ │ ├── libbase64 │ │ │ │ ├── .npmignore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── lib │ │ │ │ │ └── libbase64.js │ │ │ │ └── package.json │ │ │ └── libqp │ │ │ │ ├── .npmignore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── lib │ │ │ │ └── libqp.js │ │ │ │ └── package.json │ │ ├── package.json │ │ └── src │ │ │ ├── charset.js │ │ │ ├── libmime.js │ │ │ └── mimetypes.js │ ├── nodemailer-direct-transport │ │ ├── .jshintrc │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── Gruntfile.js │ │ ├── LICENSE │ │ ├── README.md │ │ ├── node_modules │ │ │ └── smtp-connection │ │ │ │ ├── .jshintrc │ │ │ │ ├── .npmignore │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── Gruntfile.js │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── package.json │ │ │ │ └── src │ │ │ │ ├── data-stream.js │ │ │ │ └── smtp-connection.js │ │ ├── package.json │ │ ├── src │ │ │ ├── direct-transport.js │ │ │ └── message-queue.js │ │ └── test │ │ │ ├── direct-transport-test.js │ │ │ └── message-queue-test.js │ └── nodemailer-smtp-transport │ │ ├── .jshintrc │ │ ├── .npmignore │ │ ├── Gruntfile.js │ │ ├── LICENSE │ │ ├── README.md │ │ ├── node_modules │ │ ├── nodemailer-wellknown │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ ├── services.json │ │ │ └── test.js │ │ └── smtp-connection │ │ │ ├── .jshintrc │ │ │ ├── .npmignore │ │ │ ├── CHANGELOG.md │ │ │ ├── Gruntfile.js │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ └── src │ │ │ ├── data-stream.js │ │ │ └── smtp-connection.js │ │ ├── package.json │ │ └── src │ │ └── smtp-transport.js │ ├── package.json │ └── src │ ├── compiler.js │ └── nodemailer.js ├── output.png └── package.json /README.md: -------------------------------------------------------------------------------- 1 | ## Mass Mailer using Async 2 | This script demonstrate use of Async package to build Mass Mailer which can send email to 1000's of user in parallel way. 3 | 4 | ### How to run 5 | 6 | * Clone the script or download one. 7 | 8 | * Type ```npm install``` if dependencies is not present. 9 | 10 | * Run by using ```node Server.js``` and you should see following output. 11 | ![Output](output.png) 12 | 13 | ### Explanation: 14 | 15 | Script takes the email from array and execute email sending operation at once. So for more than 1 user it will send email to them at once. Once email is sent, it will update DB and return back to parent caller once done. 16 | 17 | ![Output](explanation.png) 18 | 19 | ### Links & website : 20 | Find tutorial here (http://codeforgeek.com/2015/04/nodejs-async-tutorial/). 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /explanation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/explanation.png -------------------------------------------------------------------------------- /node_modules/async/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | -------------------------------------------------------------------------------- /node_modules/async/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2014 Caolan McMahon 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/async/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "async", 3 | "repo": "caolan/async", 4 | "description": "Higher-order functions and common patterns for asynchronous code", 5 | "version": "0.1.23", 6 | "keywords": [], 7 | "dependencies": {}, 8 | "development": {}, 9 | "main": "lib/async.js", 10 | "scripts": [ "lib/async.js" ] 11 | } 12 | -------------------------------------------------------------------------------- /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 | bin/ 15 | karma.*.js 16 | format_deps.js 17 | -------------------------------------------------------------------------------- /node_modules/mongoose/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.12" 4 | - "0.10" 5 | - "iojs" 6 | services: 7 | - mongodb 8 | -------------------------------------------------------------------------------- /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/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 unauthorized = 'unauthorized'; 13 | var uninitialized = 'uninitialized'; 14 | 15 | STATES[0] = disconnected; 16 | STATES[1] = connected; 17 | STATES[2] = connecting; 18 | STATES[3] = disconnecting; 19 | STATES[4] = unauthorized; 20 | STATES[99] = uninitialized; 21 | 22 | STATES[disconnected] = 0; 23 | STATES[connected] = 1; 24 | STATES[connecting] = 2; 25 | STATES[disconnecting] = 3; 26 | STATES[unauthorized] = 4; 27 | STATES[uninitialized] = 99; 28 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/document_provider.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * Module dependencies. 5 | */ 6 | var Document = require('./document.js'); 7 | var BrowserDocument = require('./browserDocument.js'); 8 | 9 | /** 10 | * Returns the Document constructor for the current context 11 | * 12 | * @api private 13 | */ 14 | module.exports = function() { 15 | if (typeof window !== 'undefined' && typeof document !== 'undefined' && document === window.document) { 16 | return BrowserDocument; 17 | } else { 18 | return Document; 19 | } 20 | }; -------------------------------------------------------------------------------- /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 | // Don't include all of BSON for browserify's benefit 7 | var Binary = require('mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/binary'); 8 | 9 | module.exports = exports = Binary; 10 | -------------------------------------------------------------------------------- /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 | // Don't include all of BSON for browserify's benefit 9 | var ObjectId = require('mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/objectid'); 10 | 11 | /*! 12 | * ignore 13 | */ 14 | 15 | module.exports = exports = ObjectId; 16 | 17 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/browserMissingSchema.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 document.\n' 16 | + 'Use mongoose.Document(name, schema)'; 17 | MongooseError.call(this, msg); 18 | Error.captureStackTrace && Error.captureStackTrace(this, arguments.callee); 19 | this.name = 'MissingSchemaError'; 20 | } 21 | 22 | /*! 23 | * Inherits from MongooseError. 24 | */ 25 | 26 | MissingSchemaError.prototype = Object.create(MongooseError.prototype); 27 | MissingSchemaError.prototype.constructor = MongooseError; 28 | 29 | /*! 30 | * exports 31 | */ 32 | 33 | module.exports = MissingSchemaError; 34 | -------------------------------------------------------------------------------- /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 && Error.captureStackTrace(this, arguments.callee); 19 | this.name = 'CastError'; 20 | this.kind = type; 21 | this.value = value; 22 | this.path = path; 23 | }; 24 | 25 | /*! 26 | * Inherits from MongooseError. 27 | */ 28 | 29 | CastError.prototype = Object.create(MongooseError.prototype); 30 | CastError.prototype.constructor = MongooseError; 31 | 32 | 33 | /*! 34 | * exports 35 | */ 36 | 37 | module.exports = CastError; 38 | -------------------------------------------------------------------------------- /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 && Error.captureStackTrace(this, arguments.callee); 19 | this.name = 'MissingSchemaError'; 20 | } 21 | 22 | /*! 23 | * Inherits from MongooseError. 24 | */ 25 | 26 | MissingSchemaError.prototype = Object.create(MongooseError.prototype); 27 | MissingSchemaError.prototype.constructor = MongooseError; 28 | 29 | /*! 30 | * exports 31 | */ 32 | 33 | module.exports = MissingSchemaError; 34 | -------------------------------------------------------------------------------- /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 && Error.captureStackTrace(this, arguments.callee); 17 | this.name = 'OverwriteModelError'; 18 | }; 19 | 20 | /*! 21 | * Inherits from MongooseError. 22 | */ 23 | 24 | OverwriteModelError.prototype = Object.create(MongooseError.prototype); 25 | OverwriteModelError.prototype.constructor = MongooseError; 26 | 27 | /*! 28 | * exports 29 | */ 30 | 31 | module.exports = OverwriteModelError; 32 | -------------------------------------------------------------------------------- /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 && Error.captureStackTrace(this, arguments.callee); 18 | this.name = 'VersionError'; 19 | }; 20 | 21 | /*! 22 | * Inherits from MongooseError. 23 | */ 24 | 25 | VersionError.prototype = Object.create(MongooseError.prototype); 26 | VersionError.prototype.constructor = MongooseError; 27 | 28 | /*! 29 | * exports 30 | */ 31 | 32 | module.exports = VersionError; 33 | -------------------------------------------------------------------------------- /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', 'ignore'); 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/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('../drivers/node-mongodb-native/objectid'); 19 | module.exports = ObjectId; 20 | 21 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/hooks-fixed/.npmignore: -------------------------------------------------------------------------------- 1 | **.swp 2 | node_modules 3 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/hooks-fixed/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/kareem/.npmignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # Compiled binary addons (http://nodejs.org/api/addons.html) 20 | build/Release 21 | 22 | # Dependency directory 23 | # Commenting this out is preferred by some people, see 24 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- 25 | node_modules 26 | 27 | # Users Environment Variables 28 | .lock-wscript 29 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/kareem/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.11" 4 | - "0.10" 5 | script: "npm run-script test-travis" 6 | after_script: "npm install coveralls@2.10.0 && cat ./coverage/lcov.info | coveralls" 7 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/kareem/Makefile: -------------------------------------------------------------------------------- 1 | docs: 2 | node ./docs.js 3 | 4 | coverage: 5 | ./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- -R spec ./test/* 6 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/kareem/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var mocha = require('gulp-mocha'); 3 | var config = require('./package.json'); 4 | var jscs = require('gulp-jscs'); 5 | 6 | gulp.task('mocha', function() { 7 | return gulp.src('./test/*'). 8 | pipe(mocha({ reporter: 'dot' })); 9 | }); 10 | 11 | gulp.task('jscs', function() { 12 | return gulp.src('./index.js'). 13 | pipe(jscs(config.jscsConfig)); 14 | }); 15 | 16 | gulp.task('watch', function() { 17 | gulp.watch('./index.js', ['jscs', 'mocha']); 18 | }); 19 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/kareem/test/post.test.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | var Kareem = require('../'); 3 | 4 | describe('execPost', function() { 5 | var hooks; 6 | 7 | beforeEach(function() { 8 | hooks = new Kareem(); 9 | }); 10 | 11 | it('handles errors', function(done) { 12 | hooks.post('cook', function(eggs, callback) { 13 | callback('error!'); 14 | }); 15 | 16 | hooks.execPost('cook', null, [4], function(error, eggs) { 17 | assert.equal('error!', error); 18 | assert.ok(!eggs); 19 | done(); 20 | }); 21 | }); 22 | 23 | it('multiple posts', function(done) { 24 | hooks.post('cook', function(eggs, callback) { 25 | setTimeout( 26 | function() { 27 | callback(); 28 | }, 29 | 5); 30 | }); 31 | 32 | hooks.post('cook', function(eggs, callback) { 33 | setTimeout( 34 | function() { 35 | callback(); 36 | }, 37 | 5); 38 | }); 39 | 40 | hooks.execPost('cook', null, [4], function(error, eggs) { 41 | assert.ifError(error); 42 | assert.equal(4, eggs); 43 | done(); 44 | }); 45 | }); 46 | }); -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.10 4 | - 0.12 5 | sudo: false 6 | env: 7 | - MONGODB_VERSION=2.2.x 8 | - MONGODB_VERSION=2.4.x 9 | - MONGODB_VERSION=2.6.x 10 | - MONGODB_VERSION=3.0.x 11 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/Makefile: -------------------------------------------------------------------------------- 1 | NODE = node 2 | NPM = npm 3 | JSDOC = jsdoc 4 | name = all 5 | 6 | generate_docs: 7 | # cp -R ./HISTORY.md ./docs/content/meta/release-notes.md 8 | cp -R ./docs/history-header.md ./docs/content/meta/release-notes.md 9 | more ./HISTORY.md >> ./docs/content/meta/release-notes.md 10 | pandoc docs/layouts/partials/welcome.md -o docs/layouts/partials/welcome.html 11 | hugo -s docs/ -d ../public 12 | $(JSDOC) -c conf.json -t docs/jsdoc-template/ -d ./public/api 13 | cp -R ./public/api/scripts ./public/. 14 | cp -R ./public/api/styles ./public/. 15 | 16 | .PHONY: total 17 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.10 4 | - 0.11 -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/Makefile: -------------------------------------------------------------------------------- 1 | NODE = node 2 | NPM = npm 3 | JSDOC = jsdoc 4 | name = all 5 | 6 | generate_docs: 7 | cp -R ./docs/history-header.md ./docs/content/meta/release-notes.md 8 | more ./HISTORY.md >> ./docs/content/meta/release-notes.md 9 | hugo -s docs/ -d ../public 10 | $(JSDOC) -c conf.json -t docs/jsdoc-template/ -d ./public/api 11 | cp -R ./public/api/scripts ./public/. 12 | cp -R ./public/api/styles ./public/. 13 | 14 | .PHONY: total 15 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/TESTING.md: -------------------------------------------------------------------------------- 1 | Testing setup 2 | ============= 3 | 4 | Single Server 5 | ------------- 6 | mongod --dbpath=./db 7 | 8 | Replicaset 9 | ---------- 10 | mongo --nodb 11 | var x = new ReplSetTest({"useHostName":"false", "nodes" : {node0 : {}, node1 : {}, node2 : {}}}) 12 | x.startSet(); 13 | var config = x.getReplSetConfig() 14 | x.initiate(config); 15 | 16 | Mongos 17 | ------ 18 | var s = new ShardingTest( "auth1", 1 , 0 , 2 , {rs: true, noChunkSize : true}); -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | MongoError: require('./lib/error') 3 | , Server: require('./lib/topologies/server') 4 | , ReplSet: require('./lib/topologies/replset') 5 | , Mongos: require('./lib/topologies/mongos') 6 | , Logger: require('./lib/connection/logger') 7 | , Cursor: require('./lib/cursor') 8 | , ReadPreference: require('./lib/topologies/read_preference') 9 | , BSON: require('bson') 10 | // Raw operations 11 | , Query: require('./lib/connection/commands').Query 12 | // Auth mechanisms 13 | , MongoCR: require('./lib/auth/mongocr') 14 | , X509: require('./lib/auth/x509') 15 | , Plain: require('./lib/auth/plain') 16 | , GSSAPI: require('./lib/auth/gssapi') 17 | } -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/error.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /** 4 | * Creates a new MongoError 5 | * @class 6 | * @augments Error 7 | * @param {string} message The error message 8 | * @return {MongoError} A cursor instance 9 | */ 10 | function MongoError(message) { 11 | this.name = 'MongoError'; 12 | this.message = message; 13 | this.stack = (new Error()).stack; 14 | } 15 | 16 | /** 17 | * Creates a new MongoError object 18 | * @class 19 | * @param {object} options The error options 20 | * @return {MongoError} A cursor instance 21 | */ 22 | MongoError.create = function(options) { 23 | var err = null; 24 | 25 | if(options instanceof Error) { 26 | err = new MongoError(options.message); 27 | err.stack = options.stack; 28 | } else if(typeof options == 'string') { 29 | err = new MongoError(options); 30 | } else { 31 | err = new MongoError(options.message || options.errmsg || "n/a"); 32 | // Other options 33 | for(var name in options) { 34 | err[name] = options[name]; 35 | } 36 | } 37 | 38 | return err; 39 | } 40 | 41 | // Extend JavaScript error 42 | MongoError.prototype = new Error; 43 | 44 | module.exports = MongoError; 45 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/command_result.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var setProperty = require('../connection/utils').setProperty 4 | , getProperty = require('../connection/utils').getProperty 5 | , getSingleProperty = require('../connection/utils').getSingleProperty; 6 | 7 | /** 8 | * Creates a new CommandResult instance 9 | * @class 10 | * @param {object} result CommandResult object 11 | * @param {Connection} connection A connection instance associated with this result 12 | * @return {CommandResult} A cursor instance 13 | */ 14 | var CommandResult = function(result, connection) { 15 | this.result = result; 16 | this.connection = connection; 17 | } 18 | 19 | /** 20 | * Convert CommandResult to JSON 21 | * @method 22 | * @return {object} 23 | */ 24 | CommandResult.prototype.toJSON = function() { 25 | return this.result; 26 | } 27 | 28 | /** 29 | * Convert CommandResult to String representation 30 | * @method 31 | * @return {string} 32 | */ 33 | CommandResult.prototype.toString = function() { 34 | return JSON.stringify(this.toJSON()); 35 | } 36 | 37 | module.exports = CommandResult; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/.bin/mkdirp: -------------------------------------------------------------------------------- 1 | IntxLNK../mkdirp/bin/cmd.js -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/.bin/rimraf: -------------------------------------------------------------------------------- 1 | IntxLNK../rimraf/bin.js -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.10 # development version of 0.8, may be unstable 4 | - 0.12 -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/HISTORY: -------------------------------------------------------------------------------- 1 | 0.2.21 2015-03-21 2 | ----------------- 3 | - Updated Nan to 1.7.0 to support io.js and node 0.12.0 4 | 5 | 0.2.19 2015-02-16 6 | ----------------- 7 | - Updated Nan to 1.6.2 to support io.js and node 0.12.0 8 | 9 | 0.2.18 2015-01-20 10 | ----------------- 11 | - Updated Nan to 1.5.1 to support io.js 12 | 13 | 0.2.16 2014-12-17 14 | ----------------- 15 | - Made pid cycle on 0xffff to avoid weird overflows on creation of ObjectID's 16 | 17 | 0.2.12 2014-08-24 18 | ----------------- 19 | - Fixes for fortify review of c++ extension 20 | - toBSON correctly allows returns of non objects 21 | 22 | 0.2.3 2013-10-01 23 | ---------------- 24 | - Drying of ObjectId code for generation of id (Issue #54, https://github.com/moredip) 25 | - Fixed issue where corrupt CString's could cause endless loop 26 | - Support for Node 0.11.X > (Issue #49, https://github.com/kkoopa) 27 | 28 | 0.1.4 2012-09-25 29 | ---------------- 30 | - Added precompiled c++ native extensions for win32 ia32 and x64 -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/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/mongodb-core/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 | 'include_dirs': [ '=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/mongodb-core/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/mongodb-core/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/mongodb-core/node_modules/bson/build/Release/bson.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/build/Release/bson.node -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/build/Release/linker.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/build/Release/linker.lock -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/build/Release/obj.target/bson.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/build/Release/obj.target/bson.node -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/build/Release/obj.target/bson/ext/bson.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/build/Release/obj.target/bson/ext/bson.o -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/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/mongodb-core/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/mongodb-core/node_modules/bson/builderror.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/builderror.log -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/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/mongodb-core/node_modules/bson/ext/win32/ia32/bson.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/ext/win32/ia32/bson.node -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/ext/win32/x64/bson.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/ext/win32/x64/bson.node -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A class representation of the BSON Code type. 3 | * 4 | * @class 5 | * @param {(string|function)} code a string or function. 6 | * @param {Object} [scope] an optional scope for the function. 7 | * @return {Code} 8 | */ 9 | var Code = function Code(code, scope) { 10 | if(!(this instanceof Code)) return new Code(code, scope); 11 | this._bsontype = 'Code'; 12 | this.code = code; 13 | this.scope = scope == null ? {} : scope; 14 | }; 15 | 16 | /** 17 | * @ignore 18 | */ 19 | Code.prototype.toJSON = function() { 20 | return {scope:this.scope, code:this.code}; 21 | } 22 | 23 | module.exports = Code; 24 | module.exports.Code = Code; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/db_ref.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A class representation of the BSON DBRef type. 3 | * 4 | * @class 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 | module.exports = DBRef; 32 | module.exports.DBRef = DBRef; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/double.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A class representation of the BSON Double type. 3 | * 4 | * @class 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 | * @method 19 | * @return {number} returns the wrapped double number. 20 | */ 21 | Double.prototype.valueOf = function() { 22 | return this.value; 23 | }; 24 | 25 | /** 26 | * @ignore 27 | */ 28 | Double.prototype.toJSON = function() { 29 | return this.value; 30 | } 31 | 32 | module.exports = Double; 33 | module.exports.Double = Double; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/max_key.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A class representation of the BSON MaxKey type. 3 | * 4 | * @class 5 | * @return {MaxKey} A MaxKey instance 6 | */ 7 | function MaxKey() { 8 | if(!(this instanceof MaxKey)) return new MaxKey(); 9 | 10 | this._bsontype = 'MaxKey'; 11 | } 12 | 13 | module.exports = MaxKey; 14 | module.exports.MaxKey = MaxKey; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/min_key.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A class representation of the BSON MinKey type. 3 | * 4 | * @class 5 | * @return {MinKey} A MinKey instance 6 | */ 7 | function MinKey() { 8 | if(!(this instanceof MinKey)) return new MinKey(); 9 | 10 | this._bsontype = 'MinKey'; 11 | } 12 | 13 | module.exports = MinKey; 14 | module.exports.MinKey = MinKey; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/symbol.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A class representation of the BSON Symbol type. 3 | * 4 | * @class 5 | * @deprecated 6 | * @param {string} value the string representing the symbol. 7 | * @return {Symbol} 8 | */ 9 | function Symbol(value) { 10 | if(!(this instanceof Symbol)) return new Symbol(value); 11 | this._bsontype = 'Symbol'; 12 | this.value = value; 13 | } 14 | 15 | /** 16 | * Access the wrapped string value. 17 | * 18 | * @method 19 | * @return {String} returns the wrapped string. 20 | */ 21 | Symbol.prototype.valueOf = function() { 22 | return this.value; 23 | }; 24 | 25 | /** 26 | * @ignore 27 | */ 28 | Symbol.prototype.toString = function() { 29 | return this.value; 30 | } 31 | 32 | /** 33 | * @ignore 34 | */ 35 | Symbol.prototype.inspect = function() { 36 | return this.value; 37 | } 38 | 39 | /** 40 | * @ignore 41 | */ 42 | Symbol.prototype.toJSON = function() { 43 | return this.value; 44 | } 45 | 46 | module.exports = Symbol; 47 | module.exports.Symbol = Symbol; -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/nan/.dntrc: -------------------------------------------------------------------------------- 1 | ## DNT config file 2 | ## see https://github.com/rvagg/dnt 3 | 4 | NODE_VERSIONS="\ 5 | master \ 6 | v0.11.13 \ 7 | v0.10.30 \ 8 | v0.10.29 \ 9 | v0.10.28 \ 10 | v0.10.26 \ 11 | v0.10.25 \ 12 | v0.10.24 \ 13 | v0.10.23 \ 14 | v0.10.22 \ 15 | v0.10.21 \ 16 | v0.10.20 \ 17 | v0.10.19 \ 18 | v0.8.28 \ 19 | v0.8.27 \ 20 | v0.8.26 \ 21 | v0.8.24 \ 22 | " 23 | OUTPUT_PREFIX="nan-" 24 | TEST_CMD=" \ 25 | cd /dnt/ && \ 26 | npm install && \ 27 | node_modules/.bin/node-gyp --nodedir /usr/src/node/ rebuild --directory test && \ 28 | node_modules/.bin/tap --gc test/js/*-test.js \ 29 | " 30 | 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/nan/include_dirs.js: -------------------------------------------------------------------------------- 1 | console.log(require('path').relative('.', __dirname)); 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/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/mongodb-core/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/mongodb-core/node_modules/bson/tools/jasmine-1.1.0/jasmine_favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/tools/jasmine-1.1.0/jasmine_favicon.png -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/README.md: -------------------------------------------------------------------------------- 1 | kerberos 2 | ======== 3 | 4 | Kerberos library for node.js -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/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/mongodb-core/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 Release/obj.target/kerberos/lib/kerberos.o Release/obj.target/kerberos/lib/worker.o Release/obj.target/kerberos/lib/kerberosgss.o Release/obj.target/kerberos/lib/base64.o Release/obj.target/kerberos/lib/kerberos_context.o -Wl,--end-group 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/.deps/Release/obj.target/kerberos/lib/base64.o.d: -------------------------------------------------------------------------------- 1 | cmd_Release/obj.target/kerberos/lib/base64.o := cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/unixroot/.node-gyp/0.10.30/src -I/home/unixroot/.node-gyp/0.10.30/deps/uv/include -I/home/unixroot/.node-gyp/0.10.30/deps/v8/include -I../node_modules/nan -I/usr/include/mit-krb5 -fPIC -Wall -Wextra -Wno-unused-parameter -pthread -m64 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -MMD -MF ./Release/.deps/Release/obj.target/kerberos/lib/base64.o.d.raw -c -o Release/obj.target/kerberos/lib/base64.o ../lib/base64.c 2 | Release/obj.target/kerberos/lib/base64.o: ../lib/base64.c ../lib/base64.h 3 | ../lib/base64.c: 4 | ../lib/base64.h: 5 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/kerberos.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/kerberos.node -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/linker.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/linker.lock -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/obj.target/kerberos.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/obj.target/kerberos.node -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/obj.target/kerberos/lib/base64.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/obj.target/kerberos/lib/base64.o -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/obj.target/kerberos/lib/kerberos.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/obj.target/kerberos/lib/kerberos.o -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/obj.target/kerberos/lib/kerberos_context.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/obj.target/kerberos/lib/kerberos_context.o -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/obj.target/kerberos/lib/kerberosgss.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/obj.target/kerberos/lib/kerberosgss.o -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/obj.target/kerberos/lib/worker.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build/Release/obj.target/kerberos/lib/worker.o -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/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/mongodb-core/node_modules/kerberos/builderror.log: -------------------------------------------------------------------------------- 1 | ../lib/kerberosgss.c:27:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] 2 | #pragma clang diagnostic push 3 | ^ 4 | ../lib/kerberosgss.c:28:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] 5 | #pragma clang diagnostic ignored "-Wdeprecated-declarations" 6 | ^ 7 | ../lib/kerberosgss.c: In function ‘authenticate_gss_client_wrap’: 8 | ../lib/kerberosgss.c:350:19: warning: variable ‘server_conf_flags’ set but not used [-Wunused-but-set-variable] 9 | char buf[4096], server_conf_flags; 10 | ^ 11 | ../lib/kerberosgss.c: At top level: 12 | ../lib/kerberosgss.c:692:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] 13 | #pragma clang diagnostic pop 14 | ^ 15 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/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/mongodb-core/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 | #ifndef BASE64_H 17 | #define BASE64_H 18 | 19 | char *base64_encode(const unsigned char *value, int vlen); 20 | unsigned char *base64_decode(const char *value, int *rlen); 21 | 22 | #endif -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/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/mongodb-core/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/mongodb-core/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/mongodb-core/node_modules/kerberos/lib/win32/worker.h: -------------------------------------------------------------------------------- 1 | #ifndef WORKER_H_ 2 | #define WORKER_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include "nan.h" 8 | 9 | using namespace node; 10 | using namespace v8; 11 | 12 | class Worker { 13 | public: 14 | Worker(); 15 | virtual ~Worker(); 16 | 17 | // libuv's request struct. 18 | uv_work_t request; 19 | // Callback 20 | NanCallback *callback; 21 | // Parameters 22 | void *parameters; 23 | // Results 24 | void *return_value; 25 | // Did we raise an error 26 | bool error; 27 | // The error message 28 | char *error_message; 29 | // Error code if not message 30 | int error_code; 31 | // Any return code 32 | int return_code; 33 | // Method we are going to fire 34 | void (*execute)(Worker *worker); 35 | Handle (*mapper)(Worker *worker); 36 | }; 37 | 38 | #endif // WORKER_H_ 39 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/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/mongodb-core/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/mongodb-core/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/mongodb-core/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/mongodb-core/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/mongodb-core/node_modules/kerberos/lib/worker.h: -------------------------------------------------------------------------------- 1 | #ifndef WORKER_H_ 2 | #define WORKER_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace node; 10 | using namespace v8; 11 | 12 | class Worker { 13 | public: 14 | Worker(); 15 | virtual ~Worker(); 16 | 17 | // libuv's request struct. 18 | uv_work_t request; 19 | // Callback 20 | NanCallback *callback; 21 | // Parameters 22 | void *parameters; 23 | // Results 24 | void *return_value; 25 | // Did we raise an error 26 | bool error; 27 | // The error message 28 | char *error_message; 29 | // Error code if not message 30 | int error_code; 31 | // Any return code 32 | int return_code; 33 | // Method we are going to fire 34 | void (*execute)(Worker *worker); 35 | Handle (*mapper)(Worker *worker); 36 | }; 37 | 38 | #endif // WORKER_H_ 39 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/node_modules/nan/.dntrc: -------------------------------------------------------------------------------- 1 | ## DNT config file 2 | ## see https://github.com/rvagg/dnt 3 | 4 | NODE_VERSIONS="\ 5 | master \ 6 | v0.11.13 \ 7 | v0.10.30 \ 8 | v0.10.29 \ 9 | v0.10.28 \ 10 | v0.10.26 \ 11 | v0.10.25 \ 12 | v0.10.24 \ 13 | v0.10.23 \ 14 | v0.10.22 \ 15 | v0.10.21 \ 16 | v0.10.20 \ 17 | v0.10.19 \ 18 | v0.8.28 \ 19 | v0.8.27 \ 20 | v0.8.26 \ 21 | v0.8.24 \ 22 | " 23 | OUTPUT_PREFIX="nan-" 24 | TEST_CMD=" \ 25 | cd /dnt/ && \ 26 | npm install && \ 27 | node_modules/.bin/node-gyp --nodedir /usr/src/node/ rebuild --directory test && \ 28 | node_modules/.bin/tap --gc test/js/*-test.js \ 29 | " 30 | 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/node_modules/nan/include_dirs.js: -------------------------------------------------------------------------------- 1 | console.log(require('path').relative('.', __dirname)); 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/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/mongodb-core/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/mongodb/node_modules/mongodb-core/node_modules/mkdirp/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 4 | - 0.8 5 | - "0.10" 6 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/bin/cmd.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var mkdirp = require('../'); 4 | var minimist = require('minimist'); 5 | var fs = require('fs'); 6 | 7 | var argv = minimist(process.argv.slice(2), { 8 | alias: { m: 'mode', h: 'help' }, 9 | string: [ 'mode' ] 10 | }); 11 | if (argv.help) { 12 | fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); 13 | return; 14 | } 15 | 16 | var paths = argv._.slice(); 17 | var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; 18 | 19 | (function next () { 20 | if (paths.length === 0) return; 21 | var p = paths.shift(); 22 | 23 | if (mode === undefined) mkdirp(p, cb) 24 | else mkdirp(p, mode, cb) 25 | 26 | function cb (err) { 27 | if (err) { 28 | console.error(err.message); 29 | process.exit(1); 30 | } 31 | else next(); 32 | } 33 | })(); 34 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/bin/usage.txt: -------------------------------------------------------------------------------- 1 | usage: mkdirp [DIR1,DIR2..] {OPTIONS} 2 | 3 | Create each supplied directory including any necessary parent directories that 4 | don't yet exist. 5 | 6 | If the directory already exists, do nothing. 7 | 8 | OPTIONS are: 9 | 10 | -m, --mode If a directory needs to be created, set the mode as an octal 11 | permission string. 12 | 13 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/examples/pow.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('mkdirp'); 2 | 3 | mkdirp('/tmp/foo/bar/baz', function (err) { 4 | if (err) console.error(err) 5 | else console.log('pow!') 6 | }); 7 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/node_modules/minimist/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/node_modules/minimist/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the 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 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/node_modules/minimist/example/parse.js: -------------------------------------------------------------------------------- 1 | var argv = require('../')(process.argv.slice(2)); 2 | console.dir(argv); 3 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/node_modules/minimist/test/dash.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('-', function (t) { 5 | t.plan(5); 6 | t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); 7 | t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); 8 | t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); 9 | t.deepEqual( 10 | parse([ '-b', '-' ], { boolean: 'b' }), 11 | { b: true, _: [ '-' ] } 12 | ); 13 | t.deepEqual( 14 | parse([ '-s', '-' ], { string: 's' }), 15 | { s: '-', _: [] } 16 | ); 17 | }); 18 | 19 | test('-a -- b', function (t) { 20 | t.plan(3); 21 | t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 22 | t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 23 | t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 24 | }); 25 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/node_modules/minimist/test/default_bool.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var parse = require('../'); 3 | 4 | test('boolean default true', function (t) { 5 | var argv = parse([], { 6 | boolean: 'sometrue', 7 | default: { sometrue: true } 8 | }); 9 | t.equal(argv.sometrue, true); 10 | t.end(); 11 | }); 12 | 13 | test('boolean default false', function (t) { 14 | var argv = parse([], { 15 | boolean: 'somefalse', 16 | default: { somefalse: false } 17 | }); 18 | t.equal(argv.somefalse, false); 19 | t.end(); 20 | }); 21 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/node_modules/minimist/test/dotted.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('dotted alias', function (t) { 5 | var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); 6 | t.equal(argv.a.b, 22); 7 | t.equal(argv.aa.bb, 22); 8 | t.end(); 9 | }); 10 | 11 | test('dotted default', function (t) { 12 | var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); 13 | t.equal(argv.a.b, 11); 14 | t.equal(argv.aa.bb, 11); 15 | t.end(); 16 | }); 17 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/node_modules/minimist/test/long.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var parse = require('../'); 3 | 4 | test('long opts', function (t) { 5 | t.deepEqual( 6 | parse([ '--bool' ]), 7 | { bool : true, _ : [] }, 8 | 'long boolean' 9 | ); 10 | t.deepEqual( 11 | parse([ '--pow', 'xixxle' ]), 12 | { pow : 'xixxle', _ : [] }, 13 | 'long capture sp' 14 | ); 15 | t.deepEqual( 16 | parse([ '--pow=xixxle' ]), 17 | { pow : 'xixxle', _ : [] }, 18 | 'long capture eq' 19 | ); 20 | t.deepEqual( 21 | parse([ '--host', 'localhost', '--port', '555' ]), 22 | { host : 'localhost', port : 555, _ : [] }, 23 | 'long captures sp' 24 | ); 25 | t.deepEqual( 26 | parse([ '--host=localhost', '--port=555' ]), 27 | { host : 'localhost', port : 555, _ : [] }, 28 | 'long captures eq' 29 | ); 30 | t.end(); 31 | }); 32 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('parse with modifier functions' , function (t) { 5 | t.plan(1); 6 | 7 | var argv = parse([ '-b', '123' ], { boolean: 'b' }); 8 | t.deepEqual(argv, { b: true, _: ['123'] }); 9 | }); 10 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/node_modules/minimist/test/whitespace.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('whitespace should be whitespace' , function (t) { 5 | t.plan(1); 6 | var x = parse([ '-x', '\t' ]).x; 7 | t.equal(x, '\t'); 8 | }); 9 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/test/clobber.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../').mkdirp; 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | var ps = [ '', 'tmp' ]; 7 | 8 | for (var i = 0; i < 25; i++) { 9 | var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | ps.push(dir); 11 | } 12 | 13 | var file = ps.join('/'); 14 | 15 | // a file in the way 16 | var itw = ps.slice(0, 3).join('/'); 17 | 18 | 19 | test('clobber-pre', function (t) { 20 | console.error("about to write to "+itw) 21 | fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); 22 | 23 | fs.stat(itw, function (er, stat) { 24 | t.ifError(er) 25 | t.ok(stat && stat.isFile(), 'should be file') 26 | t.end() 27 | }) 28 | }) 29 | 30 | test('clobber', function (t) { 31 | t.plan(2); 32 | mkdirp(file, 0755, function (err) { 33 | t.ok(err); 34 | t.equal(err.code, 'ENOTDIR'); 35 | t.end(); 36 | }); 37 | }); 38 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/test/mkdirp.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('woo', function (t) { 8 | t.plan(5); 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/tmp/' + [x,y,z].join('/'); 14 | 15 | mkdirp(file, 0755, function (err) { 16 | t.ifError(err); 17 | exists(file, function (ex) { 18 | t.ok(ex, 'file created'); 19 | fs.stat(file, function (err, stat) { 20 | t.ifError(err); 21 | t.equal(stat.mode & 0777, 0755); 22 | t.ok(stat.isDirectory(), 'target not a directory'); 23 | }) 24 | }) 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/test/opts_fs.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var test = require('tap').test; 4 | var mockfs = require('mock-fs'); 5 | 6 | test('opts.fs', function (t) { 7 | t.plan(5); 8 | 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/beep/boop/' + [x,y,z].join('/'); 14 | var xfs = mockfs.fs(); 15 | 16 | mkdirp(file, { fs: xfs, mode: 0755 }, function (err) { 17 | t.ifError(err); 18 | xfs.exists(file, function (ex) { 19 | t.ok(ex, 'created file'); 20 | xfs.stat(file, function (err, stat) { 21 | t.ifError(err); 22 | t.equal(stat.mode & 0777, 0755); 23 | t.ok(stat.isDirectory(), 'target not a directory'); 24 | }); 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/test/opts_fs_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var test = require('tap').test; 4 | var mockfs = require('mock-fs'); 5 | 6 | test('opts.fs sync', function (t) { 7 | t.plan(4); 8 | 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/beep/boop/' + [x,y,z].join('/'); 14 | var xfs = mockfs.fs(); 15 | 16 | mkdirp.sync(file, { fs: xfs, mode: 0755 }); 17 | xfs.exists(file, function (ex) { 18 | t.ok(ex, 'created file'); 19 | xfs.stat(file, function (err, stat) { 20 | t.ifError(err); 21 | t.equal(stat.mode & 0777, 0755); 22 | t.ok(stat.isDirectory(), 'target not a directory'); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/test/perm.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('async perm', function (t) { 8 | t.plan(5); 9 | var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); 10 | 11 | mkdirp(file, 0755, function (err) { 12 | t.ifError(err); 13 | exists(file, function (ex) { 14 | t.ok(ex, 'file created'); 15 | fs.stat(file, function (err, stat) { 16 | t.ifError(err); 17 | t.equal(stat.mode & 0777, 0755); 18 | t.ok(stat.isDirectory(), 'target not a directory'); 19 | }) 20 | }) 21 | }); 22 | }); 23 | 24 | test('async root perm', function (t) { 25 | mkdirp('/tmp', 0755, function (err) { 26 | if (err) t.fail(err); 27 | t.end(); 28 | }); 29 | t.end(); 30 | }); 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/test/perm_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('sync perm', function (t) { 8 | t.plan(4); 9 | var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; 10 | 11 | mkdirp.sync(file, 0755); 12 | exists(file, function (ex) { 13 | t.ok(ex, 'file created'); 14 | fs.stat(file, function (err, stat) { 15 | t.ifError(err); 16 | t.equal(stat.mode & 0777, 0755); 17 | t.ok(stat.isDirectory(), 'target not a directory'); 18 | }); 19 | }); 20 | }); 21 | 22 | test('sync root perm', function (t) { 23 | t.plan(3); 24 | 25 | var file = '/tmp'; 26 | mkdirp.sync(file, 0755); 27 | exists(file, function (ex) { 28 | t.ok(ex, 'file created'); 29 | fs.stat(file, function (err, stat) { 30 | t.ifError(err); 31 | t.ok(stat.isDirectory(), 'target not a directory'); 32 | }) 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/test/rel.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('rel', function (t) { 8 | t.plan(5); 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var cwd = process.cwd(); 14 | process.chdir('/tmp'); 15 | 16 | var file = [x,y,z].join('/'); 17 | 18 | mkdirp(file, 0755, function (err) { 19 | t.ifError(err); 20 | exists(file, function (ex) { 21 | t.ok(ex, 'file created'); 22 | fs.stat(file, function (err, stat) { 23 | t.ifError(err); 24 | process.chdir(cwd); 25 | t.equal(stat.mode & 0777, 0755); 26 | t.ok(stat.isDirectory(), 'target not a directory'); 27 | }) 28 | }) 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/test/return.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('return value', function (t) { 7 | t.plan(4); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | // should return the first dir created. 15 | // By this point, it would be profoundly surprising if /tmp didn't 16 | // already exist, since every other test makes things in there. 17 | mkdirp(file, function (err, made) { 18 | t.ifError(err); 19 | t.equal(made, '/tmp/' + x); 20 | mkdirp(file, function (err, made) { 21 | t.ifError(err); 22 | t.equal(made, null); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/test/return_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('return value', function (t) { 7 | t.plan(2); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | // should return the first dir created. 15 | // By this point, it would be profoundly surprising if /tmp didn't 16 | // already exist, since every other test makes things in there. 17 | // Note that this will throw on failure, which will fail the test. 18 | var made = mkdirp.sync(file); 19 | t.equal(made, '/tmp/' + x); 20 | 21 | // making the same file again should have no effect. 22 | made = mkdirp.sync(file); 23 | t.equal(made, null); 24 | }); 25 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/test/root.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('root', function (t) { 7 | // '/' on unix, 'c:/' on windows. 8 | var file = path.resolve('/'); 9 | 10 | mkdirp(file, 0755, function (err) { 11 | if (err) throw err 12 | fs.stat(file, function (er, stat) { 13 | if (er) throw er 14 | t.ok(stat.isDirectory(), 'target is a directory'); 15 | t.end(); 16 | }) 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/test/sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('sync', function (t) { 8 | t.plan(4); 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/tmp/' + [x,y,z].join('/'); 14 | 15 | try { 16 | mkdirp.sync(file, 0755); 17 | } catch (err) { 18 | t.fail(err); 19 | return t.end(); 20 | } 21 | 22 | exists(file, function (ex) { 23 | t.ok(ex, 'file created'); 24 | fs.stat(file, function (err, stat) { 25 | t.ifError(err); 26 | t.equal(stat.mode & 0777, 0755); 27 | t.ok(stat.isDirectory(), 'target not a directory'); 28 | }); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/test/umask.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('implicit mode from umask', function (t) { 8 | t.plan(5); 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/tmp/' + [x,y,z].join('/'); 14 | 15 | mkdirp(file, function (err) { 16 | t.ifError(err); 17 | exists(file, function (ex) { 18 | t.ok(ex, 'file created'); 19 | fs.stat(file, function (err, stat) { 20 | t.ifError(err); 21 | t.equal(stat.mode & 0777, 0777 & (~process.umask())); 22 | t.ok(stat.isDirectory(), 'target not a directory'); 23 | }); 24 | }) 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/mkdirp/test/umask_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | 7 | test('umask sync modes', function (t) { 8 | t.plan(4); 9 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | 13 | var file = '/tmp/' + [x,y,z].join('/'); 14 | 15 | try { 16 | mkdirp.sync(file); 17 | } catch (err) { 18 | t.fail(err); 19 | return t.end(); 20 | } 21 | 22 | exists(file, function (ex) { 23 | t.ok(ex, 'file created'); 24 | fs.stat(file, function (err, stat) { 25 | t.ifError(err); 26 | t.equal(stat.mode & 0777, (0777 & (~process.umask()))); 27 | t.ok(stat.isDirectory(), 'target not a directory'); 28 | }); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/rimraf/AUTHORS: -------------------------------------------------------------------------------- 1 | # Authors sorted by whether or not they're me. 2 | Isaac Z. Schlueter (http://blog.izs.me) 3 | Wayne Larsen (http://github.com/wvl) 4 | ritch 5 | Marcel Laverdet 6 | Yosef Dinerstein 7 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/rimraf/README.md: -------------------------------------------------------------------------------- 1 | `rm -rf` for node. 2 | 3 | Install with `npm install rimraf`, or just drop rimraf.js somewhere. 4 | 5 | ## API 6 | 7 | `rimraf(f, callback)` 8 | 9 | The callback will be called with an error if there is one. Certain 10 | errors are handled for you: 11 | 12 | * Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of 13 | `opts.maxBusyTries` times before giving up. 14 | * `ENOENT` - If the file doesn't exist, rimraf will return 15 | successfully, since your desired outcome is already the case. 16 | 17 | ## rimraf.sync 18 | 19 | It can remove stuff synchronously, too. But that's not so good. Use 20 | the async API. It's better. 21 | 22 | ## CLI 23 | 24 | If installed with `npm install rimraf -g` it can be used as a global 25 | command `rimraf ` which is useful for cross platform support. 26 | 27 | ## mkdirp 28 | 29 | If you need to create a directory recursively, check out 30 | [mkdirp](https://github.com/substack/node-mkdirp). 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/rimraf/bin.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var rimraf = require('./') 4 | 5 | var help = false 6 | var dashdash = false 7 | var args = process.argv.slice(2).filter(function(arg) { 8 | if (dashdash) 9 | return !!arg 10 | else if (arg === '--') 11 | dashdash = true 12 | else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) 13 | help = true 14 | else 15 | return !!arg 16 | }); 17 | 18 | if (help || args.length === 0) { 19 | // If they didn't ask for help, then this is not a "success" 20 | var log = help ? console.log : console.error 21 | log('Usage: rimraf ') 22 | log('') 23 | log(' Deletes all files and folders at "path" recursively.') 24 | log('') 25 | log('Options:') 26 | log('') 27 | log(' -h, --help Display this usage info') 28 | process.exit(help ? 0 : 1) 29 | } else { 30 | args.forEach(function(arg) { 31 | rimraf.sync(arg) 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/rimraf/test/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | for i in test-*.js; do 4 | echo -n $i ... 5 | bash setup.sh 6 | node $i 7 | ! [ -d target ] 8 | echo "pass" 9 | done 10 | rm -rf target 11 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/rimraf/test/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | files=10 6 | folders=2 7 | depth=4 8 | target="$PWD/target" 9 | 10 | rm -rf target 11 | 12 | fill () { 13 | local depth=$1 14 | local files=$2 15 | local folders=$3 16 | local target=$4 17 | 18 | if ! [ -d $target ]; then 19 | mkdir -p $target 20 | fi 21 | 22 | local f 23 | 24 | f=$files 25 | while [ $f -gt 0 ]; do 26 | touch "$target/f-$depth-$f" 27 | let f-- 28 | done 29 | 30 | let depth-- 31 | 32 | if [ $depth -le 0 ]; then 33 | return 0 34 | fi 35 | 36 | f=$folders 37 | while [ $f -gt 0 ]; do 38 | mkdir "$target/folder-$depth-$f" 39 | fill $depth $files $folders "$target/d-$depth-$f" 40 | let f-- 41 | done 42 | } 43 | 44 | fill $depth $files $folders $target 45 | 46 | # sanity assert 47 | [ -d $target ] 48 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/rimraf/test/test-async.js: -------------------------------------------------------------------------------- 1 | var rimraf = require("../rimraf") 2 | , path = require("path") 3 | rimraf(path.join(__dirname, "target"), function (er) { 4 | if (er) throw er 5 | }) 6 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/rimraf/test/test-sync.js: -------------------------------------------------------------------------------- 1 | var rimraf = require("../rimraf") 2 | , path = require("path") 3 | rimraf.sync(path.join(__dirname, "target")) 4 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/.npmignore: -------------------------------------------------------------------------------- 1 | build/ 2 | test/ 3 | examples/ 4 | fs.js 5 | zlib.js -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/duplex.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_duplex.js") 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/README.md: -------------------------------------------------------------------------------- 1 | # core-util-is 2 | 3 | The `util.is*` functions introduced in Node v0.12. 4 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | module.exports = require('util').inherits 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | ctor.super_ = superCtor 5 | ctor.prototype = Object.create(superCtor.prototype, { 6 | constructor: { 7 | value: ctor, 8 | enumerable: false, 9 | writable: true, 10 | configurable: true 11 | } 12 | }); 13 | }; 14 | } else { 15 | // old school shim for old browsers 16 | module.exports = function inherits(ctor, superCtor) { 17 | ctor.super_ = superCtor 18 | var TempCtor = function () {} 19 | TempCtor.prototype = superCtor.prototype 20 | ctor.prototype = new TempCtor() 21 | ctor.prototype.constructor = ctor 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/test.js: -------------------------------------------------------------------------------- 1 | var inherits = require('./inherits.js') 2 | var assert = require('assert') 3 | 4 | function test(c) { 5 | assert(c.constructor === Child) 6 | assert(c.constructor.super_ === Parent) 7 | assert(Object.getPrototypeOf(c) === Child.prototype) 8 | assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) 9 | assert(c instanceof Child) 10 | assert(c instanceof Parent) 11 | } 12 | 13 | function Child() { 14 | Parent.call(this) 15 | test(this) 16 | } 17 | 18 | function Parent() {} 19 | 20 | inherits(Child, Parent) 21 | 22 | var c = new Child 23 | test(c) 24 | 25 | console.log('ok') 26 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "isarray", 3 | "description" : "Array#isArray for older browsers", 4 | "version" : "0.0.1", 5 | "repository" : "juliangruber/isarray", 6 | "homepage": "https://github.com/juliangruber/isarray", 7 | "main" : "index.js", 8 | "scripts" : [ 9 | "index.js" 10 | ], 11 | "dependencies" : {}, 12 | "keywords": ["browser","isarray","array"], 13 | "author": { 14 | "name": "Julian Gruber", 15 | "email": "mail@juliangruber.com", 16 | "url": "http://juliangruber.com" 17 | }, 18 | "license": "MIT" 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/index.js: -------------------------------------------------------------------------------- 1 | module.exports = Array.isArray || function (arr) { 2 | return Object.prototype.toString.call(arr) == '[object Array]'; 3 | }; 4 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/.npmignore: -------------------------------------------------------------------------------- 1 | build 2 | test 3 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/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/mongoose/node_modules/mongodb/node_modules/readable-stream/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/mongoose/node_modules/mongodb/node_modules/readable-stream/passthrough.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_passthrough.js") 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/readable.js: -------------------------------------------------------------------------------- 1 | exports = module.exports = require('./lib/_stream_readable.js'); 2 | exports.Readable = exports; 3 | exports.Writable = require('./lib/_stream_writable.js'); 4 | exports.Duplex = require('./lib/_stream_duplex.js'); 5 | exports.Transform = require('./lib/_stream_transform.js'); 6 | exports.PassThrough = require('./lib/_stream_passthrough.js'); 7 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/transform.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_transform.js") 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/writable.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_writable.js") 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/t.js: -------------------------------------------------------------------------------- 1 | var MongoClient = require('./').MongoClient; 2 | 3 | function healthCheck(callback) { 4 | MongoClient.connect('mongodb://localhost:31000,localhost:31001,localhost:31002/test', function(err, db) { 5 | var r = err; 6 | 7 | // setTimeout(function() { 8 | db.close(true, function(err, result) { 9 | callback(r); 10 | }); 11 | // }, 1000) 12 | }); 13 | } 14 | 15 | function routine() { 16 | healthCheck(function(r) { 17 | console.log(r); 18 | }); 19 | 20 | setTimeout(routine, 30000); 21 | } 22 | 23 | routine(); -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mongodb/wercker.yml: -------------------------------------------------------------------------------- 1 | box: wercker/nodejs 2 | services: 3 | - wercker/mongodb@1.0.1 4 | # Build definition 5 | build: 6 | # The steps that will be executed on build 7 | steps: 8 | # A step that executes `npm install` command 9 | - npm-install 10 | # A step that executes `npm test` command 11 | - npm-test 12 | 13 | # A custom script step, name value is used in the UI 14 | # and the code value contains the command that get executed 15 | - script: 16 | name: echo nodejs information 17 | code: | 18 | echo "node version $(node -v) running" 19 | echo "npm version $(npm -v) running" 20 | -------------------------------------------------------------------------------- /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/.npmignore: -------------------------------------------------------------------------------- 1 | *.sw* 2 | node_modules/ 3 | .DS_Store 4 | .idea -------------------------------------------------------------------------------- /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/test/promise.domain.test.js: -------------------------------------------------------------------------------- 1 | var Promise = require('../') 2 | , Domain = require('domain').Domain 3 | , assert = require('assert'); 4 | 5 | 6 | describe("domains", function () { 7 | it("exceptions should not breakout of domain boundaries", function (done) { 8 | if (process.version.indexOf('v0.10') != 0) return done(); 9 | var d = new Domain; 10 | d.on('error', function (err) { 11 | assert.equal(err.message, 'gaga'); 12 | done() 13 | }); 14 | 15 | var p = new Promise(); 16 | d.run(function () { 17 | p.then( 18 | function () {} 19 | ).then( 20 | function () { throw new Error('gaga'); } 21 | ).end(); 22 | }); 23 | 24 | process.nextTick(function () { 25 | p.fulfill(); 26 | }); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mpromise/test/promises.Aplus.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | var Promise = require('../lib/promise'); 5 | var aplus = require('promises-aplus-tests'); 6 | 7 | // tests 8 | describe("run A+ suite", function () { 9 | aplus.mocha({ 10 | fulfilled: Promise.fulfilled, 11 | rejected: Promise.rejected, 12 | deferred: Promise.deferred 13 | }); 14 | }); 15 | 16 | -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/.npmignore: -------------------------------------------------------------------------------- 1 | *.sw* 2 | node_modules/ 3 | coverage/ 4 | -------------------------------------------------------------------------------- /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_ENV=test ./node_modules/.bin/mocha $(T) $(TESTS) 4 | 5 | test-cov: 6 | @NODE_ENV=test node \ 7 | node_modules/.bin/istanbul cover \ 8 | ./node_modules/.bin/_mocha \ 9 | -- -u exports \ 10 | 11 | open-cov: 12 | open coverage/lcov-report/index.html 13 | 14 | test-travis: 15 | @NODE_ENV=test node \ 16 | node_modules/.bin/istanbul cover \ 17 | ./node_modules/.bin/_mocha \ 18 | --report lcovonly \ 19 | -- -u exports \ 20 | --bail 21 | 22 | .PHONY: test test-cov open-cov test-travis 23 | -------------------------------------------------------------------------------- /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 methods = [ 8 | 'find' 9 | , 'findOne' 10 | , 'update' 11 | , 'remove' 12 | , 'count' 13 | , 'distinct' 14 | , 'findAndModify' 15 | , 'aggregate' 16 | , 'findStream' 17 | ]; 18 | 19 | /** 20 | * Collection base class from which implementations inherit 21 | */ 22 | 23 | function Collection () {} 24 | 25 | for (var i = 0, len = methods.length; i < len; ++i) { 26 | var method = methods[i]; 27 | Collection.prototype[method] = notImplemented(method); 28 | } 29 | 30 | module.exports = exports = Collection; 31 | Collection.methods = methods; 32 | 33 | /** 34 | * creates a function which throws an implementation error 35 | */ 36 | 37 | function notImplemented (method) { 38 | return function () { 39 | throw new Error('collection.' + method + ' not implemented'); 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /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('./collection') : 12 | require('./collection'); 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/bluebird/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Petka Antonov 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/mongoose/node_modules/mquery/node_modules/bluebird/zalgo.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./js/zalgo/bluebird.js'); 2 | -------------------------------------------------------------------------------- /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/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/node_modules/mongoose/node_modules/mquery/test/collection/browser.js -------------------------------------------------------------------------------- /node_modules/mongoose/node_modules/mquery/test/collection/mongo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/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/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 | } 39 | -------------------------------------------------------------------------------- /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 | 1.0.0 / 2014-10-18 3 | ================== 4 | 5 | * fixed; compatibility w/ strict mode #4 [vkarpov15](https://github.com/vkarpov15) 6 | 7 | 0.3.1 / 2013-02-17 8 | ================== 9 | 10 | * fixed; allow '#' in username and password #3 11 | 12 | 0.3.0 / 2013-01-14 13 | ================== 14 | 15 | * fixed; default db logic #2 16 | 17 | 0.2.0 / 2013-01-09 18 | ================== 19 | 20 | * changed; default db is now 'test' 21 | 22 | 0.1.0 / 2012-12-18 23 | ================== 24 | 25 | * changed; include .sock in UDS 26 | 27 | 0.0.5 / 2012-12-18 28 | ================== 29 | 30 | * fixed; unix domain sockets used with db names 31 | 32 | 0.0.4 / 2012-12-01 33 | ================== 34 | 35 | * handle multple specified protocols 36 | 37 | 0.0.3 / 2012-11-29 38 | ================== 39 | 40 | * validate mongodb:///db 41 | * more detailed error message 42 | 43 | 0.0.2 / 2012-11-02 44 | ================== 45 | 46 | * add readPreferenceTags support 47 | * add unix domain support 48 | 49 | 0.0.1 / 2012-11-01 50 | ================== 51 | 52 | * initial release 53 | -------------------------------------------------------------------------------- /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/muri/strict.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var x = require('./')('mongodb://asdf:pass@your:2342/hilllo'); 4 | -------------------------------------------------------------------------------- /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/nodemailer/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "indent": 4, 3 | "node": true, 4 | "globalstrict": true, 5 | "evil": true, 6 | "unused": true, 7 | "undef": true, 8 | "newcap": true, 9 | "esnext": true, 10 | "curly": true, 11 | "eqeqeq": true, 12 | "expr": true, 13 | 14 | "predef": [ 15 | "describe", 16 | "it", 17 | "beforeEach", 18 | "afterEach" 19 | ] 20 | } -------------------------------------------------------------------------------- /node_modules/nodemailer/.npmignore: -------------------------------------------------------------------------------- 1 | .travis.yml 2 | assets 3 | examples 4 | test -------------------------------------------------------------------------------- /node_modules/nodemailer/Gruntfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(grunt) { 4 | 5 | // Project configuration. 6 | grunt.initConfig({ 7 | jshint: { 8 | all: ['src/*.js', 'test/*.js', 'examples/*.js', 'Gruntfile.js'], 9 | options: { 10 | jshintrc: '.jshintrc' 11 | } 12 | }, 13 | 14 | mochaTest: { 15 | all: { 16 | options: { 17 | reporter: 'spec' 18 | }, 19 | src: ['test/*-test.js'] 20 | } 21 | } 22 | }); 23 | 24 | // Load the plugin(s) 25 | grunt.loadNpmTasks('grunt-contrib-jshint'); 26 | grunt.loadNpmTasks('grunt-mocha-test'); 27 | 28 | // Tasks 29 | grunt.registerTask('default', ['jshint', 'mochaTest']); 30 | }; -------------------------------------------------------------------------------- /node_modules/nodemailer/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2015 Andris Reinman 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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 11 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 12 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 13 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 14 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 15 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 16 | SOFTWARE. 17 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/buildmail/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "indent": 4, 3 | "node": true, 4 | "globalstrict": true, 5 | "evil": true, 6 | "unused": true, 7 | "undef": true, 8 | "newcap": true, 9 | "esnext": true, 10 | "curly": true, 11 | "eqeqeq": true, 12 | "expr": true, 13 | 14 | "predef": [ 15 | "describe", 16 | "it", 17 | "beforeEach", 18 | "afterEach" 19 | ] 20 | } -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/buildmail/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | .DS_Store 4 | examples -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/buildmail/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | - 0.12 5 | - iojs 6 | before_install: 7 | - npm install -g grunt-cli 8 | notifications: 9 | email: 10 | - andris@kreata.ee 11 | webhooks: 12 | urls: 13 | - https://webhooks.gitter.im/e/0ed18fd9b3e529b3c2cc 14 | on_success: change # options: [always|never|change] default: always 15 | on_failure: always # options: [always|never|change] default: always 16 | on_start: false # default: false -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/buildmail/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## v1.2.2 2015-04-03 4 | 5 | * Maintenace release, bumped libqp which resolves an endless loop in case of a trailing <CR> 6 | 7 | ## v1.2.1 2014-09-12 8 | 9 | * Maintenace release, fixed a test and bumped dependency versions 10 | 11 | ## v1.2.0 2014-09-12 12 | 13 | * Allow functions as transform plugins (the function should create a stream object) 14 | 15 | ## v1.1.1 2014-08-21 16 | 17 | * Bumped libmime version to handle filenames with spaces properly. Short ascii only names with spaces were left unquoted. 18 | 19 | ## v1.1.0 2014-07-24 20 | 21 | * Added new method `getAddresses` that returns all used addresses as a structured object 22 | * Changed version number scheme. Major is now 1 but it is not backwards incopatible with 0.x, as only the scheme changed but not the content -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/buildmail/Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | 'use strict'; 3 | 4 | // Project configuration. 5 | grunt.initConfig({ 6 | jshint: { 7 | all: ['src/*.js', 'test/*.js'], 8 | options: { 9 | jshintrc: '.jshintrc' 10 | } 11 | }, 12 | 13 | mochaTest: { 14 | all: { 15 | options: { 16 | reporter: 'spec' 17 | }, 18 | src: ['test/*-unit.js'] 19 | } 20 | } 21 | }); 22 | 23 | // Load the plugin(s) 24 | grunt.loadNpmTasks('grunt-contrib-jshint'); 25 | grunt.loadNpmTasks('grunt-mocha-test'); 26 | 27 | // Tasks 28 | grunt.registerTask('default', ['jshint', 'mochaTest']); 29 | }; -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/buildmail/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Andris Reinman 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/nodemailer/node_modules/buildmail/node_modules/addressparser/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "indent": 4, 3 | "node": true, 4 | "globalstrict": true, 5 | "evil": true, 6 | "unused": true, 7 | "undef": true, 8 | "newcap": true, 9 | "esnext": true, 10 | "curly": true, 11 | "eqeqeq": true, 12 | 13 | "predef": [ 14 | "describe", 15 | "it" 16 | ] 17 | } -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/buildmail/node_modules/addressparser/.npmignore: -------------------------------------------------------------------------------- 1 | .travis.yml 2 | test 3 | Gruntfile.js 4 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/buildmail/node_modules/addressparser/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## v0.3.2 2015-01-07 4 | 5 | * Added changelog 6 | * Allow semicolon (;) as address separator in addition to comma (,). Backport from https://github.com/whiteout-io/addressparser/pull/5 7 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/buildmail/node_modules/addressparser/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Andris Reinman 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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 11 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 12 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 13 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 14 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 15 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 16 | SOFTWARE. 17 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/buildmail/node_modules/libbase64/.npmignore: -------------------------------------------------------------------------------- 1 | .travis.yml 2 | .jshintrc 3 | Gruntfile.js 4 | test -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/buildmail/node_modules/libbase64/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Andris Reinman 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/nodemailer/node_modules/buildmail/node_modules/libqp/.npmignore: -------------------------------------------------------------------------------- 1 | .travis.yml 2 | .jshintrc 3 | Gruntfile.js 4 | test -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/buildmail/node_modules/libqp/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Andris Reinman 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/nodemailer/node_modules/hyperquest/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - "0.10" 5 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the 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 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/example/many_hyperquest.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var hyperquest = require('../'); 3 | 4 | var server = http.createServer(function (req, res) { 5 | res.write(req.url.slice(1) + '\n'); 6 | setTimeout(res.end.bind(res), 3000); 7 | }); 8 | 9 | server.listen(5000, function () { 10 | var pending = 20; 11 | for (var i = 0; i < 20; i++) { 12 | var r = hyperquest('http://localhost:5000/' + i); 13 | r.pipe(process.stdout, { end: false }); 14 | r.on('end', function () { 15 | if (--pending === 0) server.close(); 16 | }); 17 | } 18 | }); 19 | 20 | process.stdout.setMaxListeners(0); // turn off annoying warnings 21 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/example/many_request.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var request = require('request'); 3 | 4 | var server = http.createServer(function (req, res) { 5 | res.write(req.url.slice(1) + '\n'); 6 | setTimeout(res.end.bind(res), 3000); 7 | }); 8 | 9 | server.listen(5000, function () { 10 | var pending = 20; 11 | for (var i = 0; i < 20; i++) { 12 | var r = request('http://localhost:5000/' + i); 13 | r.pipe(process.stdout, { end: false }); 14 | r.on('end', function () { 15 | if (--pending === 0) server.close(); 16 | }); 17 | } 18 | }); 19 | 20 | process.stdout.setMaxListeners(0); // turn off annoying warnings 21 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/example/req.js: -------------------------------------------------------------------------------- 1 | var hyperquest = require('../'); 2 | hyperquest('http://localhost:8000').pipe(process.stdout); 3 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/.npmignore: -------------------------------------------------------------------------------- 1 | build/ 2 | test/ 3 | examples/ 4 | fs.js 5 | zlib.js -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/duplex.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_duplex.js") 2 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/node_modules/core-util-is/README.md: -------------------------------------------------------------------------------- 1 | # core-util-is 2 | 3 | The `util.is*` functions introduced in Node v0.12. 4 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/node_modules/inherits/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | module.exports = require('util').inherits 2 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | ctor.super_ = superCtor 5 | ctor.prototype = Object.create(superCtor.prototype, { 6 | constructor: { 7 | value: ctor, 8 | enumerable: false, 9 | writable: true, 10 | configurable: true 11 | } 12 | }); 13 | }; 14 | } else { 15 | // old school shim for old browsers 16 | module.exports = function inherits(ctor, superCtor) { 17 | ctor.super_ = superCtor 18 | var TempCtor = function () {} 19 | TempCtor.prototype = superCtor.prototype 20 | ctor.prototype = new TempCtor() 21 | ctor.prototype.constructor = ctor 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/node_modules/inherits/test.js: -------------------------------------------------------------------------------- 1 | var inherits = require('./inherits.js') 2 | var assert = require('assert') 3 | 4 | function test(c) { 5 | assert(c.constructor === Child) 6 | assert(c.constructor.super_ === Parent) 7 | assert(Object.getPrototypeOf(c) === Child.prototype) 8 | assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) 9 | assert(c instanceof Child) 10 | assert(c instanceof Parent) 11 | } 12 | 13 | function Child() { 14 | Parent.call(this) 15 | test(this) 16 | } 17 | 18 | function Parent() {} 19 | 20 | inherits(Child, Parent) 21 | 22 | var c = new Child 23 | test(c) 24 | 25 | console.log('ok') 26 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/node_modules/isarray/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "isarray", 3 | "description" : "Array#isArray for older browsers", 4 | "version" : "0.0.1", 5 | "repository" : "juliangruber/isarray", 6 | "homepage": "https://github.com/juliangruber/isarray", 7 | "main" : "index.js", 8 | "scripts" : [ 9 | "index.js" 10 | ], 11 | "dependencies" : {}, 12 | "keywords": ["browser","isarray","array"], 13 | "author": { 14 | "name": "Julian Gruber", 15 | "email": "mail@juliangruber.com", 16 | "url": "http://juliangruber.com" 17 | }, 18 | "license": "MIT" 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/node_modules/isarray/index.js: -------------------------------------------------------------------------------- 1 | module.exports = Array.isArray || function (arr) { 2 | return Object.prototype.toString.call(arr) == '[object Array]'; 3 | }; 4 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/node_modules/string_decoder/.npmignore: -------------------------------------------------------------------------------- 1 | build 2 | test 3 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/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/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/passthrough.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_passthrough.js") 2 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/readable.js: -------------------------------------------------------------------------------- 1 | exports = module.exports = require('./lib/_stream_readable.js'); 2 | exports.Stream = require('stream'); 3 | exports.Readable = exports; 4 | exports.Writable = require('./lib/_stream_writable.js'); 5 | exports.Duplex = require('./lib/_stream_duplex.js'); 6 | exports.Transform = require('./lib/_stream_transform.js'); 7 | exports.PassThrough = require('./lib/_stream_passthrough.js'); 8 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/transform.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_transform.js") 2 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/duplexer2/node_modules/readable-stream/writable.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_writable.js") 2 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | .jshintrc 3 | .travis.yml -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/.npmignore: -------------------------------------------------------------------------------- 1 | build/ 2 | test/ 3 | examples/ 4 | fs.js 5 | zlib.js -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/duplex.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_duplex.js") 2 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/README.md: -------------------------------------------------------------------------------- 1 | # core-util-is 2 | 3 | The `util.is*` functions introduced in Node v0.12. 4 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/node_modules/inherits/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | module.exports = require('util').inherits 2 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | ctor.super_ = superCtor 5 | ctor.prototype = Object.create(superCtor.prototype, { 6 | constructor: { 7 | value: ctor, 8 | enumerable: false, 9 | writable: true, 10 | configurable: true 11 | } 12 | }); 13 | }; 14 | } else { 15 | // old school shim for old browsers 16 | module.exports = function inherits(ctor, superCtor) { 17 | ctor.super_ = superCtor 18 | var TempCtor = function () {} 19 | TempCtor.prototype = superCtor.prototype 20 | ctor.prototype = new TempCtor() 21 | ctor.prototype.constructor = ctor 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/node_modules/inherits/test.js: -------------------------------------------------------------------------------- 1 | var inherits = require('./inherits.js') 2 | var assert = require('assert') 3 | 4 | function test(c) { 5 | assert(c.constructor === Child) 6 | assert(c.constructor.super_ === Parent) 7 | assert(Object.getPrototypeOf(c) === Child.prototype) 8 | assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) 9 | assert(c instanceof Child) 10 | assert(c instanceof Parent) 11 | } 12 | 13 | function Child() { 14 | Parent.call(this) 15 | test(this) 16 | } 17 | 18 | function Parent() {} 19 | 20 | inherits(Child, Parent) 21 | 22 | var c = new Child 23 | test(c) 24 | 25 | console.log('ok') 26 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/node_modules/isarray/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "isarray", 3 | "description" : "Array#isArray for older browsers", 4 | "version" : "0.0.1", 5 | "repository" : "juliangruber/isarray", 6 | "homepage": "https://github.com/juliangruber/isarray", 7 | "main" : "index.js", 8 | "scripts" : [ 9 | "index.js" 10 | ], 11 | "dependencies" : {}, 12 | "keywords": ["browser","isarray","array"], 13 | "author": { 14 | "name": "Julian Gruber", 15 | "email": "mail@juliangruber.com", 16 | "url": "http://juliangruber.com" 17 | }, 18 | "license": "MIT" 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/node_modules/isarray/index.js: -------------------------------------------------------------------------------- 1 | module.exports = Array.isArray || function (arr) { 2 | return Object.prototype.toString.call(arr) == '[object Array]'; 3 | }; 4 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore: -------------------------------------------------------------------------------- 1 | build 2 | test 3 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/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/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/passthrough.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_passthrough.js") 2 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/readable.js: -------------------------------------------------------------------------------- 1 | var Stream = require('stream'); // hack to fix a circular dependency issue when used with browserify 2 | exports = module.exports = require('./lib/_stream_readable.js'); 3 | exports.Stream = Stream; 4 | exports.Readable = exports; 5 | exports.Writable = require('./lib/_stream_writable.js'); 6 | exports.Duplex = require('./lib/_stream_duplex.js'); 7 | exports.Transform = require('./lib/_stream_transform.js'); 8 | exports.PassThrough = require('./lib/_stream_passthrough.js'); 9 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/transform.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_transform.js") 2 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/readable-stream/writable.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_writable.js") 2 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/xtend/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "maxdepth": 4, 3 | "maxstatements": 200, 4 | "maxcomplexity": 12, 5 | "maxlen": 80, 6 | "maxparams": 5, 7 | 8 | "curly": true, 9 | "eqeqeq": true, 10 | "immed": true, 11 | "latedef": false, 12 | "noarg": true, 13 | "noempty": true, 14 | "nonew": true, 15 | "undef": true, 16 | "unused": "vars", 17 | "trailing": true, 18 | 19 | "quotmark": true, 20 | "expr": true, 21 | "asi": true, 22 | 23 | "browser": false, 24 | "esnext": true, 25 | "devel": false, 26 | "node": false, 27 | "nonstandard": false, 28 | 29 | "predef": ["require", "module", "__dirname", "__filename"] 30 | } 31 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/xtend/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/xtend/LICENCE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2014 Raynos. 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/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/xtend/Makefile: -------------------------------------------------------------------------------- 1 | browser: 2 | node ./support/compile 3 | 4 | .PHONY: browser -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/xtend/README.md: -------------------------------------------------------------------------------- 1 | # xtend 2 | 3 | [![browser support][3]][4] 4 | 5 | [![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) 6 | 7 | Extend like a boss 8 | 9 | xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence. 10 | 11 | ## Examples 12 | 13 | ```js 14 | var extend = require("xtend") 15 | 16 | // extend returns a new object. Does not mutate arguments 17 | var combination = extend({ 18 | a: "a", 19 | b: 'c' 20 | }, { 21 | b: "b" 22 | }) 23 | // { a: "a", b: "b" } 24 | ``` 25 | 26 | ## Stability status: Locked 27 | 28 | ## MIT Licenced 29 | 30 | 31 | [3]: http://ci.testling.com/Raynos/xtend.png 32 | [4]: http://ci.testling.com/Raynos/xtend 33 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/xtend/immutable.js: -------------------------------------------------------------------------------- 1 | module.exports = extend 2 | 3 | function extend() { 4 | var target = {} 5 | 6 | for (var i = 0; i < arguments.length; i++) { 7 | var source = arguments[i] 8 | 9 | for (var key in source) { 10 | if (source.hasOwnProperty(key)) { 11 | target[key] = source[key] 12 | } 13 | } 14 | } 15 | 16 | return target 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/node_modules/through2/node_modules/xtend/mutable.js: -------------------------------------------------------------------------------- 1 | module.exports = extend 2 | 3 | function extend(target) { 4 | for (var i = 1; i < arguments.length; i++) { 5 | var source = arguments[i] 6 | 7 | for (var key in source) { 8 | if (source.hasOwnProperty(key)) { 9 | target[key] = source[key] 10 | } 11 | } 12 | } 13 | 14 | return target 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/test/get.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var http = require('http'); 3 | var hyperquest = require('../'); 4 | var through = require('through2'); 5 | 6 | var server = http.createServer(function (req, res) { 7 | res.setHeader('content-type', 'text/robot-speak'); 8 | res.end('beep boop'); 9 | }); 10 | 11 | test('get', function (t) { 12 | t.plan(2); 13 | server.listen(0, function () { 14 | var port = server.address().port; 15 | check(t, port); 16 | }); 17 | t.on('end', server.close.bind(server)); 18 | }); 19 | 20 | function check (t, port) { 21 | var r = hyperquest('http://localhost:' + port); 22 | r.pipe(through(write, end)); 23 | 24 | r.on('response', function (res) { 25 | t.equal(res.headers['content-type'], 'text/robot-speak'); 26 | }); 27 | 28 | var data = ''; 29 | function write (buf, enc, cb) { data += buf; cb() } 30 | function end () { 31 | t.equal(data, 'beep boop'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/test/many.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var http = require('http'); 3 | var hyperquest = require('../'); 4 | var through = require('through2'); 5 | 6 | var server = http.createServer(function (req, res) { 7 | res.write('beep boop'); 8 | }); 9 | 10 | test('more than 5 pending connections', function (t) { 11 | t.plan(20); 12 | var pending = []; 13 | server.listen(0, function () { 14 | var port = server.address().port; 15 | for (var i = 0; i < 20; i++) { 16 | pending.push(check(t, port)); 17 | } 18 | }); 19 | t.on('end', function () { 20 | pending.forEach(function (p) { p.destroy() }); 21 | server.close(); 22 | }); 23 | }); 24 | 25 | function check (t, port) { 26 | var r = hyperquest('http://localhost:' + port); 27 | var data = ''; 28 | r.pipe(through(function (buf, enc, cb) { data += buf; cb() })); 29 | 30 | setTimeout(function () { 31 | t.equal(data, 'beep boop'); 32 | }, 100); 33 | return r; 34 | } 35 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/test/opts.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var http = require('http'); 3 | var hyperquest = require('../'); 4 | var through = require('through2'); 5 | 6 | var server = http.createServer(function (req, res) { 7 | res.setHeader('content-type', 'text/robot-speak'); 8 | res.end('beep boop'); 9 | }); 10 | 11 | test('1st-arg options', function (t) { 12 | t.plan(2); 13 | server.listen(0, function () { 14 | var port = server.address().port; 15 | check(t, port); 16 | }); 17 | t.on('end', server.close.bind(server)); 18 | }); 19 | 20 | function check (t, port) { 21 | var r = hyperquest( 22 | { uri: 'http://localhost:' + port }, 23 | function (err, res) { 24 | t.equal(res.headers['content-type'], 'text/robot-speak'); 25 | } 26 | ); 27 | r.pipe(through(write, end)); 28 | 29 | var data = ''; 30 | function write (buf, enc, cb) { data += buf; cb() } 31 | function end () { 32 | t.equal(data, 'beep boop'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/test/post.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var http = require('http'); 3 | var hyperquest = require('../'); 4 | var through = require('through2'); 5 | 6 | var server = http.createServer(function (req, res) { 7 | req.pipe(through(function (buf, enc, cb) { 8 | this.push(String(buf).toUpperCase()); 9 | cb(); 10 | })).pipe(res); 11 | }); 12 | 13 | test('post', function (t) { 14 | t.plan(1); 15 | server.listen(0, function () { 16 | var port = server.address().port; 17 | check(t, port); 18 | }); 19 | t.on('end', server.close.bind(server)); 20 | }); 21 | 22 | function check (t, port) { 23 | var r = hyperquest.post('http://localhost:' + port); 24 | r.pipe(through(write, end)); 25 | 26 | setTimeout(function () { 27 | r.write('beep '); 28 | }, 50); 29 | 30 | setTimeout(function () { 31 | r.end('boop.'); 32 | }, 100); 33 | 34 | var data = ''; 35 | function write (buf, enc, cb) { data += buf; cb() } 36 | function end () { 37 | t.equal(data, 'BEEP BOOP.'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/test/post_immediate.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var http = require('http'); 3 | var hyperquest = require('../'); 4 | var through = require('through2'); 5 | 6 | var server = http.createServer(function (req, res) { 7 | req.pipe(through(function (buf, enc, cb) { 8 | this.push(String(buf).toUpperCase()); 9 | cb(); 10 | })).pipe(res); 11 | }); 12 | 13 | test('post', function (t) { 14 | t.plan(1); 15 | server.listen(0, function () { 16 | var port = server.address().port; 17 | check(t, port); 18 | }); 19 | t.on('end', server.close.bind(server)); 20 | }); 21 | 22 | function check (t, port) { 23 | var r = hyperquest.post('http://localhost:' + port); 24 | r.end('beep boop.'); 25 | 26 | var data = ''; 27 | r.on('data', function (buf) { data += buf }); 28 | r.on('end', function () { 29 | t.equal(data, 'BEEP BOOP.'); 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/test/readable.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var hyperquest = require('../'); 3 | var http = require('http'); 4 | 5 | var server = http.createServer(function (req, res) { res.end() }); 6 | 7 | test('readable', function (t) { 8 | server.listen(function () { 9 | var port = server.address().port; 10 | var req = hyperquest('http://localhost:' + port); 11 | t.notOk(req.flowing); 12 | t.ok(req._read); 13 | req.on('data', function () {}); 14 | req.on('end', function () { 15 | server.close(); 16 | t.end(); 17 | }); 18 | }); 19 | }); 20 | 21 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/hyperquest/test/set_header.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var http = require('http'); 3 | var hyperquest = require('../'); 4 | var through = require('through2'); 5 | 6 | test('setHeader on a request', function (t) { 7 | t.plan(2); 8 | 9 | var server = http.createServer(function (req, res) { 10 | t.equal(req.headers.robot, 'party'); 11 | res.end('beep boop'); 12 | }); 13 | server.listen(0, function () { 14 | var port = server.address().port; 15 | check(t, port); 16 | }); 17 | t.on('end', server.close.bind(server)); 18 | }); 19 | 20 | function check (t, port) { 21 | var r = hyperquest('http://localhost:' + port); 22 | r.setHeader('robot', 'party'); 23 | r.pipe(through(write, end)); 24 | 25 | var data = ''; 26 | function write (buf, enc, cb) { data += buf; cb() } 27 | function end () { 28 | t.equal(data, 'beep boop'); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/libmime/.npmignore: -------------------------------------------------------------------------------- 1 | .travis.yml 2 | .jshintrc 3 | Gruntfile.js 4 | test 5 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/libmime/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## v0.1.7 2015-01-19 4 | 5 | Updated unicode filename handling – only revert to parameter continuation if the value actually includes 6 | non-ascii characters or is too long. Previously filenames were encoded if they included anything 7 | besides letters, numbers, dot or space. 8 | 9 | ## v0.1.6 2014-10-25 10 | 11 | Fixed an issue with `encodeWords` where a trailing space was invalidly included in a word if the word 12 | ended with an non-ascii character. 13 | 14 | ## v0.1.5 2014-09-12 15 | 16 | Do not use quotes for continuation encoded filename parts. Fixes an issue with Gmail where the Gmail webmail keeps the charset as part of the filename. -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/libmime/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2015 Andris Reinman 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/nodemailer/node_modules/libmime/node_modules/iconv-lite/.npmignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *sublime-* 3 | generation 4 | test 5 | wiki 6 | coverage 7 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/libmime/node_modules/iconv-lite/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | #- "0.8" 4 | - "0.10" 5 | - "0.11" 6 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/libmime/node_modules/iconv-lite/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Alexander Shtuchkin 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/libmime/node_modules/iconv-lite/encodings/index.js: -------------------------------------------------------------------------------- 1 | 2 | // Update this array if you add/rename/remove files in this directory. 3 | // We support Browserify by skipping automatic module discovery and requiring modules directly. 4 | var modules = [ 5 | require("./internal"), 6 | require("./utf16"), 7 | require("./utf7"), 8 | require("./sbcs-codec"), 9 | require("./sbcs-data"), 10 | require("./sbcs-data-generated"), 11 | require("./dbcs-codec"), 12 | require("./dbcs-data"), 13 | ]; 14 | 15 | // Put all encoding/alias/codec definitions to single object and export it. 16 | for (var i = 0; i < modules.length; i++) { 17 | var module = modules[i]; 18 | for (var enc in module) 19 | if (Object.prototype.hasOwnProperty.call(module, enc)) 20 | exports[enc] = module[enc]; 21 | } 22 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/libmime/node_modules/libbase64/.npmignore: -------------------------------------------------------------------------------- 1 | .travis.yml 2 | .jshintrc 3 | Gruntfile.js 4 | test -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/libmime/node_modules/libbase64/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Andris Reinman 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/nodemailer/node_modules/libmime/node_modules/libqp/.npmignore: -------------------------------------------------------------------------------- 1 | .travis.yml 2 | .jshintrc 3 | Gruntfile.js 4 | test -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/libmime/node_modules/libqp/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Andris Reinman 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/nodemailer/node_modules/nodemailer-direct-transport/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "indent": 4, 3 | "node": true, 4 | "globalstrict": true, 5 | "evil": true, 6 | "unused": true, 7 | "undef": true, 8 | "newcap": true, 9 | "esnext": true, 10 | "curly": true, 11 | "eqeqeq": true, 12 | "expr": true, 13 | 14 | "predef": [ 15 | "describe", 16 | "it", 17 | "beforeEach", 18 | "afterEach" 19 | ] 20 | } -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-direct-transport/.npmignore: -------------------------------------------------------------------------------- 1 | .travis.yml 2 | tests -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-direct-transport/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## v1.0.2 2015-03-09 4 | 5 | Bumped smtp-connection version and replaced simplesmtp based tests with smtp-server based ones. 6 | 7 | ## v1.0.0 2014-07-30 8 | 9 | Fixed a bug with stream buffering. Uses [mail.resolveContent](https://github.com/andris9/Nodemailer#resolvecontent) provided by Nodemailer v1.1. 10 | 11 | As the change includes a method from Nodemailer 1.1 and not 1.0, then changed the version scheme to use proper semver instead of 0.x. -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-direct-transport/Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | 'use strict'; 3 | 4 | // Project configuration. 5 | grunt.initConfig({ 6 | jshint: { 7 | all: ['src/*.js', 'test/*.js'], 8 | options: { 9 | jshintrc: '.jshintrc' 10 | } 11 | }, 12 | 13 | mochaTest: { 14 | all: { 15 | options: { 16 | reporter: 'spec' 17 | }, 18 | src: ['test/*-test.js'] 19 | } 20 | } 21 | }); 22 | 23 | // Load the plugin(s) 24 | grunt.loadNpmTasks('grunt-contrib-jshint'); 25 | grunt.loadNpmTasks('grunt-mocha-test'); 26 | 27 | // Tasks 28 | grunt.registerTask('default', ['jshint', 'mochaTest']); 29 | }; -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-direct-transport/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Andris Reinman 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/nodemailer/node_modules/nodemailer-direct-transport/node_modules/smtp-connection/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "indent": 4, 3 | "node": true, 4 | "globalstrict": true, 5 | "evil": true, 6 | "unused": true, 7 | "undef": true, 8 | "newcap": true, 9 | "esnext": true, 10 | "curly": true, 11 | "eqeqeq": true, 12 | "expr": true, 13 | 14 | "predef": [ 15 | "describe", 16 | "it", 17 | "beforeEach", 18 | "afterEach" 19 | ] 20 | } -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-direct-transport/node_modules/smtp-connection/.npmignore: -------------------------------------------------------------------------------- 1 | .travis.yml 2 | test 3 | examples 4 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-direct-transport/node_modules/smtp-connection/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## v1.2.0 2015-03-09 4 | 5 | * Connection object has a new property `secure` that indicates if the current connection is using a secure TLS socket or not 6 | * Fixed `requireTLS` where the connection was established insecurely if STARTTLS failed, now it returns an error as it should if STARTTLS fails 7 | 8 | ## v1.1.0 2014-11-11 9 | 10 | * Added additional constructor option `requireTLS` to ensure that the connection is upgraded before any credentials are passed to the server 11 | * Added additional constructor option `socket` to use an existing socket instead of creating new one (bantu) 12 | 13 | ## v1.0.2 2014-10-15 14 | 15 | * Removed CleartextStream.pair.encrypted error handler. Does not seem to be supported by Node v0.11 16 | 17 | ## v1.0.1 2014-10-15 18 | 19 | * Added 'error' handler for CleartextStream.pair.encrypted object when connecting to TLS. 20 | 21 | ## v1.0.0 2014-09-26 22 | 23 | * Changed version scheme from 0.x to 1.x. 24 | * Improved error handling for timeout on creating a connection. Caused issues with `once('error')` handler as an error might have been emitted twice 25 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-direct-transport/node_modules/smtp-connection/Gruntfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(grunt) { 4 | 5 | // Project configuration. 6 | grunt.initConfig({ 7 | jshint: { 8 | all: ['src/*.js', 'test/*.js'], 9 | options: { 10 | jshintrc: '.jshintrc' 11 | } 12 | }, 13 | 14 | mochaTest: { 15 | all: { 16 | options: { 17 | reporter: 'spec' 18 | }, 19 | src: ['test/*-test.js'] 20 | } 21 | } 22 | }); 23 | 24 | // Load the plugin(s) 25 | grunt.loadNpmTasks('grunt-contrib-jshint'); 26 | grunt.loadNpmTasks('grunt-mocha-test'); 27 | 28 | // Tasks 29 | grunt.registerTask('default', ['jshint', 'mochaTest']); 30 | }; -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-direct-transport/node_modules/smtp-connection/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2015 Andris Reinman 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/nodemailer/node_modules/nodemailer-smtp-transport/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "indent": 4, 3 | "node": true, 4 | "globalstrict": true, 5 | "evil": true, 6 | "unused": true, 7 | "undef": true, 8 | "newcap": true, 9 | "esnext": true, 10 | "curly": true, 11 | "eqeqeq": true, 12 | "expr": true, 13 | 14 | "predef": [ 15 | "describe", 16 | "it", 17 | "beforeEach", 18 | "afterEach" 19 | ] 20 | } -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-smtp-transport/.npmignore: -------------------------------------------------------------------------------- 1 | .travis.yml 2 | test -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-smtp-transport/Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | 'use strict'; 3 | 4 | // Project configuration. 5 | grunt.initConfig({ 6 | jshint: { 7 | all: ['src/*.js', 'test/*.js'], 8 | options: { 9 | jshintrc: '.jshintrc' 10 | } 11 | }, 12 | 13 | mochaTest: { 14 | all: { 15 | options: { 16 | reporter: 'spec' 17 | }, 18 | src: ['test/*-test.js'] 19 | } 20 | } 21 | }); 22 | 23 | // Load the plugin(s) 24 | grunt.loadNpmTasks('grunt-contrib-jshint'); 25 | grunt.loadNpmTasks('grunt-mocha-test'); 26 | 27 | // Tasks 28 | grunt.registerTask('default', ['jshint', 'mochaTest']); 29 | }; -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-smtp-transport/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Andris Reinman 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/nodemailer/node_modules/nodemailer-smtp-transport/node_modules/nodemailer-wellknown/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-smtp-transport/node_modules/nodemailer-wellknown/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | - "0.11" 5 | before_install: 6 | - npm install -g grunt-cli 7 | notifications: 8 | email: 9 | - andris@kreata.ee 10 | webhooks: 11 | urls: 12 | - https://webhooks.gitter.im/e/0ed18fd9b3e529b3c2cc 13 | on_success: change # options: [always|never|change] default: always 14 | on_failure: always # options: [always|never|change] default: always 15 | on_start: false # default: false -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-smtp-transport/node_modules/nodemailer-wellknown/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Andris Reinman 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/nodemailer/node_modules/nodemailer-smtp-transport/node_modules/nodemailer-wellknown/test.js: -------------------------------------------------------------------------------- 1 | var wellknown = require('./index'); 2 | 3 | module.exports['Find by key'] = function(test) { 4 | test.ok(wellknown('Gmail')); 5 | test.done(); 6 | }; 7 | 8 | module.exports['Find by alias'] = function(test) { 9 | test.ok(wellknown('Google Mail')); 10 | test.done(); 11 | }; 12 | 13 | module.exports['Find by domain'] = function(test) { 14 | test.ok(wellknown('GoogleMail.com')); 15 | test.done(); 16 | }; 17 | 18 | module.exports['No match'] = function(test) { 19 | test.ok(!wellknown('zzzzzz')); 20 | test.done(); 21 | }; -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-smtp-transport/node_modules/smtp-connection/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "indent": 4, 3 | "node": true, 4 | "globalstrict": true, 5 | "evil": true, 6 | "unused": true, 7 | "undef": true, 8 | "newcap": true, 9 | "esnext": true, 10 | "curly": true, 11 | "eqeqeq": true, 12 | "expr": true, 13 | 14 | "predef": [ 15 | "describe", 16 | "it", 17 | "beforeEach", 18 | "afterEach" 19 | ] 20 | } -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-smtp-transport/node_modules/smtp-connection/.npmignore: -------------------------------------------------------------------------------- 1 | .travis.yml 2 | test 3 | examples 4 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-smtp-transport/node_modules/smtp-connection/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## v1.2.0 2015-03-09 4 | 5 | * Connection object has a new property `secure` that indicates if the current connection is using a secure TLS socket or not 6 | * Fixed `requireTLS` where the connection was established insecurely if STARTTLS failed, now it returns an error as it should if STARTTLS fails 7 | 8 | ## v1.1.0 2014-11-11 9 | 10 | * Added additional constructor option `requireTLS` to ensure that the connection is upgraded before any credentials are passed to the server 11 | * Added additional constructor option `socket` to use an existing socket instead of creating new one (bantu) 12 | 13 | ## v1.0.2 2014-10-15 14 | 15 | * Removed CleartextStream.pair.encrypted error handler. Does not seem to be supported by Node v0.11 16 | 17 | ## v1.0.1 2014-10-15 18 | 19 | * Added 'error' handler for CleartextStream.pair.encrypted object when connecting to TLS. 20 | 21 | ## v1.0.0 2014-09-26 22 | 23 | * Changed version scheme from 0.x to 1.x. 24 | * Improved error handling for timeout on creating a connection. Caused issues with `once('error')` handler as an error might have been emitted twice 25 | -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-smtp-transport/node_modules/smtp-connection/Gruntfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(grunt) { 4 | 5 | // Project configuration. 6 | grunt.initConfig({ 7 | jshint: { 8 | all: ['src/*.js', 'test/*.js'], 9 | options: { 10 | jshintrc: '.jshintrc' 11 | } 12 | }, 13 | 14 | mochaTest: { 15 | all: { 16 | options: { 17 | reporter: 'spec' 18 | }, 19 | src: ['test/*-test.js'] 20 | } 21 | } 22 | }); 23 | 24 | // Load the plugin(s) 25 | grunt.loadNpmTasks('grunt-contrib-jshint'); 26 | grunt.loadNpmTasks('grunt-mocha-test'); 27 | 28 | // Tasks 29 | grunt.registerTask('default', ['jshint', 'mochaTest']); 30 | }; -------------------------------------------------------------------------------- /node_modules/nodemailer/node_modules/nodemailer-smtp-transport/node_modules/smtp-connection/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2015 Andris Reinman 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 | -------------------------------------------------------------------------------- /output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforgeek/mass-mailer-nodejs/89154fb5a4994614dd69eddfd0f7dd372e1c9bfe/output.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "async-nodejs-demo", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "async": "~0.9.0", 6 | "mongoose": "^4.0.1", 7 | "nodemailer": "latest" 8 | } 9 | } 10 | --------------------------------------------------------------------------------