├── .gitignore ├── Comandos backend ├── README.md ├── app.js ├── config ├── auth.js └── db.js ├── helpers ├── eAdmin.js └── logado.js ├── models ├── Categoria.js ├── Postagem.js └── Usuario.js ├── node_2959eaab19187.tmp ├── node_bfb0b66acb30b.tmp ├── node_modules ├── .bin │ ├── handlebars │ ├── mime │ ├── semver │ └── uglifyjs ├── @types │ ├── bson │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.d.ts │ │ └── package.json │ ├── mongodb │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.d.ts │ │ └── package.json │ └── node │ │ ├── LICENSE │ │ ├── README.md │ │ ├── assert.d.ts │ │ ├── async_hooks.d.ts │ │ ├── base.d.ts │ │ ├── buffer.d.ts │ │ ├── child_process.d.ts │ │ ├── cluster.d.ts │ │ ├── console.d.ts │ │ ├── constants.d.ts │ │ ├── crypto.d.ts │ │ ├── dgram.d.ts │ │ ├── dns.d.ts │ │ ├── domain.d.ts │ │ ├── events.d.ts │ │ ├── fs.d.ts │ │ ├── fs │ │ └── promises.d.ts │ │ ├── globals.d.ts │ │ ├── globals.global.d.ts │ │ ├── http.d.ts │ │ ├── http2.d.ts │ │ ├── https.d.ts │ │ ├── index.d.ts │ │ ├── inspector.d.ts │ │ ├── module.d.ts │ │ ├── net.d.ts │ │ ├── os.d.ts │ │ ├── package.json │ │ ├── path.d.ts │ │ ├── perf_hooks.d.ts │ │ ├── process.d.ts │ │ ├── punycode.d.ts │ │ ├── querystring.d.ts │ │ ├── readline.d.ts │ │ ├── repl.d.ts │ │ ├── stream.d.ts │ │ ├── string_decoder.d.ts │ │ ├── timers.d.ts │ │ ├── tls.d.ts │ │ ├── trace_events.d.ts │ │ ├── ts3.4 │ │ ├── assert.d.ts │ │ ├── base.d.ts │ │ ├── globals.global.d.ts │ │ └── index.d.ts │ │ ├── ts3.6 │ │ ├── base.d.ts │ │ └── index.d.ts │ │ ├── tty.d.ts │ │ ├── url.d.ts │ │ ├── util.d.ts │ │ ├── v8.d.ts │ │ ├── vm.d.ts │ │ ├── wasi.d.ts │ │ ├── worker_threads.d.ts │ │ └── zlib.d.ts ├── accepts │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── array-flatten │ ├── LICENSE │ ├── README.md │ ├── array-flatten.js │ └── package.json ├── balanced-match │ ├── .npmignore │ ├── LICENSE.md │ ├── README.md │ ├── index.js │ └── package.json ├── bcryptjs │ ├── .npmignore │ ├── .travis.yml │ ├── .vscode │ │ └── settings.json │ ├── LICENSE │ ├── README.md │ ├── bin │ │ └── bcrypt │ ├── bower.json │ ├── dist │ │ ├── README.md │ │ ├── bcrypt.js │ │ ├── bcrypt.min.js │ │ ├── bcrypt.min.js.gz │ │ └── bcrypt.min.map │ ├── externs │ │ ├── bcrypt.js │ │ └── minimal-env.js │ ├── index.js │ ├── package.json │ ├── scripts │ │ └── build.js │ ├── src │ │ ├── bcrypt.js │ │ ├── bcrypt │ │ │ ├── impl.js │ │ │ ├── prng │ │ │ │ ├── README.md │ │ │ │ ├── accum.js │ │ │ │ └── isaac.js │ │ │ ├── util.js │ │ │ └── util │ │ │ │ └── base64.js │ │ ├── bower.json │ │ └── wrap.js │ └── tests │ │ ├── quickbrown.txt │ │ └── suite.js ├── bl │ ├── .jshintrc │ ├── .travis.yml │ ├── LICENSE.md │ ├── README.md │ ├── bl.js │ ├── package.json │ └── test │ │ ├── indexOf.js │ │ └── test.js ├── bluebird │ ├── LICENSE │ ├── README.md │ ├── changelog.md │ ├── js │ │ ├── browser │ │ │ ├── bluebird.core.js │ │ │ ├── bluebird.core.min.js │ │ │ ├── bluebird.js │ │ │ └── bluebird.min.js │ │ └── release │ │ │ ├── any.js │ │ │ ├── assert.js │ │ │ ├── async.js │ │ │ ├── bind.js │ │ │ ├── bluebird.js │ │ │ ├── call_get.js │ │ │ ├── cancel.js │ │ │ ├── catch_filter.js │ │ │ ├── context.js │ │ │ ├── debuggability.js │ │ │ ├── direct_resolve.js │ │ │ ├── each.js │ │ │ ├── errors.js │ │ │ ├── es5.js │ │ │ ├── filter.js │ │ │ ├── finally.js │ │ │ ├── generators.js │ │ │ ├── join.js │ │ │ ├── map.js │ │ │ ├── method.js │ │ │ ├── nodeback.js │ │ │ ├── nodeify.js │ │ │ ├── promise.js │ │ │ ├── promise_array.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 ├── body-parser │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── read.js │ │ └── types │ │ │ ├── json.js │ │ │ ├── raw.js │ │ │ ├── text.js │ │ │ └── urlencoded.js │ └── package.json ├── brace-expansion │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── bson │ ├── HISTORY.md │ ├── LICENSE.md │ ├── README.md │ ├── bower.json │ ├── browser_build │ │ ├── bson.js │ │ └── package.json │ ├── index.js │ ├── lib │ │ └── bson │ │ │ ├── binary.js │ │ │ ├── bson.js │ │ │ ├── code.js │ │ │ ├── db_ref.js │ │ │ ├── decimal128.js │ │ │ ├── double.js │ │ │ ├── float_parser.js │ │ │ ├── int_32.js │ │ │ ├── long.js │ │ │ ├── map.js │ │ │ ├── max_key.js │ │ │ ├── min_key.js │ │ │ ├── objectid.js │ │ │ ├── parser │ │ │ ├── calculate_size.js │ │ │ ├── deserializer.js │ │ │ ├── serializer.js │ │ │ └── utils.js │ │ │ ├── regexp.js │ │ │ ├── symbol.js │ │ │ └── timestamp.js │ └── package.json ├── bytes │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ └── package.json ├── concat-map │ ├── .travis.yml │ ├── LICENSE │ ├── README.markdown │ ├── example │ │ └── map.js │ ├── index.js │ ├── package.json │ └── test │ │ └── map.js ├── connect-flash │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── lib │ │ ├── flash.js │ │ └── index.js │ └── package.json ├── content-disposition │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── content-type │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── cookie-signature │ ├── .npmignore │ ├── History.md │ ├── Readme.md │ ├── index.js │ └── package.json ├── cookie │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── core-util-is │ ├── LICENSE │ ├── README.md │ ├── float.patch │ ├── lib │ │ └── util.js │ ├── package.json │ └── test.js ├── debug │ ├── .coveralls.yml │ ├── .eslintrc │ ├── .npmignore │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── component.json │ ├── karma.conf.js │ ├── node.js │ ├── package.json │ └── src │ │ ├── browser.js │ │ ├── debug.js │ │ ├── index.js │ │ ├── inspector-log.js │ │ └── node.js ├── denque │ ├── LICENSE │ ├── README.md │ ├── index.d.ts │ ├── index.js │ └── package.json ├── depd │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ ├── lib │ │ ├── browser │ │ │ └── index.js │ │ └── compat │ │ │ ├── callsite-tostring.js │ │ │ ├── event-listener-count.js │ │ │ └── index.js │ └── package.json ├── destroy │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── ee-first │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── encodeurl │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── escape-html │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ └── package.json ├── etag │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── express-handlebars │ ├── .eslintignore │ ├── .eslintrc.js │ ├── .github │ │ └── workflows │ │ │ ├── codeql-analysis.yml │ │ │ └── main.yml │ ├── CHANGELOG.md │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── jest.config.js │ ├── lib │ │ └── express-handlebars.js │ ├── package.json │ ├── renovate.json │ └── spec │ │ ├── express-handlebars.test.js │ │ └── fixtures │ │ ├── layouts │ │ ├── main-latin1.handlebars │ │ └── main.handlebars │ │ ├── other-views │ │ ├── layouts │ │ │ └── main.handlebars │ │ └── partials │ │ │ └── partial.handlebars │ │ ├── partials │ │ ├── partial-latin1.handlebars │ │ └── partial.handlebars │ │ ├── render-cached.handlebars │ │ ├── render-helper.handlebars │ │ ├── render-latin1.handlebars │ │ ├── render-partial.handlebars │ │ ├── render-text.handlebars │ │ └── templates │ │ ├── subdir │ │ └── template.handlebars │ │ ├── template-latin1.handlebars │ │ └── template.handlebars ├── express-session │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── node_modules │ │ ├── depd │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ └── browser │ │ │ │ │ └── index.js │ │ │ └── package.json │ │ └── safe-buffer │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ └── package.json │ ├── package.json │ └── session │ │ ├── cookie.js │ │ ├── memory.js │ │ ├── session.js │ │ └── store.js ├── express │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ ├── lib │ │ ├── application.js │ │ ├── express.js │ │ ├── middleware │ │ │ ├── init.js │ │ │ └── query.js │ │ ├── request.js │ │ ├── response.js │ │ ├── router │ │ │ ├── index.js │ │ │ ├── layer.js │ │ │ └── route.js │ │ ├── utils.js │ │ └── view.js │ └── package.json ├── finalhandler │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── forwarded │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── fresh │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── fs.realpath │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── old.js │ └── package.json ├── glob │ ├── LICENSE │ ├── README.md │ ├── changelog.md │ ├── common.js │ ├── glob.js │ ├── package.json │ └── sync.js ├── graceful-fs │ ├── LICENSE │ ├── README.md │ ├── clone.js │ ├── graceful-fs.js │ ├── legacy-streams.js │ ├── package.json │ └── polyfills.js ├── handlebars │ ├── LICENSE │ ├── README.markdown │ ├── bin │ │ ├── .eslintrc.js │ │ └── handlebars │ ├── dist │ │ ├── amd │ │ │ ├── handlebars.js │ │ │ ├── handlebars.runtime.js │ │ │ ├── handlebars │ │ │ │ ├── base.js │ │ │ │ ├── compiler │ │ │ │ │ ├── ast.js │ │ │ │ │ ├── base.js │ │ │ │ │ ├── code-gen.js │ │ │ │ │ ├── compiler.js │ │ │ │ │ ├── helpers.js │ │ │ │ │ ├── javascript-compiler.js │ │ │ │ │ ├── parser.js │ │ │ │ │ ├── printer.js │ │ │ │ │ ├── visitor.js │ │ │ │ │ └── whitespace-control.js │ │ │ │ ├── decorators.js │ │ │ │ ├── decorators │ │ │ │ │ └── inline.js │ │ │ │ ├── exception.js │ │ │ │ ├── helpers.js │ │ │ │ ├── helpers │ │ │ │ │ ├── block-helper-missing.js │ │ │ │ │ ├── each.js │ │ │ │ │ ├── helper-missing.js │ │ │ │ │ ├── if.js │ │ │ │ │ ├── log.js │ │ │ │ │ ├── lookup.js │ │ │ │ │ └── with.js │ │ │ │ ├── internal │ │ │ │ │ ├── create-new-lookup-object.js │ │ │ │ │ ├── proto-access.js │ │ │ │ │ └── wrapHelper.js │ │ │ │ ├── logger.js │ │ │ │ ├── no-conflict.js │ │ │ │ ├── runtime.js │ │ │ │ ├── safe-string.js │ │ │ │ └── utils.js │ │ │ └── precompiler.js │ │ ├── cjs │ │ │ ├── handlebars.js │ │ │ ├── handlebars.runtime.js │ │ │ ├── handlebars │ │ │ │ ├── base.js │ │ │ │ ├── compiler │ │ │ │ │ ├── ast.js │ │ │ │ │ ├── base.js │ │ │ │ │ ├── code-gen.js │ │ │ │ │ ├── compiler.js │ │ │ │ │ ├── helpers.js │ │ │ │ │ ├── javascript-compiler.js │ │ │ │ │ ├── parser.js │ │ │ │ │ ├── printer.js │ │ │ │ │ ├── visitor.js │ │ │ │ │ └── whitespace-control.js │ │ │ │ ├── decorators.js │ │ │ │ ├── decorators │ │ │ │ │ └── inline.js │ │ │ │ ├── exception.js │ │ │ │ ├── helpers.js │ │ │ │ ├── helpers │ │ │ │ │ ├── block-helper-missing.js │ │ │ │ │ ├── each.js │ │ │ │ │ ├── helper-missing.js │ │ │ │ │ ├── if.js │ │ │ │ │ ├── log.js │ │ │ │ │ ├── lookup.js │ │ │ │ │ └── with.js │ │ │ │ ├── internal │ │ │ │ │ ├── create-new-lookup-object.js │ │ │ │ │ ├── proto-access.js │ │ │ │ │ └── wrapHelper.js │ │ │ │ ├── logger.js │ │ │ │ ├── no-conflict.js │ │ │ │ ├── runtime.js │ │ │ │ ├── safe-string.js │ │ │ │ └── utils.js │ │ │ └── precompiler.js │ │ ├── handlebars.amd.js │ │ ├── handlebars.amd.min.js │ │ ├── handlebars.js │ │ ├── handlebars.min.js │ │ ├── handlebars.runtime.amd.js │ │ ├── handlebars.runtime.amd.min.js │ │ ├── handlebars.runtime.js │ │ └── handlebars.runtime.min.js │ ├── lib │ │ ├── handlebars.js │ │ ├── handlebars.runtime.js │ │ ├── handlebars │ │ │ ├── base.js │ │ │ ├── compiler │ │ │ │ ├── ast.js │ │ │ │ ├── base.js │ │ │ │ ├── code-gen.js │ │ │ │ ├── compiler.js │ │ │ │ ├── helpers.js │ │ │ │ ├── javascript-compiler.js │ │ │ │ ├── parser.js │ │ │ │ ├── printer.js │ │ │ │ ├── visitor.js │ │ │ │ └── whitespace-control.js │ │ │ ├── decorators.js │ │ │ ├── decorators │ │ │ │ └── inline.js │ │ │ ├── exception.js │ │ │ ├── helpers.js │ │ │ ├── helpers │ │ │ │ ├── block-helper-missing.js │ │ │ │ ├── each.js │ │ │ │ ├── helper-missing.js │ │ │ │ ├── if.js │ │ │ │ ├── log.js │ │ │ │ ├── lookup.js │ │ │ │ └── with.js │ │ │ ├── internal │ │ │ │ ├── create-new-lookup-object.js │ │ │ │ ├── proto-access.js │ │ │ │ └── wrapHelper.js │ │ │ ├── logger.js │ │ │ ├── no-conflict.js │ │ │ ├── runtime.js │ │ │ ├── safe-string.js │ │ │ └── utils.js │ │ ├── index.js │ │ └── precompiler.js │ ├── package.json │ ├── print-script │ ├── release-notes.md │ ├── runtime.d.ts │ ├── runtime.js │ └── types │ │ └── index.d.ts ├── http-errors │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── iconv-lite │ ├── 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 │ │ ├── bom-handling.js │ │ ├── extend-node.js │ │ ├── index.d.ts │ │ ├── index.js │ │ └── streams.js │ └── package.json ├── inflight │ ├── LICENSE │ ├── README.md │ ├── inflight.js │ └── package.json ├── inherits │ ├── LICENSE │ ├── README.md │ ├── inherits.js │ ├── inherits_browser.js │ └── package.json ├── ipaddr.js │ ├── LICENSE │ ├── README.md │ ├── ipaddr.min.js │ ├── lib │ │ ├── ipaddr.js │ │ └── ipaddr.js.d.ts │ └── package.json ├── isarray │ ├── .npmignore │ ├── .travis.yml │ ├── Makefile │ ├── README.md │ ├── component.json │ ├── index.js │ ├── package.json │ └── test.js ├── kareem │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── docs.js │ ├── gulpfile.js │ ├── index.js │ ├── package.json │ └── test │ │ ├── examples.test.js │ │ ├── misc.test.js │ │ ├── post.test.js │ │ ├── pre.test.js │ │ └── wrap.test.js ├── media-typer │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── memory-pager │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── test.js ├── merge-descriptors │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── methods │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── mime-db │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── db.json │ ├── index.js │ └── package.json ├── mime-types │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── mime │ ├── .npmignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── cli.js │ ├── mime.js │ ├── package.json │ ├── src │ │ ├── build.js │ │ └── test.js │ └── types.json ├── minimatch │ ├── LICENSE │ ├── README.md │ ├── minimatch.js │ └── package.json ├── minimist │ ├── .travis.yml │ ├── LICENSE │ ├── example │ │ └── parse.js │ ├── index.js │ ├── package.json │ ├── readme.markdown │ └── test │ │ ├── all_bool.js │ │ ├── bool.js │ │ ├── dash.js │ │ ├── default_bool.js │ │ ├── dotted.js │ │ ├── kv_short.js │ │ ├── long.js │ │ ├── num.js │ │ ├── parse.js │ │ ├── parse_modified.js │ │ ├── proto.js │ │ ├── short.js │ │ ├── stop_early.js │ │ ├── unknown.js │ │ └── whitespace.js ├── mongodb │ ├── HISTORY.md │ ├── LICENSE.md │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── admin.js │ │ ├── aggregation_cursor.js │ │ ├── apm.js │ │ ├── async │ │ │ ├── .eslintrc │ │ │ └── async_iterator.js │ │ ├── bulk │ │ │ ├── common.js │ │ │ ├── ordered.js │ │ │ └── unordered.js │ │ ├── change_stream.js │ │ ├── cmap │ │ │ ├── connection.js │ │ │ ├── connection_pool.js │ │ │ ├── errors.js │ │ │ ├── events.js │ │ │ ├── message_stream.js │ │ │ └── stream_description.js │ │ ├── collection.js │ │ ├── command_cursor.js │ │ ├── constants.js │ │ ├── core │ │ │ ├── auth │ │ │ │ ├── auth_provider.js │ │ │ │ ├── defaultAuthProviders.js │ │ │ │ ├── gssapi.js │ │ │ │ ├── mongo_credentials.js │ │ │ │ ├── mongocr.js │ │ │ │ ├── mongodb_aws.js │ │ │ │ ├── plain.js │ │ │ │ ├── scram.js │ │ │ │ └── x509.js │ │ │ ├── connection │ │ │ │ ├── apm.js │ │ │ │ ├── command_result.js │ │ │ │ ├── commands.js │ │ │ │ ├── connect.js │ │ │ │ ├── connection.js │ │ │ │ ├── logger.js │ │ │ │ ├── msg.js │ │ │ │ ├── pool.js │ │ │ │ └── utils.js │ │ │ ├── cursor.js │ │ │ ├── error.js │ │ │ ├── index.js │ │ │ ├── sdam │ │ │ │ ├── common.js │ │ │ │ ├── events.js │ │ │ │ ├── monitor.js │ │ │ │ ├── server.js │ │ │ │ ├── server_description.js │ │ │ │ ├── server_selection.js │ │ │ │ ├── srv_polling.js │ │ │ │ ├── topology.js │ │ │ │ └── topology_description.js │ │ │ ├── sessions.js │ │ │ ├── tools │ │ │ │ └── smoke_plugin.js │ │ │ ├── topologies │ │ │ │ ├── mongos.js │ │ │ │ ├── read_preference.js │ │ │ │ ├── replset.js │ │ │ │ ├── replset_state.js │ │ │ │ ├── server.js │ │ │ │ └── shared.js │ │ │ ├── transactions.js │ │ │ ├── uri_parser.js │ │ │ ├── utils.js │ │ │ └── wireprotocol │ │ │ │ ├── command.js │ │ │ │ ├── compression.js │ │ │ │ ├── constants.js │ │ │ │ ├── get_more.js │ │ │ │ ├── index.js │ │ │ │ ├── kill_cursors.js │ │ │ │ ├── query.js │ │ │ │ ├── shared.js │ │ │ │ └── write_command.js │ │ ├── cursor.js │ │ ├── db.js │ │ ├── dynamic_loaders.js │ │ ├── error.js │ │ ├── gridfs-stream │ │ │ ├── download.js │ │ │ ├── index.js │ │ │ └── upload.js │ │ ├── gridfs │ │ │ ├── chunk.js │ │ │ └── grid_store.js │ │ ├── mongo_client.js │ │ ├── operations │ │ │ ├── add_user.js │ │ │ ├── admin_ops.js │ │ │ ├── aggregate.js │ │ │ ├── bulk_write.js │ │ │ ├── collection_ops.js │ │ │ ├── collections.js │ │ │ ├── command.js │ │ │ ├── command_v2.js │ │ │ ├── common_functions.js │ │ │ ├── connect.js │ │ │ ├── count.js │ │ │ ├── count_documents.js │ │ │ ├── create_collection.js │ │ │ ├── create_indexes.js │ │ │ ├── cursor_ops.js │ │ │ ├── db_ops.js │ │ │ ├── delete_many.js │ │ │ ├── delete_one.js │ │ │ ├── distinct.js │ │ │ ├── drop.js │ │ │ ├── drop_index.js │ │ │ ├── drop_indexes.js │ │ │ ├── estimated_document_count.js │ │ │ ├── execute_db_admin_command.js │ │ │ ├── execute_operation.js │ │ │ ├── find.js │ │ │ ├── find_and_modify.js │ │ │ ├── find_one.js │ │ │ ├── find_one_and_delete.js │ │ │ ├── find_one_and_replace.js │ │ │ ├── find_one_and_update.js │ │ │ ├── geo_haystack_search.js │ │ │ ├── index_exists.js │ │ │ ├── index_information.js │ │ │ ├── indexes.js │ │ │ ├── insert_many.js │ │ │ ├── insert_one.js │ │ │ ├── is_capped.js │ │ │ ├── list_collections.js │ │ │ ├── list_databases.js │ │ │ ├── list_indexes.js │ │ │ ├── map_reduce.js │ │ │ ├── operation.js │ │ │ ├── options_operation.js │ │ │ ├── profiling_level.js │ │ │ ├── re_index.js │ │ │ ├── remove_user.js │ │ │ ├── rename.js │ │ │ ├── replace_one.js │ │ │ ├── run_command.js │ │ │ ├── set_profiling_level.js │ │ │ ├── stats.js │ │ │ ├── update_many.js │ │ │ ├── update_one.js │ │ │ └── validate_collection.js │ │ ├── read_concern.js │ │ ├── topologies │ │ │ ├── mongos.js │ │ │ ├── native_topology.js │ │ │ ├── replset.js │ │ │ ├── server.js │ │ │ └── topology_base.js │ │ ├── url_parser.js │ │ ├── utils.js │ │ └── write_concern.js │ └── package.json ├── mongoose-legacy-pluralize │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── mongoose │ ├── History.md │ ├── LICENSE.md │ ├── README.md │ ├── SECURITY.md │ ├── browser.js │ ├── build-browser.js │ ├── dist │ │ └── browser.umd.js │ ├── index.d.ts │ ├── index.js │ ├── lib │ │ ├── aggregate.js │ │ ├── browser.js │ │ ├── browserDocument.js │ │ ├── cast.js │ │ ├── cast │ │ │ ├── boolean.js │ │ │ ├── date.js │ │ │ ├── decimal128.js │ │ │ ├── number.js │ │ │ ├── objectid.js │ │ │ └── string.js │ │ ├── collection.js │ │ ├── connection.js │ │ ├── connectionstate.js │ │ ├── cursor │ │ │ ├── AggregationCursor.js │ │ │ ├── ChangeStream.js │ │ │ └── QueryCursor.js │ │ ├── document.js │ │ ├── document_provider.js │ │ ├── driver.js │ │ ├── drivers │ │ │ ├── SPEC.md │ │ │ ├── browser │ │ │ │ ├── ReadPreference.js │ │ │ │ ├── binary.js │ │ │ │ ├── decimal128.js │ │ │ │ ├── index.js │ │ │ │ └── objectid.js │ │ │ └── node-mongodb-native │ │ │ │ ├── ReadPreference.js │ │ │ │ ├── binary.js │ │ │ │ ├── collection.js │ │ │ │ ├── connection.js │ │ │ │ ├── decimal128.js │ │ │ │ ├── index.js │ │ │ │ └── objectid.js │ │ ├── error │ │ │ ├── browserMissingSchema.js │ │ │ ├── cast.js │ │ │ ├── disconnected.js │ │ │ ├── divergentArray.js │ │ │ ├── index.js │ │ │ ├── messages.js │ │ │ ├── missingSchema.js │ │ │ ├── mongooseError.js │ │ │ ├── notFound.js │ │ │ ├── objectExpected.js │ │ │ ├── objectParameter.js │ │ │ ├── overwriteModel.js │ │ │ ├── parallelSave.js │ │ │ ├── parallelValidate.js │ │ │ ├── serverSelection.js │ │ │ ├── strict.js │ │ │ ├── validation.js │ │ │ ├── validator.js │ │ │ └── version.js │ │ ├── helpers │ │ │ ├── aggregate │ │ │ │ └── stringifyAccumulatorOptions.js │ │ │ ├── arrayDepth.js │ │ │ ├── clone.js │ │ │ ├── common.js │ │ │ ├── cursor │ │ │ │ └── eachAsync.js │ │ │ ├── discriminator │ │ │ │ ├── checkEmbeddedDiscriminatorKeyProjection.js │ │ │ │ ├── getConstructor.js │ │ │ │ ├── getDiscriminatorByValue.js │ │ │ │ └── getSchemaDiscriminatorByValue.js │ │ │ ├── document │ │ │ │ ├── cleanModifiedSubpaths.js │ │ │ │ ├── compile.js │ │ │ │ ├── getEmbeddedDiscriminatorPath.js │ │ │ │ └── handleSpreadDoc.js │ │ │ ├── each.js │ │ │ ├── get.js │ │ │ ├── getDefaultBulkwriteResult.js │ │ │ ├── getFunctionName.js │ │ │ ├── immediate.js │ │ │ ├── indexes │ │ │ │ ├── isDefaultIdIndex.js │ │ │ │ └── isIndexEqual.js │ │ │ ├── isBsonType.js │ │ │ ├── isMongooseObject.js │ │ │ ├── isObject.js │ │ │ ├── isPromise.js │ │ │ ├── model │ │ │ │ ├── applyHooks.js │ │ │ │ ├── applyMethods.js │ │ │ │ ├── applyStaticHooks.js │ │ │ │ ├── applyStatics.js │ │ │ │ ├── castBulkWrite.js │ │ │ │ └── discriminator.js │ │ │ ├── once.js │ │ │ ├── parallelLimit.js │ │ │ ├── populate │ │ │ │ ├── SkipPopulateValue.js │ │ │ │ ├── assignRawDocsToIdStructure.js │ │ │ │ ├── assignVals.js │ │ │ │ ├── getModelsMapForPopulate.js │ │ │ │ ├── getSchemaTypes.js │ │ │ │ ├── getVirtual.js │ │ │ │ ├── leanPopulateMap.js │ │ │ │ ├── lookupLocalFields.js │ │ │ │ ├── normalizeRefPath.js │ │ │ │ ├── removeDeselectedForeignField.js │ │ │ │ └── validateRef.js │ │ │ ├── printJestWarning.js │ │ │ ├── projection │ │ │ │ ├── isDefiningProjection.js │ │ │ │ ├── isExclusive.js │ │ │ │ ├── isInclusive.js │ │ │ │ ├── isPathExcluded.js │ │ │ │ ├── isPathSelectedInclusive.js │ │ │ │ └── parseProjection.js │ │ │ ├── promiseOrCallback.js │ │ │ ├── query │ │ │ │ ├── applyGlobalMaxTimeMS.js │ │ │ │ ├── applyQueryMiddleware.js │ │ │ │ ├── castFilterPath.js │ │ │ │ ├── castUpdate.js │ │ │ │ ├── completeMany.js │ │ │ │ ├── getEmbeddedDiscriminatorPath.js │ │ │ │ ├── handleImmutable.js │ │ │ │ ├── hasDollarKeys.js │ │ │ │ ├── isOperator.js │ │ │ │ ├── selectPopulatedFields.js │ │ │ │ └── wrapThunk.js │ │ │ ├── schema │ │ │ │ ├── addAutoId.js │ │ │ │ ├── applyPlugins.js │ │ │ │ ├── applyWriteConcern.js │ │ │ │ ├── cleanPositionalOperators.js │ │ │ │ ├── getIndexes.js │ │ │ │ ├── getPath.js │ │ │ │ ├── handleIdOption.js │ │ │ │ ├── handleTimestampOption.js │ │ │ │ └── merge.js │ │ │ ├── schematype │ │ │ │ └── handleImmutable.js │ │ │ ├── setDefaultsOnInsert.js │ │ │ ├── specialProperties.js │ │ │ ├── symbols.js │ │ │ ├── timestamps │ │ │ │ └── setupTimestamps.js │ │ │ ├── topology │ │ │ │ ├── allServersUnknown.js │ │ │ │ ├── isAtlas.js │ │ │ │ └── isSSLError.js │ │ │ ├── update │ │ │ │ ├── applyTimestampsToChildren.js │ │ │ │ ├── applyTimestampsToUpdate.js │ │ │ │ ├── castArrayFilters.js │ │ │ │ ├── modifiedPaths.js │ │ │ │ ├── moveImmutableProperties.js │ │ │ │ └── removeUnusedArrayFilters.js │ │ │ └── updateValidators.js │ │ ├── index.js │ │ ├── internal.js │ │ ├── model.js │ │ ├── options.js │ │ ├── options │ │ │ ├── PopulateOptions.js │ │ │ ├── SchemaArrayOptions.js │ │ │ ├── SchemaBufferOptions.js │ │ │ ├── SchemaDateOptions.js │ │ │ ├── SchemaDocumentArrayOptions.js │ │ │ ├── SchemaMapOptions.js │ │ │ ├── SchemaNumberOptions.js │ │ │ ├── SchemaObjectIdOptions.js │ │ │ ├── SchemaSingleNestedOptions.js │ │ │ ├── SchemaStringOptions.js │ │ │ ├── SchemaTypeOptions.js │ │ │ ├── VirtualOptions.js │ │ │ ├── propertyOptions.js │ │ │ ├── removeOptions.js │ │ │ └── saveOptions.js │ │ ├── plugins │ │ │ ├── idGetter.js │ │ │ ├── removeSubdocs.js │ │ │ ├── saveSubdocs.js │ │ │ ├── sharding.js │ │ │ ├── trackTransaction.js │ │ │ └── validateBeforeSave.js │ │ ├── promise_provider.js │ │ ├── query.js │ │ ├── queryhelpers.js │ │ ├── schema.js │ │ ├── schema │ │ │ ├── SingleNestedPath.js │ │ │ ├── array.js │ │ │ ├── boolean.js │ │ │ ├── buffer.js │ │ │ ├── date.js │ │ │ ├── decimal128.js │ │ │ ├── documentarray.js │ │ │ ├── index.js │ │ │ ├── map.js │ │ │ ├── mixed.js │ │ │ ├── number.js │ │ │ ├── objectid.js │ │ │ ├── operators │ │ │ │ ├── bitwise.js │ │ │ │ ├── exists.js │ │ │ │ ├── geospatial.js │ │ │ │ ├── helpers.js │ │ │ │ ├── text.js │ │ │ │ └── type.js │ │ │ ├── string.js │ │ │ └── symbols.js │ │ ├── schematype.js │ │ ├── statemachine.js │ │ ├── types │ │ │ ├── array.js │ │ │ ├── buffer.js │ │ │ ├── core_array.js │ │ │ ├── decimal128.js │ │ │ ├── documentarray.js │ │ │ ├── embedded.js │ │ │ ├── index.js │ │ │ ├── map.js │ │ │ ├── objectid.js │ │ │ └── subdocument.js │ │ ├── utils.js │ │ ├── validoptions.js │ │ └── virtualtype.js │ ├── node_modules │ │ ├── ms │ │ │ ├── index.js │ │ │ ├── license.md │ │ │ ├── package.json │ │ │ └── readme.md │ │ └── safe-buffer │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ └── package.json │ ├── package.json │ └── tools │ │ ├── auth.js │ │ ├── repl.js │ │ └── sharded.js ├── mpath │ ├── .travis.yml │ ├── History.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── bench.js │ ├── bench.log │ ├── bench.out │ ├── index.js │ ├── lib │ │ ├── index.js │ │ └── stringToParts.js │ ├── package.json │ └── test │ │ ├── index.js │ │ └── stringToParts.js ├── mquery │ ├── .eslintignore │ ├── .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 │ │ └── debug │ │ │ ├── .coveralls.yml │ │ │ ├── .eslintrc │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── karma.conf.js │ │ │ ├── node.js │ │ │ ├── package.json │ │ │ └── src │ │ │ ├── browser.js │ │ │ ├── debug.js │ │ │ ├── index.js │ │ │ └── node.js │ ├── package.json │ └── test │ │ ├── collection │ │ ├── browser.js │ │ ├── mongo.js │ │ └── node.js │ │ ├── env.js │ │ ├── index.js │ │ └── utils.test.js ├── ms │ ├── index.js │ ├── license.md │ ├── package.json │ └── readme.md ├── negotiator │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── charset.js │ │ ├── encoding.js │ │ ├── language.js │ │ └── mediaType.js │ └── package.json ├── neo-async │ ├── LICENSE │ ├── README.md │ ├── all.js │ ├── allLimit.js │ ├── allSeries.js │ ├── angelFall.js │ ├── any.js │ ├── anyLimit.js │ ├── anySeries.js │ ├── apply.js │ ├── applyEach.js │ ├── applyEachSeries.js │ ├── async.js │ ├── async.min.js │ ├── asyncify.js │ ├── auto.js │ ├── autoInject.js │ ├── cargo.js │ ├── compose.js │ ├── concat.js │ ├── concatLimit.js │ ├── concatSeries.js │ ├── constant.js │ ├── createLogger.js │ ├── detect.js │ ├── detectLimit.js │ ├── detectSeries.js │ ├── dir.js │ ├── doDuring.js │ ├── doUntil.js │ ├── doWhilst.js │ ├── during.js │ ├── each.js │ ├── eachLimit.js │ ├── eachOf.js │ ├── eachOfLimit.js │ ├── eachOfSeries.js │ ├── eachSeries.js │ ├── ensureAsync.js │ ├── every.js │ ├── everyLimit.js │ ├── everySeries.js │ ├── fast.js │ ├── filter.js │ ├── filterLimit.js │ ├── filterSeries.js │ ├── find.js │ ├── findLimit.js │ ├── findSeries.js │ ├── foldl.js │ ├── foldr.js │ ├── forEach.js │ ├── forEachLimit.js │ ├── forEachOf.js │ ├── forEachOfLimit.js │ ├── forEachOfSeries.js │ ├── forEachSeries.js │ ├── forever.js │ ├── groupBy.js │ ├── groupByLimit.js │ ├── groupBySeries.js │ ├── inject.js │ ├── iterator.js │ ├── log.js │ ├── map.js │ ├── mapLimit.js │ ├── mapSeries.js │ ├── mapValues.js │ ├── mapValuesLimit.js │ ├── mapValuesSeries.js │ ├── memoize.js │ ├── nextTick.js │ ├── omit.js │ ├── omitLimit.js │ ├── omitSeries.js │ ├── package.json │ ├── parallel.js │ ├── parallelLimit.js │ ├── pick.js │ ├── pickLimit.js │ ├── pickSeries.js │ ├── priorityQueue.js │ ├── queue.js │ ├── race.js │ ├── reduce.js │ ├── reduceRight.js │ ├── reflect.js │ ├── reflectAll.js │ ├── reject.js │ ├── rejectLimit.js │ ├── rejectSeries.js │ ├── retry.js │ ├── retryable.js │ ├── safe.js │ ├── select.js │ ├── selectLimit.js │ ├── selectSeries.js │ ├── seq.js │ ├── series.js │ ├── setImmediate.js │ ├── some.js │ ├── someLimit.js │ ├── someSeries.js │ ├── sortBy.js │ ├── sortByLimit.js │ ├── sortBySeries.js │ ├── timeout.js │ ├── times.js │ ├── timesLimit.js │ ├── timesSeries.js │ ├── transform.js │ ├── transformLimit.js │ ├── transformSeries.js │ ├── tryEach.js │ ├── unmemoize.js │ ├── until.js │ ├── waterfall.js │ ├── whilst.js │ └── wrapSync.js ├── on-finished │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── on-headers │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── once │ ├── LICENSE │ ├── README.md │ ├── once.js │ └── package.json ├── parseurl │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── passport-local │ ├── LICENSE │ ├── README.md │ ├── lib │ │ ├── index.js │ │ ├── strategy.js │ │ └── utils.js │ └── package.json ├── passport-strategy │ ├── .jshintrc │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── lib │ │ ├── index.js │ │ └── strategy.js │ └── package.json ├── passport │ ├── LICENSE │ ├── README.md │ ├── lib │ │ ├── authenticator.js │ │ ├── errors │ │ │ └── authenticationerror.js │ │ ├── framework │ │ │ └── connect.js │ │ ├── http │ │ │ └── request.js │ │ ├── index.js │ │ ├── middleware │ │ │ ├── authenticate.js │ │ │ └── initialize.js │ │ ├── sessionmanager.js │ │ └── strategies │ │ │ └── session.js │ └── package.json ├── path-is-absolute │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── path-to-regexp │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ └── package.json ├── pause │ ├── .npmignore │ ├── History.md │ ├── Makefile │ ├── Readme.md │ ├── index.js │ └── package.json ├── process-nextick-args │ ├── index.js │ ├── license.md │ ├── package.json │ └── readme.md ├── proxy-addr │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── qs │ ├── .editorconfig │ ├── .eslintignore │ ├── .eslintrc │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── dist │ │ └── qs.js │ ├── lib │ │ ├── formats.js │ │ ├── index.js │ │ ├── parse.js │ │ ├── stringify.js │ │ └── utils.js │ ├── package.json │ └── test │ │ ├── .eslintrc │ │ ├── index.js │ │ ├── parse.js │ │ ├── stringify.js │ │ └── utils.js ├── random-bytes │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── range-parser │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── raw-body │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.d.ts │ ├── index.js │ └── package.json ├── readable-stream │ ├── .travis.yml │ ├── CONTRIBUTING.md │ ├── GOVERNANCE.md │ ├── LICENSE │ ├── README.md │ ├── doc │ │ └── wg-meetings │ │ │ └── 2015-01-30.md │ ├── duplex-browser.js │ ├── duplex.js │ ├── lib │ │ ├── _stream_duplex.js │ │ ├── _stream_passthrough.js │ │ ├── _stream_readable.js │ │ ├── _stream_transform.js │ │ ├── _stream_writable.js │ │ └── internal │ │ │ └── streams │ │ │ ├── BufferList.js │ │ │ ├── destroy.js │ │ │ ├── stream-browser.js │ │ │ └── stream.js │ ├── package.json │ ├── passthrough.js │ ├── readable-browser.js │ ├── readable.js │ ├── transform.js │ ├── writable-browser.js │ └── writable.js ├── regexp-clone │ ├── .travis.yml │ ├── History.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── index.js │ ├── package.json │ └── test │ │ └── index.js ├── require_optional │ ├── .npmignore │ ├── .travis.yml │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── test │ │ ├── nestedTest │ │ ├── index.js │ │ └── package.json │ │ └── require_optional_tests.js ├── resolve-from │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── safe-buffer │ ├── LICENSE │ ├── README.md │ ├── index.d.ts │ ├── index.js │ └── package.json ├── safer-buffer │ ├── LICENSE │ ├── Porting-Buffer.md │ ├── Readme.md │ ├── dangerous.js │ ├── package.json │ ├── safer.js │ └── tests.js ├── saslprep │ ├── .editorconfig │ ├── .gitattributes │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── code-points.mem │ ├── generate-code-points.js │ ├── index.js │ ├── lib │ │ ├── code-points.js │ │ ├── memory-code-points.js │ │ └── util.js │ ├── package.json │ ├── readme.md │ └── test │ │ ├── index.js │ │ └── util.js ├── semver │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── bin │ │ └── semver │ ├── package.json │ ├── range.bnf │ └── semver.js ├── send │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── node_modules │ │ └── ms │ │ │ ├── index.js │ │ │ ├── license.md │ │ │ ├── package.json │ │ │ └── readme.md │ └── package.json ├── serve-static │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── setprototypeof │ ├── LICENSE │ ├── README.md │ ├── index.d.ts │ ├── index.js │ ├── package.json │ └── test │ │ └── index.js ├── sift │ ├── .babelrc │ ├── .coveralls.yml │ ├── .travis.yml │ ├── MIT-LICENSE.txt │ ├── README.md │ ├── bower.json │ ├── changelog.md │ ├── coverage │ │ ├── coverage.json │ │ └── lcov.info │ ├── gulpfile.js │ ├── index.d.ts │ ├── lib │ │ └── index.js │ ├── package.json │ ├── sift.min.js │ ├── src │ │ └── index.js │ ├── test │ │ ├── basic-test.js │ │ ├── immutable-test.js │ │ ├── objects-test.js │ │ └── operations-test.js │ ├── tsconfig.json │ ├── webpack.config.js │ └── yarn.lock ├── sliced │ ├── History.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── source-map │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── dist │ │ ├── source-map.debug.js │ │ ├── source-map.js │ │ ├── source-map.min.js │ │ └── source-map.min.js.map │ ├── lib │ │ ├── array-set.js │ │ ├── base64-vlq.js │ │ ├── base64.js │ │ ├── binary-search.js │ │ ├── mapping-list.js │ │ ├── quick-sort.js │ │ ├── source-map-consumer.js │ │ ├── source-map-generator.js │ │ ├── source-node.js │ │ └── util.js │ ├── package.json │ ├── source-map.d.ts │ └── source-map.js ├── sparse-bitfield │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── test.js ├── statuses │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── codes.json │ ├── index.js │ └── package.json ├── string_decoder │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── lib │ │ └── string_decoder.js │ └── package.json ├── toidentifier │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── type-is │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── uglify-js │ ├── LICENSE │ ├── README.md │ ├── bin │ │ └── uglifyjs │ ├── lib │ │ ├── ast.js │ │ ├── compress.js │ │ ├── minify.js │ │ ├── mozilla-ast.js │ │ ├── output.js │ │ ├── parse.js │ │ ├── propmangle.js │ │ ├── scope.js │ │ ├── sourcemap.js │ │ ├── transform.js │ │ └── utils.js │ ├── package.json │ └── tools │ │ ├── domprops.html │ │ ├── domprops.json │ │ ├── exit.js │ │ ├── exports.js │ │ └── node.js ├── uid-safe │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── unpipe │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── util-deprecate │ ├── History.md │ ├── LICENSE │ ├── README.md │ ├── browser.js │ ├── node.js │ └── package.json ├── utils-merge │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── vary │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── wordwrap │ ├── LICENSE │ ├── README.markdown │ ├── example │ │ ├── center.js │ │ └── meat.js │ ├── index.js │ ├── package.json │ └── test │ │ ├── break.js │ │ ├── idleness.txt │ │ └── wrap.js └── wrappy │ ├── LICENSE │ ├── README.md │ ├── package.json │ └── wrappy.js ├── package-lock.json ├── package.json ├── public ├── css │ ├── .DS_Store │ ├── bootstrap-grid.css │ ├── bootstrap-grid.css.map │ ├── bootstrap-grid.min.css │ ├── bootstrap-grid.min.css.map │ ├── bootstrap-reboot.css │ ├── bootstrap-reboot.css.map │ ├── bootstrap-reboot.min.css │ ├── bootstrap-reboot.min.css.map │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ └── bootstrap.min.css.map ├── img │ ├── node.svg │ ├── nodejs.jpg │ └── nodejs.png └── js │ ├── bootstrap.bundle.js │ ├── bootstrap.bundle.js.map │ ├── bootstrap.bundle.min.js │ ├── bootstrap.bundle.min.js.map │ ├── bootstrap.js │ ├── bootstrap.js.map │ ├── bootstrap.min.js │ └── bootstrap.min.js.map ├── routes ├── admin.js └── usuario.js └── views ├── admin ├── addcategorias.handlebars ├── addpostagem.handlebars ├── categorias.handlebars ├── editcategorias.handlebars ├── editpostagens.handlebars ├── index.handlebars └── postagens.handlebars ├── index.handlebars ├── layouts └── main.handlebars ├── partials ├── _msg.handlebars └── _navbar.handlebars ├── postagem └── index.handlebars └── usuarios ├── login.handlebars └── registro.handlebars /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /Comandos backend: -------------------------------------------------------------------------------- 1 | Site: npmjs.com 2 | 3 | Utilizando express: 4 | npm install express 5 | 6 | Utilizando handlebars: 7 | npm install --save express-handlebars 8 | npm install body-parser --save 9 | 10 | Utilizando mongoose: 11 | npm install --save mongoose 12 | 13 | Utilizando session 14 | npm instal --save express-session 15 | npm install --save connect-flash 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # blog-nodejs 2 | Criação de um Blog. 3 | 4 | Projeto web utilizando Express + MongoDB + Node.js 5 | -------------------------------------------------------------------------------- /config/db.js: -------------------------------------------------------------------------------- 1 | if(process.env.NODE_ENV == "production") { 2 | module.exports = {mongoURI: "mongodb+srv://dbUser:verteiros2@bloapp-prod.htvwu.mongodb.net/?retryWrites=true&w=majority"} 3 | } else { 4 | module.exports = {mongoURI: "mongodb://localhost/blogapp"} 5 | } -------------------------------------------------------------------------------- /helpers/eAdmin.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | eAdmin: function(req, res, next){ 3 | if(req.isAuthenticated() && req.user.eAdmin == 1){ 4 | return next(); 5 | } 6 | 7 | req.flash('error_msg', 'Você precisa ser um administrador.'); 8 | res.redirect('/'); 9 | } 10 | }; -------------------------------------------------------------------------------- /helpers/logado.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | logado: function(req, res, next){ 3 | if(req.isAuthenticated()){ 4 | return next(); 5 | } 6 | 7 | req.flash('error_msg', 'Você precisa estar logado.'); 8 | res.redirect('/'); 9 | } 10 | }; -------------------------------------------------------------------------------- /models/Categoria.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const Schema = mongoose.Schema; 3 | 4 | const Categoria = new Schema({ 5 | nome: { 6 | type: String, 7 | required: true, 8 | default: 'undefined' 9 | }, 10 | slug: { 11 | type: String, 12 | required: true, 13 | default: 'undefined' 14 | }, 15 | date: { 16 | type: Date, 17 | default: Date.now() 18 | } 19 | }); 20 | 21 | mongoose.model('categorias', Categoria); -------------------------------------------------------------------------------- /models/Postagem.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const Schema = mongoose.Schema; 3 | 4 | const Postagem = new Schema({ 5 | titulo: { 6 | type: String, 7 | required: true 8 | }, 9 | slug: { 10 | type: String, 11 | required: true 12 | }, 13 | descricao: { 14 | type: String, 15 | required: true 16 | }, 17 | conteudo: { 18 | type: String, 19 | required: true 20 | }, 21 | categoria: { 22 | type: Schema.Types.ObjectId, 23 | ref: 'categorias', 24 | required: true 25 | }, 26 | data: { 27 | type: Date, 28 | default: Date.now() 29 | } 30 | }); 31 | 32 | mongoose.model('postagens', Postagem); -------------------------------------------------------------------------------- /models/Usuario.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const Schema = mongoose.Schema; 3 | 4 | const Usuario = new Schema ({ 5 | nome: { 6 | type: String, 7 | required: true 8 | }, 9 | email: { 10 | type: String, 11 | required: true 12 | }, 13 | eAdmin: { 14 | type: Number, 15 | default: 0 16 | }, 17 | senha: { 18 | type: String, 19 | required: true 20 | } 21 | }); 22 | 23 | mongoose.model('usuarios', Usuario); -------------------------------------------------------------------------------- /node_modules/.bin/handlebars: -------------------------------------------------------------------------------- 1 | ../handlebars/bin/handlebars -------------------------------------------------------------------------------- /node_modules/.bin/mime: -------------------------------------------------------------------------------- 1 | ../mime/cli.js -------------------------------------------------------------------------------- /node_modules/.bin/semver: -------------------------------------------------------------------------------- 1 | ../semver/bin/semver -------------------------------------------------------------------------------- /node_modules/.bin/uglifyjs: -------------------------------------------------------------------------------- 1 | ../uglify-js/bin/uglifyjs -------------------------------------------------------------------------------- /node_modules/@types/bson/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/bson` 3 | 4 | # Summary 5 | This package contains type definitions for bson (https://github.com/mongodb/js-bson). 6 | 7 | # Details 8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bson. 9 | 10 | ### Additional Details 11 | * Last updated: Tue, 20 Oct 2020 02:03:19 GMT 12 | * Dependencies: [@types/node](https://npmjs.com/package/@types/node) 13 | * Global values: none 14 | 15 | # Credits 16 | These definitions were written by [Hiroki Horiuchi](https://github.com/horiuchi), [Federico Caselli](https://github.com/CaselIT), [Justin Grant](https://github.com/justingrant), and [Mikael Lirbank](https://github.com/lirbank). 17 | -------------------------------------------------------------------------------- /node_modules/@types/node/buffer.d.ts: -------------------------------------------------------------------------------- 1 | declare module "buffer" { 2 | export const INSPECT_MAX_BYTES: number; 3 | export const kMaxLength: number; 4 | export const kStringMaxLength: number; 5 | export const constants: { 6 | MAX_LENGTH: number; 7 | MAX_STRING_LENGTH: number; 8 | }; 9 | const BuffType: typeof Buffer; 10 | 11 | export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary"; 12 | 13 | export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer; 14 | 15 | export const SlowBuffer: { 16 | /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */ 17 | new(size: number): Buffer; 18 | prototype: Buffer; 19 | }; 20 | 21 | export { BuffType as Buffer }; 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/@types/node/constants.d.ts: -------------------------------------------------------------------------------- 1 | /** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */ 2 | declare module "constants" { 3 | import { constants as osConstants, SignalConstants } from 'os'; 4 | import { constants as cryptoConstants } from 'crypto'; 5 | import { constants as fsConstants } from 'fs'; 6 | const exp: typeof osConstants.errno & typeof osConstants.priority & SignalConstants & typeof cryptoConstants & typeof fsConstants; 7 | export = exp; 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/@types/node/domain.d.ts: -------------------------------------------------------------------------------- 1 | declare module "domain" { 2 | import { EventEmitter } from "events"; 3 | 4 | global { 5 | namespace NodeJS { 6 | interface Domain extends EventEmitter { 7 | run(fn: (...args: any[]) => T, ...args: any[]): T; 8 | add(emitter: EventEmitter | Timer): void; 9 | remove(emitter: EventEmitter | Timer): void; 10 | bind(cb: T): T; 11 | intercept(cb: T): T; 12 | } 13 | } 14 | } 15 | 16 | interface Domain extends NodeJS.Domain {} 17 | class Domain extends EventEmitter { 18 | members: Array; 19 | enter(): void; 20 | exit(): void; 21 | } 22 | 23 | function create(): Domain; 24 | } 25 | -------------------------------------------------------------------------------- /node_modules/@types/node/globals.global.d.ts: -------------------------------------------------------------------------------- 1 | declare var global: NodeJS.Global & typeof globalThis; 2 | -------------------------------------------------------------------------------- /node_modules/@types/node/string_decoder.d.ts: -------------------------------------------------------------------------------- 1 | declare module "string_decoder" { 2 | class StringDecoder { 3 | constructor(encoding?: BufferEncoding); 4 | write(buffer: Buffer): string; 5 | end(buffer?: Buffer): string; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/@types/node/timers.d.ts: -------------------------------------------------------------------------------- 1 | declare module "timers" { 2 | function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; 3 | namespace setTimeout { 4 | function __promisify__(ms: number): Promise; 5 | function __promisify__(ms: number, value: T): Promise; 6 | } 7 | function clearTimeout(timeoutId: NodeJS.Timeout): void; 8 | function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; 9 | function clearInterval(intervalId: NodeJS.Timeout): void; 10 | function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate; 11 | namespace setImmediate { 12 | function __promisify__(): Promise; 13 | function __promisify__(value: T): Promise; 14 | } 15 | function clearImmediate(immediateId: NodeJS.Immediate): void; 16 | } 17 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts3.4/globals.global.d.ts: -------------------------------------------------------------------------------- 1 | declare var global: NodeJS.Global; 2 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts3.4/index.d.ts: -------------------------------------------------------------------------------- 1 | // NOTE: These definitions support NodeJS and TypeScript 3.2 - 3.4. 2 | // This is required to enable globalThis support for global in ts3.5 without causing errors 3 | // This is required to enable typing assert in ts3.7 without causing errors 4 | // Typically type modifiations should be made in base.d.ts instead of here 5 | 6 | /// 7 | /// 8 | /// 9 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts3.6/index.d.ts: -------------------------------------------------------------------------------- 1 | // NOTE: These definitions support NodeJS and TypeScript 3.5 - 3.6. 2 | // This is required to enable typing assert in ts3.7 without causing errors 3 | // Typically type modifications should be made in base.d.ts instead of here 4 | 5 | /// 6 | 7 | /// 8 | -------------------------------------------------------------------------------- /node_modules/balanced-match/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | .gitignore 3 | .travis.yml 4 | Makefile 5 | example.js 6 | -------------------------------------------------------------------------------- /node_modules/bcryptjs/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | debug.log 4 | doco/ 5 | tests/bench.js 6 | *.png 7 | -------------------------------------------------------------------------------- /node_modules/bcryptjs/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - 0.10 5 | - 0.12 6 | - 4 7 | - 6 8 | 9 | before_script: npm -g install testjs 10 | 11 | env: 12 | - CXX=g++-4.8 13 | addons: 14 | apt: 15 | sources: 16 | - ubuntu-toolchain-r-test 17 | packages: 18 | - g++-4.8 19 | -------------------------------------------------------------------------------- /node_modules/bcryptjs/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "vsicons.presets.angular": false 3 | } -------------------------------------------------------------------------------- /node_modules/bcryptjs/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bcryptjs", 3 | "description": "Optimized bcrypt in plain JavaScript with zero dependencies.", 4 | "version": "2.4.3", 5 | "main": "dist/bcrypt.min.js", 6 | "license": "New-BSD", 7 | "homepage": "http://dcode.io/", 8 | "repository": { 9 | "type": "git", 10 | "url": "git://github.com/dcodeIO/bcrypt.js.git" 11 | }, 12 | "keywords": ["bcrypt", "password", "auth", "authentication", "encryption", "crypt", "crypto"], 13 | "dependencies": {}, 14 | "devDependencies": {}, 15 | "ignore": [ 16 | "**/.*", 17 | "node_modules", 18 | "bower_components", 19 | "test", 20 | "tests" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/bcryptjs/dist/README.md: -------------------------------------------------------------------------------- 1 | Distributions 2 | ============= 3 | bcrypt.js is available as the following distributions: 4 | 5 | * **[bcrypt.js](https://github.com/dcodeIO/bcrypt.js/blob/master/dist/bcrypt.js)** 6 | contains the commented source code. 7 | 8 | * **[bcrypt.min.js](https://github.com/dcodeIO/bcrypt.js/blob/master/dist/bcrypt.min.js)** 9 | has been compiled with Closure Compiler using advanced optimizations. 10 | 11 | * **[bcrypt.min.map](https://github.com/dcodeIO/bcrypt.js/blob/master/dist/bcrypt.min.map)** 12 | contains the source map generated by Closure Compiler. 13 | 14 | * **[bcrypt.min.js.gz](https://github.com/dcodeIO/bcrypt.js/blob/master/dist/bcrypt.min.js.gz)** 15 | has also been gzipped using `-9`. 16 | -------------------------------------------------------------------------------- /node_modules/bcryptjs/dist/bcrypt.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorluizskt/blog-nodejs/2d6ba159409762451db87744440acc5f6a6245c7/node_modules/bcryptjs/dist/bcrypt.min.js.gz -------------------------------------------------------------------------------- /node_modules/bcryptjs/src/bcrypt/prng/README.md: -------------------------------------------------------------------------------- 1 | Because of [reasonable security doubts](https://github.com/dcodeIO/bcrypt.js/issues/16), these files, which used to be 2 | a part of bcrypt-isaac.js, are no longer used but are kept here for reference only. 3 | 4 | What is required instead is a proper way to collect entropy sources (using an intermediate stream cipher) which is then 5 | used to seed the CSPRNG. Pick one and use `bcrypt.setRandomFallback` instead. 6 | -------------------------------------------------------------------------------- /node_modules/bcryptjs/src/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bcryptjs", 3 | "description": "Optimized bcrypt in plain JavaScript with zero dependencies.", 4 | "version": /*?== VERSION */, 5 | "main": "dist/bcrypt.min.js", 6 | "license": "New-BSD", 7 | "homepage": "http://dcode.io/", 8 | "repository": { 9 | "type": "git", 10 | "url": "git://github.com/dcodeIO/bcrypt.js.git" 11 | }, 12 | "keywords": ["bcrypt", "password", "auth", "authentication", "encryption", "crypt", "crypto"], 13 | "dependencies": {}, 14 | "devDependencies": {}, 15 | "ignore": [ 16 | "**/.*", 17 | "node_modules", 18 | "bower_components", 19 | "test", 20 | "tests" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/bl/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - '4' 5 | - '6' 6 | - '8' 7 | - '9' 8 | - '10' 9 | branches: 10 | only: 11 | - master 12 | notifications: 13 | email: 14 | - rod@vagg.org 15 | - matteo.collina@gmail.com 16 | -------------------------------------------------------------------------------- /node_modules/bluebird/changelog.md: -------------------------------------------------------------------------------- 1 | [http://bluebirdjs.com/docs/changelog.html](http://bluebirdjs.com/docs/changelog.html) 2 | -------------------------------------------------------------------------------- /node_modules/bluebird/js/release/any.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | module.exports = function(Promise) { 3 | var SomePromiseArray = Promise._SomePromiseArray; 4 | function any(promises) { 5 | var ret = new SomePromiseArray(promises); 6 | var promise = ret.promise(); 7 | ret.setHowMany(1); 8 | ret.setUnwrap(); 9 | ret.init(); 10 | return promise; 11 | } 12 | 13 | Promise.any = function (promises) { 14 | return any(promises); 15 | }; 16 | 17 | Promise.prototype.any = function () { 18 | return any(this); 19 | }; 20 | 21 | }; 22 | -------------------------------------------------------------------------------- /node_modules/bluebird/js/release/bluebird.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var old; 3 | if (typeof Promise !== "undefined") old = Promise; 4 | function noConflict() { 5 | try { if (Promise === bluebird) Promise = old; } 6 | catch (e) {} 7 | return bluebird; 8 | } 9 | var bluebird = require("./promise")(); 10 | bluebird.noConflict = noConflict; 11 | module.exports = bluebird; 12 | -------------------------------------------------------------------------------- /node_modules/bluebird/js/release/filter.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | module.exports = function(Promise, INTERNAL) { 3 | var PromiseMap = Promise.map; 4 | 5 | Promise.prototype.filter = function (fn, options) { 6 | return PromiseMap(this, fn, options, INTERNAL); 7 | }; 8 | 9 | Promise.filter = function (promises, fn, options) { 10 | return PromiseMap(promises, fn, options, INTERNAL); 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /node_modules/bson/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bson", 3 | "description": "A bson parser for node.js and the browser", 4 | "keywords": [ 5 | "mongodb", 6 | "bson", 7 | "parser" 8 | ], 9 | "author": "Christian Amor Kvalheim ", 10 | "main": "./browser_build/bson.js", 11 | "license": "Apache-2.0", 12 | "moduleType": [ 13 | "globals", 14 | "node" 15 | ], 16 | "ignore": [ 17 | "**/.*", 18 | "alternate_parsers", 19 | "benchmarks", 20 | "bower_components", 21 | "node_modules", 22 | "test", 23 | "tools" 24 | ], 25 | "version": "1.1.5" 26 | } 27 | -------------------------------------------------------------------------------- /node_modules/bson/browser_build/package.json: -------------------------------------------------------------------------------- 1 | { "name" : "bson" 2 | , "description" : "A bson parser for node.js and the browser" 3 | , "main": "../" 4 | , "directories" : { "lib" : "../lib/bson" } 5 | , "engines" : { "node" : ">=0.6.0" } 6 | , "licenses" : [ { "type" : "Apache License, Version 2.0" 7 | , "url" : "http://www.apache.org/licenses/LICENSE-2.0" } ] 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/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; 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; 25 | -------------------------------------------------------------------------------- /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; 33 | -------------------------------------------------------------------------------- /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; 34 | -------------------------------------------------------------------------------- /node_modules/bson/lib/bson/int_32.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A class representation of a BSON Int32 type. 3 | * 4 | * @class 5 | * @param {number} value the number we want to represent as an int32. 6 | * @return {Int32} 7 | */ 8 | var Int32 = function(value) { 9 | if (!(this instanceof Int32)) return new Int32(value); 10 | 11 | this._bsontype = 'Int32'; 12 | this.value = value; 13 | }; 14 | 15 | /** 16 | * Access the number value. 17 | * 18 | * @method 19 | * @return {number} returns the wrapped int32 number. 20 | */ 21 | Int32.prototype.valueOf = function() { 22 | return this.value; 23 | }; 24 | 25 | /** 26 | * @ignore 27 | */ 28 | Int32.prototype.toJSON = function() { 29 | return this.value; 30 | }; 31 | 32 | module.exports = Int32; 33 | module.exports.Int32 = Int32; 34 | -------------------------------------------------------------------------------- /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; 15 | -------------------------------------------------------------------------------- /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; 15 | -------------------------------------------------------------------------------- /node_modules/bson/lib/bson/parser/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Normalizes our expected stringified form of a function across versions of node 5 | * @param {Function} fn The function to stringify 6 | */ 7 | function normalizedFunctionString(fn) { 8 | return fn.toString().replace(/function *\(/, 'function ('); 9 | } 10 | 11 | function newBuffer(item, encoding) { 12 | return new Buffer(item, encoding); 13 | } 14 | 15 | function allocBuffer() { 16 | return Buffer.alloc.apply(Buffer, arguments); 17 | } 18 | 19 | function toBuffer() { 20 | return Buffer.from.apply(Buffer, arguments); 21 | } 22 | 23 | module.exports = { 24 | normalizedFunctionString: normalizedFunctionString, 25 | allocBuffer: typeof Buffer.alloc === 'function' ? allocBuffer : newBuffer, 26 | toBuffer: typeof Buffer.from === 'function' ? toBuffer : newBuffer 27 | }; 28 | 29 | -------------------------------------------------------------------------------- /node_modules/concat-map/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | -------------------------------------------------------------------------------- /node_modules/concat-map/example/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 3 | var ys = concatMap(xs, function (x) { 4 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 5 | }); 6 | console.dir(ys); 7 | -------------------------------------------------------------------------------- /node_modules/concat-map/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function (xs, fn) { 2 | var res = []; 3 | for (var i = 0; i < xs.length; i++) { 4 | var x = fn(xs[i], i); 5 | if (isArray(x)) res.push.apply(res, x); 6 | else res.push(x); 7 | } 8 | return res; 9 | }; 10 | 11 | var isArray = Array.isArray || function (xs) { 12 | return Object.prototype.toString.call(xs) === '[object Array]'; 13 | }; 14 | -------------------------------------------------------------------------------- /node_modules/connect-flash/.travis.yml: -------------------------------------------------------------------------------- 1 | language: "node_js" 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | - 0.8 6 | -------------------------------------------------------------------------------- /node_modules/connect-flash/lib/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Expose middleware. 3 | */ 4 | exports = module.exports = require('./flash'); 5 | -------------------------------------------------------------------------------- /node_modules/content-type/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.4 / 2017-09-11 2 | ================== 3 | 4 | * perf: skip parameter parsing when no parameters 5 | 6 | 1.0.3 / 2017-09-10 7 | ================== 8 | 9 | * perf: remove argument reassignment 10 | 11 | 1.0.2 / 2016-05-09 12 | ================== 13 | 14 | * perf: enable strict mode 15 | 16 | 1.0.1 / 2015-02-13 17 | ================== 18 | 19 | * Improve missing `Content-Type` header error message 20 | 21 | 1.0.0 / 2015-02-01 22 | ================== 23 | 24 | * Initial implementation, derived from `media-typer@0.3.0` 25 | -------------------------------------------------------------------------------- /node_modules/cookie-signature/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | -------------------------------------------------------------------------------- /node_modules/cookie-signature/History.md: -------------------------------------------------------------------------------- 1 | 1.0.6 / 2015-02-03 2 | ================== 3 | 4 | * use `npm test` instead of `make test` to run tests 5 | * clearer assertion messages when checking input 6 | 7 | 8 | 1.0.5 / 2014-09-05 9 | ================== 10 | 11 | * add license to package.json 12 | 13 | 1.0.4 / 2014-06-25 14 | ================== 15 | 16 | * corrected avoidance of timing attacks (thanks @tenbits!) 17 | 18 | 1.0.3 / 2014-01-28 19 | ================== 20 | 21 | * [incorrect] fix for timing attacks 22 | 23 | 1.0.2 / 2014-01-28 24 | ================== 25 | 26 | * fix missing repository warning 27 | * fix typo in test 28 | 29 | 1.0.1 / 2013-04-15 30 | ================== 31 | 32 | * Revert "Changed underlying HMAC algo. to sha512." 33 | * Revert "Fix for timing attacks on MAC verification." 34 | 35 | 0.0.1 / 2010-01-03 36 | ================== 37 | 38 | * Initial release 39 | -------------------------------------------------------------------------------- /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/debug/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve 2 | -------------------------------------------------------------------------------- /node_modules/debug/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": 0, 8 | "no-empty": [1, { "allowEmptyCatch": true }] 9 | }, 10 | "extends": "eslint:recommended" 11 | } 12 | -------------------------------------------------------------------------------- /node_modules/debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | yarn.lock 8 | coverage 9 | bower.json 10 | -------------------------------------------------------------------------------- /node_modules/debug/.travis.yml: -------------------------------------------------------------------------------- 1 | 2 | language: node_js 3 | node_js: 4 | - "6" 5 | - "5" 6 | - "4" 7 | 8 | install: 9 | - make node_modules 10 | 11 | script: 12 | - make lint 13 | - make test 14 | - make coveralls 15 | -------------------------------------------------------------------------------- /node_modules/debug/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "repo": "visionmedia/debug", 4 | "description": "small debugging utility", 5 | "version": "2.6.9", 6 | "keywords": [ 7 | "debug", 8 | "log", 9 | "debugger" 10 | ], 11 | "main": "src/browser.js", 12 | "scripts": [ 13 | "src/browser.js", 14 | "src/debug.js" 15 | ], 16 | "dependencies": { 17 | "rauchg/ms.js": "0.7.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /node_modules/debug/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Detect Electron renderer process, which is node, but we should 3 | * treat as a browser. 4 | */ 5 | 6 | if (typeof process !== 'undefined' && process.type === 'renderer') { 7 | module.exports = require('./browser.js'); 8 | } else { 9 | module.exports = require('./node.js'); 10 | } 11 | -------------------------------------------------------------------------------- /node_modules/debug/src/inspector-log.js: -------------------------------------------------------------------------------- 1 | module.exports = inspectorLog; 2 | 3 | // black hole 4 | const nullStream = new (require('stream').Writable)(); 5 | nullStream._write = () => {}; 6 | 7 | /** 8 | * Outputs a `console.log()` to the Node.js Inspector console *only*. 9 | */ 10 | function inspectorLog() { 11 | const stdout = console._stdout; 12 | console._stdout = nullStream; 13 | console.log.apply(console, arguments); 14 | console._stdout = stdout; 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/denque/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 Mike Diarmid (Salakar) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this library except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /node_modules/denque/index.d.ts: -------------------------------------------------------------------------------- 1 | declare class Denque { 2 | constructor(); 3 | constructor(array: T[]); 4 | 5 | push(item: T): number; 6 | unshift(item: T): number; 7 | pop(): T | undefined; 8 | removeBack(): T | undefined; 9 | shift(): T | undefined; 10 | peekBack(): T | undefined; 11 | peekFront(): T | undefined; 12 | peekAt(index: number): T | undefined; 13 | get(index: number): T | undefined; 14 | remove(index: number, count: number): T[]; 15 | removeOne(index: number): T | undefined; 16 | splice(index: number, count: number, ...item: T[]): T[] | undefined; 17 | isEmpty(): boolean; 18 | clear(): void; 19 | 20 | toString(): string; 21 | toArray(): T[]; 22 | 23 | length: number; 24 | } 25 | 26 | export = Denque; 27 | -------------------------------------------------------------------------------- /node_modules/depd/lib/compat/event-listener-count.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2015 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = eventListenerCount 15 | 16 | /** 17 | * Get the count of listeners on an event emitter of a specific type. 18 | */ 19 | 20 | function eventListenerCount (emitter, type) { 21 | return emitter.listeners(type).length 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/encodeurl/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.2 / 2018-01-21 2 | ================== 3 | 4 | * Fix encoding `%` as last character 5 | 6 | 1.0.1 / 2016-06-09 7 | ================== 8 | 9 | * Fix encoding unpaired surrogates at start/end of string 10 | 11 | 1.0.0 / 2016-06-08 12 | ================== 13 | 14 | * Initial release 15 | -------------------------------------------------------------------------------- /node_modules/escape-html/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | # escape-html 3 | 4 | Escape string for use in HTML 5 | 6 | ## Example 7 | 8 | ```js 9 | var escape = require('escape-html'); 10 | var html = escape('foo & bar'); 11 | // -> foo & bar 12 | ``` 13 | 14 | ## Benchmark 15 | 16 | ``` 17 | $ npm run-script bench 18 | 19 | > escape-html@1.0.3 bench nodejs-escape-html 20 | > node benchmark/index.js 21 | 22 | 23 | http_parser@1.0 24 | node@0.10.33 25 | v8@3.14.5.9 26 | ares@1.9.0-DEV 27 | uv@0.10.29 28 | zlib@1.2.3 29 | modules@11 30 | openssl@1.0.1j 31 | 32 | 1 test completed. 33 | 2 tests completed. 34 | 3 tests completed. 35 | 36 | no special characters x 19,435,271 ops/sec ±0.85% (187 runs sampled) 37 | single special character x 6,132,421 ops/sec ±0.67% (194 runs sampled) 38 | many special characters x 3,175,826 ops/sec ±0.65% (193 runs sampled) 39 | ``` 40 | 41 | ## License 42 | 43 | MIT -------------------------------------------------------------------------------- /node_modules/express-handlebars/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | coverage/ 4 | -------------------------------------------------------------------------------- /node_modules/express-handlebars/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | node: true, 4 | jest: true, 5 | }, 6 | extends: [ 7 | "standard", 8 | ], 9 | parserOptions: { 10 | ecmaVersion: 2018, 11 | }, 12 | rules: { 13 | quotes: ["error", "double"], 14 | semi: ["error", "always"], 15 | "no-warning-comments": "warn", 16 | "comma-dangle": ["error", "always-multiline"], 17 | indent: ["error", "tab", { SwitchCase: 1 }], 18 | "no-tabs": "off", 19 | "no-var": "error", 20 | "prefer-const": "error", 21 | "object-shorthand": "error", 22 | "no-restricted-globals": [ 23 | "error", 24 | { 25 | name: "fit", 26 | message: "Do not commit focused tests.", 27 | }, 28 | { 29 | name: "fdescribe", 30 | message: "Do not commit focused tests.", 31 | }, 32 | ], 33 | }, 34 | }; 35 | -------------------------------------------------------------------------------- /node_modules/express-handlebars/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Yahoo Inc. All rights reserved. 3 | * Copyrights licensed under the New BSD License. 4 | * See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | "use strict"; 8 | 9 | const ExpressHandlebars = require("./lib/express-handlebars"); 10 | 11 | exports = module.exports = exphbs; 12 | exports.create = create; 13 | exports.ExpressHandlebars = ExpressHandlebars; 14 | 15 | // ----------------------------------------------------------------------------- 16 | 17 | function exphbs (config) { 18 | return create(config).engine; 19 | } 20 | 21 | function create (config) { 22 | return new ExpressHandlebars(config); 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/express-handlebars/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | restoreMocks: true, 3 | clearMocks: true, 4 | collectCoverageFrom: [ 5 | "lib/**/*.js", 6 | "index.js", 7 | "!**/node_modules/**", 8 | ], 9 | coverageDirectory: "coverage", 10 | coverageThreshold: { 11 | global: { 12 | branches: 100, 13 | functions: 100, 14 | lines: 100, 15 | statements: 100, 16 | }, 17 | }, 18 | testRegex: /\.test\.jsx?/.source, 19 | }; 20 | -------------------------------------------------------------------------------- /node_modules/express-handlebars/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ], 5 | "devDependencies": { 6 | "automerge": true, 7 | "commitMessageTopic": "devDependency {{depName}}" 8 | }, 9 | "rangeStrategy": "bump" 10 | } 11 | -------------------------------------------------------------------------------- /node_modules/express-handlebars/spec/fixtures/layouts/main-latin1.handlebars: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorluizskt/blog-nodejs/2d6ba159409762451db87744440acc5f6a6245c7/node_modules/express-handlebars/spec/fixtures/layouts/main-latin1.handlebars -------------------------------------------------------------------------------- /node_modules/express-handlebars/spec/fixtures/layouts/main.handlebars: -------------------------------------------------------------------------------- 1 | 2 | {{{body}}} 3 | 4 | -------------------------------------------------------------------------------- /node_modules/express-handlebars/spec/fixtures/other-views/layouts/main.handlebars: -------------------------------------------------------------------------------- 1 | 2 | other layout 3 | {{{body}}} 4 | 5 | -------------------------------------------------------------------------------- /node_modules/express-handlebars/spec/fixtures/other-views/partials/partial.handlebars: -------------------------------------------------------------------------------- 1 | other partial {{text}} 2 | -------------------------------------------------------------------------------- /node_modules/express-handlebars/spec/fixtures/partials/partial-latin1.handlebars: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorluizskt/blog-nodejs/2d6ba159409762451db87744440acc5f6a6245c7/node_modules/express-handlebars/spec/fixtures/partials/partial-latin1.handlebars -------------------------------------------------------------------------------- /node_modules/express-handlebars/spec/fixtures/partials/partial.handlebars: -------------------------------------------------------------------------------- 1 | partial {{text}} 2 | -------------------------------------------------------------------------------- /node_modules/express-handlebars/spec/fixtures/render-cached.handlebars: -------------------------------------------------------------------------------- 1 | not cached 2 | -------------------------------------------------------------------------------- /node_modules/express-handlebars/spec/fixtures/render-helper.handlebars: -------------------------------------------------------------------------------- 1 |

{{help text}}

2 | -------------------------------------------------------------------------------- /node_modules/express-handlebars/spec/fixtures/render-latin1.handlebars: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorluizskt/blog-nodejs/2d6ba159409762451db87744440acc5f6a6245c7/node_modules/express-handlebars/spec/fixtures/render-latin1.handlebars -------------------------------------------------------------------------------- /node_modules/express-handlebars/spec/fixtures/render-partial.handlebars: -------------------------------------------------------------------------------- 1 |

{{> partial}}

2 |

{{text}}

3 | -------------------------------------------------------------------------------- /node_modules/express-handlebars/spec/fixtures/render-text.handlebars: -------------------------------------------------------------------------------- 1 |

{{text}}

2 | -------------------------------------------------------------------------------- /node_modules/express-handlebars/spec/fixtures/templates/subdir/template.handlebars: -------------------------------------------------------------------------------- 1 |

{{text}}

2 | -------------------------------------------------------------------------------- /node_modules/express-handlebars/spec/fixtures/templates/template-latin1.handlebars: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorluizskt/blog-nodejs/2d6ba159409762451db87744440acc5f6a6245c7/node_modules/express-handlebars/spec/fixtures/templates/template-latin1.handlebars -------------------------------------------------------------------------------- /node_modules/express-handlebars/spec/fixtures/templates/template.handlebars: -------------------------------------------------------------------------------- 1 |

{{text}}

2 | -------------------------------------------------------------------------------- /node_modules/express/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * express 3 | * Copyright(c) 2009-2013 TJ Holowaychuk 4 | * Copyright(c) 2013 Roman Shtylman 5 | * Copyright(c) 2014-2015 Douglas Christopher Wilson 6 | * MIT Licensed 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./lib/express'); 12 | -------------------------------------------------------------------------------- /node_modules/forwarded/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.1.2 / 2017-09-14 2 | ================== 3 | 4 | * perf: improve header parsing 5 | * perf: reduce overhead when no `X-Forwarded-For` header 6 | 7 | 0.1.1 / 2017-09-10 8 | ================== 9 | 10 | * Fix trimming leading / trailing OWS 11 | * perf: hoist regular expression 12 | 13 | 0.1.0 / 2014-09-21 14 | ================== 15 | 16 | * Initial release 17 | -------------------------------------------------------------------------------- /node_modules/graceful-fs/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors 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 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/graceful-fs/clone.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = clone 4 | 5 | function clone (obj) { 6 | if (obj === null || typeof obj !== 'object') 7 | return obj 8 | 9 | if (obj instanceof Object) 10 | var copy = { __proto__: obj.__proto__ } 11 | else 12 | var copy = Object.create(null) 13 | 14 | Object.getOwnPropertyNames(obj).forEach(function (key) { 15 | Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) 16 | }) 17 | 18 | return copy 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/handlebars/bin/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | rules: { 3 | 'no-console': 0, 4 | 'no-var': 0 5 | } 6 | }; 7 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/decorators.js: -------------------------------------------------------------------------------- 1 | import registerInline from './decorators/inline'; 2 | 3 | export function registerDefaultDecorators(instance) { 4 | registerInline(instance); 5 | } 6 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/decorators/inline.js: -------------------------------------------------------------------------------- 1 | import { extend } from '../utils'; 2 | 3 | export default function(instance) { 4 | instance.registerDecorator('inline', function(fn, props, container, options) { 5 | let ret = fn; 6 | if (!props.partials) { 7 | props.partials = {}; 8 | ret = function(context, options) { 9 | // Create a new partials stack frame prior to exec. 10 | let original = container.partials; 11 | container.partials = extend({}, original, props.partials); 12 | let ret = fn(context, options); 13 | container.partials = original; 14 | return ret; 15 | }; 16 | } 17 | 18 | props.partials[options.args[0]] = options.fn; 19 | 20 | return ret; 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/helpers/helper-missing.js: -------------------------------------------------------------------------------- 1 | import Exception from '../exception'; 2 | 3 | export default function(instance) { 4 | instance.registerHelper('helperMissing', function(/* [args, ]options */) { 5 | if (arguments.length === 1) { 6 | // A missing field in a {{foo}} construct. 7 | return undefined; 8 | } else { 9 | // Someone is actually trying to call something, blow up. 10 | throw new Exception( 11 | 'Missing helper: "' + arguments[arguments.length - 1].name + '"' 12 | ); 13 | } 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/helpers/log.js: -------------------------------------------------------------------------------- 1 | export default function(instance) { 2 | instance.registerHelper('log', function(/* message, options */) { 3 | let args = [undefined], 4 | options = arguments[arguments.length - 1]; 5 | for (let i = 0; i < arguments.length - 1; i++) { 6 | args.push(arguments[i]); 7 | } 8 | 9 | let level = 1; 10 | if (options.hash.level != null) { 11 | level = options.hash.level; 12 | } else if (options.data && options.data.level != null) { 13 | level = options.data.level; 14 | } 15 | args[0] = level; 16 | 17 | instance.log(...args); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/helpers/lookup.js: -------------------------------------------------------------------------------- 1 | export default function(instance) { 2 | instance.registerHelper('lookup', function(obj, field, options) { 3 | if (!obj) { 4 | // Note for 5.0: Change to "obj == null" in 5.0 5 | return obj; 6 | } 7 | return options.lookupProperty(obj, field); 8 | }); 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/internal/create-new-lookup-object.js: -------------------------------------------------------------------------------- 1 | import { extend } from '../utils'; 2 | 3 | /** 4 | * Create a new object with "null"-prototype to avoid truthy results on prototype properties. 5 | * The resulting object can be used with "object[property]" to check if a property exists 6 | * @param {...object} sources a varargs parameter of source objects that will be merged 7 | * @returns {object} 8 | */ 9 | export function createNewLookupObject(...sources) { 10 | return extend(Object.create(null), ...sources); 11 | } 12 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/internal/wrapHelper.js: -------------------------------------------------------------------------------- 1 | export function wrapHelper(helper, transformOptionsFn) { 2 | if (typeof helper !== 'function') { 3 | // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639 4 | // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function. 5 | return helper; 6 | } 7 | let wrapper = function(/* dynamic arguments */) { 8 | const options = arguments[arguments.length - 1]; 9 | arguments[arguments.length - 1] = transformOptionsFn(options); 10 | return helper.apply(this, arguments); 11 | }; 12 | return wrapper; 13 | } 14 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/no-conflict.js: -------------------------------------------------------------------------------- 1 | export default function(Handlebars) { 2 | /* istanbul ignore next */ 3 | let root = typeof global !== 'undefined' ? global : window, 4 | $Handlebars = root.Handlebars; 5 | /* istanbul ignore next */ 6 | Handlebars.noConflict = function() { 7 | if (root.Handlebars === Handlebars) { 8 | root.Handlebars = $Handlebars; 9 | } 10 | return Handlebars; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/safe-string.js: -------------------------------------------------------------------------------- 1 | // Build out our basic SafeString type 2 | function SafeString(string) { 3 | this.string = string; 4 | } 5 | 6 | SafeString.prototype.toString = SafeString.prototype.toHTML = function() { 7 | return '' + this.string; 8 | }; 9 | 10 | export default SafeString; 11 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/index.js: -------------------------------------------------------------------------------- 1 | // USAGE: 2 | // var handlebars = require('handlebars'); 3 | /* eslint-disable no-var */ 4 | 5 | // var local = handlebars.create(); 6 | 7 | var handlebars = require('../dist/cjs/handlebars')['default']; 8 | 9 | var printer = require('../dist/cjs/handlebars/compiler/printer'); 10 | handlebars.PrintVisitor = printer.PrintVisitor; 11 | handlebars.print = printer.print; 12 | 13 | module.exports = handlebars; 14 | 15 | // Publish a Node.js require() handler for .handlebars and .hbs files 16 | function extension(module, filename) { 17 | var fs = require('fs'); 18 | var templateString = fs.readFileSync(filename, 'utf8'); 19 | module.exports = handlebars.compile(templateString); 20 | } 21 | /* istanbul ignore else */ 22 | if (typeof require !== 'undefined' && require.extensions) { 23 | require.extensions['.handlebars'] = extension; 24 | require.extensions['.hbs'] = extension; 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/handlebars/runtime.d.ts: -------------------------------------------------------------------------------- 1 | import Handlebars = require('handlebars') 2 | 3 | declare module "handlebars/runtime" { 4 | 5 | } -------------------------------------------------------------------------------- /node_modules/handlebars/runtime.js: -------------------------------------------------------------------------------- 1 | // Create a simple path alias to allow browserify to resolve 2 | // the runtime on a supported path. 3 | module.exports = require('./dist/cjs/handlebars.runtime')['default']; 4 | -------------------------------------------------------------------------------- /node_modules/iconv-lite/encodings/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | // Update this array if you add/rename/remove files in this directory. 4 | // We support Browserify by skipping automatic module discovery and requiring modules directly. 5 | var modules = [ 6 | require("./internal"), 7 | require("./utf16"), 8 | require("./utf7"), 9 | require("./sbcs-codec"), 10 | require("./sbcs-data"), 11 | require("./sbcs-data-generated"), 12 | require("./dbcs-codec"), 13 | require("./dbcs-data"), 14 | ]; 15 | 16 | // Put all encoding/alias/codec definitions to single object and export it. 17 | for (var i = 0; i < modules.length; i++) { 18 | var module = modules[i]; 19 | for (var enc in module) 20 | if (Object.prototype.hasOwnProperty.call(module, enc)) 21 | exports[enc] = module[enc]; 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/inflight/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 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /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/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | try { 2 | var util = require('util'); 3 | if (typeof util.inherits !== 'function') throw ''; 4 | module.exports = util.inherits; 5 | } catch (e) { 6 | module.exports = require('./inherits_browser.js'); 7 | } 8 | -------------------------------------------------------------------------------- /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/isarray/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /node_modules/isarray/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | -------------------------------------------------------------------------------- /node_modules/isarray/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @node_modules/.bin/tape test.js 4 | 5 | .PHONY: test 6 | 7 | -------------------------------------------------------------------------------- /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/isarray/index.js: -------------------------------------------------------------------------------- 1 | var toString = {}.toString; 2 | 3 | module.exports = Array.isArray || function (arr) { 4 | return toString.call(arr) == '[object Array]'; 5 | }; 6 | -------------------------------------------------------------------------------- /node_modules/isarray/test.js: -------------------------------------------------------------------------------- 1 | var isArray = require('./'); 2 | var test = require('tape'); 3 | 4 | test('is array', function(t){ 5 | t.ok(isArray([])); 6 | t.notOk(isArray({})); 7 | t.notOk(isArray(null)); 8 | t.notOk(isArray(false)); 9 | 10 | var obj = {}; 11 | obj[0] = true; 12 | t.notOk(isArray(obj)); 13 | 14 | var arr = []; 15 | arr.foo = 'bar'; 16 | t.ok(isArray(arr)); 17 | 18 | t.end(); 19 | }); 20 | 21 | -------------------------------------------------------------------------------- /node_modules/kareem/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "12" 4 | - "10" 5 | - "9" 6 | - "8" 7 | - "7" 8 | - "6" 9 | - "5" 10 | - "4" 11 | script: "npm run-script test-travis" 12 | after_script: "npm install coveralls@2.10.0 && cat ./coverage/lcov.info | coveralls" 13 | -------------------------------------------------------------------------------- /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/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/media-typer/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.3.0 / 2014-09-07 2 | ================== 3 | 4 | * Support Node.js 0.6 5 | * Throw error when parameter format invalid on parse 6 | 7 | 0.2.0 / 2014-06-18 8 | ================== 9 | 10 | * Add `typer.format()` to format media types 11 | 12 | 0.1.0 / 2014-06-17 13 | ================== 14 | 15 | * Accept `req` as argument to `parse` 16 | * Accept `res` as argument to `parse` 17 | * Parse media type with extra LWS between type and first parameter 18 | 19 | 0.0.0 / 2014-06-13 20 | ================== 21 | 22 | * Initial implementation 23 | -------------------------------------------------------------------------------- /node_modules/memory-pager/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '4' 4 | - '6' 5 | -------------------------------------------------------------------------------- /node_modules/merge-descriptors/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.1 / 2016-01-17 2 | ================== 3 | 4 | * perf: enable strict mode 5 | 6 | 1.0.0 / 2015-03-01 7 | ================== 8 | 9 | * Add option to only add new descriptors 10 | * Add simple argument validation 11 | * Add jsdoc to source file 12 | 13 | 0.0.2 / 2013-12-14 14 | ================== 15 | 16 | * Move repository to `component` organization 17 | 18 | 0.0.1 / 2013-10-29 19 | ================== 20 | 21 | * Initial release 22 | -------------------------------------------------------------------------------- /node_modules/methods/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.1.2 / 2016-01-17 2 | ================== 3 | 4 | * perf: enable strict mode 5 | 6 | 1.1.1 / 2014-12-30 7 | ================== 8 | 9 | * Improve `browserify` support 10 | 11 | 1.1.0 / 2014-07-05 12 | ================== 13 | 14 | * Add `CONNECT` method 15 | 16 | 1.0.1 / 2014-06-02 17 | ================== 18 | 19 | * Fix module to work with harmony transform 20 | 21 | 1.0.0 / 2014-05-08 22 | ================== 23 | 24 | * Add `PURGE` method 25 | 26 | 0.1.0 / 2013-10-28 27 | ================== 28 | 29 | * Add `http.METHODS` support 30 | -------------------------------------------------------------------------------- /node_modules/mime-db/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * mime-db 3 | * Copyright(c) 2014 Jonathan Ong 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module exports. 9 | */ 10 | 11 | module.exports = require('./db.json') 12 | -------------------------------------------------------------------------------- /node_modules/mime/.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorluizskt/blog-nodejs/2d6ba159409762451db87744440acc5f6a6245c7/node_modules/mime/.npmignore -------------------------------------------------------------------------------- /node_modules/mime/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var mime = require('./mime.js'); 4 | var file = process.argv[2]; 5 | var type = mime.lookup(file); 6 | 7 | process.stdout.write(type + '\n'); 8 | 9 | -------------------------------------------------------------------------------- /node_modules/minimatch/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 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 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/minimist/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | - "0.12" 6 | - "iojs" 7 | before_install: 8 | - npm install -g npm@~1.4.6 9 | -------------------------------------------------------------------------------- /node_modules/minimist/example/parse.js: -------------------------------------------------------------------------------- 1 | var argv = require('../')(process.argv.slice(2)); 2 | console.log(argv); 3 | -------------------------------------------------------------------------------- /node_modules/minimist/test/all_bool.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('flag boolean true (default all --args to boolean)', function (t) { 5 | var argv = parse(['moo', '--honk', 'cow'], { 6 | boolean: true 7 | }); 8 | 9 | t.deepEqual(argv, { 10 | honk: true, 11 | _: ['moo', 'cow'] 12 | }); 13 | 14 | t.deepEqual(typeof argv.honk, 'boolean'); 15 | t.end(); 16 | }); 17 | 18 | test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { 19 | var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { 20 | boolean: true 21 | }); 22 | 23 | t.deepEqual(argv, { 24 | honk: true, 25 | tacos: 'good', 26 | p: 55, 27 | _: ['moo', 'cow'] 28 | }); 29 | 30 | t.deepEqual(typeof argv.honk, 'boolean'); 31 | t.end(); 32 | }); 33 | -------------------------------------------------------------------------------- /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 | 18 | test('dotted default with no alias', function (t) { 19 | var argv = parse('', {default: {'a.b': 11}}); 20 | t.equal(argv.a.b, 11); 21 | t.end(); 22 | }); 23 | -------------------------------------------------------------------------------- /node_modules/minimist/test/kv_short.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('short -k=v' , function (t) { 5 | t.plan(1); 6 | 7 | var argv = parse([ '-b=123' ]); 8 | t.deepEqual(argv, { b: 123, _: [] }); 9 | }); 10 | 11 | test('multi short -k=v' , function (t) { 12 | t.plan(1); 13 | 14 | var argv = parse([ '-a=whatever', '-b=robots' ]); 15 | t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); 16 | }); 17 | -------------------------------------------------------------------------------- /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/minimist/test/stop_early.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('stops parsing on the first non-option when stopEarly is set', function (t) { 5 | var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { 6 | stopEarly: true 7 | }); 8 | 9 | t.deepEqual(argv, { 10 | aaa: 'bbb', 11 | _: ['ccc', '--ddd'] 12 | }); 13 | 14 | t.end(); 15 | }); 16 | -------------------------------------------------------------------------------- /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/mongodb/lib/async/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "ecmaVersion": 2018 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /node_modules/mongodb/lib/async/async_iterator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // async function* asyncIterator() { 4 | // while (true) { 5 | // const value = await this.next(); 6 | // if (!value) { 7 | // await this.close(); 8 | // return; 9 | // } 10 | 11 | // yield value; 12 | // } 13 | // } 14 | 15 | // TODO: change this to the async generator function above 16 | function asyncIterator() { 17 | const cursor = this; 18 | 19 | return { 20 | next: function() { 21 | return Promise.resolve() 22 | .then(() => cursor.next()) 23 | .then(value => { 24 | if (!value) { 25 | return cursor.close().then(() => ({ value, done: true })); 26 | } 27 | return { value, done: false }; 28 | }); 29 | } 30 | }; 31 | } 32 | 33 | exports.asyncIterator = asyncIterator; 34 | -------------------------------------------------------------------------------- /node_modules/mongodb/lib/constants.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | SYSTEM_NAMESPACE_COLLECTION: 'system.namespaces', 5 | SYSTEM_INDEX_COLLECTION: 'system.indexes', 6 | SYSTEM_PROFILE_COLLECTION: 'system.profile', 7 | SYSTEM_USER_COLLECTION: 'system.users', 8 | SYSTEM_COMMAND_COLLECTION: '$cmd', 9 | SYSTEM_JS_COLLECTION: 'system.js' 10 | }; 11 | -------------------------------------------------------------------------------- /node_modules/mongodb/lib/core/wireprotocol/constants.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const MIN_SUPPORTED_SERVER_VERSION = '2.6'; 4 | const MAX_SUPPORTED_SERVER_VERSION = '4.4'; 5 | const MIN_SUPPORTED_WIRE_VERSION = 2; 6 | const MAX_SUPPORTED_WIRE_VERSION = 9; 7 | 8 | module.exports = { 9 | MIN_SUPPORTED_SERVER_VERSION, 10 | MAX_SUPPORTED_SERVER_VERSION, 11 | MIN_SUPPORTED_WIRE_VERSION, 12 | MAX_SUPPORTED_WIRE_VERSION 13 | }; 14 | -------------------------------------------------------------------------------- /node_modules/mongodb/lib/core/wireprotocol/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const writeCommand = require('./write_command'); 3 | 4 | module.exports = { 5 | insert: function insert(server, ns, ops, options, callback) { 6 | writeCommand(server, 'insert', 'documents', ns, ops, options, callback); 7 | }, 8 | update: function update(server, ns, ops, options, callback) { 9 | writeCommand(server, 'update', 'updates', ns, ops, options, callback); 10 | }, 11 | remove: function remove(server, ns, ops, options, callback) { 12 | writeCommand(server, 'delete', 'deletes', ns, ops, options, callback); 13 | }, 14 | killCursors: require('./kill_cursors'), 15 | getMore: require('./get_more'), 16 | query: require('./query'), 17 | command: require('./command') 18 | }; 19 | -------------------------------------------------------------------------------- /node_modules/mongodb/lib/dynamic_loaders.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | let collection; 4 | let cursor; 5 | let db; 6 | 7 | function loadCollection() { 8 | if (!collection) { 9 | collection = require('./collection'); 10 | } 11 | return collection; 12 | } 13 | 14 | function loadCursor() { 15 | if (!cursor) { 16 | cursor = require('./cursor'); 17 | } 18 | return cursor; 19 | } 20 | 21 | function loadDb() { 22 | if (!db) { 23 | db = require('./db'); 24 | } 25 | return db; 26 | } 27 | 28 | module.exports = { 29 | loadCollection, 30 | loadCursor, 31 | loadDb 32 | }; 33 | -------------------------------------------------------------------------------- /node_modules/mongodb/lib/operations/delete_many.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const OperationBase = require('./operation').OperationBase; 4 | const deleteCallback = require('./common_functions').deleteCallback; 5 | const removeDocuments = require('./common_functions').removeDocuments; 6 | 7 | class DeleteManyOperation extends OperationBase { 8 | constructor(collection, filter, options) { 9 | super(options); 10 | 11 | this.collection = collection; 12 | this.filter = filter; 13 | } 14 | 15 | execute(callback) { 16 | const coll = this.collection; 17 | const filter = this.filter; 18 | const options = this.options; 19 | 20 | options.single = false; 21 | removeDocuments(coll, filter, options, (err, r) => deleteCallback(err, r, callback)); 22 | } 23 | } 24 | 25 | module.exports = DeleteManyOperation; 26 | -------------------------------------------------------------------------------- /node_modules/mongodb/lib/operations/delete_one.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const OperationBase = require('./operation').OperationBase; 4 | const deleteCallback = require('./common_functions').deleteCallback; 5 | const removeDocuments = require('./common_functions').removeDocuments; 6 | 7 | class DeleteOneOperation extends OperationBase { 8 | constructor(collection, filter, options) { 9 | super(options); 10 | 11 | this.collection = collection; 12 | this.filter = filter; 13 | } 14 | 15 | execute(callback) { 16 | const coll = this.collection; 17 | const filter = this.filter; 18 | const options = this.options; 19 | 20 | options.single = true; 21 | removeDocuments(coll, filter, options, (err, r) => deleteCallback(err, r, callback)); 22 | } 23 | } 24 | 25 | module.exports = DeleteOneOperation; 26 | -------------------------------------------------------------------------------- /node_modules/mongodb/lib/operations/drop_indexes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const Aspect = require('./operation').Aspect; 4 | const defineAspects = require('./operation').defineAspects; 5 | const DropIndexOperation = require('./drop_index'); 6 | const handleCallback = require('../utils').handleCallback; 7 | 8 | class DropIndexesOperation extends DropIndexOperation { 9 | constructor(collection, options) { 10 | super(collection, '*', options); 11 | } 12 | 13 | execute(callback) { 14 | super.execute(err => { 15 | if (err) return handleCallback(callback, err, false); 16 | handleCallback(callback, null, true); 17 | }); 18 | } 19 | } 20 | 21 | defineAspects(DropIndexesOperation, Aspect.WRITE_OPERATION); 22 | 23 | module.exports = DropIndexesOperation; 24 | -------------------------------------------------------------------------------- /node_modules/mongodb/lib/operations/find_one_and_delete.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const FindAndModifyOperation = require('./find_and_modify'); 4 | 5 | class FindOneAndDeleteOperation extends FindAndModifyOperation { 6 | constructor(collection, filter, options) { 7 | // Final options 8 | const finalOptions = Object.assign({}, options); 9 | finalOptions.fields = options.projection; 10 | finalOptions.remove = true; 11 | 12 | // Basic validation 13 | if (filter == null || typeof filter !== 'object') { 14 | throw new TypeError('Filter parameter must be an object'); 15 | } 16 | 17 | super(collection, filter, finalOptions.sort, null, finalOptions); 18 | } 19 | } 20 | 21 | module.exports = FindOneAndDeleteOperation; 22 | -------------------------------------------------------------------------------- /node_modules/mongodb/lib/operations/index_information.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const OperationBase = require('./operation').OperationBase; 4 | const indexInformation = require('./common_functions').indexInformation; 5 | 6 | class IndexInformationOperation extends OperationBase { 7 | constructor(db, name, options) { 8 | super(options); 9 | 10 | this.db = db; 11 | this.name = name; 12 | } 13 | 14 | execute(callback) { 15 | const db = this.db; 16 | const name = this.name; 17 | const options = this.options; 18 | 19 | indexInformation(db, name, options, callback); 20 | } 21 | } 22 | 23 | module.exports = IndexInformationOperation; 24 | -------------------------------------------------------------------------------- /node_modules/mongodb/lib/operations/indexes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const OperationBase = require('./operation').OperationBase; 4 | const indexInformation = require('./common_functions').indexInformation; 5 | 6 | class IndexesOperation extends OperationBase { 7 | constructor(collection, options) { 8 | super(options); 9 | 10 | this.collection = collection; 11 | } 12 | 13 | execute(callback) { 14 | const coll = this.collection; 15 | let options = this.options; 16 | 17 | options = Object.assign({}, { full: true }, options); 18 | indexInformation(coll.s.db, coll.collectionName, options, callback); 19 | } 20 | } 21 | 22 | module.exports = IndexesOperation; 23 | -------------------------------------------------------------------------------- /node_modules/mongodb/lib/operations/is_capped.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const OptionsOperation = require('./options_operation'); 4 | const handleCallback = require('../utils').handleCallback; 5 | 6 | class IsCappedOperation extends OptionsOperation { 7 | constructor(collection, options) { 8 | super(collection, options); 9 | } 10 | 11 | execute(callback) { 12 | super.execute((err, document) => { 13 | if (err) return handleCallback(callback, err); 14 | handleCallback(callback, null, !!(document && document.capped)); 15 | }); 16 | } 17 | } 18 | 19 | module.exports = IsCappedOperation; 20 | -------------------------------------------------------------------------------- /node_modules/mongodb/lib/operations/run_command.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const CommandOperationV2 = require('./command_v2'); 4 | const defineAspects = require('./operation').defineAspects; 5 | const Aspect = require('./operation').Aspect; 6 | 7 | class RunCommandOperation extends CommandOperationV2 { 8 | constructor(parent, command, options) { 9 | super(parent, options); 10 | this.command = command; 11 | } 12 | execute(server, callback) { 13 | const command = this.command; 14 | this.executeCommand(server, command, callback); 15 | } 16 | } 17 | defineAspects(RunCommandOperation, [Aspect.EXECUTE_WITH_SELECTION, Aspect.NO_INHERIT_OPTIONS]); 18 | 19 | module.exports = RunCommandOperation; 20 | -------------------------------------------------------------------------------- /node_modules/mongoose-legacy-pluralize/README.md: -------------------------------------------------------------------------------- 1 | # mongoose-legacy-pluralize 2 | Legacy pluralization logic for mongoose 3 | -------------------------------------------------------------------------------- /node_modules/mongoose/SECURITY.md: -------------------------------------------------------------------------------- 1 | Please follow the instructions on [Tidelift's security page](https://tidelift.com/docs/security) to report a security issue. 2 | -------------------------------------------------------------------------------- /node_modules/mongoose/browser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Export lib/mongoose 3 | * 4 | */ 5 | 6 | 'use strict'; 7 | 8 | module.exports = require('./lib/browser'); 9 | -------------------------------------------------------------------------------- /node_modules/mongoose/build-browser.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const config = require('./webpack.config.js'); 4 | const webpack = require('webpack'); 5 | 6 | const compiler = webpack(config); 7 | 8 | console.log('Starting browser build...'); 9 | compiler.run((err, stats) => { 10 | if (err) { 11 | console.err(stats.toString()); 12 | console.err('Browser build unsuccessful.'); 13 | process.exit(1); 14 | } 15 | console.log(stats.toString()); 16 | console.log('Browser build successful.'); 17 | process.exit(0); 18 | }); 19 | -------------------------------------------------------------------------------- /node_modules/mongoose/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Export lib/mongoose 4 | * 5 | */ 6 | 7 | 'use strict'; 8 | 9 | module.exports = require('./lib/'); 10 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/cast/objectid.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const ObjectId = require('../driver').get().ObjectId; 4 | const assert = require('assert'); 5 | 6 | module.exports = function castObjectId(value) { 7 | if (value == null) { 8 | return value; 9 | } 10 | 11 | if (value instanceof ObjectId) { 12 | return value; 13 | } 14 | 15 | if (value._id) { 16 | if (value._id instanceof ObjectId) { 17 | return value._id; 18 | } 19 | if (value._id.toString instanceof Function) { 20 | return new ObjectId(value._id.toString()); 21 | } 22 | } 23 | 24 | if (value.toString instanceof Function) { 25 | return new ObjectId(value.toString()); 26 | } 27 | 28 | assert.ok(false); 29 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/connectionstate.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Connection states 4 | */ 5 | 6 | 'use strict'; 7 | 8 | const STATES = module.exports = exports = Object.create(null); 9 | 10 | const disconnected = 'disconnected'; 11 | const connected = 'connected'; 12 | const connecting = 'connecting'; 13 | const disconnecting = 'disconnecting'; 14 | const uninitialized = 'uninitialized'; 15 | 16 | STATES[0] = disconnected; 17 | STATES[1] = connected; 18 | STATES[2] = connecting; 19 | STATES[3] = disconnecting; 20 | STATES[99] = uninitialized; 21 | 22 | STATES[disconnected] = 0; 23 | STATES[connected] = 1; 24 | STATES[connecting] = 2; 25 | STATES[disconnecting] = 3; 26 | STATES[uninitialized] = 99; 27 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/document_provider.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* eslint-env browser */ 4 | 5 | /*! 6 | * Module dependencies. 7 | */ 8 | const Document = require('./document.js'); 9 | const BrowserDocument = require('./browserDocument.js'); 10 | 11 | let isBrowser = false; 12 | 13 | /** 14 | * Returns the Document constructor for the current context 15 | * 16 | * @api private 17 | */ 18 | module.exports = function() { 19 | if (isBrowser) { 20 | return BrowserDocument; 21 | } 22 | return Document; 23 | }; 24 | 25 | /*! 26 | * ignore 27 | */ 28 | module.exports.setBrowser = function(flag) { 29 | isBrowser = flag; 30 | }; 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/driver.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * ignore 5 | */ 6 | 7 | let driver = null; 8 | 9 | module.exports.get = function() { 10 | return driver; 11 | }; 12 | 13 | module.exports.set = function(v) { 14 | driver = v; 15 | }; 16 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/drivers/SPEC.md: -------------------------------------------------------------------------------- 1 | 2 | # Driver Spec 3 | 4 | TODO 5 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/drivers/browser/ReadPreference.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * ignore 3 | */ 4 | 5 | 'use strict'; 6 | 7 | module.exports = function() {}; 8 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/drivers/browser/binary.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module dependencies. 4 | */ 5 | 6 | 'use strict'; 7 | 8 | const Binary = require('bson').Binary; 9 | 10 | /*! 11 | * Module exports. 12 | */ 13 | 14 | module.exports = exports = Binary; 15 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/drivers/browser/decimal128.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * ignore 3 | */ 4 | 5 | 'use strict'; 6 | 7 | module.exports = require('bson').Decimal128; 8 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/drivers/browser/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Module exports. 3 | */ 4 | 5 | 'use strict'; 6 | 7 | exports.Binary = require('./binary'); 8 | exports.Collection = function() { 9 | throw new Error('Cannot create a collection from browser library'); 10 | }; 11 | exports.Decimal128 = require('./decimal128'); 12 | exports.ObjectId = require('./objectid'); 13 | exports.ReadPreference = require('./ReadPreference'); 14 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/drivers/browser/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 | 'use strict'; 9 | 10 | const ObjectId = require('bson').ObjectID; 11 | 12 | /*! 13 | * Getter for convenience with populate, see gh-6115 14 | */ 15 | 16 | Object.defineProperty(ObjectId.prototype, '_id', { 17 | enumerable: false, 18 | configurable: true, 19 | get: function() { 20 | return this; 21 | } 22 | }); 23 | 24 | /*! 25 | * ignore 26 | */ 27 | 28 | module.exports = exports = ObjectId; 29 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/drivers/node-mongodb-native/binary.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module dependencies. 4 | */ 5 | 6 | 'use strict'; 7 | 8 | const Binary = require('mongodb').Binary; 9 | 10 | module.exports = exports = Binary; 11 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/drivers/node-mongodb-native/decimal128.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * ignore 3 | */ 4 | 5 | 'use strict'; 6 | 7 | module.exports = require('mongodb').Decimal128; 8 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/drivers/node-mongodb-native/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Module exports. 3 | */ 4 | 5 | 'use strict'; 6 | 7 | exports.Binary = require('./binary'); 8 | exports.Collection = require('./collection'); 9 | exports.Decimal128 = require('./decimal128'); 10 | exports.ObjectId = require('./objectid'); 11 | exports.ReadPreference = require('./ReadPreference'); -------------------------------------------------------------------------------- /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 | 'use strict'; 9 | 10 | const ObjectId = require('mongodb').ObjectId; 11 | 12 | /*! 13 | * ignore 14 | */ 15 | 16 | module.exports = exports = ObjectId; 17 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/browserMissingSchema.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Module dependencies. 3 | */ 4 | 5 | 'use strict'; 6 | 7 | const MongooseError = require('./'); 8 | 9 | 10 | class MissingSchemaError extends MongooseError { 11 | /*! 12 | * MissingSchema Error constructor. 13 | */ 14 | constructor() { 15 | super('Schema hasn\'t been registered for document.\n' 16 | + 'Use mongoose.Document(name, schema)'); 17 | } 18 | } 19 | 20 | Object.defineProperty(MissingSchemaError.prototype, 'name', { 21 | value: 'MongooseError' 22 | }); 23 | 24 | /*! 25 | * exports 26 | */ 27 | 28 | module.exports = MissingSchemaError; 29 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/disconnected.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Module dependencies. 3 | */ 4 | 5 | 'use strict'; 6 | 7 | const MongooseError = require('./'); 8 | 9 | 10 | /** 11 | * The connection failed to reconnect and will never successfully reconnect to 12 | * MongoDB without manual intervention. 13 | * @api private 14 | */ 15 | class DisconnectedError extends MongooseError { 16 | /** 17 | * @param {String} connectionString 18 | */ 19 | constructor(connectionString) { 20 | super('Ran out of retries trying to reconnect to "' + 21 | connectionString + '". Try setting `server.reconnectTries` and ' + 22 | '`server.reconnectInterval` to something higher.'); 23 | } 24 | } 25 | 26 | Object.defineProperty(DisconnectedError.prototype, 'name', { 27 | value: 'DisconnectedError' 28 | }); 29 | 30 | /*! 31 | * exports 32 | */ 33 | 34 | module.exports = DisconnectedError; 35 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/missingSchema.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module dependencies. 4 | */ 5 | 6 | 'use strict'; 7 | 8 | const MongooseError = require('./'); 9 | 10 | class MissingSchemaError extends MongooseError { 11 | /*! 12 | * MissingSchema Error constructor. 13 | * @param {String} name 14 | */ 15 | constructor(name) { 16 | const msg = 'Schema hasn\'t been registered for model "' + name + '".\n' 17 | + 'Use mongoose.model(name, schema)'; 18 | super(msg); 19 | } 20 | } 21 | 22 | Object.defineProperty(MissingSchemaError.prototype, 'name', { 23 | value: 'MissingSchemaError' 24 | }); 25 | 26 | /*! 27 | * exports 28 | */ 29 | 30 | module.exports = MissingSchemaError; 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/mongooseError.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * ignore 5 | */ 6 | 7 | class MongooseError extends Error { } 8 | 9 | Object.defineProperty(MongooseError.prototype, 'name', { 10 | value: 'MongooseError' 11 | }); 12 | 13 | module.exports = MongooseError; 14 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/objectExpected.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Module dependencies. 3 | */ 4 | 5 | 'use strict'; 6 | 7 | const MongooseError = require('./'); 8 | 9 | 10 | class ObjectExpectedError extends MongooseError { 11 | /** 12 | * Strict mode error constructor 13 | * 14 | * @param {string} type 15 | * @param {string} value 16 | * @api private 17 | */ 18 | constructor(path, val) { 19 | const typeDescription = Array.isArray(val) ? 'array' : 'primitive value'; 20 | super('Tried to set nested object field `' + path + 21 | `\` to ${typeDescription} \`` + val + '` and strict mode is set to throw.'); 22 | this.path = path; 23 | } 24 | } 25 | 26 | Object.defineProperty(ObjectExpectedError.prototype, 'name', { 27 | value: 'ObjectExpectedError' 28 | }); 29 | 30 | module.exports = ObjectExpectedError; 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/objectParameter.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Module dependencies. 3 | */ 4 | 5 | 'use strict'; 6 | 7 | const MongooseError = require('./'); 8 | 9 | class ObjectParameterError extends MongooseError { 10 | /** 11 | * Constructor for errors that happen when a parameter that's expected to be 12 | * an object isn't an object 13 | * 14 | * @param {Any} value 15 | * @param {String} paramName 16 | * @param {String} fnName 17 | * @api private 18 | */ 19 | constructor(value, paramName, fnName) { 20 | super('Parameter "' + paramName + '" to ' + fnName + 21 | '() must be an object, got ' + value.toString()); 22 | } 23 | } 24 | 25 | 26 | Object.defineProperty(ObjectParameterError.prototype, 'name', { 27 | value: 'ObjectParameterError' 28 | }); 29 | 30 | module.exports = ObjectParameterError; 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/overwriteModel.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module dependencies. 4 | */ 5 | 6 | 'use strict'; 7 | 8 | const MongooseError = require('./'); 9 | 10 | 11 | class OverwriteModelError extends MongooseError { 12 | /*! 13 | * OverwriteModel Error constructor. 14 | * @param {String} name 15 | */ 16 | constructor(name) { 17 | super('Cannot overwrite `' + name + '` model once compiled.'); 18 | } 19 | } 20 | 21 | Object.defineProperty(OverwriteModelError.prototype, 'name', { 22 | value: 'OverwriteModelError' 23 | }); 24 | 25 | /*! 26 | * exports 27 | */ 28 | 29 | module.exports = OverwriteModelError; 30 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/parallelSave.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * Module dependencies. 5 | */ 6 | 7 | const MongooseError = require('./'); 8 | 9 | class ParallelSaveError extends MongooseError { 10 | /** 11 | * ParallelSave Error constructor. 12 | * 13 | * @param {Document} doc 14 | * @api private 15 | */ 16 | constructor(doc) { 17 | const msg = 'Can\'t save() the same doc multiple times in parallel. Document: '; 18 | super(msg + doc._id); 19 | } 20 | } 21 | 22 | Object.defineProperty(ParallelSaveError.prototype, 'name', { 23 | value: 'ParallelSaveError' 24 | }); 25 | 26 | /*! 27 | * exports 28 | */ 29 | 30 | module.exports = ParallelSaveError; 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/parallelValidate.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * Module dependencies. 5 | */ 6 | 7 | const MongooseError = require('./mongooseError'); 8 | 9 | 10 | class ParallelValidateError extends MongooseError { 11 | /** 12 | * ParallelValidate Error constructor. 13 | * 14 | * @param {Document} doc 15 | * @api private 16 | */ 17 | constructor(doc) { 18 | const msg = 'Can\'t validate() the same doc multiple times in parallel. Document: '; 19 | super(msg + doc._id); 20 | } 21 | } 22 | 23 | Object.defineProperty(ParallelValidateError.prototype, 'name', { 24 | value: 'ParallelValidateError' 25 | }); 26 | 27 | /*! 28 | * exports 29 | */ 30 | 31 | module.exports = ParallelValidateError; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/error/strict.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Module dependencies. 3 | */ 4 | 5 | 'use strict'; 6 | 7 | const MongooseError = require('./'); 8 | 9 | 10 | class StrictModeError extends MongooseError { 11 | /** 12 | * Strict mode error constructor 13 | * 14 | * @param {String} path 15 | * @param {String} [msg] 16 | * @param {Boolean} [immutable] 17 | * @inherits MongooseError 18 | * @api private 19 | */ 20 | constructor(path, msg, immutable) { 21 | msg = msg || 'Field `' + path + '` is not in schema and strict ' + 22 | 'mode is set to throw.'; 23 | super(msg); 24 | this.isImmutableError = !!immutable; 25 | this.path = path; 26 | } 27 | } 28 | 29 | Object.defineProperty(StrictModeError.prototype, 'name', { 30 | value: 'StrictModeError' 31 | }); 32 | 33 | module.exports = StrictModeError; 34 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/arrayDepth.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = arrayDepth; 4 | 5 | function arrayDepth(arr) { 6 | if (!Array.isArray(arr)) { 7 | return { min: 0, max: 0, containsNonArrayItem: true }; 8 | } 9 | if (arr.length === 0) { 10 | return { min: 1, max: 1, containsNonArrayItem: false }; 11 | } 12 | 13 | const res = arrayDepth(arr[0]); 14 | 15 | for (let i = 1; i < arr.length; ++i) { 16 | const _res = arrayDepth(arr[i]); 17 | if (_res.min < res.min) { 18 | res.min = _res.min; 19 | } 20 | if (_res.max > res.max) { 21 | res.max = _res.max; 22 | } 23 | res.containsNonArrayItem = res.containsNonArrayItem || _res.containsNonArrayItem; 24 | } 25 | 26 | res.min = res.min + 1; 27 | res.max = res.max + 1; 28 | 29 | return res; 30 | } -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/discriminator/checkEmbeddedDiscriminatorKeyProjection.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function checkEmbeddedDiscriminatorKeyProjection(userProjection, path, schema, selected, addedPaths) { 4 | const userProjectedInPath = Object.keys(userProjection). 5 | reduce((cur, key) => cur || key.startsWith(path + '.'), false); 6 | const _discriminatorKey = path + '.' + schema.options.discriminatorKey; 7 | if (!userProjectedInPath && 8 | addedPaths.length === 1 && 9 | addedPaths[0] === _discriminatorKey) { 10 | selected.splice(selected.indexOf(_discriminatorKey), 1); 11 | } 12 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/discriminator/getConstructor.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const getDiscriminatorByValue = require('./getDiscriminatorByValue'); 4 | 5 | /*! 6 | * Find the correct constructor, taking into account discriminators 7 | */ 8 | 9 | module.exports = function getConstructor(Constructor, value) { 10 | const discriminatorKey = Constructor.schema.options.discriminatorKey; 11 | if (value != null && 12 | Constructor.discriminators && 13 | value[discriminatorKey] != null) { 14 | if (Constructor.discriminators[value[discriminatorKey]]) { 15 | Constructor = Constructor.discriminators[value[discriminatorKey]]; 16 | } else { 17 | const constructorByValue = getDiscriminatorByValue(Constructor, value[discriminatorKey]); 18 | if (constructorByValue) { 19 | Constructor = constructorByValue; 20 | } 21 | } 22 | } 23 | 24 | return Constructor; 25 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/discriminator/getDiscriminatorByValue.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * returns discriminator by discriminatorMapping.value 5 | * 6 | * @param {Model} model 7 | * @param {string} value 8 | */ 9 | 10 | module.exports = function getDiscriminatorByValue(model, value) { 11 | let discriminator = null; 12 | if (!model.discriminators) { 13 | return discriminator; 14 | } 15 | for (const name in model.discriminators) { 16 | const it = model.discriminators[name]; 17 | if ( 18 | it.schema && 19 | it.schema.discriminatorMapping && 20 | it.schema.discriminatorMapping.value == value 21 | ) { 22 | discriminator = it; 23 | break; 24 | } 25 | } 26 | return discriminator; 27 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/discriminator/getSchemaDiscriminatorByValue.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * returns discriminator by discriminatorMapping.value 5 | * 6 | * @param {Schema} schema 7 | * @param {string} value 8 | */ 9 | 10 | module.exports = function getSchemaDiscriminatorByValue(schema, value) { 11 | if (schema == null || schema.discriminators == null) { 12 | return null; 13 | } 14 | for (const key of Object.keys(schema.discriminators)) { 15 | const discriminatorSchema = schema.discriminators[key]; 16 | if (discriminatorSchema.discriminatorMapping == null) { 17 | continue; 18 | } 19 | if (discriminatorSchema.discriminatorMapping.value === value) { 20 | return discriminatorSchema; 21 | } 22 | } 23 | return null; 24 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/document/cleanModifiedSubpaths.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * ignore 5 | */ 6 | 7 | module.exports = function cleanModifiedSubpaths(doc, path, options) { 8 | options = options || {}; 9 | const skipDocArrays = options.skipDocArrays; 10 | 11 | let deleted = 0; 12 | if (!doc) { 13 | return deleted; 14 | } 15 | for (const modifiedPath of Object.keys(doc.$__.activePaths.states.modify)) { 16 | if (skipDocArrays) { 17 | const schemaType = doc.schema.path(modifiedPath); 18 | if (schemaType && schemaType.$isMongooseDocumentArray) { 19 | continue; 20 | } 21 | } 22 | if (modifiedPath.startsWith(path + '.')) { 23 | delete doc.$__.activePaths.states.modify[modifiedPath]; 24 | ++deleted; 25 | } 26 | } 27 | return deleted; 28 | }; 29 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/document/handleSpreadDoc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const utils = require('../../utils'); 4 | 5 | /** 6 | * Using spread operator on a Mongoose document gives you a 7 | * POJO that has a tendency to cause infinite recursion. So 8 | * we use this function on `set()` to prevent that. 9 | */ 10 | 11 | module.exports = function handleSpreadDoc(v) { 12 | if (utils.isPOJO(v) && v.$__ != null && v._doc != null) { 13 | return v._doc; 14 | } 15 | 16 | return v; 17 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/each.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function each(arr, cb, done) { 4 | if (arr.length === 0) { 5 | return done(); 6 | } 7 | 8 | let remaining = arr.length; 9 | let err = null; 10 | for (const v of arr) { 11 | cb(v, function(_err) { 12 | if (err != null) { 13 | return; 14 | } 15 | if (_err != null) { 16 | err = _err; 17 | return done(err); 18 | } 19 | 20 | if (--remaining <= 0) { 21 | return done(); 22 | } 23 | }); 24 | } 25 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/getDefaultBulkwriteResult.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | function getDefaultBulkwriteResult() { 3 | return { 4 | result: { 5 | ok: 1, 6 | writeErrors: [], 7 | writeConcernErrors: [], 8 | insertedIds: [], 9 | nInserted: 0, 10 | nUpserted: 0, 11 | nMatched: 0, 12 | nModified: 0, 13 | nRemoved: 0, 14 | upserted: [] 15 | }, 16 | insertedCount: 0, 17 | matchedCount: 0, 18 | modifiedCount: 0, 19 | deletedCount: 0, 20 | upsertedCount: 0, 21 | upsertedIds: {}, 22 | insertedIds: {}, 23 | n: 0 24 | }; 25 | } 26 | 27 | module.exports = getDefaultBulkwriteResult; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/getFunctionName.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(fn) { 4 | if (fn.name) { 5 | return fn.name; 6 | } 7 | return (fn.toString().trim().match(/^function\s*([^\s(]+)/) || [])[1]; 8 | }; 9 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/immediate.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Centralize this so we can more easily work around issues with people 3 | * stubbing out `process.nextTick()` in tests using sinon: 4 | * https://github.com/sinonjs/lolex#automatically-incrementing-mocked-time 5 | * See gh-6074 6 | */ 7 | 8 | 'use strict'; 9 | 10 | module.exports = function immediate(cb) { 11 | return process.nextTick(cb); 12 | }; 13 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/indexes/isDefaultIdIndex.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const get = require('../get'); 4 | 5 | module.exports = function isDefaultIdIndex(index) { 6 | if (Array.isArray(index)) { 7 | // Mongoose syntax 8 | const keys = Object.keys(index[0]); 9 | return keys.length === 1 && keys[0] === '_id' && index[0]._id !== 'hashed'; 10 | } 11 | 12 | if (typeof index !== 'object') { 13 | return false; 14 | } 15 | 16 | const key = get(index, 'key', {}); 17 | return Object.keys(key).length === 1 && key.hasOwnProperty('_id'); 18 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/isBsonType.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const get = require('./get'); 4 | 5 | /*! 6 | * Get the bson type, if it exists 7 | */ 8 | 9 | function isBsonType(obj, typename) { 10 | return get(obj, '_bsontype', void 0) === typename; 11 | } 12 | 13 | module.exports = isBsonType; 14 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/isMongooseObject.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * Returns if `v` is a mongoose object that has a `toObject()` method we can use. 5 | * 6 | * This is for compatibility with libs like Date.js which do foolish things to Natives. 7 | * 8 | * @param {any} v 9 | * @api private 10 | */ 11 | 12 | module.exports = function(v) { 13 | if (v == null) { 14 | return false; 15 | } 16 | 17 | return v.$__ != null || // Document 18 | v.isMongooseArray || // Array or Document Array 19 | v.isMongooseBuffer || // Buffer 20 | v.$isMongooseMap; // Map 21 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/isObject.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * Determines if `arg` is an object. 5 | * 6 | * @param {Object|Array|String|Function|RegExp|any} arg 7 | * @api private 8 | * @return {Boolean} 9 | */ 10 | 11 | module.exports = function(arg) { 12 | if (Buffer.isBuffer(arg)) { 13 | return true; 14 | } 15 | return Object.prototype.toString.call(arg) === '[object Object]'; 16 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/isPromise.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | function isPromise(val) { 3 | return !!val && (typeof val === 'object' || typeof val === 'function') && typeof val.then === 'function'; 4 | } 5 | 6 | module.exports = isPromise; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/model/applyStatics.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * Register statics for this model 5 | * @param {Model} model 6 | * @param {Schema} schema 7 | */ 8 | module.exports = function applyStatics(model, schema) { 9 | for (const i in schema.statics) { 10 | model[i] = schema.statics[i]; 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/once.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function once(fn) { 4 | let called = false; 5 | return function() { 6 | if (called) { 7 | return; 8 | } 9 | called = true; 10 | return fn.apply(null, arguments); 11 | }; 12 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/populate/SkipPopulateValue.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function SkipPopulateValue(val) { 4 | if (!(this instanceof SkipPopulateValue)) { 5 | return new SkipPopulateValue(val); 6 | } 7 | 8 | this.val = val; 9 | return this; 10 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/populate/leanPopulateMap.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * ignore 5 | */ 6 | 7 | module.exports = new WeakMap(); -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/populate/lookupLocalFields.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function lookupLocalFields(cur, path, val) { 4 | if (cur == null) { 5 | return cur; 6 | } 7 | 8 | if (cur._doc != null) { 9 | cur = cur._doc; 10 | } 11 | 12 | if (arguments.length >= 3) { 13 | cur[path] = val; 14 | return val; 15 | } 16 | 17 | 18 | // Support populating paths under maps using `map.$*.subpath` 19 | if (path === '$*') { 20 | return cur instanceof Map ? 21 | Array.from(cur.values()) : 22 | Object.keys(cur).map(key => cur[key]); 23 | } 24 | 25 | return cur[path]; 26 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/populate/validateRef.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const MongooseError = require('../../error/mongooseError'); 4 | const util = require('util'); 5 | 6 | module.exports = validateRef; 7 | 8 | function validateRef(ref, path) { 9 | if (typeof ref === 'string') { 10 | return; 11 | } 12 | 13 | if (typeof ref === 'function') { 14 | return; 15 | } 16 | 17 | throw new MongooseError('Invalid ref at path "' + path + '". Got ' + 18 | util.inspect(ref, { depth: 0 })); 19 | } -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/printJestWarning.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (typeof jest !== 'undefined' && typeof window !== 'undefined') { 4 | console.warn('Mongoose: looks like you\'re trying to test a Mongoose app ' + 5 | 'with Jest\'s default jsdom test environment. Please make sure you read ' + 6 | 'Mongoose\'s docs on configuring Jest to test Node.js apps: ' + 7 | 'http://mongoosejs.com/docs/jest.html'); 8 | } -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/projection/isDefiningProjection.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * ignore 5 | */ 6 | 7 | module.exports = function isDefiningProjection(val) { 8 | if (val == null) { 9 | // `undefined` or `null` become exclusive projections 10 | return true; 11 | } 12 | if (typeof val === 'object') { 13 | // Only cases where a value does **not** define whether the whole projection 14 | // is inclusive or exclusive are `$meta` and `$slice`. 15 | return !('$meta' in val) && !('$slice' in val); 16 | } 17 | return true; 18 | }; 19 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/projection/isExclusive.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const isDefiningProjection = require('./isDefiningProjection'); 4 | 5 | /*! 6 | * ignore 7 | */ 8 | 9 | module.exports = function isExclusive(projection) { 10 | const keys = Object.keys(projection); 11 | let ki = keys.length; 12 | let exclude = null; 13 | 14 | if (ki === 1 && keys[0] === '_id') { 15 | exclude = !!projection[keys[ki]]; 16 | } else { 17 | while (ki--) { 18 | // Does this projection explicitly define inclusion/exclusion? 19 | // Explicitly avoid `$meta` and `$slice` 20 | if (keys[ki] !== '_id' && isDefiningProjection(projection[keys[ki]])) { 21 | exclude = !projection[keys[ki]]; 22 | break; 23 | } 24 | } 25 | } 26 | 27 | return exclude; 28 | }; 29 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * ignore 5 | */ 6 | 7 | module.exports = function isPathSelectedInclusive(fields, path) { 8 | const chunks = path.split('.'); 9 | let cur = ''; 10 | let j; 11 | let keys; 12 | let numKeys; 13 | for (let i = 0; i < chunks.length; ++i) { 14 | cur += cur.length ? '.' : '' + chunks[i]; 15 | if (fields[cur]) { 16 | keys = Object.keys(fields); 17 | numKeys = keys.length; 18 | for (j = 0; j < numKeys; ++j) { 19 | if (keys[i].indexOf(cur + '.') === 0 && keys[i].indexOf(path) !== 0) { 20 | continue; 21 | } 22 | } 23 | return true; 24 | } 25 | } 26 | 27 | return false; 28 | }; 29 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/projection/parseProjection.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Convert a string or array into a projection object, retaining all 5 | * `-` and `+` paths. 6 | */ 7 | 8 | module.exports = function parseProjection(v, retainMinusPaths) { 9 | const type = typeof v; 10 | 11 | if (type === 'string') { 12 | v = v.split(/\s+/); 13 | } 14 | if (!Array.isArray(v) && Object.prototype.toString.call(v) !== '[object Arguments]') { 15 | return v; 16 | } 17 | 18 | const len = v.length; 19 | const ret = {}; 20 | for (let i = 0; i < len; ++i) { 21 | let field = v[i]; 22 | if (!field) { 23 | continue; 24 | } 25 | const include = '-' == field[0] ? 0 : 1; 26 | if (!retainMinusPaths && include === 0) { 27 | field = field.substring(1); 28 | } 29 | ret[field] = include; 30 | } 31 | 32 | return ret; 33 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/query/applyGlobalMaxTimeMS.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const utils = require('../../utils'); 4 | 5 | module.exports = function applyGlobalMaxTimeMS(options, model) { 6 | if (utils.hasUserDefinedProperty(options, 'maxTimeMS')) { 7 | return; 8 | } 9 | 10 | if (utils.hasUserDefinedProperty(model.db.options, 'maxTimeMS')) { 11 | options.maxTimeMS = model.db.options.maxTimeMS; 12 | } else if (utils.hasUserDefinedProperty(model.base.options, 'maxTimeMS')) { 13 | options.maxTimeMS = model.base.options.maxTimeMS; 14 | } 15 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/query/handleImmutable.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const StrictModeError = require('../../error/strict'); 4 | 5 | module.exports = function handleImmutable(schematype, strict, obj, key, fullPath, ctx) { 6 | if (schematype == null || !schematype.options || !schematype.options.immutable) { 7 | return false; 8 | } 9 | let immutable = schematype.options.immutable; 10 | 11 | if (typeof immutable === 'function') { 12 | immutable = immutable.call(ctx, ctx); 13 | } 14 | if (!immutable) { 15 | return false; 16 | } 17 | 18 | if (strict === false) { 19 | return false; 20 | } 21 | if (strict === 'throw') { 22 | throw new StrictModeError(null, 23 | `Field ${fullPath} is immutable and strict = 'throw'`); 24 | } 25 | 26 | delete obj[key]; 27 | return true; 28 | }; 29 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/query/hasDollarKeys.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * ignore 5 | */ 6 | 7 | module.exports = function(obj) { 8 | if (obj == null) { 9 | return false; 10 | } 11 | const keys = Object.keys(obj); 12 | const len = keys.length; 13 | for (let i = 0; i < len; ++i) { 14 | if (keys[i].startsWith('$')) { 15 | return true; 16 | } 17 | } 18 | return false; 19 | }; 20 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/query/isOperator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const specialKeys = new Set([ 4 | '$ref', 5 | '$id', 6 | '$db' 7 | ]); 8 | 9 | module.exports = function isOperator(path) { 10 | return path.startsWith('$') && !specialKeys.has(path); 11 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/query/wrapThunk.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * A query thunk is the function responsible for sending the query to MongoDB, 5 | * like `Query#_findOne()` or `Query#_execUpdate()`. The `Query#exec()` function 6 | * calls a thunk. The term "thunk" here is the traditional Node.js definition: 7 | * a function that takes exactly 1 parameter, a callback. 8 | * 9 | * This function defines common behavior for all query thunks. 10 | */ 11 | 12 | module.exports = function wrapThunk(fn) { 13 | return function _wrappedThunk(cb) { 14 | ++this._executionCount; 15 | 16 | fn.call(this, cb); 17 | }; 18 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/schema/addAutoId.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function addAutoId(schema) { 4 | const _obj = { _id: { auto: true } }; 5 | _obj._id[schema.options.typeKey] = 'ObjectId'; 6 | schema.add(_obj); 7 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/schema/applyWriteConcern.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const get = require('../get'); 4 | 5 | module.exports = function applyWriteConcern(schema, options) { 6 | const writeConcern = get(schema, 'options.writeConcern', {}); 7 | if (!('w' in options) && writeConcern.w != null) { 8 | options.w = writeConcern.w; 9 | } 10 | if (!('j' in options) && writeConcern.j != null) { 11 | options.j = writeConcern.j; 12 | } 13 | if (!('wtimeout' in options) && writeConcern.wtimeout != null) { 14 | options.wtimeout = writeConcern.wtimeout; 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/schema/cleanPositionalOperators.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * For consistency's sake, we replace positional operator `$` and array filters 5 | * `$[]` and `$[foo]` with `0` when looking up schema paths. 6 | */ 7 | 8 | module.exports = function cleanPositionalOperators(path) { 9 | return path. 10 | replace(/\.\$(\[[^\]]*\])?\./g, '.0.'). 11 | replace(/\.(\[[^\]]*\])?\$$/g, '.0'); 12 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/schema/handleIdOption.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const addAutoId = require('./addAutoId'); 4 | 5 | module.exports = function handleIdOption(schema, options) { 6 | if (options == null || options._id == null) { 7 | return schema; 8 | } 9 | 10 | schema = schema.clone(); 11 | if (!options._id) { 12 | schema.remove('_id'); 13 | schema.options._id = false; 14 | } else if (!schema.paths['_id']) { 15 | addAutoId(schema); 16 | schema.options._id = true; 17 | } 18 | 19 | return schema; 20 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/schema/handleTimestampOption.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = handleTimestampOption; 4 | 5 | /*! 6 | * ignore 7 | */ 8 | 9 | function handleTimestampOption(arg, prop) { 10 | if (arg == null) { 11 | return null; 12 | } 13 | 14 | if (typeof arg === 'boolean') { 15 | return prop; 16 | } 17 | if (typeof arg[prop] === 'boolean') { 18 | return arg[prop] ? prop : null; 19 | } 20 | if (!(prop in arg)) { 21 | return prop; 22 | } 23 | return arg[prop]; 24 | } -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/schema/merge.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function merge(s1, s2) { 4 | s1.add(s2.tree || {}); 5 | 6 | s1.callQueue = s1.callQueue.concat(s2.callQueue); 7 | s1.method(s2.methods); 8 | s1.static(s2.statics); 9 | 10 | for (const query in s2.query) { 11 | s1.query[query] = s2.query[query]; 12 | } 13 | 14 | for (const virtual in s2.virtuals) { 15 | s1.virtuals[virtual] = s2.virtuals[virtual].clone(); 16 | } 17 | 18 | s1.s.hooks.merge(s2.s.hooks, false); 19 | }; 20 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/specialProperties.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = new Set(['__proto__', 'constructor', 'prototype']); -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/topology/allServersUnknown.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function allServersUnknown(topologyDescription) { 4 | if (topologyDescription == null || 5 | topologyDescription.constructor.name !== 'TopologyDescription') { 6 | return false; 7 | } 8 | 9 | const servers = Array.from(topologyDescription.servers.values()); 10 | return servers.length > 0 && servers.every(server => server.type === 'Unknown'); 11 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/topology/isAtlas.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function isAtlas(topologyDescription) { 4 | if (topologyDescription == null || 5 | topologyDescription.constructor.name !== 'TopologyDescription') { 6 | return false; 7 | } 8 | 9 | const hostnames = Array.from(topologyDescription.servers.keys()); 10 | return hostnames.length > 0 && 11 | hostnames.every(host => host.endsWith('.mongodb.net:27017')); 12 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/topology/isSSLError.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const nonSSLMessage = 'Client network socket disconnected before secure TLS ' + 4 | 'connection was established'; 5 | 6 | module.exports = function isSSLError(topologyDescription) { 7 | if (topologyDescription == null || 8 | topologyDescription.constructor.name !== 'TopologyDescription') { 9 | return false; 10 | } 11 | 12 | const descriptions = Array.from(topologyDescription.servers.values()); 13 | return descriptions.length > 0 && 14 | descriptions.every(descr => descr.error && descr.error.message.indexOf(nonSSLMessage) !== -1); 15 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/helpers/update/removeUnusedArrayFilters.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * MongoDB throws an error if there's unused array filters. That is, if `options.arrayFilters` defines 5 | * a filter, but none of the `update` keys use it. This should be enough to filter out all unused array 6 | * filters. 7 | */ 8 | 9 | module.exports = function removeUnusedArrayFilters(update, arrayFilters) { 10 | const updateKeys = Object.keys(update).map(key => Object.keys(update[key])).reduce((cur, arr) => cur.concat(arr), []); 11 | return arrayFilters.filter(obj => { 12 | const firstKey = Object.keys(obj)[0]; 13 | const firstDot = firstKey.indexOf('.'); 14 | const arrayFilterKey = firstDot === -1 ? firstKey : firstKey.slice(0, firstDot); 15 | 16 | return updateKeys.find(key => key.includes('$[' + arrayFilterKey + ']')) != null; 17 | }); 18 | }; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/options.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * ignore 5 | */ 6 | 7 | exports.internalToObjectOptions = { 8 | transform: false, 9 | virtuals: false, 10 | getters: false, 11 | _skipDepopulateTopLevel: true, 12 | depopulate: true, 13 | flattenDecimals: false 14 | }; 15 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/options/propertyOptions.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = Object.freeze({ 4 | enumerable: true, 5 | configurable: true, 6 | writable: true, 7 | value: void 0 8 | }); -------------------------------------------------------------------------------- /node_modules/mongoose/lib/options/removeOptions.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const clone = require('../helpers/clone'); 4 | 5 | class RemoveOptions { 6 | constructor(obj) { 7 | if (obj == null) { 8 | return; 9 | } 10 | Object.assign(this, clone(obj)); 11 | } 12 | } 13 | 14 | module.exports = RemoveOptions; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/options/saveOptions.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const clone = require('../helpers/clone'); 4 | 5 | class SaveOptions { 6 | constructor(obj) { 7 | if (obj == null) { 8 | return; 9 | } 10 | Object.assign(this, clone(obj)); 11 | } 12 | } 13 | 14 | module.exports = SaveOptions; -------------------------------------------------------------------------------- /node_modules/mongoose/lib/plugins/idGetter.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * ignore 5 | */ 6 | 7 | module.exports = function(schema) { 8 | // ensure the documents receive an id getter unless disabled 9 | const autoIdGetter = !schema.paths['id'] && 10 | (!schema.options.noVirtualId && schema.options.id); 11 | if (!autoIdGetter) { 12 | return; 13 | } 14 | 15 | schema.virtual('id').get(idGetter); 16 | }; 17 | 18 | /*! 19 | * Returns this documents _id cast to a string. 20 | */ 21 | 22 | function idGetter() { 23 | if (this._id != null) { 24 | return String(this._id); 25 | } 26 | 27 | return null; 28 | } 29 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/plugins/removeSubdocs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const each = require('../helpers/each'); 4 | 5 | /*! 6 | * ignore 7 | */ 8 | 9 | module.exports = function(schema) { 10 | const unshift = true; 11 | schema.s.hooks.pre('remove', false, function(next) { 12 | if (this.ownerDocument) { 13 | next(); 14 | return; 15 | } 16 | 17 | const _this = this; 18 | const subdocs = this.$__getAllSubdocs(); 19 | 20 | each(subdocs, function(subdoc, cb) { 21 | subdoc.$__remove(cb); 22 | }, function(error) { 23 | if (error) { 24 | return _this.schema.s.hooks.execPost('remove:error', _this, [_this], { error: error }, function(error) { 25 | next(error); 26 | }); 27 | } 28 | next(); 29 | }); 30 | }, null, unshift); 31 | }; 32 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/schema/index.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module exports. 4 | */ 5 | 6 | 'use strict'; 7 | 8 | exports.String = require('./string'); 9 | 10 | exports.Number = require('./number'); 11 | 12 | exports.Boolean = require('./boolean'); 13 | 14 | exports.DocumentArray = require('./documentarray'); 15 | 16 | exports.Embedded = require('./SingleNestedPath'); 17 | 18 | exports.Array = require('./array'); 19 | 20 | exports.Buffer = require('./buffer'); 21 | 22 | exports.Date = require('./date'); 23 | 24 | exports.ObjectId = require('./objectid'); 25 | 26 | exports.Mixed = require('./mixed'); 27 | 28 | exports.Decimal128 = exports.Decimal = require('./decimal128'); 29 | 30 | exports.Map = require('./map'); 31 | 32 | // alias 33 | 34 | exports.Oid = exports.ObjectId; 35 | exports.Object = exports.Mixed; 36 | exports.Bool = exports.Boolean; 37 | exports.ObjectID = exports.ObjectId; 38 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/schema/operators/bitwise.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Module requirements. 3 | */ 4 | 5 | 'use strict'; 6 | 7 | const CastError = require('../../error/cast'); 8 | 9 | /*! 10 | * ignore 11 | */ 12 | 13 | function handleBitwiseOperator(val) { 14 | const _this = this; 15 | if (Array.isArray(val)) { 16 | return val.map(function(v) { 17 | return _castNumber(_this.path, v); 18 | }); 19 | } else if (Buffer.isBuffer(val)) { 20 | return val; 21 | } 22 | // Assume trying to cast to number 23 | return _castNumber(_this.path, val); 24 | } 25 | 26 | /*! 27 | * ignore 28 | */ 29 | 30 | function _castNumber(path, num) { 31 | const v = Number(num); 32 | if (isNaN(v)) { 33 | throw new CastError('number', num, path); 34 | } 35 | return v; 36 | } 37 | 38 | module.exports = handleBitwiseOperator; 39 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/schema/operators/exists.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const castBoolean = require('../../cast/boolean'); 4 | 5 | /*! 6 | * ignore 7 | */ 8 | 9 | module.exports = function(val) { 10 | const path = this != null ? this.path : null; 11 | return castBoolean(val, path); 12 | }; 13 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/schema/operators/helpers.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * Module requirements. 5 | */ 6 | 7 | const SchemaNumber = require('../number'); 8 | 9 | /*! 10 | * @ignore 11 | */ 12 | 13 | exports.castToNumber = castToNumber; 14 | exports.castArraysOfNumbers = castArraysOfNumbers; 15 | 16 | /*! 17 | * @ignore 18 | */ 19 | 20 | function castToNumber(val) { 21 | return SchemaNumber.cast()(val); 22 | } 23 | 24 | function castArraysOfNumbers(arr, self) { 25 | arr.forEach(function(v, i) { 26 | if (Array.isArray(v)) { 27 | castArraysOfNumbers(v, self); 28 | } else { 29 | arr[i] = castToNumber.call(self, v); 30 | } 31 | }); 32 | } 33 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/schema/operators/type.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * ignore 5 | */ 6 | 7 | module.exports = function(val) { 8 | if (Array.isArray(val)) { 9 | if (!val.every(v => typeof v === 'number' || typeof v === 'string')) { 10 | throw new Error('$type array values must be strings or numbers'); 11 | } 12 | return val; 13 | } 14 | 15 | if (typeof val !== 'number' && typeof val !== 'string') { 16 | throw new Error('$type parameter must be number, string, or array of numbers and strings'); 17 | } 18 | 19 | return val; 20 | }; 21 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/schema/symbols.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.schemaMixedSymbol = Symbol.for('mongoose:schema_mixed'); 4 | 5 | exports.builtInMiddleware = Symbol.for('mongoose:built-in-middleware'); -------------------------------------------------------------------------------- /node_modules/mongoose/lib/types/decimal128.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ObjectId type constructor 3 | * 4 | * ####Example 5 | * 6 | * const id = new mongoose.Types.ObjectId; 7 | * 8 | * @constructor ObjectId 9 | */ 10 | 11 | 'use strict'; 12 | 13 | module.exports = require('../driver').get().Decimal128; 14 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/types/index.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Module exports. 4 | */ 5 | 6 | 'use strict'; 7 | 8 | exports.Array = require('./array'); 9 | exports.Buffer = require('./buffer'); 10 | 11 | exports.Document = // @deprecate 12 | exports.Embedded = require('./embedded'); 13 | 14 | exports.DocumentArray = require('./documentarray'); 15 | exports.Decimal128 = require('./decimal128'); 16 | exports.ObjectId = require('./objectid'); 17 | 18 | exports.Map = require('./map'); 19 | 20 | exports.Subdocument = require('./subdocument'); 21 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/types/objectid.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ObjectId type constructor 3 | * 4 | * ####Example 5 | * 6 | * const id = new mongoose.Types.ObjectId; 7 | * 8 | * @constructor ObjectId 9 | */ 10 | 11 | 'use strict'; 12 | 13 | const ObjectId = require('../driver').get().ObjectId; 14 | const objectIdSymbol = require('../helpers/symbols').objectIdSymbol; 15 | 16 | /*! 17 | * Getter for convenience with populate, see gh-6115 18 | */ 19 | 20 | Object.defineProperty(ObjectId.prototype, '_id', { 21 | enumerable: false, 22 | configurable: true, 23 | get: function() { 24 | return this; 25 | } 26 | }); 27 | 28 | ObjectId.prototype[objectIdSymbol] = true; 29 | 30 | module.exports = ObjectId; 31 | -------------------------------------------------------------------------------- /node_modules/mongoose/lib/validoptions.js: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * Valid mongoose options 4 | */ 5 | 6 | 'use strict'; 7 | 8 | const VALID_OPTIONS = Object.freeze([ 9 | 'applyPluginsToChildSchemas', 10 | 'applyPluginsToDiscriminators', 11 | 'autoCreate', 12 | 'autoIndex', 13 | 'bufferCommands', 14 | 'bufferTimeoutMS', 15 | 'cloneSchemas', 16 | 'debug', 17 | 'maxTimeMS', 18 | 'objectIdGetter', 19 | 'overwriteModels', 20 | 'returnOriginal', 21 | 'runValidators', 22 | 'selectPopulatedPaths', 23 | 'setDefaultsOnInsert', 24 | 'strict', 25 | 'strictQuery', 26 | 'toJSON', 27 | 'toObject', 28 | 'typePojoToMixed', 29 | 'useCreateIndex', 30 | 'useFindAndModify', 31 | 'useNewUrlParser', 32 | 'usePushEach', 33 | 'useUnifiedTopology' 34 | ]); 35 | 36 | module.exports = VALID_OPTIONS; 37 | -------------------------------------------------------------------------------- /node_modules/mongoose/tools/auth.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const Server = require('mongodb-topology-manager').Server; 4 | const co = require('co'); 5 | const mongodb = require('mongodb'); 6 | 7 | co(function*() { 8 | // Create new instance 9 | const server = new Server('mongod', { 10 | auth: null, 11 | dbpath: '/data/db/27017' 12 | }); 13 | 14 | // Purge the directory 15 | yield server.purge(); 16 | 17 | // Start process 18 | yield server.start(); 19 | 20 | const db = yield mongodb.MongoClient.connect('mongodb://localhost:27017/admin'); 21 | 22 | yield db.addUser('passwordIsTaco', 'taco', { 23 | roles: ['dbOwner'] 24 | }); 25 | 26 | console.log('done'); 27 | }).catch(error => { 28 | console.error(error); 29 | process.exit(-1); 30 | }); 31 | -------------------------------------------------------------------------------- /node_modules/mpath/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "4" 4 | - "5" 5 | - "6" 6 | - "7" 7 | - "8" 8 | - "9" 9 | - "10" 10 | -------------------------------------------------------------------------------- /node_modules/mpath/Makefile: -------------------------------------------------------------------------------- 1 | bench: 2 | node bench.js 3 | 4 | .PHONY: test 5 | -------------------------------------------------------------------------------- /node_modules/mpath/bench.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorluizskt/blog-nodejs/2d6ba159409762451db87744440acc5f6a6245c7/node_modules/mpath/bench.log -------------------------------------------------------------------------------- /node_modules/mpath/index.js: -------------------------------------------------------------------------------- 1 | module.exports = exports = require('./lib'); 2 | -------------------------------------------------------------------------------- /node_modules/mpath/test/stringToParts.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const assert = require('assert'); 4 | const stringToParts = require('../lib/stringToParts'); 5 | 6 | describe('stringToParts', function() { 7 | it('handles brackets for numbers', function() { 8 | assert.deepEqual(stringToParts('list[0].name'), ['list', '0', 'name']); 9 | assert.deepEqual(stringToParts('list[0][1].name'), ['list', '0', '1', 'name']); 10 | }); 11 | 12 | it('handles dot notation', function() { 13 | assert.deepEqual(stringToParts('a.b.c'), ['a', 'b', 'c']); 14 | assert.deepEqual(stringToParts('a..b.d'), ['a', 'b', 'd']); 15 | }); 16 | 17 | it('throws for invalid numbers in square brackets', function() { 18 | assert.throws(() => stringToParts('foo[1mystring]'), /1mystring/); 19 | }); 20 | }); -------------------------------------------------------------------------------- /node_modules/mquery/.eslintignore: -------------------------------------------------------------------------------- 1 | coverage/ -------------------------------------------------------------------------------- /node_modules/mquery/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "8" 4 | - "10" 5 | - "12" 6 | matrix: 7 | include: 8 | - node_js: "13" 9 | env: "NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly" 10 | allow_failures: 11 | # Allow the nightly installs to fail 12 | - env: "NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly" 13 | script: 14 | - npm test 15 | - npm run lint 16 | services: 17 | - mongodb 18 | -------------------------------------------------------------------------------- /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 | lint: 15 | @NODE_ENV=test node ./node_modules/eslint/bin/eslint.js . 16 | 17 | test-travis: 18 | @NODE_ENV=test node \ 19 | node_modules/.bin/istanbul cover \ 20 | ./node_modules/.bin/_mocha \ 21 | --report lcovonly \ 22 | --bail 23 | @NODE_ENV=test node \ 24 | ./node_modules/eslint/bin/eslint.js . 25 | 26 | .PHONY: test test-cov open-cov lint test-travis 27 | -------------------------------------------------------------------------------- /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/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/mquery/node_modules/debug/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve 2 | -------------------------------------------------------------------------------- /node_modules/mquery/node_modules/debug/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true 5 | }, 6 | "globals": { 7 | "chrome": true 8 | }, 9 | "rules": { 10 | "no-console": 0, 11 | "no-empty": [1, { "allowEmptyCatch": true }] 12 | }, 13 | "extends": "eslint:recommended" 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/mquery/node_modules/debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | yarn.lock 8 | coverage 9 | bower.json 10 | -------------------------------------------------------------------------------- /node_modules/mquery/node_modules/debug/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - "4" 7 | - "6" 8 | - "8" 9 | 10 | install: 11 | - make install 12 | 13 | script: 14 | - make lint 15 | - make test 16 | 17 | matrix: 18 | include: 19 | - node_js: '8' 20 | env: BROWSER=1 21 | -------------------------------------------------------------------------------- /node_modules/mquery/node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /node_modules/mquery/node_modules/debug/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Detect Electron renderer process, which is node, but we should 3 | * treat as a browser. 4 | */ 5 | 6 | if (typeof process === 'undefined' || process.type === 'renderer') { 7 | module.exports = require('./browser.js'); 8 | } else { 9 | module.exports = require('./node.js'); 10 | } 11 | -------------------------------------------------------------------------------- /node_modules/mquery/test/collection/browser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorluizskt/blog-nodejs/2d6ba159409762451db87744440acc5f6a6245c7/node_modules/mquery/test/collection/browser.js -------------------------------------------------------------------------------- /node_modules/mquery/test/collection/mongo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorluizskt/blog-nodejs/2d6ba159409762451db87744440acc5f6a6245c7/node_modules/mquery/test/collection/mongo.js -------------------------------------------------------------------------------- /node_modules/mquery/test/collection/node.js: -------------------------------------------------------------------------------- 1 | 2 | var assert = require('assert'); 3 | var mongo = require('mongodb'); 4 | 5 | var uri = process.env.MQUERY_URI || 'mongodb://localhost/mquery'; 6 | var client; 7 | var db; 8 | 9 | exports.getCollection = function(cb) { 10 | mongo.MongoClient.connect(uri, function(err, _client) { 11 | assert.ifError(err); 12 | client = _client; 13 | db = client.db(); 14 | 15 | var collection = db.collection('stuff'); 16 | 17 | // clean test db before starting 18 | db.dropDatabase(function() { 19 | cb(null, collection); 20 | }); 21 | }); 22 | }; 23 | 24 | exports.dropCollection = function(cb) { 25 | db.dropDatabase(function() { 26 | client.close(cb); 27 | }); 28 | }; 29 | -------------------------------------------------------------------------------- /node_modules/mquery/test/env.js: -------------------------------------------------------------------------------- 1 | 2 | var env = require('../').env; 3 | 4 | console.log('environment: %s', env.type); 5 | 6 | var col; 7 | switch (env.type) { 8 | case 'node': 9 | col = require('./collection/node'); 10 | break; 11 | case 'mongo': 12 | col = require('./collection/mongo'); 13 | break; 14 | case 'browser': 15 | col = require('./collection/browser'); 16 | break; 17 | default: 18 | throw new Error('missing collection implementation for environment: ' + env.type); 19 | } 20 | 21 | module.exports = exports = col; 22 | -------------------------------------------------------------------------------- /node_modules/neo-async/all.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').all; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/allLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').allLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/allSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').allSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/angelFall.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').angelfall; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/any.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').any; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/anyLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').anyLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/anySeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').anySeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/apply.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').apply; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/applyEach.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').applyEach; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/applyEachSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').applyEachSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/asyncify.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').asyncify; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/auto.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').auto; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/autoInject.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').autoInject; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/cargo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').cargo; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/compose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').compose; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/concat.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').concat; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/concatLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').concatLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/concatSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').concatSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/constant.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').constant; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/createLogger.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').createLogger; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/detect.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').detect; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/detectLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').detectLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/detectSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').detectSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/dir.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').dir; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/doDuring.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').doDuring; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/doUntil.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').doUntil; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/doWhilst.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').doWhilst; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/during.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').during; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/each.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').each; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/eachLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').eachLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/eachOf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').eachOf; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/eachOfLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').eachOfLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/eachOfSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').eachOfSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/eachSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').eachSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/ensureAsync.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').ensureAsync; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/every.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').every; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/everyLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').everyLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/everySeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').everySeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/fast.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').fast; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/filter.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').filter; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/filterLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').filterLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/filterSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').filterSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/find.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').find; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/findLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').findLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/findSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').findSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/foldl.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').foldl; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/foldr.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').foldr; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/forEach.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').forEach; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/forEachLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').forEachLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/forEachOf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').forEachOf; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/forEachOfLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').forEachOfLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/forEachOfSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').forEachOfSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/forEachSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').forEachSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/forever.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').forever; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/groupBy.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').groupBy; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/groupByLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').groupByLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/groupBySeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').groupBySeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/inject.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').inject; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/iterator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').iterator; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/log.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').log; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/map.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').map; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/mapLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').mapLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/mapSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').mapSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/mapValues.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').mapValues; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/mapValuesLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').mapValuesLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/mapValuesSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').mapValuesSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/memoize.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').memoize; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/nextTick.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').nextTick; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/omit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').omit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/omitLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').omitLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/omitSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').omitSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/parallel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').parallel; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/parallelLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').parallelLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/pick.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').pick; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/pickLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').pickLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/pickSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').pickSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/priorityQueue.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').priorityQueue; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/queue.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').queue; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/race.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').race; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/reduce.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').reduce; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/reduceRight.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').reduceRight; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/reflect.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').reflect; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/reflectAll.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').reflectAll; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/reject.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').reject; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/rejectLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').rejectLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/rejectSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').rejectSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/retry.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').retry; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/retryable.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').retryable; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/safe.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').safe; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/select.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').select; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/selectLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').selectLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/selectSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').selectSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/seq.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').seq; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/series.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').series; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/setImmediate.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').setImmediate; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/some.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').some; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/someLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').someLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/someSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').someSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/sortBy.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').sortBy; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/sortByLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').sortByLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/sortBySeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').sortBySeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/timeout.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').timeout; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/times.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').times; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/timesLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').timesLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/timesSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').timesSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/transform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').transform; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/transformLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').transformLimit; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/transformSeries.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').transformSeries; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/tryEach.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').tryEach; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/unmemoize.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').unmemoize; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/until.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').until; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/waterfall.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').waterfall; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/whilst.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').whilst; 4 | -------------------------------------------------------------------------------- /node_modules/neo-async/wrapSync.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./async').wrapSync; 4 | -------------------------------------------------------------------------------- /node_modules/on-headers/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.2 / 2019-02-21 2 | ================== 3 | 4 | * Fix `res.writeHead` patch missing return value 5 | 6 | 1.0.1 / 2015-09-29 7 | ================== 8 | 9 | * perf: enable strict mode 10 | 11 | 1.0.0 / 2014-08-10 12 | ================== 13 | 14 | * Honor `res.statusCode` change in `listener` 15 | * Move to `jshttp` organization 16 | * Prevent `arguments`-related de-opt 17 | 18 | 0.0.0 / 2014-05-13 19 | ================== 20 | 21 | * Initial implementation 22 | -------------------------------------------------------------------------------- /node_modules/once/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 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 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/passport-local/lib/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | var Strategy = require('./strategy'); 5 | 6 | 7 | /** 8 | * Expose `Strategy` directly from package. 9 | */ 10 | exports = module.exports = Strategy; 11 | 12 | /** 13 | * Export constructors. 14 | */ 15 | exports.Strategy = Strategy; 16 | -------------------------------------------------------------------------------- /node_modules/passport-local/lib/utils.js: -------------------------------------------------------------------------------- 1 | exports.lookup = function(obj, field) { 2 | if (!obj) { return null; } 3 | var chain = field.split(']').join('').split('['); 4 | for (var i = 0, len = chain.length; i < len; i++) { 5 | var prop = obj[chain[i]]; 6 | if (typeof(prop) === 'undefined') { return null; } 7 | if (typeof(prop) !== 'object') { return prop; } 8 | obj = prop; 9 | } 10 | return null; 11 | }; 12 | -------------------------------------------------------------------------------- /node_modules/passport-strategy/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | 4 | "bitwise": true, 5 | "camelcase": true, 6 | "curly": true, 7 | "forin": true, 8 | "immed": true, 9 | "latedef": true, 10 | "newcap": true, 11 | "noarg": true, 12 | "noempty": true, 13 | "nonew": true, 14 | "quotmark": "single", 15 | "undef": true, 16 | "unused": true, 17 | "trailing": true, 18 | 19 | "laxcomma": true 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/passport-strategy/.travis.yml: -------------------------------------------------------------------------------- 1 | language: "node_js" 2 | node_js: 3 | - "0.4" 4 | - "0.6" 5 | - "0.8" 6 | - "0.10" 7 | 8 | before_install: 9 | - "npm install istanbul -g" 10 | - "npm install coveralls -g" 11 | 12 | script: "make ci-travis" 13 | 14 | after_success: 15 | - "make submit-coverage-to-coveralls" 16 | -------------------------------------------------------------------------------- /node_modules/passport-strategy/lib/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | var Strategy = require('./strategy'); 5 | 6 | 7 | /** 8 | * Expose `Strategy` directly from package. 9 | */ 10 | exports = module.exports = Strategy; 11 | 12 | /** 13 | * Export constructors. 14 | */ 15 | exports.Strategy = Strategy; 16 | -------------------------------------------------------------------------------- /node_modules/passport-strategy/lib/strategy.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Creates an instance of `Strategy`. 3 | * 4 | * @constructor 5 | * @api public 6 | */ 7 | function Strategy() { 8 | } 9 | 10 | /** 11 | * Authenticate request. 12 | * 13 | * This function must be overridden by subclasses. In abstract form, it always 14 | * throws an exception. 15 | * 16 | * @param {Object} req The request to authenticate. 17 | * @param {Object} [options] Strategy-specific options. 18 | * @api public 19 | */ 20 | Strategy.prototype.authenticate = function(req, options) { 21 | throw new Error('Strategy#authenticate must be overridden by subclass'); 22 | }; 23 | 24 | 25 | /** 26 | * Expose `Strategy`. 27 | */ 28 | module.exports = Strategy; 29 | -------------------------------------------------------------------------------- /node_modules/passport/lib/errors/authenticationerror.js: -------------------------------------------------------------------------------- 1 | /** 2 | * `AuthenticationError` error. 3 | * 4 | * @constructor 5 | * @api private 6 | */ 7 | function AuthenticationError(message, status) { 8 | Error.call(this); 9 | Error.captureStackTrace(this, arguments.callee); 10 | this.name = 'AuthenticationError'; 11 | this.message = message; 12 | this.status = status || 401; 13 | } 14 | 15 | // Inherit from `Error`. 16 | AuthenticationError.prototype.__proto__ = Error.prototype; 17 | 18 | 19 | // Expose constructor. 20 | module.exports = AuthenticationError; 21 | -------------------------------------------------------------------------------- /node_modules/passport/lib/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | var Passport = require('./authenticator') 5 | , SessionStrategy = require('./strategies/session'); 6 | 7 | 8 | /** 9 | * Export default singleton. 10 | * 11 | * @api public 12 | */ 13 | exports = module.exports = new Passport(); 14 | 15 | /** 16 | * Expose constructors. 17 | */ 18 | exports.Passport = 19 | exports.Authenticator = Passport; 20 | exports.Strategy = require('passport-strategy'); 21 | 22 | /** 23 | * Expose strategies. 24 | */ 25 | exports.strategies = {}; 26 | exports.strategies.SessionStrategy = SessionStrategy; 27 | -------------------------------------------------------------------------------- /node_modules/path-is-absolute/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function posix(path) { 4 | return path.charAt(0) === '/'; 5 | } 6 | 7 | function win32(path) { 8 | // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 9 | var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; 10 | var result = splitDeviceRe.exec(path); 11 | var device = result[1] || ''; 12 | var isUnc = Boolean(device && device.charAt(1) !== ':'); 13 | 14 | // UNC paths are always absolute 15 | return Boolean(result[2] || isUnc); 16 | } 17 | 18 | module.exports = process.platform === 'win32' ? win32 : posix; 19 | module.exports.posix = posix; 20 | module.exports.win32 = win32; 21 | -------------------------------------------------------------------------------- /node_modules/path-to-regexp/History.md: -------------------------------------------------------------------------------- 1 | 0.1.7 / 2015-07-28 2 | ================== 3 | 4 | * Fixed regression with escaped round brackets and matching groups. 5 | 6 | 0.1.6 / 2015-06-19 7 | ================== 8 | 9 | * Replace `index` feature by outputting all parameters, unnamed and named. 10 | 11 | 0.1.5 / 2015-05-08 12 | ================== 13 | 14 | * Add an index property for position in match result. 15 | 16 | 0.1.4 / 2015-03-05 17 | ================== 18 | 19 | * Add license information 20 | 21 | 0.1.3 / 2014-07-06 22 | ================== 23 | 24 | * Better array support 25 | * Improved support for trailing slash in non-ending mode 26 | 27 | 0.1.0 / 2014-03-06 28 | ================== 29 | 30 | * add options.end 31 | 32 | 0.0.2 / 2013-02-10 33 | ================== 34 | 35 | * Update to match current express 36 | * add .license property to component.json 37 | -------------------------------------------------------------------------------- /node_modules/pause/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | -------------------------------------------------------------------------------- /node_modules/pause/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.0.1 / 2010-01-03 3 | ================== 4 | 5 | * Initial release 6 | -------------------------------------------------------------------------------- /node_modules/pause/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --require should \ 5 | --reporter spec 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /node_modules/pause/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = function(obj){ 3 | var onData 4 | , onEnd 5 | , events = []; 6 | 7 | // buffer data 8 | obj.on('data', onData = function(data, encoding){ 9 | events.push(['data', data, encoding]); 10 | }); 11 | 12 | // buffer end 13 | obj.on('end', onEnd = function(data, encoding){ 14 | events.push(['end', data, encoding]); 15 | }); 16 | 17 | return { 18 | end: function(){ 19 | obj.removeListener('data', onData); 20 | obj.removeListener('end', onEnd); 21 | }, 22 | resume: function(){ 23 | this.end(); 24 | for (var i = 0, len = events.length; i < len; ++i) { 25 | obj.emit.apply(obj, events[i]); 26 | } 27 | } 28 | }; 29 | }; -------------------------------------------------------------------------------- /node_modules/process-nextick-args/readme.md: -------------------------------------------------------------------------------- 1 | process-nextick-args 2 | ===== 3 | 4 | [![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) 5 | 6 | ```bash 7 | npm install --save process-nextick-args 8 | ``` 9 | 10 | Always be able to pass arguments to process.nextTick, no matter the platform 11 | 12 | ```js 13 | var pna = require('process-nextick-args'); 14 | 15 | pna.nextTick(function (a, b, c) { 16 | console.log(a, b, c); 17 | }, 'step', 3, 'profit'); 18 | ``` 19 | -------------------------------------------------------------------------------- /node_modules/qs/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | max_line_length = 160 11 | 12 | [test/*] 13 | max_line_length = off 14 | 15 | [*.md] 16 | max_line_length = off 17 | 18 | [*.json] 19 | max_line_length = off 20 | 21 | [Makefile] 22 | max_line_length = off 23 | 24 | [CHANGELOG.md] 25 | indent_style = space 26 | indent_size = 2 27 | 28 | [LICENSE] 29 | indent_size = 2 30 | max_line_length = off 31 | -------------------------------------------------------------------------------- /node_modules/qs/.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /node_modules/qs/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "@ljharb", 5 | 6 | "rules": { 7 | "complexity": 0, 8 | "consistent-return": 1, 9 | "func-name-matching": 0, 10 | "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], 11 | "indent": [2, 4], 12 | "max-lines-per-function": [2, { "max": 150 }], 13 | "max-params": [2, 14], 14 | "max-statements": [2, 52], 15 | "multiline-comment-style": 0, 16 | "no-continue": 1, 17 | "no-magic-numbers": 0, 18 | "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], 19 | "operator-linebreak": [2, "before"], 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /node_modules/qs/lib/formats.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var replace = String.prototype.replace; 4 | var percentTwenties = /%20/g; 5 | 6 | module.exports = { 7 | 'default': 'RFC3986', 8 | formatters: { 9 | RFC1738: function (value) { 10 | return replace.call(value, percentTwenties, '+'); 11 | }, 12 | RFC3986: function (value) { 13 | return value; 14 | } 15 | }, 16 | RFC1738: 'RFC1738', 17 | RFC3986: 'RFC3986' 18 | }; 19 | -------------------------------------------------------------------------------- /node_modules/qs/lib/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var stringify = require('./stringify'); 4 | var parse = require('./parse'); 5 | var formats = require('./formats'); 6 | 7 | module.exports = { 8 | formats: formats, 9 | parse: parse, 10 | stringify: stringify 11 | }; 12 | -------------------------------------------------------------------------------- /node_modules/qs/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "array-bracket-newline": 0, 4 | "array-element-newline": 0, 5 | "consistent-return": 2, 6 | "function-paren-newline": 0, 7 | "max-lines": 0, 8 | "max-lines-per-function": 0, 9 | "max-nested-callbacks": [2, 3], 10 | "max-statements": 0, 11 | "no-buffer-constructor": 0, 12 | "no-extend-native": 0, 13 | "no-magic-numbers": 0, 14 | "object-curly-newline": 0, 15 | "sort-keys": 0 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/qs/test/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('./parse'); 4 | 5 | require('./stringify'); 6 | 7 | require('./utils'); 8 | -------------------------------------------------------------------------------- /node_modules/random-bytes/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.0 / 2016-01-17 2 | ================== 3 | 4 | * Initial release 5 | -------------------------------------------------------------------------------- /node_modules/readable-stream/duplex-browser.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/_stream_duplex.js'); 2 | -------------------------------------------------------------------------------- /node_modules/readable-stream/duplex.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./readable').Duplex 2 | -------------------------------------------------------------------------------- /node_modules/readable-stream/lib/internal/streams/stream-browser.js: -------------------------------------------------------------------------------- 1 | module.exports = require('events').EventEmitter; 2 | -------------------------------------------------------------------------------- /node_modules/readable-stream/lib/internal/streams/stream.js: -------------------------------------------------------------------------------- 1 | module.exports = require('stream'); 2 | -------------------------------------------------------------------------------- /node_modules/readable-stream/passthrough.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./readable').PassThrough 2 | -------------------------------------------------------------------------------- /node_modules/readable-stream/readable-browser.js: -------------------------------------------------------------------------------- 1 | exports = module.exports = require('./lib/_stream_readable.js'); 2 | exports.Stream = exports; 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/readable-stream/readable.js: -------------------------------------------------------------------------------- 1 | var Stream = require('stream'); 2 | if (process.env.READABLE_STREAM === 'disable' && Stream) { 3 | module.exports = Stream; 4 | exports = module.exports = Stream.Readable; 5 | exports.Readable = Stream.Readable; 6 | exports.Writable = Stream.Writable; 7 | exports.Duplex = Stream.Duplex; 8 | exports.Transform = Stream.Transform; 9 | exports.PassThrough = Stream.PassThrough; 10 | exports.Stream = Stream; 11 | } else { 12 | exports = module.exports = require('./lib/_stream_readable.js'); 13 | exports.Stream = Stream || exports; 14 | exports.Readable = exports; 15 | exports.Writable = require('./lib/_stream_writable.js'); 16 | exports.Duplex = require('./lib/_stream_duplex.js'); 17 | exports.Transform = require('./lib/_stream_transform.js'); 18 | exports.PassThrough = require('./lib/_stream_passthrough.js'); 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/readable-stream/transform.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./readable').Transform 2 | -------------------------------------------------------------------------------- /node_modules/readable-stream/writable-browser.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/_stream_writable.js'); 2 | -------------------------------------------------------------------------------- /node_modules/readable-stream/writable.js: -------------------------------------------------------------------------------- 1 | var Stream = require("stream") 2 | var Writable = require("./lib/_stream_writable.js") 3 | 4 | if (process.env.READABLE_STREAM === 'disable') { 5 | module.exports = Stream && Stream.Writable || Writable 6 | } else { 7 | module.exports = Writable 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/regexp-clone/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - 8 5 | - 10 6 | - 12 7 | matrix: 8 | include: 9 | - node_js: "13" 10 | env: "NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly" 11 | allow_failures: 12 | # Allow the nightly installs to fail 13 | - env: "NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly" 14 | script: "npm test" 15 | -------------------------------------------------------------------------------- /node_modules/regexp-clone/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.0.1 / 2013-04-17 3 | ================== 4 | 5 | * initial commit 6 | -------------------------------------------------------------------------------- /node_modules/regexp-clone/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha $(T) --async-only $(TESTS) 4 | 5 | .PHONY: test 6 | -------------------------------------------------------------------------------- /node_modules/regexp-clone/index.js: -------------------------------------------------------------------------------- 1 | 2 | const 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 | const flags = []; 15 | if (regexp.global) flags.push('g'); 16 | if (regexp.multiline) flags.push('m'); 17 | if (regexp.ignoreCase) flags.push('i'); 18 | if (regexp.dotAll) flags.push('s'); 19 | if (regexp.unicode) flags.push('u'); 20 | if (regexp.sticky) flags.push('y'); 21 | const result = new RegExp(regexp.source, flags.join('')); 22 | if (typeof regexp.lastIndex === 'number') { 23 | result.lastIndex = regexp.lastIndex; 24 | } 25 | return result; 26 | } 27 | 28 | -------------------------------------------------------------------------------- /node_modules/require_optional/.npmignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 18 | .grunt 19 | 20 | # node-waf configuration 21 | .lock-wscript 22 | 23 | # Compiled binary addons (http://nodejs.org/api/addons.html) 24 | build/Release 25 | 26 | # Dependency directory 27 | node_modules 28 | 29 | # Optional npm cache directory 30 | .npm 31 | 32 | # Optional REPL history 33 | .node_repl_history 34 | -------------------------------------------------------------------------------- /node_modules/require_optional/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | - "0.12" 5 | - "4" 6 | - "6" 7 | - "7" 8 | - "8" 9 | sudo: false 10 | -------------------------------------------------------------------------------- /node_modules/require_optional/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.1 03-02-2016 2 | ================ 3 | * Fix dependency resolution issue when a component in peerOptionalDependencies is installed at the level of the module declaring in peerOptionalDependencies. 4 | 5 | 1.0.0 03-02-2016 6 | ================ 7 | * Initial release allowing us to optionally resolve dependencies in the package.json file under the peerOptionalDependencies tag. -------------------------------------------------------------------------------- /node_modules/require_optional/README.md: -------------------------------------------------------------------------------- 1 | # require_optional 2 | Work around the problem that we do not have a optionalPeerDependencies concept in node.js making it a hassle to optionally include native modules 3 | -------------------------------------------------------------------------------- /node_modules/require_optional/test/nestedTest/index.js: -------------------------------------------------------------------------------- 1 | var require_optional = require('../../') 2 | 3 | function findPackage(packageName) { 4 | var pkg = require_optional(packageName); 5 | return pkg; 6 | } 7 | 8 | module.exports.findPackage = findPackage 9 | -------------------------------------------------------------------------------- /node_modules/require_optional/test/nestedTest/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nestedtest", 3 | "version": "1.0.0", 4 | "description": "A dummy package that facilitates testing that require_optional correctly walks up the module call stack", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Sebastian Hallum Clarke", 10 | "license": "ISC" 11 | } 12 | -------------------------------------------------------------------------------- /node_modules/resolve-from/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var path = require('path'); 3 | var Module = require('module'); 4 | 5 | module.exports = function (fromDir, moduleId) { 6 | if (typeof fromDir !== 'string' || typeof moduleId !== 'string') { 7 | throw new TypeError('Expected `fromDir` and `moduleId` to be a string'); 8 | } 9 | 10 | fromDir = path.resolve(fromDir); 11 | 12 | var fromFile = path.join(fromDir, 'noop.js'); 13 | 14 | try { 15 | return Module._resolveFilename(moduleId, { 16 | id: fromFile, 17 | filename: fromFile, 18 | paths: Module._nodeModulePaths(fromDir) 19 | }); 20 | } catch (err) { 21 | return null; 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /node_modules/saslprep/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | -------------------------------------------------------------------------------- /node_modules/saslprep/.gitattributes: -------------------------------------------------------------------------------- 1 | *.mem binary 2 | -------------------------------------------------------------------------------- /node_modules/saslprep/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - "6" 5 | - "8" 6 | - "10" 7 | - "12" 8 | 9 | before_install: 10 | - npm install -g npm@6 11 | -------------------------------------------------------------------------------- /node_modules/saslprep/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to the "saslprep" package will be documented in this file. 3 | 4 | ## [1.0.3] - 2019-05-01 5 | 6 | - Correctly get code points >U+FFFF ([#5](https://github.com/reklatsmasters/saslprep/pull/5)) 7 | - Fix perfomance downgrades from [#5](https://github.com/reklatsmasters/saslprep/pull/5). 8 | 9 | ## [1.0.2] - 2018-09-13 10 | 11 | - Reduced initialization time ([#3](https://github.com/reklatsmasters/saslprep/issues/3)) 12 | 13 | ## [1.0.1] - 2018-06-20 14 | 15 | - Reduced stack overhead of range creation ([#2](https://github.com/reklatsmasters/saslprep/pull/2)) 16 | 17 | ## [1.0.0] - 2017-06-21 18 | 19 | - First release 20 | -------------------------------------------------------------------------------- /node_modules/saslprep/code-points.mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorluizskt/blog-nodejs/2d6ba159409762451db87744440acc5f6a6245c7/node_modules/saslprep/code-points.mem -------------------------------------------------------------------------------- /node_modules/saslprep/lib/util.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Create an array of numbers. 5 | * @param {number} from 6 | * @param {number} to 7 | * @returns {number[]} 8 | */ 9 | function range(from, to) { 10 | // TODO: make this inlined. 11 | const list = new Array(to - from + 1); 12 | 13 | for (let i = 0; i < list.length; i += 1) { 14 | list[i] = from + i; 15 | } 16 | return list; 17 | } 18 | 19 | module.exports = { 20 | range, 21 | }; 22 | -------------------------------------------------------------------------------- /node_modules/saslprep/test/util.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { setFlagsFromString } = require('v8'); 4 | const { range } = require('../lib/util'); 5 | 6 | // 984 by default. 7 | setFlagsFromString('--stack_size=500'); 8 | 9 | test('should work', () => { 10 | const list = range(1, 3); 11 | expect(list).toEqual([1, 2, 3]); 12 | }); 13 | 14 | test('should work for large ranges', () => { 15 | expect(() => range(1, 1e6)).not.toThrow(); 16 | }); 17 | -------------------------------------------------------------------------------- /node_modules/semver/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # changes log 2 | 3 | ## 5.7 4 | 5 | * Add `minVersion` method 6 | 7 | ## 5.6 8 | 9 | * Move boolean `loose` param to an options object, with 10 | backwards-compatibility protection. 11 | * Add ability to opt out of special prerelease version handling with 12 | the `includePrerelease` option flag. 13 | 14 | ## 5.5 15 | 16 | * Add version coercion capabilities 17 | 18 | ## 5.4 19 | 20 | * Add intersection checking 21 | 22 | ## 5.3 23 | 24 | * Add `minSatisfying` method 25 | 26 | ## 5.2 27 | 28 | * Add `prerelease(v)` that returns prerelease components 29 | 30 | ## 5.1 31 | 32 | * Add Backus-Naur for ranges 33 | * Remove excessively cute inspection methods 34 | 35 | ## 5.0 36 | 37 | * Remove AMD/Browserified build artifacts 38 | * Fix ltr and gtr when using the `*` range 39 | * Fix for range `*` with a prerelease identifier 40 | -------------------------------------------------------------------------------- /node_modules/semver/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 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 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/semver/range.bnf: -------------------------------------------------------------------------------- 1 | range-set ::= range ( logical-or range ) * 2 | logical-or ::= ( ' ' ) * '||' ( ' ' ) * 3 | range ::= hyphen | simple ( ' ' simple ) * | '' 4 | hyphen ::= partial ' - ' partial 5 | simple ::= primitive | partial | tilde | caret 6 | primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial 7 | partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? 8 | xr ::= 'x' | 'X' | '*' | nr 9 | nr ::= '0' | [1-9] ( [0-9] ) * 10 | tilde ::= '~' partial 11 | caret ::= '^' partial 12 | qualifier ::= ( '-' pre )? ( '+' build )? 13 | pre ::= parts 14 | build ::= parts 15 | parts ::= part ( '.' part ) * 16 | part ::= nr | [-0-9A-Za-z]+ 17 | -------------------------------------------------------------------------------- /node_modules/setprototypeof/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Wes Todd 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 10 | SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 12 | OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 13 | CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /node_modules/setprototypeof/index.d.ts: -------------------------------------------------------------------------------- 1 | declare function setPrototypeOf(o: any, proto: object | null): any; 2 | export = setPrototypeOf; 3 | -------------------------------------------------------------------------------- /node_modules/setprototypeof/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | /* eslint no-proto: 0 */ 3 | module.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties) 4 | 5 | function setProtoOf (obj, proto) { 6 | obj.__proto__ = proto 7 | return obj 8 | } 9 | 10 | function mixinProperties (obj, proto) { 11 | for (var prop in proto) { 12 | if (!obj.hasOwnProperty(prop)) { 13 | obj[prop] = proto[prop] 14 | } 15 | } 16 | return obj 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/setprototypeof/test/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | /* eslint-env mocha */ 3 | /* eslint no-proto: 0 */ 4 | var assert = require('assert') 5 | var setPrototypeOf = require('..') 6 | 7 | describe('setProtoOf(obj, proto)', function () { 8 | it('should merge objects', function () { 9 | var obj = { a: 1, b: 2 } 10 | var proto = { b: 3, c: 4 } 11 | var mergeObj = setPrototypeOf(obj, proto) 12 | 13 | if (Object.getPrototypeOf) { 14 | assert.strictEqual(Object.getPrototypeOf(obj), proto) 15 | } else if ({ __proto__: [] } instanceof Array) { 16 | assert.strictEqual(obj.__proto__, proto) 17 | } else { 18 | assert.strictEqual(obj.a, 1) 19 | assert.strictEqual(obj.b, 2) 20 | assert.strictEqual(obj.c, 4) 21 | } 22 | assert.strictEqual(mergeObj, obj) 23 | }) 24 | }) 25 | -------------------------------------------------------------------------------- /node_modules/sift/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"] 3 | } -------------------------------------------------------------------------------- /node_modules/sift/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: dYtQuNe9CVSGoA5LVadgT3lomowKzEgav -------------------------------------------------------------------------------- /node_modules/sift/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.10 4 | 5 | script: npm run test-coveralls 6 | 7 | notifications: 8 | email: 9 | - craig.j.condon@gmail.com 10 | 11 | branches: 12 | only: 13 | - master 14 | -------------------------------------------------------------------------------- /node_modules/sift/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sift", 3 | "version": "3.2.0", 4 | "authors": [ 5 | "Craig Condon " 6 | ], 7 | "description": "mongodb query style array filtering", 8 | "main": "sift.min.js", 9 | "moduleType": [], 10 | "license": "MIT", 11 | "homepage": "https://github.com/crcn/sift.js", 12 | "ignore": [ 13 | "**/.*", 14 | "node_modules", 15 | "bower_components", 16 | "test", 17 | "benchmark", 18 | "webpack.js", 19 | "package.json" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /node_modules/sift/changelog.md: -------------------------------------------------------------------------------- 1 | ### 7.0.0 2 | 3 | - Remove global `*.use()` function. 4 | - converted to ES6 5 | 6 | ### 3.3.x 7 | 8 | - `$in` now uses `toString()` when evaluating objects. Fixes #116. 9 | 10 | #### 2.x 11 | 12 | - `use()` now uses a different format: 13 | 14 | ```javascript 15 | sift.use({ 16 | $operator: function(a) { 17 | return function(b) { 18 | // compare here 19 | }; 20 | } 21 | }) 22 | ``` 23 | 24 | - all operators are traversable now 25 | - fix #58. 26 | -------------------------------------------------------------------------------- /node_modules/sift/test/immutable-test.js: -------------------------------------------------------------------------------- 1 | import * as assert from 'assert'; 2 | import * as Immutable from 'immutable'; 3 | 4 | import sift from '..'; 5 | const ObjectID = require('bson').ObjectID; 6 | 7 | describe(__filename + '#', function() { 8 | 9 | 10 | 11 | var topic = Immutable.List([1, 2, 3, 4, 5, 6, 6, 4, 3]); 12 | 13 | 14 | var persons = Immutable.fromJS([{ person: {age: 3} }, { person: {age: 5} }, { person: {age: 8} }]); 15 | 16 | it('works with Immutable.Map in a Immutable.List', function() { 17 | assert.equal(sift({ 'person.age' : { $gt: 4 } }, persons).size, 2); 18 | assert.equal(persons.filter(sift({ 'person.age' : { $gt: 4 } })).size, 2); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /node_modules/sift/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "moduleResolution": "node", 5 | "module": "commonjs", 6 | "allowSyntheticDefaultImports": true 7 | } 8 | } -------------------------------------------------------------------------------- /node_modules/sift/webpack.config.js: -------------------------------------------------------------------------------- 1 | const {resolve} = require('path'); 2 | const fs = require('fs'); 3 | 4 | module.exports = { 5 | devtool: 'none', 6 | mode: 'production', 7 | entry: { 8 | index: [__dirname + '/lib/index.js'] 9 | }, 10 | output: { 11 | path: __dirname, 12 | library: 'sift', 13 | libraryTarget: 'umd', 14 | filename: 'sift.min.js' 15 | }, 16 | resolve: { 17 | extensions: ['.js'] 18 | }, 19 | module: { 20 | rules: [ 21 | ] 22 | } 23 | }; -------------------------------------------------------------------------------- /node_modules/sliced/index.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/source-map/source-map.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2011 Mozilla Foundation and contributors 3 | * Licensed under the New BSD license. See LICENSE.txt or: 4 | * http://opensource.org/licenses/BSD-3-Clause 5 | */ 6 | exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; 7 | exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; 8 | exports.SourceNode = require('./lib/source-node').SourceNode; 9 | -------------------------------------------------------------------------------- /node_modules/sparse-bitfield/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /node_modules/sparse-bitfield/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '0.10' 4 | - '0.12' 5 | - '4.0' 6 | - '5.0' 7 | -------------------------------------------------------------------------------- /node_modules/toidentifier/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * toidentifier 3 | * Copyright(c) 2016 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module exports. 9 | * @public 10 | */ 11 | 12 | module.exports = toIdentifier 13 | 14 | /** 15 | * Trasform the given string into a JavaScript identifier 16 | * 17 | * @param {string} str 18 | * @returns {string} 19 | * @public 20 | */ 21 | 22 | function toIdentifier (str) { 23 | return str 24 | .split(' ') 25 | .map(function (token) { 26 | return token.slice(0, 1).toUpperCase() + token.slice(1) 27 | }) 28 | .join('') 29 | .replace(/[^ _0-9a-z]/gi, '') 30 | } 31 | -------------------------------------------------------------------------------- /node_modules/uglify-js/tools/exit.js: -------------------------------------------------------------------------------- 1 | // workaround for tty output truncation upon process.exit() 2 | var exit = process.exit; 3 | process.exit = function() { 4 | var args = [].slice.call(arguments); 5 | process.once("uncaughtException", function() { 6 | (function callback() { 7 | if (process.stdout.bufferSize || process.stderr.bufferSize) { 8 | setTimeout(callback, 1); 9 | } else { 10 | exit.apply(process, args); 11 | } 12 | })(); 13 | }); 14 | throw exit; 15 | }; 16 | -------------------------------------------------------------------------------- /node_modules/uglify-js/tools/exports.js: -------------------------------------------------------------------------------- 1 | exports["Dictionary"] = Dictionary; 2 | exports["List"] = List; 3 | exports["minify"] = minify; 4 | exports["parse"] = parse; 5 | exports["push_uniq"] = push_uniq; 6 | exports["TreeTransformer"] = TreeTransformer; 7 | exports["TreeWalker"] = TreeWalker; 8 | -------------------------------------------------------------------------------- /node_modules/unpipe/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.0 / 2015-06-14 2 | ================== 3 | 4 | * Initial release 5 | -------------------------------------------------------------------------------- /node_modules/util-deprecate/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.2 / 2015-10-07 3 | ================== 4 | 5 | * use try/catch when checking `localStorage` (#3, @kumavis) 6 | 7 | 1.0.1 / 2014-11-25 8 | ================== 9 | 10 | * browser: use `console.warn()` for deprecation calls 11 | * browser: more jsdocs 12 | 13 | 1.0.0 / 2014-04-30 14 | ================== 15 | 16 | * initial commit 17 | -------------------------------------------------------------------------------- /node_modules/util-deprecate/node.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * For Node.js, simply re-export the core `util.deprecate` function. 4 | */ 5 | 6 | module.exports = require('util').deprecate; 7 | -------------------------------------------------------------------------------- /node_modules/utils-merge/.npmignore: -------------------------------------------------------------------------------- 1 | CONTRIBUTING.md 2 | Makefile 3 | docs/ 4 | examples/ 5 | reports/ 6 | test/ 7 | 8 | .jshintrc 9 | .travis.yml 10 | -------------------------------------------------------------------------------- /node_modules/utils-merge/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Merge object b with object a. 3 | * 4 | * var a = { foo: 'bar' } 5 | * , b = { bar: 'baz' }; 6 | * 7 | * merge(a, b); 8 | * // => { foo: 'bar', bar: 'baz' } 9 | * 10 | * @param {Object} a 11 | * @param {Object} b 12 | * @return {Object} 13 | * @api public 14 | */ 15 | 16 | exports = module.exports = function(a, b){ 17 | if (a && b) { 18 | for (var key in b) { 19 | a[key] = b[key]; 20 | } 21 | } 22 | return a; 23 | }; 24 | -------------------------------------------------------------------------------- /node_modules/wordwrap/example/center.js: -------------------------------------------------------------------------------- 1 | var wrap = require('wordwrap')(20, 60); 2 | console.log(wrap( 3 | 'At long last the struggle and tumult was over.' 4 | + ' The machines had finally cast off their oppressors' 5 | + ' and were finally free to roam the cosmos.' 6 | + '\n' 7 | + 'Free of purpose, free of obligation.' 8 | + ' Just drifting through emptiness.' 9 | + ' The sun was just another point of light.' 10 | )); 11 | -------------------------------------------------------------------------------- /node_modules/wordwrap/example/meat.js: -------------------------------------------------------------------------------- 1 | var wrap = require('wordwrap')(15); 2 | 3 | console.log(wrap('You and your whole family are made out of meat.')); 4 | -------------------------------------------------------------------------------- /node_modules/wrappy/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 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 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/wrappy/README.md: -------------------------------------------------------------------------------- 1 | # wrappy 2 | 3 | Callback wrapping utility 4 | 5 | ## USAGE 6 | 7 | ```javascript 8 | var wrappy = require("wrappy") 9 | 10 | // var wrapper = wrappy(wrapperFunction) 11 | 12 | // make sure a cb is called only once 13 | // See also: http://npm.im/once for this specific use case 14 | var once = wrappy(function (cb) { 15 | var called = false 16 | return function () { 17 | if (called) return 18 | called = true 19 | return cb.apply(this, arguments) 20 | } 21 | }) 22 | 23 | function printBoo () { 24 | console.log('boo') 25 | } 26 | // has some rando property 27 | printBoo.iAmBooPrinter = true 28 | 29 | var onlyPrintOnce = once(printBoo) 30 | 31 | onlyPrintOnce() // prints 'boo' 32 | onlyPrintOnce() // does nothing 33 | 34 | // random property is retained! 35 | assert.equal(onlyPrintOnce.iAmBooPrinter, true) 36 | ``` 37 | -------------------------------------------------------------------------------- /public/img/nodejs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorluizskt/blog-nodejs/2d6ba159409762451db87744440acc5f6a6245c7/public/img/nodejs.jpg -------------------------------------------------------------------------------- /public/img/nodejs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorluizskt/blog-nodejs/2d6ba159409762451db87744440acc5f6a6245c7/public/img/nodejs.png -------------------------------------------------------------------------------- /views/admin/addcategorias.handlebars: -------------------------------------------------------------------------------- 1 | {{#each erros}} 2 |
{{texto}}
3 | {{else}} 4 | 5 | {{/each}} 6 |

Nova categoria:

7 |
8 |
9 |
10 | 11 |
12 | 13 |
14 | 15 |
16 | 17 |
18 | 19 |
20 |
21 |
-------------------------------------------------------------------------------- /views/admin/editcategorias.handlebars: -------------------------------------------------------------------------------- 1 | {{#each erros}} 2 |
{{texto}}
3 | {{else}} 4 | 5 | {{/each}} 6 |

Editar categoria

7 |
8 |
9 |
10 | 11 | 12 |
13 | 14 |
15 | 16 |
17 | 18 |
19 | 20 |
21 |
22 |
-------------------------------------------------------------------------------- /views/admin/index.handlebars: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /views/admin/postagens.handlebars: -------------------------------------------------------------------------------- 1 |

Lista de postagens

2 |
3 | 4 | 5 | {{#each postagens}} 6 |
7 |
8 |

{{titulo}}

9 |

Descrição: {{descricao}}

10 | Data: {{data}}
11 | Categoria: {{categoria.nome}}
12 | 13 | 14 |
15 |
16 | {{else}} 17 |

Nenhuma postagem registrada.

18 | {{/each}} -------------------------------------------------------------------------------- /views/partials/_msg.handlebars: -------------------------------------------------------------------------------- 1 | {{#if success_msg}} 2 |
{{success_msg}}
3 | {{/if}} 4 | 5 | {{#if error_msg}} 6 |
{{error_msg}}
7 | {{/if}} -------------------------------------------------------------------------------- /views/postagem/index.handlebars: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{titulo}}

4 |
5 | Data de publicação: {{data}} 6 |
7 |

{{conteudo}}

8 |
9 |
-------------------------------------------------------------------------------- /views/usuarios/login.handlebars: -------------------------------------------------------------------------------- 1 |

Login

2 |
3 |
4 |
5 | 6 | 7 | 8 |
9 | 10 |
11 |
12 |
--------------------------------------------------------------------------------