├── .DS_Store ├── README.md ├── assets └── animated.gif ├── client ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── public │ ├── _redirects │ ├── favicon.ico │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── robots.txt └── src │ ├── App.js │ ├── actions │ ├── authentication.js │ ├── diet.js │ ├── healthDetail.js │ ├── rawProduct.js │ ├── recipesIngredients.js │ ├── snackBar.js │ └── user.js │ ├── api │ ├── index.js │ └── rawProductAPI.js │ ├── components │ ├── AdminDB │ │ ├── AdminDB.js │ │ └── styles.js │ ├── Authentication │ │ ├── Authentication.js │ │ ├── Icon │ │ │ └── Icon.js │ │ ├── Input │ │ │ └── Input.js │ │ └── styles.js │ ├── Dashboard │ │ ├── Dashboard.js │ │ ├── Form │ │ │ ├── Form.js │ │ │ └── styles.js │ │ ├── HealthDetail │ │ │ ├── HealthDetail.js │ │ │ └── styles.js │ │ └── styles.js │ ├── Home │ │ ├── DietPosts │ │ │ ├── DietPost │ │ │ │ ├── DietPost.js │ │ │ │ └── styles.js │ │ │ ├── DietPosts.js │ │ │ └── styles.js │ │ ├── Home.js │ │ └── styles.js │ ├── Mealplan │ │ ├── Dietmodel │ │ │ ├── Dietmodel.js │ │ │ └── styles.js │ │ ├── Foodcards │ │ │ ├── Data │ │ │ │ └── defaultData.js │ │ │ ├── Foodcard │ │ │ │ ├── Foodcard.js │ │ │ │ └── styles.js │ │ │ ├── Foodcards.js │ │ │ ├── styles.css │ │ │ └── styles.js │ │ ├── Mealplan.js │ │ ├── Pievisual │ │ │ └── Pievisual.js │ │ └── styles.js │ ├── Navbar │ │ ├── DrawerNav │ │ │ ├── DrawerNav.js │ │ │ └── styles.js │ │ ├── Navbar.js │ │ └── styles.js │ ├── Recipes │ │ ├── Recipes.js │ │ ├── RecipesCard │ │ │ ├── RecipesCard.js │ │ │ └── styles.js │ │ └── styles.js │ ├── Scheduling │ │ ├── Scheduling.js │ │ └── styles.js │ └── Snackbar │ │ ├── Snackbar.js │ │ └── styles.js │ ├── constants │ └── constantTypes.js │ ├── image │ ├── HEP.jpg │ ├── apple.png │ ├── arrow-gif.gif │ └── doctor.png │ ├── index.css │ ├── index.js │ └── reducers │ ├── authentication.js │ ├── diets.js │ ├── healthDetails.js │ ├── index.js │ ├── snackbar.js │ └── user.js └── server ├── .DS_Store ├── .env.example ├── .gitignore ├── Functions └── fuctions.js ├── Procfile ├── controllers ├── diet.js ├── healthDetail.js └── user.js ├── index.js ├── middleware └── authentication.js ├── models ├── diet.js ├── healthDetail.js └── user.js ├── node_modules ├── .bin │ ├── mime │ ├── nodemon │ ├── nodetouch │ ├── nopt │ └── semver ├── .package-lock.json ├── @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 │ │ ├── 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 │ │ ├── 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 ├── abbrev │ ├── LICENSE │ ├── README.md │ ├── abbrev.js │ └── package.json ├── accepts │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── anymatch │ ├── LICENSE │ ├── README.md │ ├── index.d.ts │ ├── index.js │ └── package.json ├── array-flatten │ ├── LICENSE │ ├── README.md │ ├── array-flatten.js │ └── package.json ├── balanced-match │ ├── 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 ├── binary-extensions │ ├── binary-extensions.json │ ├── binary-extensions.json.d.ts │ ├── index.d.ts │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── 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 ├── braces │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── compile.js │ │ ├── constants.js │ │ ├── expand.js │ │ ├── parse.js │ │ ├── stringify.js │ │ └── utils.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 ├── buffer-equal-constant-time │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE.txt │ ├── README.md │ ├── index.js │ ├── package.json │ └── test.js ├── bytes │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ └── package.json ├── chokidar │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── constants.js │ │ ├── fsevents-handler.js │ │ └── nodefs-handler.js │ ├── package.json │ └── types │ │ └── index.d.ts ├── concat-map │ ├── .travis.yml │ ├── LICENSE │ ├── README.markdown │ ├── example │ │ └── map.js │ ├── index.js │ ├── package.json │ └── test │ │ └── map.js ├── 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 │ ├── lib │ │ └── util.js │ └── package.json ├── cors │ ├── CONTRIBUTING.md │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── lib │ │ └── index.js │ └── package.json ├── 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 │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.d.ts │ ├── index.js │ └── package.json ├── depd │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ ├── lib │ │ └── browser │ │ │ └── index.js │ └── package.json ├── destroy │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── dotenv │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── config.js │ ├── lib │ │ ├── cli-options.js │ │ ├── env-options.js │ │ └── main.js │ ├── package.json │ └── types │ │ ├── index.d.ts │ │ ├── test.ts │ │ ├── tsconfig.json │ │ └── tslint.json ├── ecdsa-sig-formatter │ ├── CODEOWNERS │ ├── LICENSE │ ├── README.md │ ├── package.json │ └── src │ │ ├── ecdsa-sig-formatter.d.ts │ │ ├── ecdsa-sig-formatter.js │ │ └── param-bytes-for-alg.js ├── 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 │ ├── 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 ├── fill-range │ ├── LICENSE │ ├── README.md │ ├── index.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 ├── fsevents │ ├── LICENSE │ ├── README.md │ ├── fsevents.d.ts │ ├── fsevents.js │ ├── fsevents.node │ └── package.json ├── glob-parent │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── has-flag │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── 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 ├── ignore-by-default │ ├── LICENSE │ ├── README.md │ ├── index.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 ├── is-binary-path │ ├── index.d.ts │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── is-extglob │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── is-glob │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── is-number │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── isarray │ ├── .npmignore │ ├── .travis.yml │ ├── Makefile │ ├── README.md │ ├── component.json │ ├── index.js │ ├── package.json │ └── test.js ├── jsonwebtoken │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── decode.js │ ├── index.js │ ├── lib │ │ ├── JsonWebTokenError.js │ │ ├── NotBeforeError.js │ │ ├── TokenExpiredError.js │ │ ├── psSupported.js │ │ └── timespan.js │ ├── node_modules │ │ └── ms │ │ │ ├── index.js │ │ │ ├── license.md │ │ │ ├── package.json │ │ │ └── readme.md │ ├── package.json │ ├── sign.js │ └── verify.js ├── jwa │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── jws │ ├── CHANGELOG.md │ ├── LICENSE │ ├── index.js │ ├── lib │ │ ├── data-stream.js │ │ ├── sign-stream.js │ │ ├── tostring.js │ │ └── verify-stream.js │ ├── package.json │ └── readme.md ├── 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 ├── lodash.includes │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── lodash.isboolean │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── lodash.isinteger │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── lodash.isnumber │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── lodash.isplainobject │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── lodash.isstring │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── lodash.once │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── 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 ├── mongodb │ ├── 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 │ │ ├── encrypter.js │ │ ├── error.js │ │ ├── explain.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 │ ├── 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 │ │ │ │ └── stringifyFunctionOperators.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 │ │ │ │ └── updatedPathsByArrayFilter.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 │ ├── 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 │ │ ├── .eslintrc.yml │ │ ├── index.js │ │ └── stringToParts.js ├── mquery │ ├── .eslintignore │ ├── .travis.yml │ ├── History.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── SECURITY.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 ├── nodemon │ ├── LICENSE │ ├── README.md │ ├── bin │ │ └── nodemon.js │ ├── doc │ │ └── cli │ │ │ ├── authors.txt │ │ │ ├── config.txt │ │ │ ├── help.txt │ │ │ ├── logo.txt │ │ │ ├── options.txt │ │ │ ├── topics.txt │ │ │ ├── usage.txt │ │ │ └── whoami.txt │ ├── lib │ │ ├── cli │ │ │ ├── index.js │ │ │ └── parse.js │ │ ├── config │ │ │ ├── command.js │ │ │ ├── defaults.js │ │ │ ├── exec.js │ │ │ ├── index.js │ │ │ └── load.js │ │ ├── help │ │ │ └── index.js │ │ ├── index.js │ │ ├── monitor │ │ │ ├── index.js │ │ │ ├── match.js │ │ │ ├── run.js │ │ │ ├── signals.js │ │ │ └── watch.js │ │ ├── nodemon.js │ │ ├── rules │ │ │ ├── add.js │ │ │ ├── index.js │ │ │ └── parse.js │ │ ├── spawn.js │ │ ├── utils │ │ │ ├── bus.js │ │ │ ├── clone.js │ │ │ ├── colour.js │ │ │ ├── index.js │ │ │ ├── log.js │ │ │ └── merge.js │ │ └── version.js │ ├── node_modules │ │ ├── debug │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── node.js │ │ │ ├── package.json │ │ │ └── src │ │ │ │ ├── browser.js │ │ │ │ ├── common.js │ │ │ │ ├── index.js │ │ │ │ └── node.js │ │ └── ms │ │ │ ├── index.js │ │ │ ├── license.md │ │ │ ├── package.json │ │ │ └── readme.md │ └── package.json ├── nopt │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── bin │ │ └── nopt.js │ ├── examples │ │ └── my-program.js │ ├── lib │ │ └── nopt.js │ └── package.json ├── normalize-path │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── object-assign │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── on-finished │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── optional-require │ ├── README.md │ ├── index.js │ └── package.json ├── parseurl │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── path-to-regexp │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ └── package.json ├── picomatch │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── constants.js │ │ ├── parse.js │ │ ├── picomatch.js │ │ ├── scan.js │ │ └── utils.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 ├── pstree.remy │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── lib │ │ ├── index.js │ │ ├── tree.js │ │ └── utils.js │ ├── package.json │ └── tests │ │ ├── fixtures │ │ ├── index.js │ │ ├── out1 │ │ └── out2 │ │ └── index.test.js ├── qs │ ├── .editorconfig │ ├── .eslintrc │ ├── CHANGELOG.md │ ├── README.md │ ├── dist │ │ └── qs.js │ ├── lib │ │ ├── formats.js │ │ ├── index.js │ │ ├── parse.js │ │ ├── stringify.js │ │ └── utils.js │ ├── package.json │ └── test │ │ ├── parse.js │ │ ├── stringify.js │ │ └── utils.js ├── 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 ├── readdirp │ ├── LICENSE │ ├── README.md │ ├── index.d.ts │ ├── index.js │ └── package.json ├── regexp-clone │ ├── .travis.yml │ ├── History.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── index.js │ ├── package.json │ └── test │ │ └── index.js ├── 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 │ ├── MIT-LICENSE.txt │ ├── README.md │ ├── changelog.md │ ├── index.d.ts │ ├── lib │ │ └── index.js │ ├── package.json │ └── sift.min.js ├── sliced │ ├── History.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── 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 ├── supports-color │ ├── browser.js │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── to-regex-range │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── toidentifier │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── touch │ ├── LICENSE │ ├── README.md │ ├── bin │ │ └── nodetouch.js │ ├── index.js │ └── package.json ├── type-is │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── undefsafe │ ├── .jscsrc │ ├── .jshintrc │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── example.js │ ├── lib │ │ └── undefsafe.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 ├── package-lock.json ├── package.json └── routes ├── diet.js ├── healthDetail.js └── user.js /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/.DS_Store -------------------------------------------------------------------------------- /assets/animated.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/assets/animated.gif -------------------------------------------------------------------------------- /client/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /client/public/_redirects: -------------------------------------------------------------------------------- 1 | /* /index.html 200 -------------------------------------------------------------------------------- /client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/client/public/favicon.ico -------------------------------------------------------------------------------- /client/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/client/public/logo192.png -------------------------------------------------------------------------------- /client/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/client/public/logo512.png -------------------------------------------------------------------------------- /client/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /client/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /client/src/actions/snackBar.js: -------------------------------------------------------------------------------- 1 | import { SET_SNACKBAR } from '../constants/constantTypes.js'; 2 | 3 | export const setSnackBar = ( 4 | snackbarOpen, 5 | snackbarType = "success", 6 | snackbarMessage = "" 7 | ) => async (dispatch) => { 8 | 9 | const data = { snackbarOpen, snackbarType, snackbarMessage }; 10 | 11 | try { 12 | dispatch({ type: SET_SNACKBAR, payload: data }); 13 | } catch (error) { 14 | console.log(error); 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /client/src/actions/user.js: -------------------------------------------------------------------------------- 1 | import * as api from '../api/index.js'; 2 | import { FETCH2, DELETE2 } from '../constants/constantTypes.js'; 3 | import { setSnackBar } from './snackBar.js'; 4 | 5 | // get Users 6 | export const getUser = () => async (dispatch) => { 7 | try { 8 | const { data } = await api.fetchUser(); 9 | 10 | // dispatch action to get data 11 | dispatch({ type: FETCH2, payload: data }); 12 | } catch (error) { 13 | console.log(error.message); 14 | } 15 | }; 16 | 17 | // delete User 18 | export const deleteUser = (id) => async (dispatch) => { 19 | try { 20 | await api.deleteUser(id); 21 | 22 | dispatch({ type: DELETE2, payload: id }); 23 | dispatch(setSnackBar(true, 'success', "SUCCESSFULLY DELETED")); 24 | } catch (error) { 25 | console.log(error.message); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /client/src/api/rawProductAPI.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | export const API = axios.create({ 4 | baseURL: 'https://trackapi.nutritionix.com/v2', 5 | headers: { 6 | 'x-app-id': '7b14ebd4', 7 | 'x-app-key': 'f27ea0520b4309e18a209cf9aa440e42' 8 | } 9 | }); 10 | 11 | // header1 12 | // headers: { 13 | // 'x-app-id': 'f7b33457', 14 | // 'x-app-key': '0c4bce30ca0088e1c732829e9b018c48' 15 | // } 16 | 17 | // header2 18 | // headers: { 19 | // 'x-app-id': '7b14ebd4', 20 | // 'x-app-key': 'f27ea0520b4309e18a209cf9aa440e42' 21 | // } -------------------------------------------------------------------------------- /client/src/components/AdminDB/styles.js: -------------------------------------------------------------------------------- 1 | import { makeStyles } from '@material-ui/core/styles'; 2 | 3 | export default makeStyles(() => ({ 4 | mainContainer: { 5 | maxWidth: 'inherit', 6 | background: 'white', 7 | height: '90vh', 8 | borderRadius: 30, 9 | border: '1px solid rgba(0,0,0, 0.2)', 10 | paddingTop: 20, 11 | boxShadow: '0px 2px 4px -1px rgb(0 0 0 / 20%) , 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%)', 12 | }, 13 | table: { 14 | minWidth: 650, 15 | }, 16 | })); 17 | -------------------------------------------------------------------------------- /client/src/components/Authentication/Icon/Icon.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Icon = () => ( 4 | 5 | 9 | 10 | ); 11 | 12 | export default Icon; 13 | -------------------------------------------------------------------------------- /client/src/components/Dashboard/Form/styles.js: -------------------------------------------------------------------------------- 1 | import { makeStyles } from '@material-ui/core/styles'; 2 | 3 | export default makeStyles((theme) => ({ 4 | root: { 5 | '& .MuiTextField-root': { 6 | margin: theme.spacing(2), 7 | }, 8 | }, 9 | paper: { 10 | padding: 50, 11 | width: '80%' 12 | }, 13 | form: { 14 | display: 'flex', 15 | flexWrap: 'wrap', 16 | justifyContent: 'center', 17 | }, 18 | buttonSubmit: { 19 | marginBottom: 10, 20 | }, 21 | })); -------------------------------------------------------------------------------- /client/src/components/Dashboard/styles.js: -------------------------------------------------------------------------------- 1 | import { makeStyles } from '@material-ui/core/styles'; 2 | 3 | export default makeStyles(() => ({ 4 | mainContainer: { 5 | maxWidth: 'inherit', 6 | background: 'white', 7 | height: '90vh', 8 | borderRadius: 30, 9 | border: '1px solid rgba(0,0,0, 0.2)', 10 | paddingTop: 20, 11 | boxShadow: '0px 2px 4px -1px rgb(0 0 0 / 20%) , 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%)', 12 | } 13 | })); 14 | -------------------------------------------------------------------------------- /client/src/components/Home/DietPosts/styles.js: -------------------------------------------------------------------------------- 1 | import { makeStyles } from '@material-ui/core/styles'; 2 | 3 | export default makeStyles((theme) => ({ 4 | mainContainer: { 5 | display: 'flex', 6 | alignItems: 'center', 7 | } 8 | })); -------------------------------------------------------------------------------- /client/src/components/Home/styles.js: -------------------------------------------------------------------------------- 1 | import { makeStyles } from '@material-ui/core/styles'; 2 | 3 | export default makeStyles(({ 4 | mainContainer: { 5 | maxWidth: 'inherit', 6 | background: 'white', 7 | height: '100%', 8 | borderRadius: 30, 9 | border: '1px solid rgba(0,0,0, 0.2)', 10 | paddingTop: 20, 11 | boxShadow: '0px 2px 4px -1px rgb(0 0 0 / 20%) , 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%)', 12 | }, 13 | display: { 14 | display: 'inline-block', 15 | margin: '5% 2% 2% 7%' 16 | } 17 | })); -------------------------------------------------------------------------------- /client/src/components/Mealplan/Dietmodel/styles.js: -------------------------------------------------------------------------------- 1 | import { makeStyles } from '@material-ui/core/styles'; 2 | 3 | export default makeStyles(() => ({ 4 | text: { 5 | padding: 10, 6 | borderRadius: 20, 7 | color: 'black', 8 | width: '35%' 9 | }, 10 | vegies: { 11 | background: '#98ddca' 12 | }, 13 | fruits: { 14 | background: '#d5ecc2' 15 | }, 16 | grains: { 17 | background: '#ffd3b4' 18 | }, 19 | proteins: { 20 | background: '#ffaaa7' 21 | }, 22 | })); -------------------------------------------------------------------------------- /client/src/components/Mealplan/Foodcards/styles.css: -------------------------------------------------------------------------------- 1 | button.rec-dot{ 2 | background-color: rgb(255, 255, 255); 3 | box-shadow: 0 0 1px 3px rgba(98, 98, 98, 0.5); 4 | } 5 | 6 | button.rec-dot:hover, button.rec-dot:active, button.rec-dot:focus { 7 | box-shadow: 0 0 1px 3px rgba(0, 177, 253, 0.5); 8 | } 9 | 10 | .rec.rec-arrow:disabled { 11 | visibility: hidden; 12 | } 13 | 14 | .rec.rec-arrow { 15 | background-color: rgb(240, 235, 235); 16 | } 17 | .rec.rec-arrow.rec.rec-arrow-left:hover, .rec.rec-arrow.rec.rec-arrow-left:active, .rec.rec-arrow.rec.rec-arrow-left:focus { 18 | background-color: rgb(0, 177, 253); 19 | } 20 | .rec.rec-arrow.rec.rec-arrow-right:hover, .rec.rec-arrow.rec.rec-arrow-right:active, .rec.rec-arrow.rec.rec-arrow-right:focus { 21 | background-color: rgb(0, 177, 253); 22 | } 23 | -------------------------------------------------------------------------------- /client/src/components/Navbar/styles.js: -------------------------------------------------------------------------------- 1 | import { makeStyles } from '@material-ui/core/styles'; 2 | 3 | export default makeStyles((theme) => ({ 4 | appBar: { 5 | borderRadius: 15, 6 | margin: '30px 0', 7 | display: 'flex', 8 | flexDirection: 'row', 9 | justifyContent: 'center', 10 | alignItems: 'center', 11 | }, 12 | heading: { 13 | color: '#20565c', 14 | textDecoration: 'none' 15 | }, 16 | icon: { 17 | width: 70, 18 | height: 70, 19 | padding: 10, 20 | paddingLeft: 40 21 | }, 22 | 23 | })); -------------------------------------------------------------------------------- /client/src/components/Recipes/styles.js: -------------------------------------------------------------------------------- 1 | import { makeStyles } from '@material-ui/core/styles'; 2 | 3 | export default makeStyles(({ 4 | mainContainer: { 5 | maxWidth: 'inherit', 6 | background: 'white', 7 | height: '100%', 8 | borderRadius: 30, 9 | border: '1px solid rgba(0,0,0, 0.2)', 10 | paddingTop: 20, 11 | boxShadow: '0px 2px 4px -1px rgb(0 0 0 / 20%) , 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%)', 12 | }, 13 | })); -------------------------------------------------------------------------------- /client/src/components/Scheduling/styles.js: -------------------------------------------------------------------------------- 1 | import { makeStyles } from '@material-ui/core/styles'; 2 | 3 | export default makeStyles(({ 4 | mainContainer: { 5 | maxWidth: 'inherit', 6 | background: 'white', 7 | height: '100%', 8 | borderRadius: 30, 9 | border: '1px solid rgba(0,0,0, 0.2)', 10 | paddingTop: 20, 11 | boxShadow: '0px 2px 4px -1px rgb(0 0 0 / 20%) , 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%)', 12 | }, 13 | image: { 14 | width: '70%', 15 | height: '75vh' 16 | } 17 | })); -------------------------------------------------------------------------------- /client/src/components/Snackbar/styles.js: -------------------------------------------------------------------------------- 1 | import { makeStyles } from '@material-ui/core/styles'; 2 | 3 | export default makeStyles(theme => ({ 4 | root: { 5 | width: "100%", 6 | "& > * + *": { 7 | marginTop: theme.spacing(2) 8 | } 9 | } 10 | })); -------------------------------------------------------------------------------- /client/src/constants/constantTypes.js: -------------------------------------------------------------------------------- 1 | // Request Action Types 2 | export const FETCH = 'FETCH'; 3 | export const CREATE = 'CREATE'; 4 | export const UPDATE = 'UPDATE'; 5 | export const DELETE = 'DELETE'; 6 | 7 | export const FETCH1 = 'FETCH1'; 8 | export const CREATE1 = 'CREATE1'; 9 | export const UPDATE1 = 'UPDATE1'; 10 | export const DELETE1 = 'DELETE1'; 11 | export const LIKE1 = 'LIKE1'; 12 | 13 | export const FETCH2 = 'FETCH2'; 14 | export const DELETE2 = 'DELETE2'; 15 | // Authentication Types 16 | export const AUTH = 'Sign In'; 17 | export const LOGOUT = 'Sign Out'; 18 | 19 | // Navigation Types 20 | export const Home = 'Home'; 21 | export const Dashboard = 'Dashboard'; 22 | export const MealPlan = 'Meal Plan'; 23 | export const Recipes = 'Recipes'; 24 | export const Schedule = 'Schedule'; 25 | export const AdminDB = 'AdminDB'; 26 | 27 | // notification 28 | export const SET_SNACKBAR = 'SET SNACKBAR'; -------------------------------------------------------------------------------- /client/src/image/HEP.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/client/src/image/HEP.jpg -------------------------------------------------------------------------------- /client/src/image/apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/client/src/image/apple.png -------------------------------------------------------------------------------- /client/src/image/arrow-gif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/client/src/image/arrow-gif.gif -------------------------------------------------------------------------------- /client/src/image/doctor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/client/src/image/doctor.png -------------------------------------------------------------------------------- /client/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: linear-gradient(-45deg, #f4f9f9, #f2a154, #a4ebf3, #e05752); 3 | background-size: 400% 400%; 4 | animation: gradient 15s ease infinite; 5 | } 6 | 7 | @keyframes gradient { 8 | 0% { 9 | background-position: 0% 50%; 10 | } 11 | 50% { 12 | background-position: 100% 50%; 13 | } 14 | 100% { 15 | background-position: 0% 50%; 16 | } 17 | } -------------------------------------------------------------------------------- /client/src/index.js: -------------------------------------------------------------------------------- 1 | // Connecting react application to html file 2 | 3 | // axios: API requests 4 | // moment: time and date lib 5 | // react - file - base64: converting images 6 | // redux, redux - thunk: asynchorous function using redux 7 | 8 | import React from 'react'; 9 | import ReactDOM from 'react-dom'; 10 | import { Provider } from 'react-redux'; 11 | import { createStore, applyMiddleware, compose } from 'redux'; 12 | import thunk from 'redux-thunk'; 13 | 14 | import App from './App.js'; 15 | import reducers from './reducers/index.js'; 16 | 17 | import './index.css'; 18 | 19 | const store = createStore(reducers, compose(applyMiddleware(thunk))); 20 | 21 | // connect to div of Id of root 22 | ReactDOM.render( 23 | 24 | 25 | , 26 | document.getElementById('root'), 27 | ); -------------------------------------------------------------------------------- /client/src/reducers/authentication.js: -------------------------------------------------------------------------------- 1 | import { AUTH, LOGOUT } from '../constants/constantTypes.js'; 2 | 3 | export default (state = { authData: null }, action) => { 4 | switch (action.type) { 5 | case AUTH: 6 | localStorage.setItem('userProfile', JSON.stringify({ ...action?.payload })); 7 | return { ...state, authData: action?.payload }; 8 | case LOGOUT: 9 | localStorage.clear(); 10 | return { ...state, authData: null }; 11 | default: 12 | return state; 13 | } 14 | }; -------------------------------------------------------------------------------- /client/src/reducers/diets.js: -------------------------------------------------------------------------------- 1 | import { FETCH1, CREATE1, UPDATE1, DELETE1, LIKE1 } from '../constants/constantTypes.js'; 2 | 3 | export default (DietPost = [], action) => { 4 | switch (action.type) { 5 | case FETCH1: 6 | return action.payload; 7 | case CREATE1: 8 | return [...DietPost, action.payload]; 9 | case UPDATE1: 10 | case LIKE1: 11 | return DietPost.map((dietPost) => dietPost._id === action.payload._id ? action.payload : dietPost); 12 | case DELETE1: 13 | return DietPost.filter((dietPost) => dietPost._id !== action.payload); 14 | default: 15 | return DietPost; 16 | } 17 | }; -------------------------------------------------------------------------------- /client/src/reducers/healthDetails.js: -------------------------------------------------------------------------------- 1 | import { FETCH, CREATE, UPDATE, DELETE } from '../constants/constantTypes.js'; 2 | 3 | export default (HealthData = [], action) => { 4 | switch (action.type) { 5 | case FETCH: 6 | return action.payload; 7 | case CREATE: 8 | return [...HealthData, action.payload]; 9 | case UPDATE: 10 | return HealthData.map((HD) => HD._id === action.payload._id ? action.payload : HD); 11 | case DELETE: 12 | return HealthData.filter((HD) => HD._id !== action.payload); 13 | default: 14 | return HealthData; 15 | } 16 | }; -------------------------------------------------------------------------------- /client/src/reducers/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux'; 2 | 3 | import healthDetails from './healthDetails.js'; 4 | import authentication from './authentication.js'; 5 | import snackbar from './snackbar.js'; 6 | import diets from './diets.js'; 7 | import USERS from './user.js'; 8 | 9 | export default combineReducers({ healthDetails, authentication, snackbar, diets, USERS }); 10 | 11 | -------------------------------------------------------------------------------- /client/src/reducers/snackbar.js: -------------------------------------------------------------------------------- 1 | import { SET_SNACKBAR } from '../constants/constantTypes.js'; 2 | 3 | const initial = { 4 | snackbarOpen: false, 5 | snackbarType: "success", 6 | snackbarMessage: "" 7 | }; 8 | 9 | export default (snackbar = initial, action) => { 10 | switch (action.type) { 11 | case SET_SNACKBAR: 12 | const { snackbarOpen, snackbarType, snackbarMessage } = action.payload; 13 | return { ...snackbar, snackbarOpen, snackbarType, snackbarMessage }; 14 | default: 15 | return snackbar; 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /client/src/reducers/user.js: -------------------------------------------------------------------------------- 1 | import { FETCH2, DELETE2 } from '../constants/constantTypes.js'; 2 | 3 | export default (USER = [], action) => { 4 | switch (action.type) { 5 | case FETCH2: 6 | return action.payload; 7 | case DELETE2: 8 | return USER.filter((USER) => USER._id !== action.payload); 9 | default: 10 | return USER; 11 | } 12 | }; -------------------------------------------------------------------------------- /server/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/server/.DS_Store -------------------------------------------------------------------------------- /server/.env.example: -------------------------------------------------------------------------------- 1 | PORT = "PORT" 2 | CONNECTION_URL = "YOUR MONGO URL STRING" -------------------------------------------------------------------------------- /server/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env -------------------------------------------------------------------------------- /server/Functions/fuctions.js: -------------------------------------------------------------------------------- 1 | export const Cal_bmi = (weight, height) => (weight / (height * height) * 10000).toFixed(1); 2 | 3 | export const Cal_bmr = (age, weight, height, sex) => { 4 | if (sex == 'male') { 5 | return Math.round(66.47 + (13.75 * weight) + (5.003 * height) - (6.755 * age)); 6 | // return 66.47 + (13.75 * weight [kg]) + (5.003 * size [cm]) − (6.755 * age [years]) 7 | } else { 8 | return Math.round(655.1 + (9.563 * weight) + (1.85 * height) - (4.676 * age)); 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /server/Procfile: -------------------------------------------------------------------------------- 1 | web: npm run start -------------------------------------------------------------------------------- /server/models/healthDetail.js: -------------------------------------------------------------------------------- 1 | import mongoose from 'mongoose'; 2 | 3 | const healthDetailSchema = mongoose.Schema({ 4 | userID: { type: String }, 5 | weight: { type: Number }, 6 | height: { type: Number }, 7 | sex: { type: String }, 8 | age: { type: Number }, 9 | bmr: { type: Number }, 10 | bmi: { type: Number } 11 | }); 12 | 13 | export default mongoose.model('healthDetail', healthDetailSchema); -------------------------------------------------------------------------------- /server/models/user.js: -------------------------------------------------------------------------------- 1 | import mongoose from 'mongoose'; 2 | 3 | const userSchema = mongoose.Schema({ 4 | name: { type: String, required: true }, 5 | email: { type: String, required: true }, 6 | role: { type: String }, 7 | password: { type: String, required: true }, 8 | id: { type: String } 9 | }); 10 | 11 | export default mongoose.model("User", userSchema); 12 | 13 | -------------------------------------------------------------------------------- /server/node_modules/.bin/mime: -------------------------------------------------------------------------------- 1 | ../mime/cli.js -------------------------------------------------------------------------------- /server/node_modules/.bin/nodemon: -------------------------------------------------------------------------------- 1 | ../nodemon/bin/nodemon.js -------------------------------------------------------------------------------- /server/node_modules/.bin/nodetouch: -------------------------------------------------------------------------------- 1 | ../touch/bin/nodetouch.js -------------------------------------------------------------------------------- /server/node_modules/.bin/nopt: -------------------------------------------------------------------------------- 1 | ../nopt/bin/nopt.js -------------------------------------------------------------------------------- /server/node_modules/.bin/semver: -------------------------------------------------------------------------------- 1 | ../semver/bin/semver -------------------------------------------------------------------------------- /server/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: Thu, 29 Jul 2021 13:31:23 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 | -------------------------------------------------------------------------------- /server/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 'node:os'; 4 | import { constants as cryptoConstants } from 'node:crypto'; 5 | import { constants as fsConstants } from 'node:fs'; 6 | 7 | const exp: typeof osConstants.errno & 8 | typeof osConstants.priority & 9 | SignalConstants & 10 | typeof cryptoConstants & 11 | typeof fsConstants; 12 | export = exp; 13 | } 14 | 15 | declare module 'node:constants' { 16 | import constants = require('constants'); 17 | export = constants; 18 | } 19 | -------------------------------------------------------------------------------- /server/node_modules/@types/node/globals.global.d.ts: -------------------------------------------------------------------------------- 1 | declare var global: typeof globalThis; 2 | -------------------------------------------------------------------------------- /server/node_modules/abbrev/README.md: -------------------------------------------------------------------------------- 1 | # abbrev-js 2 | 3 | Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev). 4 | 5 | Usage: 6 | 7 | var abbrev = require("abbrev"); 8 | abbrev("foo", "fool", "folding", "flop"); 9 | 10 | // returns: 11 | { fl: 'flop' 12 | , flo: 'flop' 13 | , flop: 'flop' 14 | , fol: 'folding' 15 | , fold: 'folding' 16 | , foldi: 'folding' 17 | , foldin: 'folding' 18 | , folding: 'folding' 19 | , foo: 'foo' 20 | , fool: 'fool' 21 | } 22 | 23 | This is handy for command-line scripts, or other cases where you want to be able to accept shorthands. 24 | -------------------------------------------------------------------------------- /server/node_modules/anymatch/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) 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 | -------------------------------------------------------------------------------- /server/node_modules/anymatch/index.d.ts: -------------------------------------------------------------------------------- 1 | type AnymatchFn = (testString: string) => boolean; 2 | type AnymatchPattern = string|RegExp|AnymatchFn; 3 | type AnymatchMatcher = AnymatchPattern|AnymatchPattern[] 4 | type AnymatchTester = { 5 | (testString: string|any[], returnIndex: true): number; 6 | (testString: string|any[]): boolean; 7 | } 8 | 9 | type PicomatchOptions = {dot: boolean}; 10 | 11 | declare const anymatch: { 12 | (matchers: AnymatchMatcher): AnymatchTester; 13 | (matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number; 14 | (matchers: AnymatchMatcher, testString: string|any[]): boolean; 15 | } 16 | 17 | export {AnymatchMatcher as Matcher} 18 | export {AnymatchTester as Tester} 19 | export default anymatch 20 | -------------------------------------------------------------------------------- /server/node_modules/bcryptjs/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | debug.log 4 | doco/ 5 | tests/bench.js 6 | *.png 7 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/bcryptjs/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "vsicons.presets.angular": false 3 | } -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/bcryptjs/dist/bcrypt.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/server/node_modules/bcryptjs/dist/bcrypt.min.js.gz -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/binary-extensions/binary-extensions.json.d.ts: -------------------------------------------------------------------------------- 1 | declare const binaryExtensionsJson: readonly string[]; 2 | 3 | export = binaryExtensionsJson; 4 | -------------------------------------------------------------------------------- /server/node_modules/binary-extensions/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | List of binary file extensions. 3 | 4 | @example 5 | ``` 6 | import binaryExtensions = require('binary-extensions'); 7 | 8 | console.log(binaryExtensions); 9 | //=> ['3ds', '3g2', …] 10 | ``` 11 | */ 12 | declare const binaryExtensions: readonly string[]; 13 | 14 | export = binaryExtensions; 15 | -------------------------------------------------------------------------------- /server/node_modules/binary-extensions/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./binary-extensions.json'); 2 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/bluebird/changelog.md: -------------------------------------------------------------------------------- 1 | [http://bluebirdjs.com/docs/changelog.html](http://bluebirdjs.com/docs/changelog.html) 2 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/braces/lib/stringify.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const utils = require('./utils'); 4 | 5 | module.exports = (ast, options = {}) => { 6 | let stringify = (node, parent = {}) => { 7 | let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); 8 | let invalidNode = node.invalid === true && options.escapeInvalid === true; 9 | let output = ''; 10 | 11 | if (node.value) { 12 | if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { 13 | return '\\' + node.value; 14 | } 15 | return node.value; 16 | } 17 | 18 | if (node.value) { 19 | return node.value; 20 | } 21 | 22 | if (node.nodes) { 23 | for (let child of node.nodes) { 24 | output += stringify(child); 25 | } 26 | } 27 | return output; 28 | }; 29 | 30 | return stringify(ast); 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /server/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.6" 26 | } 27 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/buffer-equal-constant-time/.npmignore: -------------------------------------------------------------------------------- 1 | .*.sw[mnop] 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /server/node_modules/buffer-equal-constant-time/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.11" 4 | - "0.10" 5 | -------------------------------------------------------------------------------- /server/node_modules/buffer-equal-constant-time/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "buffer-equal-constant-time", 3 | "version": "1.0.1", 4 | "description": "Constant-time comparison of Buffers", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "mocha test.js" 8 | }, 9 | "repository": "git@github.com:goinstant/buffer-equal-constant-time.git", 10 | "keywords": [ 11 | "buffer", 12 | "equal", 13 | "constant-time", 14 | "crypto" 15 | ], 16 | "author": "GoInstant Inc., a salesforce.com company", 17 | "license": "BSD-3-Clause", 18 | "devDependencies": { 19 | "mocha": "~1.15.1" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /server/node_modules/concat-map/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/cookie-signature/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/cookie-signature/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cookie-signature", 3 | "version": "1.0.6", 4 | "description": "Sign and unsign cookies", 5 | "keywords": ["cookie", "sign", "unsign"], 6 | "author": "TJ Holowaychuk ", 7 | "license": "MIT", 8 | "repository": { "type": "git", "url": "https://github.com/visionmedia/node-cookie-signature.git"}, 9 | "dependencies": {}, 10 | "devDependencies": { 11 | "mocha": "*", 12 | "should": "*" 13 | }, 14 | "scripts": { 15 | "test": "mocha --require should --reporter spec" 16 | }, 17 | "main": "index" 18 | } 19 | -------------------------------------------------------------------------------- /server/node_modules/core-util-is/README.md: -------------------------------------------------------------------------------- 1 | # core-util-is 2 | 3 | The `util.is*` functions introduced in Node v0.12. 4 | -------------------------------------------------------------------------------- /server/node_modules/debug/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve 2 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/denque/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.5.1 2 | 3 | - perf: minor performance tweak when growing queue size (#29) 4 | 5 | ## 1.5.0 6 | 7 | - feat: adds capacity option for circular buffers (#27) 8 | 9 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/denque/index.d.ts: -------------------------------------------------------------------------------- 1 | declare class Denque { 2 | constructor(); 3 | constructor(array: T[]); 4 | constructor(array: T[], options: IDenqueOptions); 5 | 6 | push(item: T): number; 7 | unshift(item: T): number; 8 | pop(): T | undefined; 9 | removeBack(): T | undefined; 10 | shift(): T | undefined; 11 | peekBack(): T | undefined; 12 | peekFront(): T | undefined; 13 | peekAt(index: number): T | undefined; 14 | get(index: number): T | undefined; 15 | remove(index: number, count: number): T[]; 16 | removeOne(index: number): T | undefined; 17 | splice(index: number, count: number, ...item: T[]): T[] | undefined; 18 | isEmpty(): boolean; 19 | clear(): void; 20 | 21 | toString(): string; 22 | toArray(): T[]; 23 | 24 | length: number; 25 | } 26 | 27 | interface IDenqueOptions { 28 | capacity?: number 29 | } 30 | 31 | export = Denque; 32 | -------------------------------------------------------------------------------- /server/node_modules/dotenv/config.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | (function () { 4 | require('./lib/main').config( 5 | Object.assign( 6 | {}, 7 | require('./lib/env-options'), 8 | require('./lib/cli-options')(process.argv) 9 | ) 10 | ) 11 | })() 12 | -------------------------------------------------------------------------------- /server/node_modules/dotenv/lib/cli-options.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | const re = /^dotenv_config_(encoding|path|debug)=(.+)$/ 4 | 5 | module.exports = function optionMatcher (args /*: Array */) { 6 | return args.reduce(function (acc, cur) { 7 | const matches = cur.match(re) 8 | if (matches) { 9 | acc[matches[1]] = matches[2] 10 | } 11 | return acc 12 | }, {}) 13 | } 14 | -------------------------------------------------------------------------------- /server/node_modules/dotenv/lib/env-options.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | // ../config.js accepts options via environment variables 4 | const options = {} 5 | 6 | if (process.env.DOTENV_CONFIG_ENCODING != null) { 7 | options.encoding = process.env.DOTENV_CONFIG_ENCODING 8 | } 9 | 10 | if (process.env.DOTENV_CONFIG_PATH != null) { 11 | options.path = process.env.DOTENV_CONFIG_PATH 12 | } 13 | 14 | if (process.env.DOTENV_CONFIG_DEBUG != null) { 15 | options.debug = process.env.DOTENV_CONFIG_DEBUG 16 | } 17 | 18 | module.exports = options 19 | -------------------------------------------------------------------------------- /server/node_modules/dotenv/types/test.ts: -------------------------------------------------------------------------------- 1 | import { config, parse } from "dotenv"; 2 | 3 | const env = config(); 4 | const dbUrl: string | null = 5 | env.error || !env.parsed ? null : env.parsed["BASIC"]; 6 | 7 | config({ 8 | path: ".env-example", 9 | encoding: "utf8", 10 | debug: true 11 | }); 12 | 13 | const parsed = parse("NODE_ENV=production\nDB_HOST=a.b.c"); 14 | const dbHost: string = parsed["DB_HOST"]; 15 | 16 | const parsedFromBuffer = parse(new Buffer("JUSTICE=league\n"), { 17 | debug: true 18 | }); 19 | const justice: string = parsedFromBuffer["JUSTICE"]; 20 | -------------------------------------------------------------------------------- /server/node_modules/dotenv/types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "lib": ["es6"], 5 | "noImplicitAny": true, 6 | "noImplicitThis": true, 7 | "strictNullChecks": true, 8 | "strictFunctionTypes": true, 9 | "noEmit": true, 10 | "baseUrl": ".", 11 | "paths": { 12 | "dotenv": ["."] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /server/node_modules/dotenv/types/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "dtslint/dtslint.json", 3 | "rules": { 4 | "strict-export-declare-modifiers": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /server/node_modules/ecdsa-sig-formatter/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @omsmith 2 | -------------------------------------------------------------------------------- /server/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module "ecdsa-sig-formatter" { 4 | /** 5 | * Convert the ASN.1/DER encoded signature to a JOSE-style concatenated signature. Returns a base64 url encoded String. 6 | * If signature is a String, it should be base64 encoded 7 | * alg must be one of ES256, ES384 or ES512 8 | */ 9 | export function derToJose(signature: Buffer | string, alg: string): string; 10 | 11 | /** 12 | * Convert the JOSE-style concatenated signature to an ASN.1/DER encoded signature. Returns a Buffer 13 | * If signature is a String, it should be base64 url encoded 14 | * alg must be one of ES256, ES384 or ES512 15 | */ 16 | export function joseToDer(signature: Buffer | string, alg: string): Buffer 17 | } 18 | -------------------------------------------------------------------------------- /server/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function getParamSize(keySize) { 4 | var result = ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1); 5 | return result; 6 | } 7 | 8 | var paramBytesForAlg = { 9 | ES256: getParamSize(256), 10 | ES384: getParamSize(384), 11 | ES512: getParamSize(521) 12 | }; 13 | 14 | function getParamBytesForAlg(alg) { 15 | var paramBytes = paramBytesForAlg[alg]; 16 | if (paramBytes) { 17 | return paramBytes; 18 | } 19 | 20 | throw new Error('Unknown algorithm "' + alg + '"'); 21 | } 22 | 23 | module.exports = getParamBytesForAlg; 24 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 -------------------------------------------------------------------------------- /server/node_modules/escape-html/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "escape-html", 3 | "description": "Escape string for use in HTML", 4 | "version": "1.0.3", 5 | "license": "MIT", 6 | "keywords": [ 7 | "escape", 8 | "html", 9 | "utility" 10 | ], 11 | "repository": "component/escape-html", 12 | "devDependencies": { 13 | "benchmark": "1.0.0", 14 | "beautify-benchmark": "0.2.4" 15 | }, 16 | "files": [ 17 | "LICENSE", 18 | "Readme.md", 19 | "index.js" 20 | ], 21 | "scripts": { 22 | "bench": "node benchmark/index.js" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/forwarded/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.2.0 / 2021-05-31 2 | ================== 3 | 4 | * Use `req.socket` over deprecated `req.connection` 5 | 6 | 0.1.2 / 2017-09-14 7 | ================== 8 | 9 | * perf: improve header parsing 10 | * perf: reduce overhead when no `X-Forwarded-For` header 11 | 12 | 0.1.1 / 2017-09-10 13 | ================== 14 | 15 | * Fix trimming leading / trailing OWS 16 | * perf: hoist regular expression 17 | 18 | 0.1.0 / 2014-09-21 19 | ================== 20 | 21 | * Initial release 22 | -------------------------------------------------------------------------------- /server/node_modules/fsevents/fsevents.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/server/node_modules/fsevents/fsevents.node -------------------------------------------------------------------------------- /server/node_modules/glob-parent/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) 2015, 2019 Elan Shanker 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 | -------------------------------------------------------------------------------- /server/node_modules/has-flag/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = (flag, argv) => { 3 | argv = argv || process.argv; 4 | const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); 5 | const pos = argv.indexOf(prefix + flag); 6 | const terminatorPos = argv.indexOf('--'); 7 | return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); 8 | }; 9 | -------------------------------------------------------------------------------- /server/node_modules/has-flag/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "has-flag", 3 | "version": "3.0.0", 4 | "description": "Check if argv has a specific flag", 5 | "license": "MIT", 6 | "repository": "sindresorhus/has-flag", 7 | "author": { 8 | "name": "Sindre Sorhus", 9 | "email": "sindresorhus@gmail.com", 10 | "url": "sindresorhus.com" 11 | }, 12 | "engines": { 13 | "node": ">=4" 14 | }, 15 | "scripts": { 16 | "test": "xo && ava" 17 | }, 18 | "files": [ 19 | "index.js" 20 | ], 21 | "keywords": [ 22 | "has", 23 | "check", 24 | "detect", 25 | "contains", 26 | "find", 27 | "flag", 28 | "cli", 29 | "command-line", 30 | "argv", 31 | "process", 32 | "arg", 33 | "args", 34 | "argument", 35 | "arguments", 36 | "getopt", 37 | "minimist", 38 | "optimist" 39 | ], 40 | "devDependencies": { 41 | "ava": "*", 42 | "xo": "*" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/ignore-by-default/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License (ISC) 2 | Copyright (c) 2016, Mark Wubben 3 | 4 | Permission to use, copy, modify, and/or distribute this software for any purpose 5 | with or without fee is hereby granted, provided that the above copyright notice 6 | and this permission notice appear in all copies. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 9 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 10 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 11 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 12 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 13 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 14 | THIS SOFTWARE. 15 | -------------------------------------------------------------------------------- /server/node_modules/ignore-by-default/README.md: -------------------------------------------------------------------------------- 1 | # ignore-by-default 2 | 3 | This is a package aimed at Node.js development tools. It provides a list of 4 | directories that should probably be ignored by such tools, e.g. when watching 5 | for file changes. 6 | 7 | It's used by [AVA](https://www.npmjs.com/package/ava) and 8 | [nodemon](https://www.npmjs.com/package/nodemon). 9 | 10 | [Please contribute!](./CONTRIBUTING.md) 11 | 12 | ## Installation 13 | 14 | ``` 15 | npm install --save ignore-by-default 16 | ``` 17 | 18 | ## Usage 19 | 20 | The `ignore-by-default` module exports a `directories()` function, which will 21 | return an array of directory names. These are the ones you should ignore. 22 | 23 | ```js 24 | // ['.git', '.sass_cache', …] 25 | var ignoredDirectories = require('ignore-by-default').directories() 26 | ``` 27 | -------------------------------------------------------------------------------- /server/node_modules/ignore-by-default/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | exports.directories = function () { 4 | return [ 5 | '.git', // Git repository files, see 6 | '.nyc_output', // Temporary directory where nyc stores coverage data, see 7 | '.sass-cache', // Cache folder for node-sass, see 8 | 'bower_components', // Where Bower packages are installed, see 9 | 'coverage', // Standard output directory for code coverage reports, see 10 | 'node_modules' // Where Node modules are installed, see 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | try { 2 | var util = require('util'); 3 | /* istanbul ignore next */ 4 | if (typeof util.inherits !== 'function') throw ''; 5 | module.exports = util.inherits; 6 | } catch (e) { 7 | /* istanbul ignore next */ 8 | module.exports = require('./inherits_browser.js'); 9 | } 10 | -------------------------------------------------------------------------------- /server/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 | if (superCtor) { 5 | ctor.super_ = superCtor 6 | ctor.prototype = Object.create(superCtor.prototype, { 7 | constructor: { 8 | value: ctor, 9 | enumerable: false, 10 | writable: true, 11 | configurable: true 12 | } 13 | }) 14 | } 15 | }; 16 | } else { 17 | // old school shim for old browsers 18 | module.exports = function inherits(ctor, superCtor) { 19 | if (superCtor) { 20 | ctor.super_ = superCtor 21 | var TempCtor = function () {} 22 | TempCtor.prototype = superCtor.prototype 23 | ctor.prototype = new TempCtor() 24 | ctor.prototype.constructor = ctor 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /server/node_modules/inherits/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inherits", 3 | "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", 4 | "version": "2.0.4", 5 | "keywords": [ 6 | "inheritance", 7 | "class", 8 | "klass", 9 | "oop", 10 | "object-oriented", 11 | "inherits", 12 | "browser", 13 | "browserify" 14 | ], 15 | "main": "./inherits.js", 16 | "browser": "./inherits_browser.js", 17 | "repository": "git://github.com/isaacs/inherits", 18 | "license": "ISC", 19 | "scripts": { 20 | "test": "tap" 21 | }, 22 | "devDependencies": { 23 | "tap": "^14.2.4" 24 | }, 25 | "files": [ 26 | "inherits.js", 27 | "inherits_browser.js" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /server/node_modules/is-binary-path/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Check if a file path is a binary file. 3 | 4 | @example 5 | ``` 6 | import isBinaryPath = require('is-binary-path'); 7 | 8 | isBinaryPath('source/unicorn.png'); 9 | //=> true 10 | 11 | isBinaryPath('source/unicorn.txt'); 12 | //=> false 13 | ``` 14 | */ 15 | declare function isBinaryPath(filePath: string): boolean; 16 | 17 | export = isBinaryPath; 18 | -------------------------------------------------------------------------------- /server/node_modules/is-binary-path/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const path = require('path'); 3 | const binaryExtensions = require('binary-extensions'); 4 | 5 | const extensions = new Set(binaryExtensions); 6 | 7 | module.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase()); 8 | -------------------------------------------------------------------------------- /server/node_modules/is-binary-path/readme.md: -------------------------------------------------------------------------------- 1 | # is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path) 2 | 3 | > Check if a file path is a binary file 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install is-binary-path 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | const isBinaryPath = require('is-binary-path'); 17 | 18 | isBinaryPath('source/unicorn.png'); 19 | //=> true 20 | 21 | isBinaryPath('source/unicorn.txt'); 22 | //=> false 23 | ``` 24 | 25 | 26 | ## Related 27 | 28 | - [binary-extensions](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions 29 | - [is-text-path](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file 30 | 31 | 32 | ## License 33 | 34 | MIT © [Sindre Sorhus](https://sindresorhus.com), [Paul Miller](https://paulmillr.com) 35 | -------------------------------------------------------------------------------- /server/node_modules/is-extglob/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * is-extglob 3 | * 4 | * Copyright (c) 2014-2016, Jon Schlinkert. 5 | * Licensed under the MIT License. 6 | */ 7 | 8 | module.exports = function isExtglob(str) { 9 | if (typeof str !== 'string' || str === '') { 10 | return false; 11 | } 12 | 13 | var match; 14 | while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { 15 | if (match[2]) return true; 16 | str = str.slice(match.index + match[0].length); 17 | } 18 | 19 | return false; 20 | }; 21 | -------------------------------------------------------------------------------- /server/node_modules/is-number/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * is-number 3 | * 4 | * Copyright (c) 2014-present, Jon Schlinkert. 5 | * Released under the MIT License. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | module.exports = function(num) { 11 | if (typeof num === 'number') { 12 | return num - num === 0; 13 | } 14 | if (typeof num === 'string' && num.trim() !== '') { 15 | return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); 16 | } 17 | return false; 18 | }; 19 | -------------------------------------------------------------------------------- /server/node_modules/isarray/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /server/node_modules/isarray/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | -------------------------------------------------------------------------------- /server/node_modules/isarray/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @node_modules/.bin/tape test.js 4 | 5 | .PHONY: test 6 | 7 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/jsonwebtoken/decode.js: -------------------------------------------------------------------------------- 1 | var jws = require('jws'); 2 | 3 | module.exports = function (jwt, options) { 4 | options = options || {}; 5 | var decoded = jws.decode(jwt, options); 6 | if (!decoded) { return null; } 7 | var payload = decoded.payload; 8 | 9 | //try parse the payload 10 | if(typeof payload === 'string') { 11 | try { 12 | var obj = JSON.parse(payload); 13 | if(obj !== null && typeof obj === 'object') { 14 | payload = obj; 15 | } 16 | } catch (e) { } 17 | } 18 | 19 | //return header if `complete` option is enabled. header includes claims 20 | //such as `kid` and `alg` used to select the key within a JWKS needed to 21 | //verify the signature 22 | if (options.complete === true) { 23 | return { 24 | header: decoded.header, 25 | payload: payload, 26 | signature: decoded.signature 27 | }; 28 | } 29 | return payload; 30 | }; 31 | -------------------------------------------------------------------------------- /server/node_modules/jsonwebtoken/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | decode: require('./decode'), 3 | verify: require('./verify'), 4 | sign: require('./sign'), 5 | JsonWebTokenError: require('./lib/JsonWebTokenError'), 6 | NotBeforeError: require('./lib/NotBeforeError'), 7 | TokenExpiredError: require('./lib/TokenExpiredError'), 8 | }; 9 | -------------------------------------------------------------------------------- /server/node_modules/jsonwebtoken/lib/JsonWebTokenError.js: -------------------------------------------------------------------------------- 1 | var JsonWebTokenError = function (message, error) { 2 | Error.call(this, message); 3 | if(Error.captureStackTrace) { 4 | Error.captureStackTrace(this, this.constructor); 5 | } 6 | this.name = 'JsonWebTokenError'; 7 | this.message = message; 8 | if (error) this.inner = error; 9 | }; 10 | 11 | JsonWebTokenError.prototype = Object.create(Error.prototype); 12 | JsonWebTokenError.prototype.constructor = JsonWebTokenError; 13 | 14 | module.exports = JsonWebTokenError; 15 | -------------------------------------------------------------------------------- /server/node_modules/jsonwebtoken/lib/NotBeforeError.js: -------------------------------------------------------------------------------- 1 | var JsonWebTokenError = require('./JsonWebTokenError'); 2 | 3 | var NotBeforeError = function (message, date) { 4 | JsonWebTokenError.call(this, message); 5 | this.name = 'NotBeforeError'; 6 | this.date = date; 7 | }; 8 | 9 | NotBeforeError.prototype = Object.create(JsonWebTokenError.prototype); 10 | 11 | NotBeforeError.prototype.constructor = NotBeforeError; 12 | 13 | module.exports = NotBeforeError; -------------------------------------------------------------------------------- /server/node_modules/jsonwebtoken/lib/TokenExpiredError.js: -------------------------------------------------------------------------------- 1 | var JsonWebTokenError = require('./JsonWebTokenError'); 2 | 3 | var TokenExpiredError = function (message, expiredAt) { 4 | JsonWebTokenError.call(this, message); 5 | this.name = 'TokenExpiredError'; 6 | this.expiredAt = expiredAt; 7 | }; 8 | 9 | TokenExpiredError.prototype = Object.create(JsonWebTokenError.prototype); 10 | 11 | TokenExpiredError.prototype.constructor = TokenExpiredError; 12 | 13 | module.exports = TokenExpiredError; -------------------------------------------------------------------------------- /server/node_modules/jsonwebtoken/lib/psSupported.js: -------------------------------------------------------------------------------- 1 | var semver = require('semver'); 2 | 3 | module.exports = semver.satisfies(process.version, '^6.12.0 || >=8.0.0'); 4 | -------------------------------------------------------------------------------- /server/node_modules/jsonwebtoken/lib/timespan.js: -------------------------------------------------------------------------------- 1 | var ms = require('ms'); 2 | 3 | module.exports = function (time, iat) { 4 | var timestamp = iat || Math.floor(Date.now() / 1000); 5 | 6 | if (typeof time === 'string') { 7 | var milliseconds = ms(time); 8 | if (typeof milliseconds === 'undefined') { 9 | return; 10 | } 11 | return Math.floor(timestamp + milliseconds / 1000); 12 | } else if (typeof time === 'number') { 13 | return timestamp + time; 14 | } else { 15 | return; 16 | } 17 | 18 | }; -------------------------------------------------------------------------------- /server/node_modules/jws/index.js: -------------------------------------------------------------------------------- 1 | /*global exports*/ 2 | var SignStream = require('./lib/sign-stream'); 3 | var VerifyStream = require('./lib/verify-stream'); 4 | 5 | var ALGORITHMS = [ 6 | 'HS256', 'HS384', 'HS512', 7 | 'RS256', 'RS384', 'RS512', 8 | 'PS256', 'PS384', 'PS512', 9 | 'ES256', 'ES384', 'ES512' 10 | ]; 11 | 12 | exports.ALGORITHMS = ALGORITHMS; 13 | exports.sign = SignStream.sign; 14 | exports.verify = VerifyStream.verify; 15 | exports.decode = VerifyStream.decode; 16 | exports.isValid = VerifyStream.isValid; 17 | exports.createSign = function createSign(opts) { 18 | return new SignStream(opts); 19 | }; 20 | exports.createVerify = function createVerify(opts) { 21 | return new VerifyStream(opts); 22 | }; 23 | -------------------------------------------------------------------------------- /server/node_modules/jws/lib/tostring.js: -------------------------------------------------------------------------------- 1 | /*global module*/ 2 | var Buffer = require('buffer').Buffer; 3 | 4 | module.exports = function toString(obj) { 5 | if (typeof obj === 'string') 6 | return obj; 7 | if (typeof obj === 'number' || Buffer.isBuffer(obj)) 8 | return obj.toString(); 9 | return JSON.stringify(obj); 10 | }; 11 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/lodash.includes/README.md: -------------------------------------------------------------------------------- 1 | # lodash.includes v4.3.0 2 | 3 | The [lodash](https://lodash.com/) method `_.includes` exported as a [Node.js](https://nodejs.org/) module. 4 | 5 | ## Installation 6 | 7 | Using npm: 8 | ```bash 9 | $ {sudo -H} npm i -g npm 10 | $ npm i --save lodash.includes 11 | ``` 12 | 13 | In Node.js: 14 | ```js 15 | var includes = require('lodash.includes'); 16 | ``` 17 | 18 | See the [documentation](https://lodash.com/docs#includes) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.includes) for more details. 19 | -------------------------------------------------------------------------------- /server/node_modules/lodash.includes/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lodash.includes", 3 | "version": "4.3.0", 4 | "description": "The lodash method `_.includes` exported as a module.", 5 | "homepage": "https://lodash.com/", 6 | "icon": "https://lodash.com/icon.svg", 7 | "license": "MIT", 8 | "keywords": "lodash-modularized, includes", 9 | "author": "John-David Dalton (http://allyoucanleet.com/)", 10 | "contributors": [ 11 | "John-David Dalton (http://allyoucanleet.com/)", 12 | "Blaine Bublitz (https://github.com/phated)", 13 | "Mathias Bynens (https://mathiasbynens.be/)" 14 | ], 15 | "repository": "lodash/lodash", 16 | "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } 17 | } 18 | -------------------------------------------------------------------------------- /server/node_modules/lodash.isboolean/README.md: -------------------------------------------------------------------------------- 1 | # lodash.isboolean v3.0.3 2 | 3 | The [lodash](https://lodash.com/) method `_.isBoolean` exported as a [Node.js](https://nodejs.org/) module. 4 | 5 | ## Installation 6 | 7 | Using npm: 8 | ```bash 9 | $ {sudo -H} npm i -g npm 10 | $ npm i --save lodash.isboolean 11 | ``` 12 | 13 | In Node.js: 14 | ```js 15 | var isBoolean = require('lodash.isboolean'); 16 | ``` 17 | 18 | See the [documentation](https://lodash.com/docs#isBoolean) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isboolean) for more details. 19 | -------------------------------------------------------------------------------- /server/node_modules/lodash.isboolean/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lodash.isboolean", 3 | "version": "3.0.3", 4 | "description": "The lodash method `_.isBoolean` exported as a module.", 5 | "homepage": "https://lodash.com/", 6 | "icon": "https://lodash.com/icon.svg", 7 | "license": "MIT", 8 | "keywords": "lodash-modularized, isboolean", 9 | "author": "John-David Dalton (http://allyoucanleet.com/)", 10 | "contributors": [ 11 | "John-David Dalton (http://allyoucanleet.com/)", 12 | "Blaine Bublitz (https://github.com/phated)", 13 | "Mathias Bynens (https://mathiasbynens.be/)" 14 | ], 15 | "repository": "lodash/lodash", 16 | "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } 17 | } 18 | -------------------------------------------------------------------------------- /server/node_modules/lodash.isinteger/README.md: -------------------------------------------------------------------------------- 1 | # lodash.isinteger v4.0.4 2 | 3 | The [lodash](https://lodash.com/) method `_.isInteger` exported as a [Node.js](https://nodejs.org/) module. 4 | 5 | ## Installation 6 | 7 | Using npm: 8 | ```bash 9 | $ {sudo -H} npm i -g npm 10 | $ npm i --save lodash.isinteger 11 | ``` 12 | 13 | In Node.js: 14 | ```js 15 | var isInteger = require('lodash.isinteger'); 16 | ``` 17 | 18 | See the [documentation](https://lodash.com/docs#isInteger) or [package source](https://github.com/lodash/lodash/blob/4.0.4-npm-packages/lodash.isinteger) for more details. 19 | -------------------------------------------------------------------------------- /server/node_modules/lodash.isinteger/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lodash.isinteger", 3 | "version": "4.0.4", 4 | "description": "The lodash method `_.isInteger` exported as a module.", 5 | "homepage": "https://lodash.com/", 6 | "icon": "https://lodash.com/icon.svg", 7 | "license": "MIT", 8 | "keywords": "lodash-modularized, isinteger", 9 | "author": "John-David Dalton (http://allyoucanleet.com/)", 10 | "contributors": [ 11 | "John-David Dalton (http://allyoucanleet.com/)", 12 | "Blaine Bublitz (https://github.com/phated)", 13 | "Mathias Bynens (https://mathiasbynens.be/)" 14 | ], 15 | "repository": "lodash/lodash", 16 | "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } 17 | } 18 | -------------------------------------------------------------------------------- /server/node_modules/lodash.isnumber/README.md: -------------------------------------------------------------------------------- 1 | # lodash.isnumber v3.0.3 2 | 3 | The [lodash](https://lodash.com/) method `_.isNumber` exported as a [Node.js](https://nodejs.org/) module. 4 | 5 | ## Installation 6 | 7 | Using npm: 8 | ```bash 9 | $ {sudo -H} npm i -g npm 10 | $ npm i --save lodash.isnumber 11 | ``` 12 | 13 | In Node.js: 14 | ```js 15 | var isNumber = require('lodash.isnumber'); 16 | ``` 17 | 18 | See the [documentation](https://lodash.com/docs#isNumber) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isnumber) for more details. 19 | -------------------------------------------------------------------------------- /server/node_modules/lodash.isnumber/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lodash.isnumber", 3 | "version": "3.0.3", 4 | "description": "The lodash method `_.isNumber` exported as a module.", 5 | "homepage": "https://lodash.com/", 6 | "icon": "https://lodash.com/icon.svg", 7 | "license": "MIT", 8 | "keywords": "lodash-modularized, isnumber", 9 | "author": "John-David Dalton (http://allyoucanleet.com/)", 10 | "contributors": [ 11 | "John-David Dalton (http://allyoucanleet.com/)", 12 | "Blaine Bublitz (https://github.com/phated)", 13 | "Mathias Bynens (https://mathiasbynens.be/)" 14 | ], 15 | "repository": "lodash/lodash", 16 | "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } 17 | } 18 | -------------------------------------------------------------------------------- /server/node_modules/lodash.isplainobject/README.md: -------------------------------------------------------------------------------- 1 | # lodash.isplainobject v4.0.6 2 | 3 | The [lodash](https://lodash.com/) method `_.isPlainObject` exported as a [Node.js](https://nodejs.org/) module. 4 | 5 | ## Installation 6 | 7 | Using npm: 8 | ```bash 9 | $ {sudo -H} npm i -g npm 10 | $ npm i --save lodash.isplainobject 11 | ``` 12 | 13 | In Node.js: 14 | ```js 15 | var isPlainObject = require('lodash.isplainobject'); 16 | ``` 17 | 18 | See the [documentation](https://lodash.com/docs#isPlainObject) or [package source](https://github.com/lodash/lodash/blob/4.0.6-npm-packages/lodash.isplainobject) for more details. 19 | -------------------------------------------------------------------------------- /server/node_modules/lodash.isplainobject/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lodash.isplainobject", 3 | "version": "4.0.6", 4 | "description": "The lodash method `_.isPlainObject` exported as a module.", 5 | "homepage": "https://lodash.com/", 6 | "icon": "https://lodash.com/icon.svg", 7 | "license": "MIT", 8 | "keywords": "lodash-modularized, isplainobject", 9 | "author": "John-David Dalton (http://allyoucanleet.com/)", 10 | "contributors": [ 11 | "John-David Dalton (http://allyoucanleet.com/)", 12 | "Blaine Bublitz (https://github.com/phated)", 13 | "Mathias Bynens (https://mathiasbynens.be/)" 14 | ], 15 | "repository": "lodash/lodash", 16 | "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } 17 | } 18 | -------------------------------------------------------------------------------- /server/node_modules/lodash.isstring/README.md: -------------------------------------------------------------------------------- 1 | # lodash.isstring v4.0.1 2 | 3 | The [lodash](https://lodash.com/) method `_.isString` exported as a [Node.js](https://nodejs.org/) module. 4 | 5 | ## Installation 6 | 7 | Using npm: 8 | ```bash 9 | $ {sudo -H} npm i -g npm 10 | $ npm i --save lodash.isstring 11 | ``` 12 | 13 | In Node.js: 14 | ```js 15 | var isString = require('lodash.isstring'); 16 | ``` 17 | 18 | See the [documentation](https://lodash.com/docs#isString) or [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash.isstring) for more details. 19 | -------------------------------------------------------------------------------- /server/node_modules/lodash.isstring/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lodash.isstring", 3 | "version": "4.0.1", 4 | "description": "The lodash method `_.isString` exported as a module.", 5 | "homepage": "https://lodash.com/", 6 | "icon": "https://lodash.com/icon.svg", 7 | "license": "MIT", 8 | "keywords": "lodash-modularized, isstring", 9 | "author": "John-David Dalton (http://allyoucanleet.com/)", 10 | "contributors": [ 11 | "John-David Dalton (http://allyoucanleet.com/)", 12 | "Blaine Bublitz (https://github.com/phated)", 13 | "Mathias Bynens (https://mathiasbynens.be/)" 14 | ], 15 | "repository": "lodash/lodash", 16 | "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } 17 | } 18 | -------------------------------------------------------------------------------- /server/node_modules/lodash.once/README.md: -------------------------------------------------------------------------------- 1 | # lodash.once v4.1.1 2 | 3 | The [lodash](https://lodash.com/) method `_.once` exported as a [Node.js](https://nodejs.org/) module. 4 | 5 | ## Installation 6 | 7 | Using npm: 8 | ```bash 9 | $ {sudo -H} npm i -g npm 10 | $ npm i --save lodash.once 11 | ``` 12 | 13 | In Node.js: 14 | ```js 15 | var once = require('lodash.once'); 16 | ``` 17 | 18 | See the [documentation](https://lodash.com/docs#once) or [package source](https://github.com/lodash/lodash/blob/4.1.1-npm-packages/lodash.once) for more details. 19 | -------------------------------------------------------------------------------- /server/node_modules/lodash.once/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lodash.once", 3 | "version": "4.1.1", 4 | "description": "The lodash method `_.once` exported as a module.", 5 | "homepage": "https://lodash.com/", 6 | "icon": "https://lodash.com/icon.svg", 7 | "license": "MIT", 8 | "keywords": "lodash-modularized, once", 9 | "author": "John-David Dalton (http://allyoucanleet.com/)", 10 | "contributors": [ 11 | "John-David Dalton (http://allyoucanleet.com/)", 12 | "Blaine Bublitz (https://github.com/phated)", 13 | "Mathias Bynens (https://mathiasbynens.be/)" 14 | ], 15 | "repository": "lodash/lodash", 16 | "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } 17 | } 18 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/media-typer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "media-typer", 3 | "description": "Simple RFC 6838 media type parser and formatter", 4 | "version": "0.3.0", 5 | "author": "Douglas Christopher Wilson ", 6 | "license": "MIT", 7 | "repository": "jshttp/media-typer", 8 | "devDependencies": { 9 | "istanbul": "0.3.2", 10 | "mocha": "~1.21.4", 11 | "should": "~4.0.4" 12 | }, 13 | "files": [ 14 | "LICENSE", 15 | "HISTORY.md", 16 | "index.js" 17 | ], 18 | "engines": { 19 | "node": ">= 0.6" 20 | }, 21 | "scripts": { 22 | "test": "mocha --reporter spec --check-leaks --bail test/", 23 | "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", 24 | "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /server/node_modules/memory-pager/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '4' 4 | - '6' 5 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/mime-db/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * mime-db 3 | * Copyright(c) 2014 Jonathan Ong 4 | * Copyright(c) 2015-2022 Douglas Christopher Wilson 5 | * MIT Licensed 6 | */ 7 | 8 | /** 9 | * Module exports. 10 | */ 11 | 12 | module.exports = require('./db.json') 13 | -------------------------------------------------------------------------------- /server/node_modules/mime/.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/server/node_modules/mime/.npmignore -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/minimatch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Isaac Z. Schlueter (http://blog.izs.me)", 3 | "name": "minimatch", 4 | "description": "a glob matcher in javascript", 5 | "version": "3.1.2", 6 | "publishConfig": { 7 | "tag": "v3-legacy" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git://github.com/isaacs/minimatch.git" 12 | }, 13 | "main": "minimatch.js", 14 | "scripts": { 15 | "test": "tap", 16 | "preversion": "npm test", 17 | "postversion": "npm publish", 18 | "postpublish": "git push origin --all; git push origin --tags" 19 | }, 20 | "engines": { 21 | "node": "*" 22 | }, 23 | "dependencies": { 24 | "brace-expansion": "^1.1.7" 25 | }, 26 | "devDependencies": { 27 | "tap": "^15.1.6" 28 | }, 29 | "license": "ISC", 30 | "files": [ 31 | "minimatch.js" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /server/node_modules/mongodb/lib/async/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "ecmaVersion": 2018 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 = '5.0'; 5 | const MIN_SUPPORTED_WIRE_VERSION = 2; 6 | const MAX_SUPPORTED_WIRE_VERSION = 13; 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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/mongoose-legacy-pluralize/README.md: -------------------------------------------------------------------------------- 1 | # mongoose-legacy-pluralize 2 | Legacy pluralization logic for mongoose 3 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/mongoose/browser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Export lib/mongoose 3 | * 4 | */ 5 | 6 | 'use strict'; 7 | 8 | module.exports = require('./lib/browser'); 9 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/mongoose/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Export lib/mongoose 4 | * 5 | */ 6 | 7 | 'use strict'; 8 | 9 | module.exports = require('./lib/'); 10 | -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/mongoose/lib/drivers/SPEC.md: -------------------------------------------------------------------------------- 1 | 2 | # Driver Spec 3 | 4 | TODO 5 | -------------------------------------------------------------------------------- /server/node_modules/mongoose/lib/drivers/browser/ReadPreference.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * ignore 3 | */ 4 | 5 | 'use strict'; 6 | 7 | module.exports = function() {}; 8 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/mongoose/lib/drivers/browser/decimal128.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * ignore 3 | */ 4 | 5 | 'use strict'; 6 | 7 | module.exports = require('bson').Decimal128; 8 | -------------------------------------------------------------------------------- /server/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.getConnection = () => function() { 12 | throw new Error('Cannot create a connection from browser library'); 13 | }; 14 | exports.Decimal128 = require('./decimal128'); 15 | exports.ObjectId = require('./objectid'); 16 | exports.ReadPreference = require('./ReadPreference'); 17 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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'); 12 | exports.getConnection = () => require('./connection'); -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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; -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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.discriminators, value[discriminatorKey]); 18 | if (constructorByValue) { 19 | Constructor = constructorByValue; 20 | } 21 | } 22 | } 23 | 24 | return Constructor; 25 | }; -------------------------------------------------------------------------------- /server/node_modules/mongoose/lib/helpers/discriminator/getDiscriminatorByValue.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const areDiscriminatorValuesEqual = require('./areDiscriminatorValuesEqual'); 4 | 5 | /*! 6 | * returns discriminator by discriminatorMapping.value 7 | * 8 | * @param {Model} model 9 | * @param {string} value 10 | */ 11 | 12 | module.exports = function getDiscriminatorByValue(discriminators, value) { 13 | if (discriminators == null) { 14 | return null; 15 | } 16 | for (const name of Object.keys(discriminators)) { 17 | const it = discriminators[name]; 18 | if ( 19 | it.schema && 20 | it.schema.discriminatorMapping && 21 | areDiscriminatorValuesEqual(it.schema.discriminatorMapping.value, value) 22 | ) { 23 | return it; 24 | } 25 | } 26 | return null; 27 | }; -------------------------------------------------------------------------------- /server/node_modules/mongoose/lib/helpers/discriminator/getSchemaDiscriminatorByValue.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const areDiscriminatorValuesEqual = require('./areDiscriminatorValuesEqual'); 4 | 5 | /*! 6 | * returns discriminator by discriminatorMapping.value 7 | * 8 | * @param {Schema} schema 9 | * @param {string} value 10 | */ 11 | 12 | module.exports = function getSchemaDiscriminatorByValue(schema, value) { 13 | if (schema == null || schema.discriminators == null) { 14 | return null; 15 | } 16 | for (const key of Object.keys(schema.discriminators)) { 17 | const discriminatorSchema = schema.discriminators[key]; 18 | if (discriminatorSchema.discriminatorMapping == null) { 19 | continue; 20 | } 21 | if (areDiscriminatorValuesEqual(discriminatorSchema.discriminatorMapping.value, value)) { 22 | return discriminatorSchema; 23 | } 24 | } 25 | return null; 26 | }; -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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; -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | const nextTick = process.nextTick.bind(process); 11 | 12 | module.exports = function immediate(cb) { 13 | return nextTick(cb); 14 | }; 15 | -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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; -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/node_modules/mongoose/lib/helpers/populate/leanPopulateMap.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * ignore 5 | */ 6 | 7 | module.exports = new WeakMap(); -------------------------------------------------------------------------------- /server/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 | if (typeof cur !== 'object') { 14 | return void 0; 15 | } 16 | if (val === void 0) { 17 | return void 0; 18 | } 19 | cur[path] = val; 20 | return val; 21 | } 22 | 23 | 24 | // Support populating paths under maps using `map.$*.subpath` 25 | if (path === '$*') { 26 | return cur instanceof Map ? 27 | Array.from(cur.values()) : 28 | Object.keys(cur).map(key => cur[key]); 29 | } 30 | return cur[path]; 31 | }; -------------------------------------------------------------------------------- /server/node_modules/mongoose/lib/helpers/populate/removeDeselectedForeignField.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const get = require('../get'); 4 | const mpath = require('mpath'); 5 | const parseProjection = require('../projection/parseProjection'); 6 | 7 | /*! 8 | * ignore 9 | */ 10 | 11 | module.exports = function removeDeselectedForeignField(foreignFields, options, docs) { 12 | const projection = parseProjection(get(options, 'select', null), true) || 13 | parseProjection(get(options, 'options.select', null), true); 14 | 15 | if (projection == null) { 16 | return; 17 | } 18 | for (const foreignField of foreignFields) { 19 | if (!projection.hasOwnProperty('-' + foreignField)) { 20 | continue; 21 | } 22 | 23 | for (const val of docs) { 24 | if (val.$__ != null) { 25 | mpath.unset(foreignField, val._doc); 26 | } else { 27 | mpath.unset(foreignField, val); 28 | } 29 | } 30 | } 31 | }; -------------------------------------------------------------------------------- /server/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 | } -------------------------------------------------------------------------------- /server/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 | } 9 | 10 | if (typeof jest !== 'undefined' && process.nextTick.toString().indexOf('nextTick') === -1) { 11 | console.warn('Mongoose: looks like you\'re trying to test a Mongoose app ' + 12 | 'with Jest\'s mock timers enabled. Please make sure you read ' + 13 | 'Mongoose\'s docs on configuring Jest to test Node.js apps: ' + 14 | 'http://mongoosejs.com/docs/jest.html'); 15 | } -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | if (projection == null) { 11 | return null; 12 | } 13 | 14 | const keys = Object.keys(projection); 15 | let ki = keys.length; 16 | let exclude = null; 17 | 18 | if (ki === 1 && keys[0] === '_id') { 19 | exclude = !!projection[keys[ki]]; 20 | } else { 21 | while (ki--) { 22 | // Does this projection explicitly define inclusion/exclusion? 23 | // Explicitly avoid `$meta` and `$slice` 24 | if (keys[ki] !== '_id' && isDefiningProjection(projection[keys[ki]])) { 25 | exclude = !projection[keys[ki]]; 26 | break; 27 | } 28 | } 29 | } 30 | 31 | return exclude; 32 | }; 33 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/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 | } -------------------------------------------------------------------------------- /server/node_modules/mongoose/lib/helpers/schema/merge.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function merge(s1, s2, skipConflictingPaths) { 4 | const paths = Object.keys(s2.tree); 5 | const pathsToAdd = {}; 6 | for (const key of paths) { 7 | if (skipConflictingPaths && (s1.paths[key] || s1.nested[key] || s1.singleNestedPaths[key])) { 8 | continue; 9 | } 10 | pathsToAdd[key] = s2.tree[key]; 11 | } 12 | s1.add(pathsToAdd); 13 | 14 | s1.callQueue = s1.callQueue.concat(s2.callQueue); 15 | s1.method(s2.methods); 16 | s1.static(s2.statics); 17 | 18 | for (const query in s2.query) { 19 | s1.query[query] = s2.query[query]; 20 | } 21 | 22 | for (const virtual in s2.virtuals) { 23 | s1.virtuals[virtual] = s2.virtuals[virtual].clone(); 24 | } 25 | 26 | s1.s.hooks.merge(s2.s.hooks, false); 27 | }; 28 | -------------------------------------------------------------------------------- /server/node_modules/mongoose/lib/helpers/specialProperties.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = new Set(['__proto__', 'constructor', 'prototype']); -------------------------------------------------------------------------------- /server/node_modules/mongoose/lib/helpers/topology/allServersUnknown.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const getConstructorName = require('../getConstructorName'); 4 | 5 | module.exports = function allServersUnknown(topologyDescription) { 6 | if (getConstructorName(topologyDescription) !== 'TopologyDescription') { 7 | return false; 8 | } 9 | 10 | const servers = Array.from(topologyDescription.servers.values()); 11 | return servers.length > 0 && servers.every(server => server.type === 'Unknown'); 12 | }; -------------------------------------------------------------------------------- /server/node_modules/mongoose/lib/helpers/topology/isAtlas.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const getConstructorName = require('../getConstructorName'); 4 | 5 | module.exports = function isAtlas(topologyDescription) { 6 | if (getConstructorName(topologyDescription) !== 'TopologyDescription') { 7 | return false; 8 | } 9 | 10 | const hostnames = Array.from(topologyDescription.servers.keys()); 11 | return hostnames.length > 0 && 12 | hostnames.every(host => host.endsWith('.mongodb.net:27017')); 13 | }; -------------------------------------------------------------------------------- /server/node_modules/mongoose/lib/helpers/topology/isSSLError.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const getConstructorName = require('../getConstructorName'); 4 | 5 | const nonSSLMessage = 'Client network socket disconnected before secure TLS ' + 6 | 'connection was established'; 7 | 8 | module.exports = function isSSLError(topologyDescription) { 9 | if (getConstructorName(topologyDescription) !== 'TopologyDescription') { 10 | return false; 11 | } 12 | 13 | const descriptions = Array.from(topologyDescription.servers.values()); 14 | return descriptions.length > 0 && 15 | descriptions.every(descr => descr.error && descr.error.message.indexOf(nonSSLMessage) !== -1); 16 | }; -------------------------------------------------------------------------------- /server/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 | }; -------------------------------------------------------------------------------- /server/node_modules/mongoose/lib/helpers/update/updatedPathsByArrayFilter.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const modifiedPaths = require('./modifiedPaths'); 4 | 5 | module.exports = function updatedPathsByArrayFilter(update) { 6 | const updatedPaths = modifiedPaths(update); 7 | 8 | return Object.keys(updatedPaths).reduce((cur, path) => { 9 | const matches = path.match(/\$\[[^\]]+\]/g); 10 | if (matches == null) { 11 | return cur; 12 | } 13 | for (const match of matches) { 14 | const firstMatch = path.indexOf(match); 15 | if (firstMatch !== path.lastIndexOf(match)) { 16 | throw new Error(`Path '${path}' contains the same array filter multiple times`); 17 | } 18 | cur[match.substring(2, match.length - 1)] = path. 19 | substr(0, firstMatch - 1). 20 | replace(/\$\[[^\]]+\]/g, '0'); 21 | } 22 | return cur; 23 | }, {}); 24 | }; -------------------------------------------------------------------------------- /server/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 | useProjection: false 15 | }; 16 | -------------------------------------------------------------------------------- /server/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 | }); -------------------------------------------------------------------------------- /server/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; -------------------------------------------------------------------------------- /server/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; -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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'); -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | 'sanitizeProjection', 23 | 'selectPopulatedPaths', 24 | 'setDefaultsOnInsert', 25 | 'strict', 26 | 'strictQuery', 27 | 'toJSON', 28 | 'toObject', 29 | 'typePojoToMixed', 30 | 'useCreateIndex', 31 | 'useFindAndModify', 32 | 'useNewUrlParser', 33 | 'usePushEach', 34 | 'useUnifiedTopology' 35 | ]); 36 | 37 | module.exports = VALID_OPTIONS; 38 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/mpath/Makefile: -------------------------------------------------------------------------------- 1 | bench: 2 | node bench.js 3 | 4 | .PHONY: test 5 | -------------------------------------------------------------------------------- /server/node_modules/mpath/bench.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/server/node_modules/mpath/bench.log -------------------------------------------------------------------------------- /server/node_modules/mpath/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = exports = require('./lib'); 4 | -------------------------------------------------------------------------------- /server/node_modules/mpath/test/.eslintrc.yml: -------------------------------------------------------------------------------- 1 | env: 2 | mocha: true 3 | rules: 4 | no-unused-vars: off -------------------------------------------------------------------------------- /server/node_modules/mquery/.eslintignore: -------------------------------------------------------------------------------- 1 | coverage/ -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/mquery/SECURITY.md: -------------------------------------------------------------------------------- 1 | Please follow the instructions on [Tidelift's security page](https://tidelift.com/docs/security) to report a security issue. 2 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/mquery/node_modules/debug/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve 2 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/mquery/node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/mquery/test/collection/browser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/server/node_modules/mquery/test/collection/browser.js -------------------------------------------------------------------------------- /server/node_modules/mquery/test/collection/mongo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/server/node_modules/mquery/test/collection/mongo.js -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/ms/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ms", 3 | "version": "2.0.0", 4 | "description": "Tiny milisecond conversion utility", 5 | "repository": "zeit/ms", 6 | "main": "./index", 7 | "files": [ 8 | "index.js" 9 | ], 10 | "scripts": { 11 | "precommit": "lint-staged", 12 | "lint": "eslint lib/* bin/*", 13 | "test": "mocha tests.js" 14 | }, 15 | "eslintConfig": { 16 | "extends": "eslint:recommended", 17 | "env": { 18 | "node": true, 19 | "es6": true 20 | } 21 | }, 22 | "lint-staged": { 23 | "*.js": [ 24 | "npm run lint", 25 | "prettier --single-quote --write", 26 | "git add" 27 | ] 28 | }, 29 | "license": "MIT", 30 | "devDependencies": { 31 | "eslint": "3.19.0", 32 | "expect.js": "0.3.1", 33 | "husky": "0.13.3", 34 | "lint-staged": "3.4.1", 35 | "mocha": "3.4.1" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /server/node_modules/nodemon/bin/nodemon.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const cli = require('../lib/cli'); 4 | const nodemon = require('../lib/'); 5 | const options = cli.parse(process.argv); 6 | 7 | nodemon(options); 8 | 9 | const fs = require('fs'); 10 | 11 | // checks for available update and returns an instance 12 | const pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json')); 13 | 14 | if (pkg.version.indexOf('0.0.0') !== 0 && options.noUpdateNotifier !== true) { 15 | require('simple-update-notifier')({ pkg }); 16 | } 17 | -------------------------------------------------------------------------------- /server/node_modules/nodemon/doc/cli/authors.txt: -------------------------------------------------------------------------------- 1 | 2 | Remy Sharp - author and maintainer 3 | https://github.com/remy 4 | https://twitter.com/rem 5 | 6 | Contributors: https://github.com/remy/nodemon/graphs/contributors ❤︎ 7 | 8 | Please help make nodemon better: https://github.com/remy/nodemon/ 9 | -------------------------------------------------------------------------------- /server/node_modules/nodemon/doc/cli/logo.txt: -------------------------------------------------------------------------------- 1 | ; ; 2 | kO. x0 3 | KMX, .:x0kc. 'KMN 4 | 0MMM0: 'oKMMMMMMMXd, ;OMMMX 5 | oMMMMMWKOONMMMMMMMMMMMMMWOOKWMMMMMx 6 | OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK. 7 | .oWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMd. 8 | KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN 9 | KMMMMMMMMMMMMMMW0k0WMMMMMMMMMMMMMMW 10 | KMMMMMMMMMMMNk:. :xNMMMMMMMMMMMW 11 | KMMMMMMMMMMK OMMMMMMMMMMW 12 | KMMMMMMMMMMO xMMMMMMMMMMN 13 | KMMMMMMMMMMO xMMMMMMMMMMN 14 | KMMMMMMMMMMO xMMMMMMMMMMN 15 | KMMMMMMMMMMO xMMMMMMMMMMN 16 | KMMMMMMMMMMO xMMMMMMMMMMN 17 | KMMMMMMMMMNc ;NMMMMMMMMMN 18 | KMMMMMW0o' .lOWMMMMMN 19 | KMMKd; ,oKMMN 20 | kX: ,K0 -------------------------------------------------------------------------------- /server/node_modules/nodemon/doc/cli/topics.txt: -------------------------------------------------------------------------------- 1 | 2 | options .................. show all available nodemon options 3 | config ................... default config options using nodemon.json 4 | authors .................. contributors to this project 5 | logo ..................... <3 6 | whoami ................... I, AM, NODEMON \o/ 7 | 8 | Please support https://github.com/remy/nodemon/ 9 | -------------------------------------------------------------------------------- /server/node_modules/nodemon/doc/cli/usage.txt: -------------------------------------------------------------------------------- 1 | Usage: nodemon [nodemon options] [script.js] [args] 2 | 3 | See "nodemon --help" for more. 4 | -------------------------------------------------------------------------------- /server/node_modules/nodemon/lib/help/index.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var path = require('path'); 3 | const supportsColor = require('supports-color'); 4 | 5 | module.exports = help; 6 | 7 | const highlight = supportsColor.stdout ? '\x1B\[$1m' : ''; 8 | 9 | function help(item) { 10 | if (!item) { 11 | item = 'help'; 12 | } else if (item === true) { // if used with -h or --help and no args 13 | item = 'help'; 14 | } 15 | 16 | // cleanse the filename to only contain letters 17 | // aka: /\W/g but figured this was eaiser to read 18 | item = item.replace(/[^a-z]/gi, ''); 19 | 20 | try { 21 | var dir = path.join(__dirname, '..', '..', 'doc', 'cli', item + '.txt'); 22 | var body = fs.readFileSync(dir, 'utf8'); 23 | return body.replace(/\\x1B\[(.)m/g, highlight); 24 | } catch (e) { 25 | return '"' + item + '" help can\'t be found'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /server/node_modules/nodemon/lib/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./nodemon'); -------------------------------------------------------------------------------- /server/node_modules/nodemon/lib/monitor/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | run: require('./run'), 3 | watch: require('./watch').watch, 4 | }; 5 | -------------------------------------------------------------------------------- /server/node_modules/nodemon/lib/monitor/signals.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | SIGHUP: 1, 3 | SIGINT: 2, 4 | SIGQUIT: 3, 5 | SIGILL: 4, 6 | SIGTRAP: 5, 7 | SIGABRT: 6, 8 | SIGBUS: 7, 9 | SIGFPE: 8, 10 | SIGKILL: 9, 11 | SIGUSR1: 10, 12 | SIGSEGV: 11, 13 | SIGUSR2: 12, 14 | SIGPIPE: 13, 15 | SIGALRM: 14, 16 | SIGTERM: 15, 17 | SIGSTKFLT: 16, 18 | SIGCHLD: 17, 19 | SIGCONT: 18, 20 | SIGSTOP: 19, 21 | SIGTSTP: 20, 22 | SIGTTIN: 21, 23 | SIGTTOU: 22, 24 | SIGURG: 23, 25 | SIGXCPU: 24, 26 | SIGXFSZ: 25, 27 | SIGVTALRM: 26, 28 | SIGPROF: 27, 29 | SIGWINCH: 28, 30 | SIGIO: 29, 31 | SIGPWR: 30, 32 | SIGSYS: 31, 33 | SIGRTMIN: 35, 34 | } 35 | -------------------------------------------------------------------------------- /server/node_modules/nodemon/lib/utils/colour.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Encodes a string in a colour: red, yellow or green 3 | * @param {String} c colour to highlight in 4 | * @param {String} str the string to encode 5 | * @return {String} coloured string for terminal printing 6 | */ 7 | function colour(c, str) { 8 | return (colour[c] || colour.black) + str + colour.black; 9 | } 10 | 11 | function strip(str) { 12 | re.lastIndex = 0; // reset position 13 | return str.replace(re, ''); 14 | } 15 | 16 | colour.red = '\x1B[31m'; 17 | colour.yellow = '\x1B[33m'; 18 | colour.green = '\x1B[32m'; 19 | colour.black = '\x1B[39m'; 20 | 21 | var reStr = Object.keys(colour).map(key => colour[key]).join('|'); 22 | var re = new RegExp(('(' + reStr + ')').replace(/\[/g, '\\['), 'g'); 23 | 24 | colour.strip = strip; 25 | 26 | module.exports = colour; 27 | -------------------------------------------------------------------------------- /server/node_modules/nodemon/node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /server/node_modules/nodemon/node_modules/debug/src/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /** 4 | * Detect Electron renderer / nwjs process, which is node, but we should 5 | * treat as a browser. 6 | */ 7 | if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { 8 | module.exports = require('./browser.js'); 9 | } else { 10 | module.exports = require('./node.js'); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /server/node_modules/nopt/.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/server/node_modules/nopt/.npmignore -------------------------------------------------------------------------------- /server/node_modules/nopt/package.json: -------------------------------------------------------------------------------- 1 | { "name" : "nopt" 2 | , "version" : "1.0.10" 3 | , "description" : "Option parsing for Node, supporting types, shorthands, etc. Used by npm." 4 | , "author" : "Isaac Z. Schlueter (http://blog.izs.me/)" 5 | , "main" : "lib/nopt.js" 6 | , "scripts" : { "test" : "node lib/nopt.js" } 7 | , "repository" : "http://github.com/isaacs/nopt" 8 | , "bin" : "./bin/nopt.js" 9 | , "license" : 10 | { "type" : "MIT" 11 | , "url" : "https://github.com/isaacs/nopt/raw/master/LICENSE" } 12 | , "dependencies" : { "abbrev" : "1" }} 13 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/path-to-regexp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "path-to-regexp", 3 | "description": "Express style path to RegExp utility", 4 | "version": "0.1.7", 5 | "files": [ 6 | "index.js", 7 | "LICENSE" 8 | ], 9 | "scripts": { 10 | "test": "istanbul cover _mocha -- -R spec" 11 | }, 12 | "keywords": [ 13 | "express", 14 | "regexp" 15 | ], 16 | "component": { 17 | "scripts": { 18 | "path-to-regexp": "index.js" 19 | } 20 | }, 21 | "license": "MIT", 22 | "repository": { 23 | "type": "git", 24 | "url": "https://github.com/component/path-to-regexp.git" 25 | }, 26 | "devDependencies": { 27 | "mocha": "^1.17.1", 28 | "istanbul": "^0.2.6" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /server/node_modules/picomatch/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./lib/picomatch'); 4 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/pstree.remy/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | cache: 3 | directories: 4 | - ~/.npm 5 | notifications: 6 | email: false 7 | node_js: 8 | - '8' 9 | -------------------------------------------------------------------------------- /server/node_modules/pstree.remy/README.md: -------------------------------------------------------------------------------- 1 | # pstree.remy 2 | 3 | > Cross platform ps-tree (including unix flavours without ps) 4 | 5 | ## Installation 6 | 7 | ```shel 8 | npm install pstree.remy 9 | ``` 10 | 11 | ## Usage 12 | 13 | ```js 14 | const psTree = psTree require('pstree.remy'); 15 | 16 | psTree(PID, (err, pids) => { 17 | if (err) { 18 | console.error(err); 19 | } 20 | console.log(pids) 21 | }); 22 | 23 | console.log(psTree.hasPS 24 | ? "This platform has the ps shell command" 25 | : "This platform does not have the ps shell command"); 26 | ``` 27 | -------------------------------------------------------------------------------- /server/node_modules/pstree.remy/tests/fixtures/index.js: -------------------------------------------------------------------------------- 1 | const spawn = require('child_process').spawn; 2 | function run() { 3 | spawn( 4 | 'sh', 5 | ['-c', 'node -e "setInterval(() => console.log(`running`), 200)"'], 6 | { 7 | stdio: 'pipe', 8 | } 9 | ); 10 | } 11 | 12 | var runCallCount = process.argv[2] || 1; 13 | for (var i = 0; i < runCallCount; i++) run(); 14 | -------------------------------------------------------------------------------- /server/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 | quote_type = single 12 | 13 | [test/*] 14 | max_line_length = off 15 | 16 | [LICENSE.md] 17 | indent_size = off 18 | 19 | [*.md] 20 | max_line_length = off 21 | 22 | [*.json] 23 | max_line_length = off 24 | 25 | [Makefile] 26 | max_line_length = off 27 | 28 | [CHANGELOG.md] 29 | indent_style = space 30 | indent_size = 2 31 | 32 | [LICENSE] 33 | indent_size = 2 34 | max_line_length = off 35 | 36 | [coverage/**/*] 37 | indent_size = off 38 | indent_style = off 39 | indent = off 40 | max_line_length = off 41 | -------------------------------------------------------------------------------- /server/node_modules/qs/lib/formats.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var replace = String.prototype.replace; 4 | var percentTwenties = /%20/g; 5 | 6 | var Format = { 7 | RFC1738: 'RFC1738', 8 | RFC3986: 'RFC3986' 9 | }; 10 | 11 | module.exports = { 12 | 'default': Format.RFC3986, 13 | formatters: { 14 | RFC1738: function (value) { 15 | return replace.call(value, percentTwenties, '+'); 16 | }, 17 | RFC3986: function (value) { 18 | return String(value); 19 | } 20 | }, 21 | RFC1738: Format.RFC1738, 22 | RFC3986: Format.RFC3986 23 | }; 24 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/readable-stream/duplex-browser.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/_stream_duplex.js'); 2 | -------------------------------------------------------------------------------- /server/node_modules/readable-stream/duplex.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./readable').Duplex 2 | -------------------------------------------------------------------------------- /server/node_modules/readable-stream/lib/internal/streams/stream-browser.js: -------------------------------------------------------------------------------- 1 | module.exports = require('events').EventEmitter; 2 | -------------------------------------------------------------------------------- /server/node_modules/readable-stream/lib/internal/streams/stream.js: -------------------------------------------------------------------------------- 1 | module.exports = require('stream'); 2 | -------------------------------------------------------------------------------- /server/node_modules/readable-stream/passthrough.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./readable').PassThrough 2 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/readable-stream/transform.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./readable').Transform 2 | -------------------------------------------------------------------------------- /server/node_modules/readable-stream/writable-browser.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/_stream_writable.js'); 2 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/regexp-clone/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.0.1 / 2013-04-17 3 | ================== 4 | 5 | * initial commit 6 | -------------------------------------------------------------------------------- /server/node_modules/regexp-clone/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha $(T) --async-only $(TESTS) 4 | 5 | .PHONY: test 6 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/saslprep/.gitattributes: -------------------------------------------------------------------------------- 1 | *.mem binary 2 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/saslprep/code-points.mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Liam1809/Daily-Nutrients-API/e1299084f831a4df9321f1c2673d4bf317934f72/server/node_modules/saslprep/code-points.mem -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/setprototypeof/index.d.ts: -------------------------------------------------------------------------------- 1 | declare function setPrototypeOf(o: any, proto: object | null): any; 2 | export = setPrototypeOf; 3 | -------------------------------------------------------------------------------- /server/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 (!Object.prototype.hasOwnProperty.call(obj, prop)) { 13 | obj[prop] = proto[prop] 14 | } 15 | } 16 | return obj 17 | } 18 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/sift/index.d.ts: -------------------------------------------------------------------------------- 1 | import sift from "./lib"; 2 | 3 | export default sift; 4 | export * from "./lib"; 5 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/sliced/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sliced", 3 | "version": "1.0.1", 4 | "description": "A faster Node.js alternative to Array.prototype.slice.call(arguments)", 5 | "main": "index.js", 6 | "files": [ 7 | "LICENSE", 8 | "README.md", 9 | "index.js" 10 | ], 11 | "scripts": { 12 | "test": "make test" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git://github.com/aheckmann/sliced" 17 | }, 18 | "keywords": [ 19 | "arguments", 20 | "slice", 21 | "array" 22 | ], 23 | "author": "Aaron Heckmann ", 24 | "license": "MIT", 25 | "devDependencies": { 26 | "mocha": "1.5.0", 27 | "benchmark": "~1.0.0" 28 | }, 29 | "dependencies": {} 30 | } 31 | -------------------------------------------------------------------------------- /server/node_modules/sparse-bitfield/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/sparse-bitfield/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sparse-bitfield", 3 | "version": "3.0.3", 4 | "description": "Bitfield that allocates a series of small buffers to support sparse bits without allocating a massive buffer", 5 | "main": "index.js", 6 | "dependencies": { 7 | "memory-pager": "^1.0.2" 8 | }, 9 | "devDependencies": { 10 | "buffer-alloc": "^1.1.0", 11 | "standard": "^9.0.0", 12 | "tape": "^4.6.3" 13 | }, 14 | "scripts": { 15 | "test": "standard && tape test.js" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "https://github.com/mafintosh/sparse-bitfield.git" 20 | }, 21 | "author": "Mathias Buus (@mafintosh)", 22 | "license": "MIT", 23 | "bugs": { 24 | "url": "https://github.com/mafintosh/sparse-bitfield/issues" 25 | }, 26 | "homepage": "https://github.com/mafintosh/sparse-bitfield" 27 | } 28 | -------------------------------------------------------------------------------- /server/node_modules/supports-color/browser.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = { 3 | stdout: false, 4 | stderr: false 5 | }; 6 | -------------------------------------------------------------------------------- /server/node_modules/toidentifier/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * toidentifier 3 | * Copyright(c) 2016 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = toIdentifier 15 | 16 | /** 17 | * Trasform the given string into a JavaScript identifier 18 | * 19 | * @param {string} str 20 | * @returns {string} 21 | * @public 22 | */ 23 | 24 | function toIdentifier (str) { 25 | return str 26 | .split(' ') 27 | .map(function (token) { 28 | return token.slice(0, 1).toUpperCase() + token.slice(1) 29 | }) 30 | .join('') 31 | .replace(/[^ _0-9a-z]/gi, '') 32 | } 33 | -------------------------------------------------------------------------------- /server/node_modules/touch/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 | -------------------------------------------------------------------------------- /server/node_modules/undefsafe/.jscsrc: -------------------------------------------------------------------------------- 1 | { 2 | "preset": "node-style-guide", 3 | "requireCapitalizedComments": null, 4 | "requireSpacesInAnonymousFunctionExpression": { 5 | "beforeOpeningCurlyBrace": true, 6 | "beforeOpeningRoundBrace": true 7 | }, 8 | "disallowSpacesInNamedFunctionExpression": { 9 | "beforeOpeningRoundBrace": true 10 | }, 11 | "excludeFiles": ["node_modules/**"], 12 | "disallowSpacesInFunction": null 13 | } 14 | -------------------------------------------------------------------------------- /server/node_modules/undefsafe/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "browser": false, 3 | "camelcase": true, 4 | "curly": true, 5 | "devel": true, 6 | "eqeqeq": true, 7 | "forin": true, 8 | "indent": 2, 9 | "noarg": true, 10 | "node": true, 11 | "quotmark": "single", 12 | "undef": true, 13 | "strict": false, 14 | "unused": true 15 | } 16 | 17 | -------------------------------------------------------------------------------- /server/node_modules/undefsafe/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | cache: 4 | directories: 5 | - node_modules 6 | notifications: 7 | email: false 8 | node_js: 9 | - '4' 10 | before_install: 11 | - npm i -g npm@^2.0.0 12 | before_script: 13 | - npm prune 14 | after_success: 15 | - npm run semantic-release 16 | branches: 17 | except: 18 | - "/^v\\d+\\.\\d+\\.\\d+$/" 19 | -------------------------------------------------------------------------------- /server/node_modules/undefsafe/example.js: -------------------------------------------------------------------------------- 1 | var undefsafe = require('undefsafe'); 2 | 3 | var object = { 4 | a: { 5 | b: { 6 | c: 1, 7 | d: [1, 2, 3], 8 | e: 'remy' 9 | } 10 | } 11 | }; 12 | 13 | console.log(undefsafe(object, 'a.b.e')); // "remy" 14 | console.log(undefsafe(object, 'a.b.not.found')); // undefined 15 | -------------------------------------------------------------------------------- /server/node_modules/unpipe/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.0 / 2015-06-14 2 | ================== 3 | 4 | * Initial release 5 | -------------------------------------------------------------------------------- /server/node_modules/unpipe/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "unpipe", 3 | "description": "Unpipe a stream from all destinations", 4 | "version": "1.0.0", 5 | "author": "Douglas Christopher Wilson ", 6 | "license": "MIT", 7 | "repository": "stream-utils/unpipe", 8 | "devDependencies": { 9 | "istanbul": "0.3.15", 10 | "mocha": "2.2.5", 11 | "readable-stream": "1.1.13" 12 | }, 13 | "files": [ 14 | "HISTORY.md", 15 | "LICENSE", 16 | "README.md", 17 | "index.js" 18 | ], 19 | "engines": { 20 | "node": ">= 0.8" 21 | }, 22 | "scripts": { 23 | "test": "mocha --reporter spec --bail --check-leaks test/", 24 | "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", 25 | "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/node_modules/util-deprecate/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "util-deprecate", 3 | "version": "1.0.2", 4 | "description": "The Node.js `util.deprecate()` function with browser support", 5 | "main": "node.js", 6 | "browser": "browser.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git://github.com/TooTallNate/util-deprecate.git" 13 | }, 14 | "keywords": [ 15 | "util", 16 | "deprecate", 17 | "browserify", 18 | "browser", 19 | "node" 20 | ], 21 | "author": "Nathan Rajlich (http://n8.io/)", 22 | "license": "MIT", 23 | "bugs": { 24 | "url": "https://github.com/TooTallNate/util-deprecate/issues" 25 | }, 26 | "homepage": "https://github.com/TooTallNate/util-deprecate" 27 | } 28 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/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 | -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "type": "module", 7 | "scripts": { 8 | "start": "nodemon index.js" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "dependencies": { 14 | "bcryptjs": "^2.4.3", 15 | "body-parser": "^1.19.0", 16 | "cors": "^2.8.5", 17 | "dotenv": "^10.0.0", 18 | "express": "^4.17.1", 19 | "jsonwebtoken": "^8.5.1", 20 | "mongodb": "^3.6.6", 21 | "mongoose": "^5.12.4", 22 | "nodemon": "^2.0.7" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /server/routes/diet.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import authentication from '../middleware/authentication.js'; 3 | 4 | import { getDietPost, createDietPost, updateDietPost, likeDietPost, deleteDietPost } from '../controllers/diet.js'; 5 | const router = express.Router(); 6 | 7 | router.get('/', getDietPost); 8 | router.post('/', authentication, createDietPost); 9 | router.patch('/:id', authentication, updateDietPost); 10 | router.patch('/:id/likeDietPost', authentication, likeDietPost); 11 | router.delete('/:id', authentication, deleteDietPost); 12 | 13 | 14 | export default router; -------------------------------------------------------------------------------- /server/routes/healthDetail.js: -------------------------------------------------------------------------------- 1 | import express from 'express'; 2 | 3 | import { getHealthDetails, createHealthDetail, updateHealthDetail, deleteHealthDetail } from '../controllers/healthDetail.js'; 4 | 5 | import authentication from '../middleware/authentication.js'; 6 | 7 | const router = express.Router(); 8 | 9 | router.get('/', getHealthDetails); 10 | router.post('/', authentication, createHealthDetail); 11 | router.patch('/:id', authentication, updateHealthDetail); 12 | router.delete('/:id', authentication, deleteHealthDetail); 13 | 14 | export default router; -------------------------------------------------------------------------------- /server/routes/user.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | const router = express.Router(); 3 | 4 | import { getUsers, deleteUser, signin, signup } from "../controllers/user.js"; 5 | 6 | router.get("/", getUsers); 7 | router.post("/signin", signin); 8 | router.post("/signup", signup); 9 | router.delete('/:id', deleteUser); 10 | 11 | export default router; --------------------------------------------------------------------------------