diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..c0d2cd5 --- /dev/null +++ b/.env.example @@ -0,0 +1,33 @@ +APP_URL=http://localhost:3333 +NODE_ENV=development + +# Auth + +APP_SECRET=bootcampgobarbernode + +# Database + +DB_HOST= +DB_USER= +DB_PASS= +DB_NAME= + +# Mongo + +MONGO_URL= + +# Redis + +REDIS_HOST=127.0.0.1 +REDIS_PORT=6379 + +# Mail + +MAIL_HOST=smtp.mailtrap.io +MAIL_PORT=2525 +MAIL_USER= +MAIL_PASS= + +# Sentry + +SENTRY_DSN= diff --git a/.gitignore b/.gitignore index 3c3629e..37d7e73 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +.env diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity index d695f96..b0cf93b 100644 --- a/node_modules/.yarn-integrity +++ b/node_modules/.yarn-integrity @@ -6,15 +6,18 @@ "flags": [], "linkedModules": [], "topLevelPatterns": [ + "@sentry/node@5.12.2", "bcryptjs@^2.4.3", "bee-queue@^1.2.3", "cli@^1.0.1", "date-fns@^2.0.0-beta.5", + "dotenv@^8.2.0", "eslint-config-airbnb-base@^14.0.0", "eslint-config-prettier@^6.10.0", "eslint-plugin-import@^2.20.1", "eslint-plugin-prettier@^3.1.2", "eslint@^6.8.0", + "express-async-errors@^3.1.1", "express-handlebars@^3.1.0", "express@^4.17.1", "jsonwebtoken@^8.5.1", @@ -29,17 +32,27 @@ "sequelize-cli@^5.5.1", "sequelize@^5.21.3", "sucrase@^3.12.1", + "youch@^2.0.10", "yup@^0.28.1" ], "lockfileEntries": { "@babel/code-frame@^7.0.0": "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e", "@babel/highlight@^7.8.3": "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797", "@babel/runtime@^7.0.0": "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.4.tgz#d79f5a2040f7caa24d53e563aad49cbc05581308", + "@sentry/apm@5.12.2": "https://registry.yarnpkg.com/@sentry/apm/-/apm-5.12.2.tgz#6e1de4fb012bbfcaa053ae598ccd7e7fbc036b01", + "@sentry/browser@5.12.1": "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.12.1.tgz#dc1f268595269fb7277f55eb625c7e92d76dc01b", + "@sentry/core@5.12.0": "https://registry.yarnpkg.com/@sentry/core/-/core-5.12.0.tgz#d6380c4ef7beee5f418ac1d0e5be86a2de2af449", + "@sentry/hub@5.12.0": "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.12.0.tgz#5e8c8f249f5bdbeb8cc4ec02c2ccc53a67f2cc02", + "@sentry/minimal@5.12.0": "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.12.0.tgz#2611e2aa520c1edb7999e6de51bd65ec66341757", + "@sentry/node@5.12.2": "https://registry.yarnpkg.com/@sentry/node/-/node-5.12.2.tgz#cea3f947ac15c2668fe2a3e33cd1ece609d54f41", + "@sentry/types@5.12.0": "https://registry.yarnpkg.com/@sentry/types/-/types-5.12.0.tgz#5367e53c74261beea01502e3f7b6f3d822682a31", + "@sentry/utils@5.12.0": "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.12.0.tgz#62967f934a3ee6d21472eac0219084e37225933e", "@types/node@*": "https://registry.yarnpkg.com/@types/node/-/node-13.7.0.tgz#b417deda18cf8400f278733499ad5547ed1abec4", "abbrev@1": "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8", "accepts@~1.3.7": "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd", "acorn-jsx@^5.1.0": "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.1.0.tgz#294adb71b57398b0680015f0a38c563ee1db5384", "acorn@^7.1.0": "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c", + "agent-base@5": "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c", "ajv@^6.10.0": "https://registry.yarnpkg.com/ajv/-/ajv-6.11.0.tgz#c3607cbc8ae392d8a5a536f25b21f8e5f3f87fe9", "ajv@^6.10.2": "https://registry.yarnpkg.com/ajv/-/ajv-6.11.0.tgz#c3607cbc8ae392d8a5a536f25b21f8e5f3f87fe9", "ansi-align@^2.0.0": "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f", @@ -112,6 +125,7 @@ "content-type@~1.0.4": "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b", "cookie-signature@1.0.6": "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c", "cookie@0.4.0": "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba", + "cookie@^0.3.1": "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb", "core-js@^2.4.0": "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c", "core-util-is@~1.0.0": "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7", "create-error-class@^3.0.0": "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6", @@ -123,6 +137,7 @@ "date-fns@^2.0.0-beta.5": "https://registry.yarnpkg.com/date-fns/-/date-fns-2.0.0-beta.5.tgz#90885db3772802d55519cd12acd49de56aca1059", "debug@2.6.9": "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f", "debug@3.1.0": "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261", + "debug@4": "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791", "debug@^2.2.0": "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f", "debug@^2.6.9": "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f", "debug@^3.2.6": "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b", @@ -139,6 +154,7 @@ "doctrine@1.5.0": "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa", "doctrine@^3.0.0": "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961", "dot-prop@^4.1.0": "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57", + "dotenv@^8.2.0": "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a", "dottie@^2.0.0": "https://registry.yarnpkg.com/dottie/-/dottie-2.0.2.tgz#cc91c0726ce3a054ebf11c55fbc92a7f266dd154", "double-ended-queue@^2.1.0-0": "https://registry.yarnpkg.com/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz#103d3527fd31528f40188130c841efdd78264e5c", "duplexer3@^0.1.4": "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2", @@ -189,6 +205,7 @@ "event-emitter@^0.3.5": "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39", "execa@^0.7.0": "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777", "exit@0.1.2": "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c", + "express-async-errors@^3.1.1": "https://registry.yarnpkg.com/express-async-errors/-/express-async-errors-3.1.1.tgz#6053236d61d21ddef4892d6bd1d736889fc9da41", "express-handlebars@^3.0.0": "https://registry.yarnpkg.com/express-handlebars/-/express-handlebars-3.1.0.tgz#c177ee9a81f6a2abada6b550b77b3e30c6bc0796", "express-handlebars@^3.1.0": "https://registry.yarnpkg.com/express-handlebars/-/express-handlebars-3.1.0.tgz#c177ee9a81f6a2abada6b550b77b3e30c6bc0796", "express@^4.17.1": "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134", @@ -236,6 +253,7 @@ "hosted-git-info@^2.1.4": "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c", "http-errors@1.7.2": "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f", "http-errors@~1.7.2": "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06", + "https-proxy-agent@^4.0.0": "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b", "iconv-lite@0.4.24": "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b", "iconv-lite@^0.4.24": "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b", "ignore-by-default@^1.0.1": "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09", @@ -319,6 +337,7 @@ "lru-cache@^4.0.1": "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd", "lru-cache@^4.1.5": "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd", "lru-queue@0.1": "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3", + "lru_map@^0.3.3": "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd", "make-dir@^1.0.0": "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c", "media-typer@0.3.0": "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748", "memoizee@^0.4.14": "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.14.tgz#07a00f204699f9a95c2d9e77218271c7cd610d57", @@ -348,6 +367,7 @@ "ms@2.1.2": "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009", "ms@^2.1.1": "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009", "multer@^1.4.2": "https://registry.yarnpkg.com/multer/-/multer-1.4.2.tgz#2f1f4d12dbaeeba74cb37e623f234bf4d3d2057a", + "mustache@^3.0.0": "https://registry.yarnpkg.com/mustache/-/mustache-3.2.1.tgz#89e78a9d207d78f2799b1e95764a25bf71a28322", "mute-stream@0.0.8": "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d", "mz@^2.7.0": "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32", "natural-compare@^1.4.0": "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7", @@ -514,6 +534,7 @@ "spdx-license-ids@^3.0.0": "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654", "split@^1.0.0": "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9", "sprintf-js@~1.0.2": "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c", + "stack-trace@0.0.10": "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0", "statuses@>= 1.5.0 < 2": "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c", "statuses@~1.5.0": "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c", "streamsearch@0.1.2": "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a", @@ -556,6 +577,7 @@ "touch@^3.1.0": "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b", "ts-interface-checker@^0.1.9": "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.10.tgz#b68a49e37e90a05797e590f08494dd528bf383cf", "tslib@^1.9.0": "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a", + "tslib@^1.9.3": "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a", "type-check@~0.3.2": "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72", "type-fest@^0.8.1": "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d", "type-is@^1.6.4": "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131", @@ -599,6 +621,7 @@ "yallist@^2.1.2": "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52", "yargs-parser@^13.1.1": "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0", "yargs@^13.1.0": "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83", + "youch@^2.0.10": "https://registry.yarnpkg.com/youch/-/youch-2.0.10.tgz#e0f6312b12304fd330a0c4a0e0925b0123f7d495", "yup@^0.28.1": "https://registry.yarnpkg.com/yup/-/yup-0.28.1.tgz#60c0725be7057ed7a9ae61561333809332a63d47" }, "files": [], diff --git a/node_modules/cookie/HISTORY.md b/node_modules/cookie/HISTORY.md index da2bf24..5bd6485 100644 --- a/node_modules/cookie/HISTORY.md +++ b/node_modules/cookie/HISTORY.md @@ -1,8 +1,3 @@ -0.4.0 / 2019-05-15 -================== - - * Add `SameSite=None` support - 0.3.1 / 2016-05-26 ================== diff --git a/node_modules/cookie/README.md b/node_modules/cookie/README.md index 857fb77..db0d078 100644 --- a/node_modules/cookie/README.md +++ b/node_modules/cookie/README.md @@ -1,7 +1,7 @@ # cookie -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] [![Node.js Version][node-version-image]][node-version-url] [![Build Status][travis-image]][travis-url] [![Test Coverage][coveralls-image]][coveralls-url] @@ -64,7 +64,7 @@ var setCookie = cookie.serialize('foo', 'bar'); ##### domain -Specifies the value for the [`Domain` `Set-Cookie` attribute][rfc-6265-5.2.3]. By default, no +Specifies the value for the [`Domain` `Set-Cookie` attribute][rfc-6266-5.2.3]. By default, no domain is set, and most clients will consider the cookie to apply to only the current domain. ##### encode @@ -73,22 +73,22 @@ Specifies a function that will be used to encode a cookie's value. Since value o has a limited character set (and must be a simple string), this function can be used to encode a value into a string suited for a cookie's value. -The default function is the global `encodeURIComponent`, which will encode a JavaScript string +The default function is the global `ecodeURIComponent`, which will encode a JavaScript string into UTF-8 byte sequences and then URL-encode any that fall outside of the cookie range. ##### expires -Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute][rfc-6265-5.2.1]. +Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute][rfc-6266-5.2.1]. By default, no expiration is set, and most clients will consider this a "non-persistent cookie" and will delete it on a condition like exiting a web browser application. -**note** the [cookie storage model specification][rfc-6265-5.3] states that if both `expires` and -`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this, +**note** the [cookie storage model specification][rfc-6266-5.3] states that if both `expires` and +`magAge` are set, then `maxAge` takes precedence, but it is possiblke not all clients by obey this, so if both are set, they should point to the same date and time. ##### httpOnly -Specifies the `boolean` value for the [`HttpOnly` `Set-Cookie` attribute][rfc-6265-5.2.6]. When truthy, +Specifies the `boolean` value for the [`HttpOnly` `Set-Cookie` attribute][rfc-6266-5.2.6]. When truthy, the `HttpOnly` attribute is set, otherwise it is not. By default, the `HttpOnly` attribute is not set. **note** be careful when setting this to `true`, as compliant clients will not allow client-side @@ -96,37 +96,38 @@ JavaScript to see the cookie in `document.cookie`. ##### maxAge -Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute][rfc-6265-5.2.2]. +Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute][rfc-6266-5.2.2]. The given number will be converted to an integer by rounding down. By default, no maximum age is set. -**note** the [cookie storage model specification][rfc-6265-5.3] states that if both `expires` and -`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this, +**note** the [cookie storage model specification][rfc-6266-5.3] states that if both `expires` and +`magAge` are set, then `maxAge` takes precedence, but it is possiblke not all clients by obey this, so if both are set, they should point to the same date and time. ##### path -Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6265-5.2.4]. By default, the path -is considered the ["default path"][rfc-6265-5.1.4]. +Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6266-5.2.4]. By default, the path +is considered the ["default path"][rfc-6266-5.1.4]. By default, no maximum age is set, and most +clients will consider this a "non-persistent cookie" and will delete it on a condition like exiting +a web browser application. ##### sameSite -Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][rfc-6265bis-03-4.1.2.7]. +Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][draft-west-first-party-cookies-07]. - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement. - `false` will not set the `SameSite` attribute. - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement. - - `'none'` will set the `SameSite` attribute to `None` for an explicit cross-site cookie. - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement. -More information about the different enforcement levels can be found in -[the specification][rfc-6265bis-03-4.1.2.7]. +More information about the different enforcement levels can be found in the specification +https://tools.ietf.org/html/draft-west-first-party-cookies-07#section-4.1.1 **note** This is an attribute that has not yet been fully standardized, and may change in the future. This also means many clients may ignore this attribute until they understand it. ##### secure -Specifies the `boolean` value for the [`Secure` `Set-Cookie` attribute][rfc-6265-5.2.5]. When truthy, +Specifies the `boolean` value for the [`Secure` `Set-Cookie` attribute][rfc-6266-5.2.5]. When truthy, the `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set. **note** be careful when setting this to `true`, as compliant clients will not send the cookie back to @@ -177,7 +178,7 @@ function onRequest(req, res) { res.write('
'); res.write(' '); - res.end('
'); + res.end(' cookie@0.3.1 bench cookie -> node benchmark/index.js - - http_parser@2.8.0 - node@6.14.2 - v8@5.1.281.111 - uv@1.16.1 - zlib@1.2.11 - ares@1.10.1-DEV - icu@58.2 - modules@48 - napi@3 - openssl@1.0.2o - -> node benchmark/parse.js - - cookie.parse - - 6 tests completed. - - simple x 1,200,691 ops/sec ±1.12% (189 runs sampled) - decode x 1,012,994 ops/sec ±0.97% (186 runs sampled) - unquote x 1,074,174 ops/sec ±2.43% (186 runs sampled) - duplicates x 438,424 ops/sec ±2.17% (184 runs sampled) - 10 cookies x 147,154 ops/sec ±1.01% (186 runs sampled) - 100 cookies x 14,274 ops/sec ±1.07% (187 runs sampled) -``` - ## References -- [RFC 6265: HTTP State Management Mechanism][rfc-6265] -- [Same-site Cookies][rfc-6265bis-03-4.1.2.7] +- [RFC 6266: HTTP State Management Mechanism][rfc-6266] +- [Same-site Cookies][draft-west-first-party-cookies-07] -[rfc-6265bis-03-4.1.2.7]: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7 -[rfc-6265]: https://tools.ietf.org/html/rfc6265 -[rfc-6265-5.1.4]: https://tools.ietf.org/html/rfc6265#section-5.1.4 -[rfc-6265-5.2.1]: https://tools.ietf.org/html/rfc6265#section-5.2.1 -[rfc-6265-5.2.2]: https://tools.ietf.org/html/rfc6265#section-5.2.2 -[rfc-6265-5.2.3]: https://tools.ietf.org/html/rfc6265#section-5.2.3 -[rfc-6265-5.2.4]: https://tools.ietf.org/html/rfc6265#section-5.2.4 -[rfc-6265-5.2.5]: https://tools.ietf.org/html/rfc6265#section-5.2.5 -[rfc-6265-5.2.6]: https://tools.ietf.org/html/rfc6265#section-5.2.6 -[rfc-6265-5.3]: https://tools.ietf.org/html/rfc6265#section-5.3 +[draft-west-first-party-cookies-07]: https://tools.ietf.org/html/draft-west-first-party-cookies-07 +[rfc-6266]: https://tools.ietf.org/html/rfc6266 +[rfc-6266-5.1.4]: https://tools.ietf.org/html/rfc6266#section-5.1.4 +[rfc-6266-5.2.1]: https://tools.ietf.org/html/rfc6266#section-5.2.1 +[rfc-6266-5.2.2]: https://tools.ietf.org/html/rfc6266#section-5.2.2 +[rfc-6266-5.2.3]: https://tools.ietf.org/html/rfc6266#section-5.2.3 +[rfc-6266-5.2.4]: https://tools.ietf.org/html/rfc6266#section-5.2.4 +[rfc-6266-5.3]: https://tools.ietf.org/html/rfc6266#section-5.3 ## License [MIT](LICENSE) -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/cookie/master -[coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master -[node-version-image]: https://badgen.net/npm/node/cookie -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/cookie +[npm-image]: https://img.shields.io/npm/v/cookie.svg [npm-url]: https://npmjs.org/package/cookie -[npm-version-image]: https://badgen.net/npm/v/cookie -[travis-image]: https://badgen.net/travis/jshttp/cookie/master +[node-version-image]: https://img.shields.io/node/v/cookie.svg +[node-version-url]: https://nodejs.org/en/download +[travis-image]: https://img.shields.io/travis/jshttp/cookie/master.svg [travis-url]: https://travis-ci.org/jshttp/cookie +[coveralls-image]: https://img.shields.io/coveralls/jshttp/cookie/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master +[downloads-image]: https://img.shields.io/npm/dm/cookie.svg +[downloads-url]: https://npmjs.org/package/cookie diff --git a/node_modules/cookie/index.js b/node_modules/cookie/index.js index 16f56c0..ab2e467 100644 --- a/node_modules/cookie/index.js +++ b/node_modules/cookie/index.js @@ -170,9 +170,6 @@ function serialize(name, val, options) { case 'strict': str += '; SameSite=Strict'; break; - case 'none': - str += '; SameSite=None'; - break; default: throw new TypeError('option sameSite is invalid'); } diff --git a/node_modules/cookie/package.json b/node_modules/cookie/package.json index 9bfbc47..b485150 100644 --- a/node_modules/cookie/package.json +++ b/node_modules/cookie/package.json @@ -1,7 +1,7 @@ { "name": "cookie", "description": "HTTP server cookie parsing and serialization", - "version": "0.4.0", + "version": "0.3.1", "author": "Roman Shtylman ", "contributors": [ "Douglas Christopher Wilson " @@ -13,12 +13,8 @@ ], "repository": "jshttp/cookie", "devDependencies": { - "beautify-benchmark": "0.2.4", - "benchmark": "2.1.4", - "eslint": "5.16.0", - "eslint-plugin-markdown": "1.0.0", - "istanbul": "0.4.5", - "mocha": "6.1.4" + "istanbul": "0.4.3", + "mocha": "1.21.5" }, "files": [ "HISTORY.md", @@ -30,11 +26,8 @@ "node": ">= 0.6" }, "scripts": { - "bench": "node benchmark/index.js", - "lint": "eslint --plugin markdown --ext js,md .", "test": "mocha --reporter spec --bail --check-leaks test/", "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "version": "node scripts/version-history.js && git add HISTORY.md" + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" } } diff --git a/package.json b/package.json index 58b1fad..fa11c17 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,13 @@ "dev:debug": "nodemon --inspect src/server.js " }, "dependencies": { + "@sentry/node": "5.12.2", "bcryptjs": "^2.4.3", "bee-queue": "^1.2.3", "date-fns": "^2.0.0-beta.5", + "dotenv": "^8.2.0", "express": "^4.17.1", + "express-async-errors": "^3.1.1", "express-handlebars": "^3.1.0", "jsonwebtoken": "^8.5.1", "mongoose": "^5.8.11", @@ -22,6 +25,7 @@ "pg": "^7.18.1", "pg-hstore": "^2.3.3", "sequelize": "^5.21.3", + "youch": "^2.0.10", "yup": "^0.28.1" }, "devDependencies": { diff --git a/src/app.js b/src/app.js index 756a1e8..9d17c0b 100644 --- a/src/app.js +++ b/src/app.js @@ -1,6 +1,13 @@ +import 'dotenv/config'; + import express from 'express'; import path from 'path'; +import Youch from 'youch'; +import * as Sentry from '@sentry/node'; +import 'express-async-errors'; + import routes from './routes'; +import sentryConfig from './config/sentry'; import './database'; @@ -8,11 +15,15 @@ class App { constructor() { this.server = express(); + Sentry.init(sentryConfig); + this.middlewares(); this.routes(); + this.exceptionHandler(); } middlewares() { + this.server.use(Sentry.Handlers.requestHandler()); this.server.use(express.json()); this.server.use( '/files', @@ -22,6 +33,18 @@ class App { routes() { this.server.use(routes); + this.server.use(Sentry.Handlers.errorHandler()); + } + + exceptionHandler() { + this.server.use(async (err, req, res, next) => { + if (process.env.NODE_ENV === 'development') { + const errors = await new Youch(err, req).toJSON(); + + return res.status(500).json(errors); + } + return res.status(500).json({ error: 'Internal server error' }); + }); } } diff --git a/src/app/controllers/AppointmentController.js b/src/app/controllers/AppointmentController.js index 4d97e7d..cf26a3e 100644 --- a/src/app/controllers/AppointmentController.js +++ b/src/app/controllers/AppointmentController.js @@ -16,7 +16,7 @@ class AppointmentController { const appointments = await Appointment.findAll({ where: { user_id: req.userId, canceled_at: null }, order: ['date'], - attributes: ['id', 'date'], + attributes: ['id', 'date', 'past', 'cancelable'], limit: 20, offset: (page - 1) * 20, include: [ diff --git a/src/app/controllers/AvailableController.js b/src/app/controllers/AvailableController.js new file mode 100644 index 0000000..490e9d2 --- /dev/null +++ b/src/app/controllers/AvailableController.js @@ -0,0 +1,67 @@ +import { + startOfDay, + endOfDay, + setHours, + setMinutes, + setSeconds, + format, + isAfter, +} from 'date-fns'; +import { Op } from 'sequelize'; +import Appointment from '../models/Appointment'; + +class AvailableController { + async index(req, res) { + const { date } = req.query; + + if (!date) { + return res.status(400).json({ error: 'Invalid Date.' }); + } + + const searchDate = Number(date); + + const appointments = await Appointment.findAll({ + where: { + provider_id: req.params.providerId, + canceled_at: null, + date: { + [Op.between]: [startOfDay(searchDate), endOfDay(searchDate)], + }, + }, + }); + + const schedule = [ + '08:00', + '09:00', + '10:00', + '11:00', + '12:00', + '13:00', + '14:00', + '15:00', + '16:00', + '17:00', + '18:00', + ]; + + const available = schedule.map(time => { + const [hour, minute] = time.split(':'); + const value = setSeconds( + setMinutes(setHours(searchDate, hour), minute), + 0 + ); + + return { + time, + value: format(value, "yyyy-MM-dd'T'HH:mm:ssxxx"), + available: + isAfter(value, new Date()) && + !appointments.find(a => format(a.date, 'HH:mm') === time), + }; + }); + + return res.json(available); + } +} + +export default new AvailableController(); diff --git a/src/app/models/Appointment.js b/src/app/models/Appointment.js index b2795c9..8e853bf 100644 --- a/src/app/models/Appointment.js +++ b/src/app/models/Appointment.js @@ -1,4 +1,5 @@ import Sequelize, { Model } from 'sequelize'; +import { isBefore, subHours } from 'date-fns'; class Appointment extends Model { static init(sequelize) { @@ -6,6 +7,18 @@ class Appointment extends Model { { date: Sequelize.DATE, canceled_at: Sequelize.DATE, + past: { + type: Sequelize.VIRTUAL, + get() { + return isBefore(this.date, new Date()); + }, + }, + cancelable: { + type: Sequelize.VIRTUAL, + get() { + return isBefore(new Date(), subHours(this.date, 2)); + }, + }, }, { sequelize, diff --git a/src/app/models/File.js b/src/app/models/File.js index 2d898b2..1bcc285 100644 --- a/src/app/models/File.js +++ b/src/app/models/File.js @@ -9,7 +9,7 @@ class File extends Model { url: { type: Sequelize.VIRTUAL, get() { - return `http://localhost:3333/files/${this.path}`; + return `${process.env.APP_URL}/files/${this.path}`; }, }, }, diff --git a/src/config/auth.js b/src/config/auth.js index bd6c066..1da951c 100644 --- a/src/config/auth.js +++ b/src/config/auth.js @@ -1,4 +1,4 @@ export default { - secret: '36828012b7696ab64196e0f636018a2e', + secret: process.env.APP_SECRET, expiresIn: '7d', }; diff --git a/src/config/database.js b/src/config/database.js index ed30a11..aa9b0c7 100644 --- a/src/config/database.js +++ b/src/config/database.js @@ -1,9 +1,11 @@ +require('dotenv/config'); + module.exports = { dialect: 'postgres', - host: 'localhost', - username: 'postgres', - password: 'docker', - database: 'gobarber', + host: process.env.DB_HOST, + username: process.env.DB_USER, + password: process.env.DB_PASS, + database: process.env.DB_NAME, define: { timestamps: true, underscored: true, diff --git a/src/config/mail.js b/src/config/mail.js index 4220d4a..6c0a822 100644 --- a/src/config/mail.js +++ b/src/config/mail.js @@ -1,10 +1,10 @@ export default { - host: 'smtp.mailtrap.io', - port: '2525', + host: process.env.MAIL_HOST, + port: process.env.MAIL_PORT, secure: false, auth: { - user: '9e5c07f5be4a0c', - pass: 'dfef8c43a493f4', + user: process.env.MAIL_USER, + pass: process.env.MAIL_PASS, }, default: { from: 'Equipe Gobarber ', diff --git a/src/config/redis.js b/src/config/redis.js index ca98e3a..e4670b4 100644 --- a/src/config/redis.js +++ b/src/config/redis.js @@ -1,4 +1,4 @@ export default { - host: '127.0.0.1', - port: 6379, + host: process.env.REDIS_HOST, + port: process.env.REDIS_PORT, }; diff --git a/src/config/sentry.js b/src/config/sentry.js new file mode 100644 index 0000000..c2850c6 --- /dev/null +++ b/src/config/sentry.js @@ -0,0 +1,3 @@ +export default { + dsn: process.env.SENTRY_DSN, +}; diff --git a/src/database/index.js b/src/database/index.js index 7803187..59066e3 100644 --- a/src/database/index.js +++ b/src/database/index.js @@ -24,13 +24,10 @@ class Database { } mongo() { - this.mongoConnection = mongoose.connect( - 'mongodb://localhost:27017/gobarber', - { - useNewUrlParser: true, - useFindAndModify: true, - } - ); + this.mongoConnection = mongoose.connect(process.env.MONGO_URL, { + useNewUrlParser: true, + useFindAndModify: true, + }); } } diff --git a/src/queue.js b/src/queue.js index 08824e5..a1dd7b7 100644 --- a/src/queue.js +++ b/src/queue.js @@ -1,3 +1,5 @@ +import 'dotenv/config'; + import Queue from './lib/Queue'; Queue.processQueue(); diff --git a/src/routes.js b/src/routes.js index b90da13..046aa6a 100644 --- a/src/routes.js +++ b/src/routes.js @@ -9,6 +9,7 @@ import ProviderController from './app/controllers/ProviderController'; import AppointmentController from './app/controllers/AppointmentController'; import ScheduleController from './app/controllers/ScheduleController'; import NotificationController from './app/controllers/NotificationController'; +import AvailableController from './app/controllers/AvailableController'; import authMiddleware from './app/middlewares/auth'; @@ -23,6 +24,7 @@ routes.use(authMiddleware); routes.put('/users', UserController.update); routes.get('/providers', ProviderController.index); +routes.get('/providers/:providerId/available', AvailableController.index); routes.get('/appointments', AppointmentController.index); routes.post('/appointments', AppointmentController.store); diff --git a/yarn.lock b/yarn.lock index a004da2..37ba462 100644 --- a/yarn.lock +++ b/yarn.lock @@ -25,6 +25,85 @@ dependencies: regenerator-runtime "^0.13.2" +"@sentry/apm@5.12.2": + version "5.12.2" + resolved "https://registry.yarnpkg.com/@sentry/apm/-/apm-5.12.2.tgz#6e1de4fb012bbfcaa053ae598ccd7e7fbc036b01" + integrity sha512-YP3LlFm11THM49R2iSbiLIbobXkVXuAvuPyN3d2BeW4fQ5PtRc4XOHavQdmnKmrW/zZxo/umK98n80Tu9V1Jwg== + dependencies: + "@sentry/browser" "5.12.1" + "@sentry/hub" "5.12.0" + "@sentry/minimal" "5.12.0" + "@sentry/types" "5.12.0" + "@sentry/utils" "5.12.0" + tslib "^1.9.3" + +"@sentry/browser@5.12.1": + version "5.12.1" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.12.1.tgz#dc1f268595269fb7277f55eb625c7e92d76dc01b" + integrity sha512-Zl7VdppUxctyaoqMSEhnDJp2rrupx8n8N2n3PSooH74yhB2Z91nt84mouczprBsw3JU1iggGyUw9seRFzDI1hw== + dependencies: + "@sentry/core" "5.12.0" + "@sentry/types" "5.12.0" + "@sentry/utils" "5.12.0" + tslib "^1.9.3" + +"@sentry/core@5.12.0": + version "5.12.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.12.0.tgz#d6380c4ef7beee5f418ac1d0e5be86a2de2af449" + integrity sha512-wY4rsoX71QsGpcs9tF+OxKgDPKzIFMRvFiSRcJoPMfhFsTilQ/CBMn/c3bDtWQd9Bnr/ReQIL6NbnIjUsPHA4Q== + dependencies: + "@sentry/hub" "5.12.0" + "@sentry/minimal" "5.12.0" + "@sentry/types" "5.12.0" + "@sentry/utils" "5.12.0" + tslib "^1.9.3" + +"@sentry/hub@5.12.0": + version "5.12.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.12.0.tgz#5e8c8f249f5bdbeb8cc4ec02c2ccc53a67f2cc02" + integrity sha512-3k7yE8BEVJsKx8mR4LcI4IN0O8pngmq44OcJ/fRUUBAPqsT38jsJdP2CaWhdlM1jiNUzUDB1ktBv6/lY+VgcoQ== + dependencies: + "@sentry/types" "5.12.0" + "@sentry/utils" "5.12.0" + tslib "^1.9.3" + +"@sentry/minimal@5.12.0": + version "5.12.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.12.0.tgz#2611e2aa520c1edb7999e6de51bd65ec66341757" + integrity sha512-fk73meyz4k4jCg9yzbma+WkggsfEIQWI2e2TWfYsRGcrV3RnlSrXyM4D91/A8Bjx10SNezHPUFHjasjlHXOkyA== + dependencies: + "@sentry/hub" "5.12.0" + "@sentry/types" "5.12.0" + tslib "^1.9.3" + +"@sentry/node@5.12.2": + version "5.12.2" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.12.2.tgz#cea3f947ac15c2668fe2a3e33cd1ece609d54f41" + integrity sha512-c8T3SHoefO+dJ+4DZp2MvO++pzHvMW5GsYvwOWv+NFchiOwMvoEaAGnveHQsWaFauAlJz8Iyvn8/yCpr2ggXdA== + dependencies: + "@sentry/apm" "5.12.2" + "@sentry/core" "5.12.0" + "@sentry/hub" "5.12.0" + "@sentry/types" "5.12.0" + "@sentry/utils" "5.12.0" + cookie "^0.3.1" + https-proxy-agent "^4.0.0" + lru_map "^0.3.3" + tslib "^1.9.3" + +"@sentry/types@5.12.0": + version "5.12.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.12.0.tgz#5367e53c74261beea01502e3f7b6f3d822682a31" + integrity sha512-aZbBouBLrKB8wXlztriIagZNmsB+wegk1Jkl6eprqRW/w24Sl/47tiwH8c5S4jYTxdAiJk+SAR10AAuYmIN3zg== + +"@sentry/utils@5.12.0": + version "5.12.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.12.0.tgz#62967f934a3ee6d21472eac0219084e37225933e" + integrity sha512-fYUadGLbfTCbs4OG5hKCOtv2jrNE4/8LHNABy9DwNJ/t5DVtGqWAZBnxsC+FG6a3nVqCpxjFI9AHlYsJ2wsf7Q== + dependencies: + "@sentry/types" "5.12.0" + tslib "^1.9.3" + "@types/node@*": version "13.7.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.0.tgz#b417deda18cf8400f278733499ad5547ed1abec4" @@ -53,6 +132,11 @@ acorn@^7.1.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c" integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ== +agent-base@5: + version "5.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" + integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== + ajv@^6.10.0, ajv@^6.10.2: version "6.11.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.11.0.tgz#c3607cbc8ae392d8a5a536f25b21f8e5f3f87fe9" @@ -476,6 +560,11 @@ cookie@0.4.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== +cookie@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= + core-js@^2.4.0: version "2.6.11" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" @@ -545,6 +634,13 @@ debug@3.1.0: dependencies: ms "2.0.0" +debug@4, debug@^4.0.1, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + debug@^3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -552,13 +648,6 @@ debug@^3.2.6: dependencies: ms "^2.1.1" -debug@^4.0.1, debug@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -621,6 +710,11 @@ dot-prop@^4.1.0: dependencies: is-obj "^1.0.0" +dotenv@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + dottie@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/dottie/-/dottie-2.0.2.tgz#cc91c0726ce3a054ebf11c55fbc92a7f266dd154" @@ -941,6 +1035,11 @@ exit@0.1.2: resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= +express-async-errors@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/express-async-errors/-/express-async-errors-3.1.1.tgz#6053236d61d21ddef4892d6bd1d736889fc9da41" + integrity sha512-h6aK1da4tpqWSbyCa3FxB/V6Ehd4EEB15zyQq9qe75OZBp0krinNKuH4rAY+S/U/2I36vdLAUFSjQJ+TFmODng== + express-handlebars@^3.0.0, express-handlebars@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/express-handlebars/-/express-handlebars-3.1.0.tgz#c177ee9a81f6a2abada6b550b77b3e30c6bc0796" @@ -1255,6 +1354,14 @@ http-errors@~1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" +https-proxy-agent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" + integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== + dependencies: + agent-base "5" + debug "4" + iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -1672,6 +1779,11 @@ lru-queue@0.1: dependencies: es5-ext "~0.10.2" +lru_map@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" + integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0= + make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -1854,6 +1966,11 @@ multer@^1.4.2: type-is "^1.6.4" xtend "^4.0.0" +mustache@^3.0.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/mustache/-/mustache-3.2.1.tgz#89e78a9d207d78f2799b1e95764a25bf71a28322" + integrity sha512-RERvMFdLpaFfSRIEe632yDm5nsd0SDKn8hGmcUwswnyiE5mtdZLDybtHAz6hjJhawokF0hXvGLtx9mrQfm6FkA== + mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" @@ -2806,6 +2923,11 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= +stack-trace@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= + "statuses@>= 1.5.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" @@ -3029,7 +3151,7 @@ ts-interface-checker@^0.1.9: resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.10.tgz#b68a49e37e90a05797e590f08494dd528bf383cf" integrity sha512-UJYuKET7ez7ry0CnvfY6fPIUIZDw+UI3qvTUQeS2MyI4TgEeWAUBqy185LeaHcdJ9zG2dgFpPJU/AecXU0Afug== -tslib@^1.9.0: +tslib@^1.9.0, tslib@^1.9.3: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== @@ -3297,6 +3419,15 @@ yargs@^13.1.0: y18n "^4.0.0" yargs-parser "^13.1.1" +youch@^2.0.10: + version "2.0.10" + resolved "https://registry.yarnpkg.com/youch/-/youch-2.0.10.tgz#e0f6312b12304fd330a0c4a0e0925b0123f7d495" + integrity sha512-qPLQW2TuwlcK9sm5i1Gbb9ezRZRZyzr6NsY5cqxsbh+2iEyKPxLlz0OSAc+pQ7mv1pYZLri1MXynggP6R2FcNQ== + dependencies: + cookie "^0.3.1" + mustache "^3.0.0" + stack-trace "0.0.10" + yup@^0.28.1: version "0.28.1" resolved "https://registry.yarnpkg.com/yup/-/yup-0.28.1.tgz#60c0725be7057ed7a9ae61561333809332a63d47"