From ed91d893333b84349216276b06435e7d104e5978 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Sun, 26 Feb 2017 05:28:36 -0800 Subject: [PATCH 01/54] added basic auth flow for react router --- app/components/Template/Header.js | 2 ++ app/components/auth.js | 51 +++++++++++++++++++++++++++++++ app/entry.js | 18 ++++++++++- app/pages/Login.js | 50 ++++++++++++++++++++++++++++++ app/pages/Logout.js | 19 ++++++++++++ package.json | 4 ++- yarn.lock | 40 +++++++++++++++++++++++- 7 files changed, 181 insertions(+), 3 deletions(-) create mode 100644 app/components/auth.js create mode 100644 app/pages/Login.js create mode 100644 app/pages/Logout.js diff --git a/app/components/Template/Header.js b/app/components/Template/Header.js index 7c60ec14de..0ffa7c8b66 100644 --- a/app/components/Template/Header.js +++ b/app/components/Template/Header.js @@ -3,6 +3,7 @@ import { Link, IndexLink } from 'react-router'; import Hamburger from './Hamburger'; import links from '../../data/links'; +import auth from '../auth'; const Header = () => (
+ +

You're about to learn a lot about me. Let me learn a little about you. I only ask for your email address and I promise not to spam you.

+ +

Login with Google

+
(hint: password)
diff --git a/models/User.js b/models/User.js new file mode 100644 index 0000000000..66295d7058 --- /dev/null +++ b/models/User.js @@ -0,0 +1,34 @@ +module.exports = (sequelize, DataTypes) => sequelize.define('user', { + sub: { + type: DataTypes.STRING, + }, + name: { + type: DataTypes.STRING, + }, + given_name: { + type: DataTypes.STRING, + }, + family_name: { + type: DataTypes.STRING, + }, + profile: { + type: DataTypes.STRING, + }, + picture: { + type: DataTypes.STRING, + }, + email: { + type: DataTypes.STRING, + }, + email_verified: { + type: DataTypes.BOOLEAN, + }, + gender: { + type: DataTypes.STRING, + }, + logins: { + type: DataTypes.INTEGER, + }, +}, { + freezeTableName: true, // Model tableName will be the same as the model name +}); diff --git a/models/index.js b/models/index.js new file mode 100644 index 0000000000..fc45b437f9 --- /dev/null +++ b/models/index.js @@ -0,0 +1,31 @@ +import fs from 'fs'; +import path from 'path'; +import Sequelize from 'sequelize'; +import 'dotenv/config'; + +const env = process.env.NODE_ENV || 'development'; + +const sequelize = new Sequelize('db', null, null, { + dialect: 'sqlite', + storage: path.join(__dirname, '../', 'db.sqlite'), +}); + +const db = {}; + +fs.readdirSync(__dirname) + .filter(file => (file.indexOf('.') !== 0) && (file !== 'index.js')) + .forEach((file) => { + const model = sequelize.import(path.join(__dirname, file)); + db[model.name] = model; + }); + +Object.keys(db).forEach((modelName) => { + if ('associate' in db[modelName]) { + db[modelName].associate(db); + } +}); + +db.sequelize = sequelize; +db.Sequelize = Sequelize; + +export default db; diff --git a/package.json b/package.json index 7aa9f661e8..8734546dd1 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "dev": "nodemon server.js --ignore app/ --ignore tests/ --exec babel-node", "forever-start": "forever start --minUptime 1000ms --spinSleepTime 1000ms -a -l forever.log -o out.log -e err.log -c 'nodemon server.js --exitcrash --exec babel-node' server.js", "forever-stop": "forever stop server.js", - "lint": "./node_modules/.bin/eslint app routes server.js test webpack", + "lint": "./node_modules/.bin/eslint app models routes server.js test webpack", "start": "./node_modules/.bin/babel-node server", "test": "./node_modules/mocha/bin/mocha --compilers js:babel-core/register ./test/test.js" }, @@ -57,6 +57,9 @@ "react-router": "^3.0.2", "rimraf": "^2.6.0", "sass-loader": "^6.0.1", + "sequelize": "^3.30.2", + "sequelize-cli": "^2.5.1", + "sqlite3": "^3.1.8", "stats-webpack-plugin": "^0.4.3", "strip-loader": "^0.1.2", "style-loader": "^0.13.1", diff --git a/routes/init.js b/routes/init.js index 438d10dfcc..e21b0d249f 100644 --- a/routes/init.js +++ b/routes/init.js @@ -1,10 +1,18 @@ /* eslint-disable global-require */ import 'dotenv/config'; - +import path from 'path'; +import Sequelize from 'sequelize'; +var models = require('../models'); +console.log(Object.keys(models)); const passport = require('passport'); const Strategy = require('passport-google-oauth20').Strategy; const port = process.env.PORT || 7999; +const sequelize = new Sequelize('db', null, null, { + dialect: 'sqlite', + storage: path.join(__dirname, '../', 'db.sqlite'), +}); + passport.use(new Strategy({ clientID: process.env.GOOGLE_CLIENT_ID, clientSecret: process.env.GOOGLE_CLIENT_SECRET, @@ -12,13 +20,20 @@ passport.use(new Strategy({ userProfileURL: 'https://www.googleapis.com/oauth2/v3/userinfo', scope: ['email'], }, - (accessToken, refreshToken, profile, cb) => + (accessToken, refreshToken, profile, cb) => { // In this example, the user's Facebook profile is supplied as the user // record. In a production-quality application, the Facebook profile should // be associated with a user record in the application's database, which // allows for account linking and authentication with other identity // providers. - cb(null, profile))); + console.log('serialize', profile._json); + + models.user.create(Object.assign({}, profile._json)).then(() => { + console.log('this works') + cb(null, profile); + }); + }, +)); passport.serializeUser((user, cb) => { cb(null, user); @@ -39,7 +54,8 @@ const routes = (app) => { app.get('/login/google/return', passport.authenticate('google', { failureRedirect: '/login' }, ), (req, res) => { - console.log(req); + console.log('req.user', req.user); + res.redirect('/'); }); diff --git a/server.js b/server.js index 4658e67436..1dd65dd333 100644 --- a/server.js +++ b/server.js @@ -26,6 +26,15 @@ app.use(bodyParser.json()); if (!module.parent) app.use(morgan('combined')); app.use(express.static(path.join(__dirname, 'public'))); +var models = require("./models"); +models.sequelize.sync().then(function () { + app.listen(port); + app.on('error', (error) => { console.error('error', error);}); + app.on('listening', (info) => { console.info('info', info);}); +}); + + + routes(app); if (env === 'development') { // eslint-disable-line eqeqeq diff --git a/yarn.lock b/yarn.lock index b430a9e9f4..4c3f2c6792 100644 --- a/yarn.lock +++ b/yarn.lock @@ -98,6 +98,10 @@ aproba@^1.0.3: version "1.1.1" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.1.tgz#95d3600f07710aa0e9298c726ad5ecf2eacbabab" +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + are-we-there-yet@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" @@ -131,6 +135,10 @@ arr-flatten@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" +array-differ@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" + array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" @@ -149,7 +157,7 @@ array-union@^1.0.1: dependencies: array-uniq "^1.0.1" -array-uniq@^1.0.1: +array-uniq@^1.0.1, array-uniq@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" @@ -916,6 +924,10 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" +beeper@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" + big.js@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" @@ -930,7 +942,7 @@ block-stream@*: dependencies: inherits "~2.0.0" -bluebird@^3.4.7: +bluebird@^3.0.1, bluebird@^3.0.5, bluebird@^3.3.4, bluebird@^3.4.5, bluebird@^3.4.6, bluebird@^3.4.7: version "3.4.7" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" @@ -1233,6 +1245,15 @@ clean-css@4.0.x: dependencies: source-map "0.5.x" +cli-color@~0.3.2: + version "0.3.3" + resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-0.3.3.tgz#12d5bdd158ff8a0b0db401198913c03df069f6f5" + dependencies: + d "~0.1.1" + es5-ext "~0.10.6" + memoizee "~0.3.8" + timers-ext "0.1" + cli-color@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-1.1.0.tgz#de188cdc4929d83b67aea04110fbed40fdbf6775" @@ -1286,7 +1307,15 @@ cliui@^3.2.0: strip-ansi "^3.0.1" wrap-ansi "^2.0.0" -clone@^1.0.2: +clone-stats@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + +clone@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f" + +clone@^1.0.0, clone@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" @@ -1439,6 +1468,13 @@ concat-stream@1.5.0, concat-stream@^1.4.6: readable-stream "~2.0.0" typedarray "~0.0.5" +config-chain@~1.1.5: + version "1.1.11" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.11.tgz#aba09747dfbe4c3e70e766a6e41586e1859fc6f2" + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" + configstore@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/configstore/-/configstore-1.4.0.tgz#c35781d0501d268c25c54b8b17f6240e8a4fb021" @@ -1525,7 +1561,13 @@ create-hmac@^1.1.0, create-hmac@^1.1.2: create-hash "^1.1.0" inherits "^2.0.1" -cross-spawn@^3.0.0: +cross-env@^3.1.2: + version "3.1.4" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-3.1.4.tgz#56e8bca96f17908a6eb1bc2012ca126f92842130" + dependencies: + cross-spawn "^3.0.1" + +cross-spawn@^3.0.0, cross-spawn@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" dependencies: @@ -1685,6 +1727,10 @@ date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" +dateformat@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" + debug@0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" @@ -1733,7 +1779,7 @@ deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" -defaults@^1.0.2: +defaults@^1.0.0, defaults@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" dependencies: @@ -1774,10 +1820,14 @@ delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" -depd@~1.1.0: +depd@^1.1.0, depd@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" +deprecated@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19" + des.js@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" @@ -1789,6 +1839,12 @@ destroy@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" +detect-file@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-0.1.0.tgz#4935dedfd9488648e006b0129566e9386711ea63" + dependencies: + fs-exists-sync "^0.1.0" + detect-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" @@ -1880,6 +1936,16 @@ dotenv@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-4.0.0.tgz#864ef1379aced55ce6f95debecdce179f7a0cd1d" +dottie@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/dottie/-/dottie-1.1.1.tgz#45c2a3f48bd6528eeed267a69a848eaaca6faa6a" + +duplexer2@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + dependencies: + readable-stream "~1.1.9" + duplexer@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" @@ -1899,6 +1965,15 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" +editorconfig@^0.13.2: + version "0.13.2" + resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.13.2.tgz#8e57926d9ee69ab6cb999f027c2171467acceb35" + dependencies: + bluebird "^3.0.5" + commander "^2.9.0" + lru-cache "^3.2.0" + sigmund "^1.0.1" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -1971,6 +2046,12 @@ end-of-stream@1.0.0: dependencies: once "~1.3.0" +end-of-stream@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf" + dependencies: + once "~1.3.0" + enhanced-resolve@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.1.0.tgz#9f4b626f577245edcf4b2ad83d86e17f4f421dec" @@ -2349,6 +2430,12 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" +expand-tilde@^1.2.1, expand-tilde@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449" + dependencies: + os-homedir "^1.0.1" + express@^4.14.1: version "4.14.1" resolved "https://registry.yarnpkg.com/express/-/express-4.14.1.tgz#646c237f766f148c2120aff073817b9e4d7e0d33" @@ -2380,7 +2467,7 @@ express@^4.14.1: utils-merge "1.0.0" vary "~1.1.0" -extend@3, extend@~3.0.0: +extend@3, extend@^3.0.0, extend@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" @@ -2416,6 +2503,13 @@ eyes@0.1.x, eyes@~0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" +fancy-log@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.0.tgz#45be17d02bb9917d60ccffd4995c999e6c8c9948" + dependencies: + chalk "^1.1.1" + time-stamp "^1.0.0" + fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" @@ -2494,6 +2588,10 @@ find-cache-dir@^0.1.1: mkdirp "^0.5.1" pkg-dir "^1.0.0" +find-index@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -2501,6 +2599,35 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" +findup-sync@^0.4.0, findup-sync@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.4.3.tgz#40043929e7bc60adf0b7f4827c4c6e75a0deca12" + dependencies: + detect-file "^0.1.0" + is-glob "^2.0.1" + micromatch "^2.3.7" + resolve-dir "^0.1.0" + +fined@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/fined/-/fined-1.0.2.tgz#5b28424b760d7598960b7ef8480dff8ad3660e97" + dependencies: + expand-tilde "^1.2.1" + lodash.assignwith "^4.0.7" + lodash.isempty "^4.2.1" + lodash.isplainobject "^4.0.4" + lodash.isstring "^4.0.1" + lodash.pick "^4.2.1" + parse-filepath "^1.0.1" + +first-chunk-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e" + +flagged-respawn@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-0.3.2.tgz#ff191eddcd7088a675b2610fffc976be9b8074b5" + flat-cache@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" @@ -2604,6 +2731,10 @@ from@~0: version "0.1.3" resolved "https://registry.yarnpkg.com/from/-/from-0.1.3.tgz#ef63ac2062ac32acf7862e0d40b44b896f22f3bc" +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "http://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + fs-extra@^0.30.0: version "0.30.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" @@ -2614,6 +2745,14 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" +fs-extra@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + fs-readdir-recursive@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560" @@ -2667,6 +2806,12 @@ gauge@~2.7.1: strip-ansi "^3.0.1" wide-align "^1.1.0" +gaze@^0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-0.5.2.tgz#40b709537d24d1d45767db5a908689dfe69ac44f" + dependencies: + globule "~0.1.0" + gaze@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.2.tgz#847224677adb8870d679257ed3388fdb61e40105" @@ -2683,6 +2828,10 @@ generate-object-property@^1.1.0: dependencies: is-property "^1.0.0" +generic-pool@2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/generic-pool/-/generic-pool-2.4.2.tgz#886bc5bf0beb7db96e81bcbba078818de5a62683" + get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" @@ -2719,6 +2868,29 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" +glob-stream@^3.1.5: + version "3.1.18" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-3.1.18.tgz#9170a5f12b790306fdfe598f313f8f7954fd143b" + dependencies: + glob "^4.3.1" + glob2base "^0.0.12" + minimatch "^2.0.1" + ordered-read-streams "^0.1.0" + through2 "^0.6.1" + unique-stream "^1.0.0" + +glob-watcher@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b" + dependencies: + gaze "^0.5.1" + +glob2base@^0.0.12: + version "0.0.12" + resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56" + dependencies: + find-index "^0.1.1" + glob@7.0.5: version "7.0.5" resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" @@ -2730,6 +2902,15 @@ glob@7.0.5: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^4.3.1: + version "4.5.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "^2.0.1" + once "^1.3.0" + glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@~7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" @@ -2741,6 +2922,30 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@~7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@~3.1.21: + version "3.1.21" + resolved "https://registry.yarnpkg.com/glob/-/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd" + dependencies: + graceful-fs "~1.2.0" + inherits "1" + minimatch "~0.2.11" + +global-modules@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d" + dependencies: + global-prefix "^0.1.4" + is-windows "^0.2.0" + +global-prefix@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-0.1.5.tgz#8d3bc6b8da3ca8112a160d8d496ff0462bfef78f" + dependencies: + homedir-polyfill "^1.0.0" + ini "^1.3.4" + is-windows "^0.2.0" + which "^1.2.12" + globals@^9.0.0, globals@^9.14.0: version "9.16.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.16.0.tgz#63e903658171ec2d9f51b1d31de5e2b8dc01fb80" @@ -2764,6 +2969,20 @@ globule@^1.0.0: lodash "~4.16.4" minimatch "~3.0.2" +globule@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5" + dependencies: + glob "~3.1.21" + lodash "~1.0.1" + minimatch "~0.2.11" + +glogg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.0.tgz#7fe0f199f57ac906cf512feead8f90ee4a284fc5" + dependencies: + sparkles "^1.0.0" + got@^3.2.0: version "3.3.1" resolved "https://registry.yarnpkg.com/got/-/got-3.3.1.tgz#e5d0ed4af55fc3eef4d56007769d98192bcb2eca" @@ -2779,10 +2998,20 @@ got@^3.2.0: read-all-stream "^3.0.0" timed-out "^2.0.0" +graceful-fs@^3.0.0: + version "3.0.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818" + dependencies: + natives "^1.1.0" + graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" +graceful-fs@~1.2.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364" + "graceful-readlink@>= 1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" @@ -2791,6 +3020,60 @@ growl@1.9.2: version "1.9.2" resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" +gulp-help@~1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/gulp-help/-/gulp-help-1.6.1.tgz#261db186e18397fef3f6a2c22e9c315bfa88ae0c" + dependencies: + chalk "^1.0.0" + object-assign "^3.0.0" + +gulp-util@^3.0.0: + version "3.0.8" + resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" + dependencies: + array-differ "^1.0.0" + array-uniq "^1.0.2" + beeper "^1.0.0" + chalk "^1.0.0" + dateformat "^2.0.0" + fancy-log "^1.1.0" + gulplog "^1.0.0" + has-gulplog "^0.1.0" + lodash._reescape "^3.0.0" + lodash._reevaluate "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.template "^3.0.0" + minimist "^1.1.0" + multipipe "^0.1.2" + object-assign "^3.0.0" + replace-ext "0.0.1" + through2 "^2.0.0" + vinyl "^0.5.0" + +gulp@^3.9.1: + version "3.9.1" + resolved "https://registry.yarnpkg.com/gulp/-/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4" + dependencies: + archy "^1.0.0" + chalk "^1.0.0" + deprecated "^0.0.1" + gulp-util "^3.0.0" + interpret "^1.0.0" + liftoff "^2.1.0" + minimist "^1.1.0" + orchestrator "^0.3.0" + pretty-hrtime "^1.0.0" + semver "^4.1.0" + tildify "^1.0.0" + v8flags "^2.0.2" + vinyl-fs "^0.3.0" + +gulplog@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + dependencies: + glogg "^1.0.0" + har-validator@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" @@ -2810,6 +3093,12 @@ has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" +has-gulplog@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" + dependencies: + sparkles "^1.0.0" + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -2867,6 +3156,12 @@ home-path@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/home-path/-/home-path-1.0.3.tgz#9ece59fec3f032e6d10b5434fee264df4c2de32f" +homedir-polyfill@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" + dependencies: + parse-passwd "^1.0.0" + hosted-git-info@^2.1.4: version "2.2.0" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.2.0.tgz#7a0d097863d886c0fabbdcd37bf1758d8becf8a5" @@ -3013,6 +3308,10 @@ infinity-agent@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/infinity-agent/-/infinity-agent-2.0.3.tgz#45e0e2ff7a9eb030b27d62b74b3744b7a7ac4216" +inflection@^1.6.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.12.0.tgz#a200935656d6f5f6bc4dc7502e1aecb703228416" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -3020,6 +3319,10 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" +inherits@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b" + inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -3028,7 +3331,7 @@ inherits@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" -ini@1.x.x, ini@~1.3.0: +ini@1.x.x, ini@^1.3.4, ini@~1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" @@ -3083,6 +3386,13 @@ is-absolute-url@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" +is-absolute@^0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.2.6.tgz#20de69f3db942ef2d87b9c2da36f172235b1b5eb" + dependencies: + is-relative "^0.2.1" + is-windows "^0.2.0" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -3216,6 +3526,12 @@ is-regex@^1.0.3: dependencies: has "^1.0.1" +is-relative@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.2.1.tgz#d27f4c7d516d175fb610db84bbeef23c3bc97aa5" + dependencies: + is-unc-path "^0.1.1" + is-resolvable@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" @@ -3240,10 +3556,20 @@ is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" +is-unc-path@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-0.1.2.tgz#6ab053a72573c10250ff416a3814c35178af39b9" + dependencies: + unc-path-regex "^0.1.0" + is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" +is-windows@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" + isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -3283,6 +3609,15 @@ js-base64@^2.1.9: version "2.1.9" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" +js-beautify@^1.5.4: + version "1.6.11" + resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.6.11.tgz#538a22867e669250935bcdc7b90a8cd6386ddab6" + dependencies: + config-chain "~1.1.5" + editorconfig "^0.13.2" + mkdirp "~0.5.0" + nopt "~3.0.1" + js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" @@ -3421,6 +3756,20 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +liftoff@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.3.0.tgz#a98f2ff67183d8ba7cfaca10548bd7ff0550b385" + dependencies: + extend "^3.0.0" + findup-sync "^0.4.2" + fined "^1.0.1" + flagged-respawn "^0.3.2" + lodash.isplainobject "^4.0.4" + lodash.isstring "^4.0.1" + lodash.mapvalues "^4.4.0" + rechoir "^0.6.2" + resolve "^1.1.7" + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -3459,6 +3808,14 @@ lodash._basecreate@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" +lodash._basetostring@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" + +lodash._basevalues@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" + lodash._bindcallback@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" @@ -3479,6 +3836,22 @@ lodash._isiterateecall@^3.0.0: version "3.0.9" resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" +lodash._reescape@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" + +lodash._reevaluate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash._root@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + lodash.assign@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-3.2.0.tgz#3ce9f0234b4b2223e296b8fa0ac1fee8ebca64fa" @@ -3491,6 +3864,10 @@ lodash.assign@^4.0.3, lodash.assign@^4.0.6, lodash.assign@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" +lodash.assignwith@^4.0.7: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz#127a97f02adc41751a954d24b0de17e100e038eb" + lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -3518,6 +3895,12 @@ lodash.defaults@^3.1.2: lodash.assign "^3.0.0" lodash.restparam "^3.0.0" +lodash.escape@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" + dependencies: + lodash._root "^3.0.0" + lodash.isarguments@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" @@ -3526,10 +3909,18 @@ lodash.isarray@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" -lodash.isplainobject@^4.0.6: +lodash.isempty@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.isempty/-/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e" + +lodash.isplainobject@^4.0.4, lodash.isplainobject@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + lodash.keys@^3.0.0, lodash.keys@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" @@ -3538,6 +3929,10 @@ lodash.keys@^3.0.0, lodash.keys@^3.1.2: lodash.isarguments "^3.0.0" lodash.isarray "^3.0.0" +lodash.mapvalues@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" + lodash.memoize@^4.1.0: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" @@ -3546,6 +3941,10 @@ lodash.mergewith@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.0.tgz#150cf0a16791f5903b8891eab154609274bdea55" +lodash.pick@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + lodash.pickby@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" @@ -3558,6 +3957,27 @@ lodash.tail@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.tail/-/lodash.tail-4.1.1.tgz#d2333a36d9e7717c8ad2f7cacafec7c32b444664" +lodash.template@^3.0.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" + dependencies: + lodash._basecopy "^3.0.0" + lodash._basetostring "^3.0.0" + lodash._basevalues "^3.0.0" + lodash._isiterateecall "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash.keys "^3.0.0" + lodash.restparam "^3.0.0" + lodash.templatesettings "^3.0.0" + +lodash.templatesettings@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash.uniq@^4.3.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" @@ -3566,10 +3986,18 @@ lodash@3.0.x: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.0.1.tgz#14d49028a38bc740241d11e2ecd57ec06d73c19a" -lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.3, lodash@^4.2.0, lodash@^4.3.0: +lodash@4.12.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.12.0.tgz#2bd6dc46a040f59e686c972ed21d93dc59053258" + +lodash@^4.0.0, lodash@^4.12.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.3, lodash@^4.2.0, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" +lodash@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551" + lodash@~4.16.4: version "4.16.6" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.16.6.tgz#d22c9ac660288f3843e16ba7d2b5d06cca27d777" @@ -3599,6 +4027,16 @@ lowercase-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" +lru-cache@2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" + +lru-cache@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee" + dependencies: + pseudomap "^1.0.1" + lru-cache@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" @@ -3616,6 +4054,10 @@ macaddress@^0.2.8: version "0.2.8" resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" +map-cache@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" @@ -3644,7 +4086,7 @@ media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" -memoizee@^0.3.9: +memoizee@^0.3.9, memoizee@~0.3.8: version "0.3.10" resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.3.10.tgz#4eca0d8aed39ec9d017f4c5c2f2f6432f42e5c8f" dependencies: @@ -3686,7 +4128,7 @@ methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" -micromatch@^2.1.5: +micromatch@^2.1.5, micromatch@^2.3.7: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" dependencies: @@ -3733,12 +4175,25 @@ minimalistic-assert@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" +minimatch@^2.0.1: + version "2.0.10" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" + dependencies: + brace-expansion "^1.0.0" + minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@~3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: brace-expansion "^1.0.0" +minimatch@~0.2.11: + version "0.2.14" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a" + dependencies: + lru-cache "2" + sigmund "~1.0.0" + minimist@0.0.8, minimist@~0.0.1: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -3800,7 +4255,13 @@ mocha@^3.2.0: mkdirp "0.5.1" supports-color "3.1.2" -moment@^2.17.1: +moment-timezone@^0.5.4: + version "0.5.11" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.11.tgz#9b76c03d8ef514c7e4249a7bbce649eed39ef29f" + dependencies: + moment ">= 2.6.0" + +"moment@>= 2.6.0", moment@^2.13.0, moment@^2.15.1, moment@^2.17.1, moment@^2.8.3: version "2.17.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.17.1.tgz#fed9506063f36b10f066c8b59a144d7faebe1d82" @@ -3822,6 +4283,12 @@ ms@0.7.2: version "0.7.2" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" +multipipe@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" + dependencies: + duplexer2 "0.0.2" + mute-stream@0.0.5, mute-stream@~0.0.4: version "0.0.5" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" @@ -3830,6 +4297,14 @@ nan@^2.3.0, nan@^2.3.2: version "2.5.1" resolved "https://registry.yarnpkg.com/nan/-/nan-2.5.1.tgz#d5b01691253326a97a2bbee9e61c55d8d60351e2" +nan@~2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.4.0.tgz#fb3c59d45fe4effe215f0b890f8adf6eb32d2232" + +natives@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31" + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -3947,7 +4422,7 @@ node-libs-browser@^2.0.0: util "^0.10.3" vm-browserify "0.0.4" -node-pre-gyp@^0.6.29: +node-pre-gyp@^0.6.29, node-pre-gyp@~0.6.31: version "0.6.33" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.33.tgz#640ac55198f6a925972e0c16c4ac26a034d5ecc9" dependencies: @@ -4003,7 +4478,7 @@ nodemon@^1.11.0: undefsafe "0.0.3" update-notifier "0.5.0" -"nopt@2 || 3", nopt@~3.0.6: +"nopt@2 || 3", nopt@~3.0.1, nopt@~3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" dependencies: @@ -4183,11 +4658,23 @@ optionator@^0.8.2: type-check "~0.3.2" wordwrap "~1.0.0" +orchestrator@^0.3.0: + version "0.3.8" + resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e" + dependencies: + end-of-stream "~0.1.5" + sequencify "~0.0.7" + stream-consume "~0.1.0" + +ordered-read-streams@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126" + os-browserify@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" -os-homedir@^1.0.0: +os-homedir@^1.0.0, os-homedir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -4243,6 +4730,14 @@ parse-asn1@^5.0.0: evp_bytestokey "^1.0.0" pbkdf2 "^3.0.3" +parse-filepath@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.1.tgz#159d6155d43904d16c10ef698911da1e91969b73" + dependencies: + is-absolute "^0.2.3" + map-cache "^0.2.0" + path-root "^0.1.1" + parse-glob@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" @@ -4258,6 +4753,10 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + parseurl@~1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" @@ -4310,6 +4809,16 @@ path-is-inside@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" +path-root-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" + +path-root@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" + dependencies: + path-root-regex "^0.1.0" + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -4644,6 +5153,10 @@ pretty-error@^2.0.2: renderkid "~2.0.0" utila "~0.4" +pretty-hrtime@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" + prettyjson@^1.1.2: version "1.2.1" resolved "https://registry.yarnpkg.com/prettyjson/-/prettyjson-1.2.1.tgz#fcffab41d19cab4dfae5e575e64246619b12d289" @@ -4690,6 +5203,10 @@ prompt@0.2.14: utile "0.2.x" winston "0.8.x" +proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + proxy-addr@~1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.3.tgz#dc97502f5722e888467b3fa2297a7b1ff47df074" @@ -4908,7 +5425,7 @@ read@1.0.x: dependencies: mute-stream "~0.0.4" -readable-stream@1.0: +readable-stream@1.0, "readable-stream@>=1.0.33-1 <1.1.0-0": version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" dependencies: @@ -4984,6 +5501,10 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" +redefine@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/redefine/-/redefine-0.2.1.tgz#e89ee7a6f24d19fff62590569332dc60380a89a3" + redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" @@ -5094,6 +5615,10 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" +replace-ext@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" + request@2, request@^2.45.0, request@^2.61.0, request@^2.72.0, request@^2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" @@ -5134,6 +5659,13 @@ require-uncached@^1.0.2: caller-path "^0.1.0" resolve-from "^1.0.0" +resolve-dir@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e" + dependencies: + expand-tilde "^1.2.2" + global-modules "^0.2.3" + resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" @@ -5142,7 +5674,7 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.1.6: +resolve@^1.0.0, resolve@^1.1.6, resolve@^1.1.7: version "1.2.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" @@ -5159,6 +5691,14 @@ resumer@~0.0.0: dependencies: through "~2.3.4" +retry-as-promised@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/retry-as-promised/-/retry-as-promised-2.2.0.tgz#b0463d7fd3cf5b2fed64500ab6e8b8a49c5b8e6c" + dependencies: + bluebird "^3.4.6" + cross-env "^3.1.2" + debug "^2.2.0" + revalidator@0.1.x: version "0.1.8" resolved "https://registry.yarnpkg.com/revalidator/-/revalidator-0.1.8.tgz#fece61bfa0c1b52a206bd6b18198184bdd523a3b" @@ -5222,10 +5762,14 @@ semver-diff@^2.0.0: dependencies: semver "^5.0.3" -"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.0.3, semver@^5.3.0, semver@~5.3.0: +"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.0.1, semver@^5.0.3, semver@^5.3.0, semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" +semver@^4.1.0: + version "4.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + semver@~5.0.1: version "5.0.3" resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a" @@ -5248,6 +5792,48 @@ send@0.14.2: range-parser "~1.2.0" statuses "~1.3.1" +sequelize-cli@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/sequelize-cli/-/sequelize-cli-2.5.1.tgz#cea4c74fbbc069c3bad09fd0fdff7f6a8a24c1ef" + dependencies: + bluebird "^3.4.5" + cli-color "~0.3.2" + findup-sync "^0.4.0" + fs-extra "^1.0.0" + gulp "^3.9.1" + gulp-help "~1.6.1" + js-beautify "^1.5.4" + lodash "^4.12.0" + moment "^2.15.1" + resolve "^1.0.0" + umzug "^1.9.1" + yargs "^6.5.0" + +sequelize@^3.30.2: + version "3.30.2" + resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-3.30.2.tgz#8fb5a5769a01777451593924092f9d3061eb935f" + dependencies: + bluebird "^3.3.4" + depd "^1.1.0" + dottie "^1.0.0" + generic-pool "2.4.2" + inflection "^1.6.0" + lodash "4.12.0" + moment "^2.13.0" + moment-timezone "^0.5.4" + retry-as-promised "^2.0.0" + semver "^5.0.1" + shimmer "1.1.0" + terraformer-wkt-parser "^1.1.0" + toposort-class "^1.0.1" + uuid "^3.0.0" + validator "^5.2.0" + wkx "0.2.0" + +sequencify@~0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c" + serve-static@~1.11.2: version "1.11.2" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.11.2.tgz#2cf9889bd4435a320cc36895c9aa57bd662e6ac7" @@ -5293,6 +5879,10 @@ shelljs@^0.7.5: interpret "^1.0.0" rechoir "^0.6.2" +shimmer@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.1.0.tgz#97d7377137ffbbab425522e429fe0aa89a488b35" + shush@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shush/-/shush-1.0.0.tgz#c27415a9e458f2fed39b27cf8eb37c003782b431" @@ -5300,6 +5890,10 @@ shush@^1.0.0: caller "~0.0.1" strip-json-comments "~0.1.1" +sigmund@^1.0.1, sigmund@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + signal-exit@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -5374,6 +5968,10 @@ source-map@~0.1.30: dependencies: amdefine ">=0.0.4" +sparkles@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" + spdx-correct@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" @@ -5408,6 +6006,13 @@ sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" +sqlite3@^3.1.8: + version "3.1.8" + resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-3.1.8.tgz#4cbcf965d8b901d1b1015cbc7fc415aae157dfaa" + dependencies: + nan "~2.4.0" + node-pre-gyp "~0.6.31" + sshpk@^1.7.0: version "1.10.2" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.2.tgz#d5a804ce22695515638e798dbe23273de070a5fa" @@ -5454,7 +6059,7 @@ stream-combiner@~0.0.4: dependencies: duplexer "~0.1.1" -stream-consume@^0.1.0: +stream-consume@^0.1.0, stream-consume@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f" @@ -5519,6 +6124,13 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" +strip-bom@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794" + dependencies: + first-chunk-stream "^1.0.0" + is-utf8 "^0.2.0" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -5637,6 +6249,16 @@ tar@^2.0.0, tar@~2.2.1: fstream "^1.0.2" inherits "2" +terraformer-wkt-parser@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/terraformer-wkt-parser/-/terraformer-wkt-parser-1.1.2.tgz#336a0c8fc82094a5aff83288f69aedecd369bf0c" + dependencies: + terraformer "~1.0.5" + +terraformer@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/terraformer/-/terraformer-1.0.7.tgz#d8a19a56fbf25966ea062d21f515b93589702d69" + text-hex@0.0.x: version "0.0.0" resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-0.0.0.tgz#578fbc85a6a92636e42dd17b41d0218cce9eb2b3" @@ -5649,7 +6271,14 @@ throttleit@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-0.0.2.tgz#cfedf88e60c00dd9697b61fdd2a8343a9b680eaf" -through2@^2.0.2: +through2@^0.6.1: + version "0.6.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" + dependencies: + readable-stream ">=1.0.33-1 <1.1.0-0" + xtend ">=4.0.0 <4.1.0-0" + +through2@^2.0.0, through2@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" dependencies: @@ -5667,6 +6296,16 @@ through@2, through@^2.3.6, through@~2.3, through@~2.3.1, through@~2.3.4: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" +tildify@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a" + dependencies: + os-homedir "^1.0.0" + +time-stamp@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151" + timed-out@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-2.0.0.tgz#f38b0ae81d3747d628001f41dafc652ace671c0a" @@ -5696,6 +6335,10 @@ to-fast-properties@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" +toposort-class@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toposort-class/-/toposort-class-1.0.1.tgz#7ffd1f78c8be28c3ba45cd4e1a3f5ee193bd9988" + toposort@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.3.tgz#f02cd8a74bd8be2fc0e98611c3bacb95a171869c" @@ -5786,6 +6429,20 @@ uid2@0.0.x: version "0.0.3" resolved "https://registry.yarnpkg.com/uid2/-/uid2-0.0.3.tgz#483126e11774df2f71b8b639dcd799c376162b82" +umzug@^1.9.1: + version "1.11.0" + resolved "https://registry.yarnpkg.com/umzug/-/umzug-1.11.0.tgz#6531ad4b5b650957d1791f98189f435235d07cce" + dependencies: + bluebird "^3.0.1" + lodash "^4.3.0" + moment "^2.8.3" + redefine "^0.2.0" + resolve "^1.0.0" + +unc-path-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + undefsafe@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-0.0.3.tgz#ecca3a03e56b9af17385baac812ac83b994a962f" @@ -5804,6 +6461,10 @@ uniqs@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" +unique-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b" + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -5889,7 +6550,7 @@ uuid@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" -v8flags@^2.0.10: +v8flags@^2.0.10, v8flags@^2.0.2: version "2.0.11" resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.0.11.tgz#bca8f30f0d6d60612cc2c00641e6962d42ae6881" dependencies: @@ -5902,6 +6563,10 @@ validate-npm-package-license@^3.0.1: spdx-correct "~1.0.0" spdx-expression-parse "~1.0.0" +validator@^5.2.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-5.7.0.tgz#7a87a58146b695ac486071141c0c49d67da05e5c" + vary@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.0.tgz#e1e5affbbd16ae768dd2674394b9ad3022653140" @@ -5916,6 +6581,34 @@ verror@1.3.6: dependencies: extsprintf "1.0.2" +vinyl-fs@^0.3.0: + version "0.3.14" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6" + dependencies: + defaults "^1.0.0" + glob-stream "^3.1.5" + glob-watcher "^0.0.6" + graceful-fs "^3.0.0" + mkdirp "^0.5.0" + strip-bom "^1.0.0" + through2 "^0.6.1" + vinyl "^0.4.0" + +vinyl@^0.4.0: + version "0.4.6" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847" + dependencies: + clone "^0.2.0" + clone-stats "^0.0.1" + +vinyl@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + vm-browserify@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" @@ -6002,7 +6695,7 @@ which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@1, which@^1.2.9: +which@1, which@^1.2.12, which@^1.2.9: version "1.2.12" resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" dependencies: @@ -6045,6 +6738,10 @@ winston@0.8.x, winston@~0.8.1: pkginfo "0.3.x" stack-trace "0.0.x" +wkx@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/wkx/-/wkx-0.2.0.tgz#76c24f16acd0cd8f93cd34aa331e0f7961256e84" + wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" @@ -6096,7 +6793,7 @@ xss-filters@^1.2.6: version "1.2.7" resolved "https://registry.yarnpkg.com/xss-filters/-/xss-filters-1.2.7.tgz#59fa1de201f36f2f3470dcac5f58ccc2830b0a9a" -xtend@^4.0.0, xtend@~4.0.1: +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -6146,7 +6843,7 @@ yargs@^4.7.1: y18n "^3.2.1" yargs-parser "^2.4.1" -yargs@^6.0.0: +yargs@^6.0.0, yargs@^6.5.0: version "6.6.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" dependencies: From 0ee8a6b778d02bc8c79ebaee5d1fc2706c2ebbb9 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Sun, 26 Feb 2017 18:44:39 -0800 Subject: [PATCH 04/54] renamed routes init file linted code updated syntax --- .gitignore | 3 +++ models/User.js | 22 +++++++++++----------- models/index.js | 2 -- routes/{init.js => index.js} | 25 +++++++++---------------- server.js | 11 +++++------ 5 files changed, 28 insertions(+), 35 deletions(-) rename routes/{init.js => index.js} (76%) diff --git a/.gitignore b/.gitignore index 8004054748..2a6a40fd13 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Database +db.sqlite + # Logs logs *.log diff --git a/models/User.js b/models/User.js index 66295d7058..f629102342 100644 --- a/models/User.js +++ b/models/User.js @@ -1,33 +1,33 @@ -module.exports = (sequelize, DataTypes) => sequelize.define('user', { +export default (sequelize, { STRING, BOOLEAN, INTEGER }) => sequelize.define('user', { sub: { - type: DataTypes.STRING, + type: STRING, }, name: { - type: DataTypes.STRING, + type: STRING, }, given_name: { - type: DataTypes.STRING, + type: STRING, }, family_name: { - type: DataTypes.STRING, + type: STRING, }, profile: { - type: DataTypes.STRING, + type: STRING, }, picture: { - type: DataTypes.STRING, + type: STRING, }, email: { - type: DataTypes.STRING, + type: STRING, }, email_verified: { - type: DataTypes.BOOLEAN, + type: BOOLEAN, }, gender: { - type: DataTypes.STRING, + type: STRING, }, logins: { - type: DataTypes.INTEGER, + type: INTEGER, }, }, { freezeTableName: true, // Model tableName will be the same as the model name diff --git a/models/index.js b/models/index.js index fc45b437f9..b95cd97be1 100644 --- a/models/index.js +++ b/models/index.js @@ -3,8 +3,6 @@ import path from 'path'; import Sequelize from 'sequelize'; import 'dotenv/config'; -const env = process.env.NODE_ENV || 'development'; - const sequelize = new Sequelize('db', null, null, { dialect: 'sqlite', storage: path.join(__dirname, '../', 'db.sqlite'), diff --git a/routes/init.js b/routes/index.js similarity index 76% rename from routes/init.js rename to routes/index.js index e21b0d249f..c1b18d136b 100644 --- a/routes/init.js +++ b/routes/index.js @@ -1,17 +1,10 @@ /* eslint-disable global-require */ import 'dotenv/config'; -import path from 'path'; -import Sequelize from 'sequelize'; -var models = require('../models'); -console.log(Object.keys(models)); -const passport = require('passport'); -const Strategy = require('passport-google-oauth20').Strategy; -const port = process.env.PORT || 7999; +import passport from 'passport'; +import { Strategy } from 'passport-google-oauth20'; +import models from '../models'; -const sequelize = new Sequelize('db', null, null, { - dialect: 'sqlite', - storage: path.join(__dirname, '../', 'db.sqlite'), -}); +const port = process.env.PORT || 7999; passport.use(new Strategy({ clientID: process.env.GOOGLE_CLIENT_ID, @@ -27,9 +20,9 @@ passport.use(new Strategy({ // allows for account linking and authentication with other identity // providers. console.log('serialize', profile._json); - + models.user.create(Object.assign({}, profile._json)).then(() => { - console.log('this works') + console.log('this works'); cb(null, profile); }); }, @@ -53,9 +46,9 @@ const routes = (app) => { app.get('/login/google/return', passport.authenticate('google', { failureRedirect: '/login' }, - ), (req, res) => { - console.log('req.user', req.user); - + ), ({ user }, res) => { + console.log('req.user', user); + res.redirect('/'); }); diff --git a/server.js b/server.js index 1dd65dd333..1595107f11 100644 --- a/server.js +++ b/server.js @@ -11,7 +11,8 @@ import webpackMiddleware from 'webpack-dev-middleware'; import webpackHotMiddleware from 'webpack-hot-middleware'; import config from './webpack/webpack.config'; -import routes from './routes/init'; +import routes from './routes'; +import models from './models'; const port = process.env.PORT || 7999; const env = process.env.NODE_ENV || 'development'; @@ -26,15 +27,13 @@ app.use(bodyParser.json()); if (!module.parent) app.use(morgan('combined')); app.use(express.static(path.join(__dirname, 'public'))); -var models = require("./models"); -models.sequelize.sync().then(function () { +models.sequelize.sync().then(() => { app.listen(port); - app.on('error', (error) => { console.error('error', error);}); - app.on('listening', (info) => { console.info('info', info);}); + app.on('error', (error) => { console.error('error', error); }); + app.on('listening', (info) => { console.info('info', info); }); }); - routes(app); if (env === 'development') { // eslint-disable-line eqeqeq From b7b4ded9f249f319f12aa1a5a16992b3dbe079f7 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Sun, 26 Feb 2017 22:21:02 -0800 Subject: [PATCH 05/54] added notes --- models/User.js | 3 +++ routes/index.js | 42 ++++++++++++++++++++++++++---------------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/models/User.js b/models/User.js index f629102342..8958756f5c 100644 --- a/models/User.js +++ b/models/User.js @@ -29,6 +29,9 @@ export default (sequelize, { STRING, BOOLEAN, INTEGER }) => sequelize.define('us logins: { type: INTEGER, }, + hd: { + type: STRING, + } }, { freezeTableName: true, // Model tableName will be the same as the model name }); diff --git a/routes/index.js b/routes/index.js index c1b18d136b..739a904d27 100644 --- a/routes/index.js +++ b/routes/index.js @@ -14,26 +14,32 @@ passport.use(new Strategy({ scope: ['email'], }, (accessToken, refreshToken, profile, cb) => { - // In this example, the user's Facebook profile is supplied as the user - // record. In a production-quality application, the Facebook profile should - // be associated with a user record in the application's database, which - // allows for account linking and authentication with other identity - // providers. - console.log('serialize', profile._json); - - models.user.create(Object.assign({}, profile._json)).then(() => { - console.log('this works'); + models.user.findOrCreate({ + where: Object.assign({ token : accessToken }, profile._json), + }).then((user) => { + console.log('user.values', user.values); cb(null, profile); + }).catch((err) => { + console.log('Error occured', err); }); }, )); passport.serializeUser((user, cb) => { - cb(null, user); + cb(null, user.id); }); -passport.deserializeUser((obj, cb) => { - cb(null, obj); +passport.deserializeUser((id, cb) => { + models.user.findOne({ + where: { + id: id + } + }).then((user) => { + console.log('user1', user); + cb(null, user); + }).catch((err) => { + console.log('Error occured', err); + }); }); @@ -41,14 +47,18 @@ const routes = (app) => { app.use(passport.initialize()); app.use(passport.session()); - app.get('/login/google', - passport.authenticate('google', { scope: ['email'] })); + app.get('/login/google', passport.authenticate('google')); app.get('/login/google/return', passport.authenticate('google', { failureRedirect: '/login' }, - ), ({ user }, res) => { - console.log('req.user', user); + ), (req, res) => { + console.log('req.user', req.user); + res.redirect('/'); + }); + // NOTE should also delete token + app.get('/logout', (req, res) => { + if (req.user) req.logout(); res.redirect('/'); }); From 7126c58134df7ab77b9c911f52454ace54b09794 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Tue, 28 Feb 2017 01:07:37 -0800 Subject: [PATCH 06/54] added session store --- package.json | 3 +++ server.js | 12 ++++++++++ yarn.lock | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 76 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8734546dd1..a1b7ce6106 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,12 @@ "babel-register": "^6.23.0", "body-parser": "^1.16.1", "compression": "^1.6.2", + "connect": "^3.6.0", + "connect-sqlite3": "^0.9.9", "css-loader": "^0.26.1", "dotenv": "^4.0.0", "express": "^4.14.1", + "express-session": "^1.15.1", "extract-text-webpack-plugin": "^2.0.0-rc.3", "file-loader": "^0.10.0", "forever": "^0.15.3", diff --git a/server.js b/server.js index 1595107f11..23b3c33dfd 100644 --- a/server.js +++ b/server.js @@ -5,6 +5,8 @@ import express from 'express'; import bodyParser from 'body-parser'; import compress from 'compression'; import morgan from 'morgan'; +import session from 'express-session'; +import store from 'connect-sqlite3'; import webpack from 'webpack'; import webpackMiddleware from 'webpack-dev-middleware'; @@ -19,10 +21,20 @@ const env = process.env.NODE_ENV || 'development'; const app = express(); +const SQLiteStore = store(session); + app.use(compress()); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); +app.use(session({ + resave: false, + saveUninitialized: false, + store: new SQLiteStore({ dir: './db' }), + secret: 'testestestestestestest', + cookie: { maxAge: 7 * 24 * 60 * 60 * 1000 } // 1 week +})); + // prevents logs from polluting test results if (!module.parent) app.use(morgan('combined')); app.use(express.static(path.join(__dirname, 'public'))); diff --git a/yarn.lock b/yarn.lock index 4c3f2c6792..b8fd35a90a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -914,6 +914,10 @@ base64-js@^1.0.2: version "1.2.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" +base64-url@1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/base64-url/-/base64-url-1.3.3.tgz#f8b6c537f09a4fc58c99cb86e0b0e9c61461a20f" + basic-auth@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-1.1.0.tgz#45221ee429f7ee1e5035be3f51533f1cdfd29884" @@ -1488,6 +1492,21 @@ configstore@^1.0.0: write-file-atomic "^1.1.2" xdg-basedir "^2.0.0" +connect-sqlite3@^0.9.9: + version "0.9.9" + resolved "https://registry.yarnpkg.com/connect-sqlite3/-/connect-sqlite3-0.9.9.tgz#3eeaddc0a67f96b4178e9322479a77d2290e8884" + dependencies: + sqlite3 "^3.1.1" + +connect@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.0.tgz#f09a4f7dcd17324b663b725c815bdb1c4158a46e" + dependencies: + debug "2.6.1" + finalhandler "1.0.0" + parseurl "~1.3.1" + utils-merge "1.0.0" + console-browserify@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" @@ -1538,6 +1557,10 @@ core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +crc@3.4.4: + version "3.4.4" + resolved "https://registry.yarnpkg.com/crc/-/crc-3.4.4.tgz#9da1e980e3bd44fc5c93bf5ab3da3378d85e466b" + create-ecdh@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" @@ -2436,6 +2459,20 @@ expand-tilde@^1.2.1, expand-tilde@^1.2.2: dependencies: os-homedir "^1.0.1" +express-session@^1.15.1: + version "1.15.1" + resolved "https://registry.yarnpkg.com/express-session/-/express-session-1.15.1.tgz#9abba15971beea7ad98da5a4d25ed92ba4a2984e" + dependencies: + cookie "0.3.1" + cookie-signature "1.0.6" + crc "3.4.4" + debug "2.6.1" + depd "~1.1.0" + on-headers "~1.0.1" + parseurl "~1.3.1" + uid-safe "~2.1.3" + utils-merge "1.0.0" + express@^4.14.1: version "4.14.1" resolved "https://registry.yarnpkg.com/express/-/express-4.14.1.tgz#646c237f766f148c2120aff073817b9e4d7e0d33" @@ -2580,6 +2617,18 @@ finalhandler@0.5.1: statuses "~1.3.1" unpipe "~1.0.0" +finalhandler@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.0.tgz#b5691c2c0912092f18ac23e9416bde5cd7dc6755" + dependencies: + debug "2.6.1" + encodeurl "~1.0.1" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.1" + statuses "~1.3.1" + unpipe "~1.0.0" + find-cache-dir@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" @@ -5296,6 +5345,10 @@ ramda@^0.22.1: version "0.22.1" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.22.1.tgz#031da0c3df417c5b33c96234757eb37033f36a0e" +random-bytes@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/random-bytes/-/random-bytes-1.0.0.tgz#4f68a1dc0ae58bd3fb95848c30324db75d64360b" + randomatic@^1.1.3: version "1.1.6" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" @@ -6006,7 +6059,7 @@ sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" -sqlite3@^3.1.8: +sqlite3@^3.1.1, sqlite3@^3.1.8: version "3.1.8" resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-3.1.8.tgz#4cbcf965d8b901d1b1015cbc7fc415aae157dfaa" dependencies: @@ -6425,6 +6478,13 @@ uid-number@~0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" +uid-safe@~2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/uid-safe/-/uid-safe-2.1.3.tgz#077e264a00b3187936b270bb7376a26473631071" + dependencies: + base64-url "1.3.3" + random-bytes "~1.0.0" + uid2@0.0.x: version "0.0.3" resolved "https://registry.yarnpkg.com/uid2/-/uid2-0.0.3.tgz#483126e11774df2f71b8b639dcd799c376162b82" From 7430a08b3a769d76cb4b6c3da5a242b1a756b692 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Fri, 3 Mar 2017 03:44:04 -0800 Subject: [PATCH 07/54] refactored database --- app/pages/Login.js | 25 +++++++++++++++---------- models/index.js | 26 ++++++++++++++------------ package.json | 3 +++ routes/index.js | 17 +++++++++-------- server.js | 10 ++-------- yarn.lock | 21 +++++++++++++++++++++ 6 files changed, 64 insertions(+), 38 deletions(-) diff --git a/app/pages/Login.js b/app/pages/Login.js index 113dc8ca87..a67e02f8d1 100644 --- a/app/pages/Login.js +++ b/app/pages/Login.js @@ -2,6 +2,19 @@ import React, { Component } from 'react'; import { Link, withRouter } from 'react-router'; import auth from '../components/auth'; +const success = (response) => { + console.log(response); +}; + +const error = (response) => { + console.error(response); +}; + +const loading = () => { + console.log('loading'); +}; + + class Login extends Component { constructor(props) { @@ -32,7 +45,7 @@ class Login extends Component { render() { return ( -
+

Login

@@ -41,20 +54,12 @@ class Login extends Component {
-

You're about to learn a lot about me. Let me learn a little about you. I only ask for your email address and I promise not to spam you.

+

You're about to learn a lot about me. Let me learn a little about you. I only ask for your email address and I promise not to spam you. You can login with your google account below.

Login with Google

- - - (hint: password)
- - {this.state.error && ( -

Bad login information

- )} -
); diff --git a/models/index.js b/models/index.js index b95cd97be1..db4ad2685c 100644 --- a/models/index.js +++ b/models/index.js @@ -3,25 +3,27 @@ import path from 'path'; import Sequelize from 'sequelize'; import 'dotenv/config'; +const dbpath = path.join(__dirname, '../db'); + +if (!fs.existsSync(dbpath)){ + fs.mkdirSync(dbpath); +} + const sequelize = new Sequelize('db', null, null, { dialect: 'sqlite', - storage: path.join(__dirname, '../', 'db.sqlite'), + storage: path.join(dbpath, 'site.sqlite'), }); const db = {}; fs.readdirSync(__dirname) - .filter(file => (file.indexOf('.') !== 0) && (file !== 'index.js')) - .forEach((file) => { - const model = sequelize.import(path.join(__dirname, file)); - db[model.name] = model; - }); - -Object.keys(db).forEach((modelName) => { - if ('associate' in db[modelName]) { - db[modelName].associate(db); - } -}); + .filter(file => (file.indexOf('.') !== 0) && (file !== 'index.js')) + .forEach((file) => { + const model = sequelize.import(path.join(__dirname, file)); + db[model.name] = model; + }); + +sequelize.sync(); // set up db db.sequelize = sequelize; db.Sequelize = Sequelize; diff --git a/package.json b/package.json index a1b7ce6106..efb1df531d 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "compression": "^1.6.2", "connect": "^3.6.0", "connect-sqlite3": "^0.9.9", + "cookie-parser": "^1.4.3", "css-loader": "^0.26.1", "dotenv": "^4.0.0", "express": "^4.14.1", @@ -54,7 +55,9 @@ "react": "^15.4.2", "react-burger-menu": "^1.10.12", "react-dom": "^15.4.2", + "react-fontawesome": "^1.5.0", "react-ga": "^2.1.2", + "react-google-login": "^2.8.2", "react-helmet": "^4.0.0", "react-markdown": "^2.4.4", "react-router": "^3.0.2", diff --git a/routes/index.js b/routes/index.js index 739a904d27..120f350e77 100644 --- a/routes/index.js +++ b/routes/index.js @@ -15,7 +15,7 @@ passport.use(new Strategy({ }, (accessToken, refreshToken, profile, cb) => { models.user.findOrCreate({ - where: Object.assign({ token : accessToken }, profile._json), + where: { email: profile._json.email }, }).then((user) => { console.log('user.values', user.values); cb(null, profile); @@ -25,20 +25,21 @@ passport.use(new Strategy({ }, )); -passport.serializeUser((user, cb) => { - cb(null, user.id); +passport.serializeUser((user, done) => { + done(null, user.id); }); -passport.deserializeUser((id, cb) => { +passport.deserializeUser((id, done) => { models.user.findOne({ where: { id: id } - }).then((user) => { - console.log('user1', user); - cb(null, user); - }).catch((err) => { + }).success((user) => { + console.log('user1', user); + done(null, user); + }).error((err) => { console.log('Error occured', err); + done(err, null); }); }); diff --git a/server.js b/server.js index 23b3c33dfd..7c0de83b84 100644 --- a/server.js +++ b/server.js @@ -7,6 +7,7 @@ import compress from 'compression'; import morgan from 'morgan'; import session from 'express-session'; import store from 'connect-sqlite3'; +import cookieParser from 'cookie-parser'; import webpack from 'webpack'; import webpackMiddleware from 'webpack-dev-middleware'; @@ -14,7 +15,6 @@ import webpackHotMiddleware from 'webpack-hot-middleware'; import config from './webpack/webpack.config'; import routes from './routes'; -import models from './models'; const port = process.env.PORT || 7999; const env = process.env.NODE_ENV || 'development'; @@ -26,6 +26,7 @@ const SQLiteStore = store(session); app.use(compress()); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); +app.use(cookieParser()); app.use(session({ resave: false, @@ -39,13 +40,6 @@ app.use(session({ if (!module.parent) app.use(morgan('combined')); app.use(express.static(path.join(__dirname, 'public'))); -models.sequelize.sync().then(() => { - app.listen(port); - app.on('error', (error) => { console.error('error', error); }); - app.on('listening', (info) => { console.info('info', info); }); -}); - - routes(app); if (env === 'development') { // eslint-disable-line eqeqeq diff --git a/yarn.lock b/yarn.lock index b8fd35a90a..3dc5fd4018 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,10 @@ # yarn lockfile v1 +"@types/react@*": + version "15.0.13" + resolved "https://registry.yarnpkg.com/@types/react/-/react-15.0.13.tgz#7031530b0d1b77941551cda06e5b56b704505f12" + abbrev@1: version "1.1.0" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" @@ -1537,6 +1541,13 @@ convert-source-map@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.4.0.tgz#e3dad195bf61bfe13a7a3c73e9876ec14a0268f3" +cookie-parser@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/cookie-parser/-/cookie-parser-1.4.3.tgz#0fe31fa19d000b95f4aadf1f53fdc2b8a203baa5" + dependencies: + cookie "0.3.1" + cookie-signature "1.0.6" + cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" @@ -5403,12 +5414,22 @@ react-dom@^15.4.2: loose-envify "^1.1.0" object-assign "^4.1.0" +react-fontawesome@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/react-fontawesome/-/react-fontawesome-1.5.0.tgz#879d1b2aa5c48bba551e9237f84993217b5645c4" + react-ga@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/react-ga/-/react-ga-2.1.2.tgz#7af206c5e8761d7176e15773fe826acdb70ac653" dependencies: object-assign "^4.0.1" +react-google-login@^2.8.2: + version "2.8.2" + resolved "https://registry.yarnpkg.com/react-google-login/-/react-google-login-2.8.2.tgz#61ad71c3e65e07df2f818ffca1bfa156e072b972" + dependencies: + "@types/react" "*" + react-helmet@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-4.0.0.tgz#df74bcd6ff585a1ccbbfba5aaa1c346cabc43d03" From e706e5f59ca71cff798b8595d40fb35905fac564 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Thu, 23 Mar 2017 18:56:26 -0700 Subject: [PATCH 08/54] started to replace sqlite3 with mongo --- models/User.js | 51 +-- models/index.js | 31 -- package.json | 3 +- routes/index.js | 59 ++-- server.js | 22 +- yarn.lock | 877 +++++++++++++++++++++++++++--------------------- 6 files changed, 559 insertions(+), 484 deletions(-) delete mode 100644 models/index.js diff --git a/models/User.js b/models/User.js index 8958756f5c..d3f41b1888 100644 --- a/models/User.js +++ b/models/User.js @@ -1,37 +1,16 @@ -export default (sequelize, { STRING, BOOLEAN, INTEGER }) => sequelize.define('user', { - sub: { - type: STRING, - }, - name: { - type: STRING, - }, - given_name: { - type: STRING, - }, - family_name: { - type: STRING, - }, - profile: { - type: STRING, - }, - picture: { - type: STRING, - }, - email: { - type: STRING, - }, - email_verified: { - type: BOOLEAN, - }, - gender: { - type: STRING, - }, - logins: { - type: INTEGER, - }, - hd: { - type: STRING, - } -}, { - freezeTableName: true, // Model tableName will be the same as the model name +import mongoose from 'mongoose'; +const Schema = mongoose.Schema; + +const User = new Schema({ + name: String, + given_name: String, + family_name: String, + profile: String, + picture: String, + email: String, + email_verified: Boolean, + gender: String, }); + + +export default mongoose.model('users', User); diff --git a/models/index.js b/models/index.js deleted file mode 100644 index db4ad2685c..0000000000 --- a/models/index.js +++ /dev/null @@ -1,31 +0,0 @@ -import fs from 'fs'; -import path from 'path'; -import Sequelize from 'sequelize'; -import 'dotenv/config'; - -const dbpath = path.join(__dirname, '../db'); - -if (!fs.existsSync(dbpath)){ - fs.mkdirSync(dbpath); -} - -const sequelize = new Sequelize('db', null, null, { - dialect: 'sqlite', - storage: path.join(dbpath, 'site.sqlite'), -}); - -const db = {}; - -fs.readdirSync(__dirname) - .filter(file => (file.indexOf('.') !== 0) && (file !== 'index.js')) - .forEach((file) => { - const model = sequelize.import(path.join(__dirname, file)); - db[model.name] = model; - }); - -sequelize.sync(); // set up db - -db.sequelize = sequelize; -db.Sequelize = Sequelize; - -export default db; diff --git a/package.json b/package.json index 22a633752a..8ace991c83 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "html-webpack-plugin": "^2.28.0", "last.fm.api": "^0.1.3", "moment": "^2.18.0", + "mongoose": "^4.9.0", "morgan": "^1.8.1", "node-sass": "^4.5.0", "nodemon": "^1.11.0", @@ -88,4 +89,4 @@ "mocha-generators": "^2.0.0", "nightmare": "^2.10.0" } -} \ No newline at end of file +} diff --git a/routes/index.js b/routes/index.js index 120f350e77..0b01159eb2 100644 --- a/routes/index.js +++ b/routes/index.js @@ -2,57 +2,52 @@ import 'dotenv/config'; import passport from 'passport'; import { Strategy } from 'passport-google-oauth20'; -import models from '../models'; - +import User from '../models/User'; const port = process.env.PORT || 7999; +const isProduction = process.env.NODE_ENV === 'production'; + passport.use(new Strategy({ - clientID: process.env.GOOGLE_CLIENT_ID, - clientSecret: process.env.GOOGLE_CLIENT_SECRET, - callbackURL: `http://localhost:${port}/login/google/return`, - userProfileURL: 'https://www.googleapis.com/oauth2/v3/userinfo', - scope: ['email'], -}, - (accessToken, refreshToken, profile, cb) => { - models.user.findOrCreate({ - where: { email: profile._json.email }, - }).then((user) => { - console.log('user.values', user.values); - cb(null, profile); - }).catch((err) => { - console.log('Error occured', err); + clientID: process.env.GOOGLE_CLIENT_ID, + clientSecret: process.env.GOOGLE_CLIENT_SECRET, + callbackURL: `${isProduction ? 'https://mldangelo.com' : `http://localhost:${port}`}/login/google/return`, + userProfileURL: 'https://www.googleapis.com/oauth2/v3/userinfo', + scope: ['email'], + }, (token, tokenSecret, profile, done) => { + // update the user if s/he exists or add a new user + User.findOneAndUpdate({ + email: profile._json.email + }, Object.assign({}, profile._json, { updatedAt: Date.now() }), { + upsert: true + }, (err, user) => { + if (err) { + return done(err); + } else { + return done(null, user); + } }); - }, + } + )); passport.serializeUser((user, done) => { done(null, user.id); }); -passport.deserializeUser((id, done) => { - models.user.findOne({ - where: { - id: id - } - }).success((user) => { - console.log('user1', user); - done(null, user); - }).error((err) => { - console.log('Error occured', err); - done(err, null); +passport.deserializeUser(function(id, done) { + User.findById(id, function(err, user) { + done(err, user); }); }); const routes = (app) => { - app.use(passport.initialize()); - app.use(passport.session()); app.get('/login/google', passport.authenticate('google')); app.get('/login/google/return', passport.authenticate('google', { - failureRedirect: '/login' }, - ), (req, res) => { + failureRedirect: '/login' + }, ), (req, res) => { console.log('req.user', req.user); res.redirect('/'); }); diff --git a/server.js b/server.js index 7c0de83b84..4413385f1c 100644 --- a/server.js +++ b/server.js @@ -5,8 +5,6 @@ import express from 'express'; import bodyParser from 'body-parser'; import compress from 'compression'; import morgan from 'morgan'; -import session from 'express-session'; -import store from 'connect-sqlite3'; import cookieParser from 'cookie-parser'; import webpack from 'webpack'; @@ -19,9 +17,11 @@ import routes from './routes'; const port = process.env.PORT || 7999; const env = process.env.NODE_ENV || 'development'; -const app = express(); +var passport = require('passport'); +var session = require('express-session'); + -const SQLiteStore = store(session); +const app = express(); app.use(compress()); app.use(bodyParser.urlencoded({ extended: false })); @@ -29,12 +29,16 @@ app.use(bodyParser.json()); app.use(cookieParser()); app.use(session({ - resave: false, - saveUninitialized: false, - store: new SQLiteStore({ dir: './db' }), - secret: 'testestestestestestest', - cookie: { maxAge: 7 * 24 * 60 * 60 * 1000 } // 1 week + secret: 'keyboard cat', + resave: true, + saveUninitialized: true })); +app.use(passport.initialize()); +app.use(passport.session()); +var mongoose = require('mongoose'); +mongoose.connect('mongodb://localhost/mldangelo'); + + // prevents logs from polluting test results if (!module.parent) app.use(morgan('combined')); diff --git a/yarn.lock b/yarn.lock index 396ae876b8..017a694e92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,8 +3,8 @@ "@types/react@*": - version "15.0.13" - resolved "https://registry.yarnpkg.com/@types/react/-/react-15.0.13.tgz#7031530b0d1b77941551cda06e5b56b704505f12" + version "15.0.16" + resolved "https://registry.yarnpkg.com/@types/react/-/react-15.0.16.tgz#78e39511a9cfcabf7f74ecd55180522f4290a0c1" abbrev@1: version "1.1.0" @@ -18,8 +18,8 @@ accepts@~1.3.3: negotiator "0.6.1" acorn-dynamic-import@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.1.tgz#23f671eb6e650dab277fef477c321b1178a8cca2" + version "2.0.2" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" dependencies: acorn "^4.0.3" @@ -52,9 +52,9 @@ ajv-keywords@^1.0.0, ajv-keywords@^1.1.1: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" -ajv@^4.11.2, ajv@^4.7.0: - version "4.11.3" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.3.tgz#ce30bdb90d1254f762c75af915fb3a63e7183d22" +ajv@^4.11.2, ajv@^4.7.0, ajv@^4.9.1: + version "4.11.5" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.5.tgz#b6ee74657b993a01dce44b7944d56f485828d5bd" dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" @@ -83,7 +83,7 @@ ansi-html@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" -ansi-regex@2, ansi-regex@^2.0.0: +ansi-regex@2, ansi-regex@^2.0.0, ansi-regex@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" @@ -196,14 +196,14 @@ asn1@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" -assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - assert@^1.1.1: version "1.4.1" resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" @@ -238,10 +238,16 @@ async-foreach@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" -async@0.2.9, async@0.2.x, async@~0.2.6, async@~0.2.9: +async@0.2.9, async@0.2.x, async@~0.2.9: version "0.2.9" resolved "https://registry.yarnpkg.com/async/-/async-0.2.9.tgz#df63060fbf3d33286a76aaf6d55a2986d9ff8619" +async@2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4" + dependencies: + lodash "^4.14.0" + async@^2.1.2, async@^2.1.5: version "2.1.5" resolved "https://registry.yarnpkg.com/async/-/async-2.1.5.tgz#e587c68580994ac67fc56ff86d3ac56bdbe810bc" @@ -256,18 +262,7 @@ asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" -autoprefixer@^6.3.1: - version "6.7.4" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.4.tgz#b4405a263325c04a7c2b1c86fc603ad7bbfe01c6" - dependencies: - browserslist "^1.7.4" - caniuse-db "^1.0.30000624" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^5.2.14" - postcss-value-parser "^3.2.3" - -autoprefixer@^6.7.7: +autoprefixer@^6.3.1, autoprefixer@^6.7.7: version "6.7.7" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" dependencies: @@ -918,8 +913,8 @@ babel-types@^6.15.0, babel-types@^6.19.0, babel-types@^6.22.0, babel-types@^6.23 to-fast-properties "^1.0.1" babylon@^6.11.0, babylon@^6.13.0, babylon@^6.15.0: - version "6.15.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e" + version "6.16.1" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3" balanced-match@^0.4.1, balanced-match@^0.4.2: version "0.4.2" @@ -929,10 +924,6 @@ base64-js@^1.0.2: version "1.2.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" -base64-url@1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/base64-url/-/base64-url-1.3.3.tgz#f8b6c537f09a4fc58c99cb86e0b0e9c61461a20f" - basic-auth@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-1.1.0.tgz#45221ee429f7ee1e5035be3f51533f1cdfd29884" @@ -961,9 +952,13 @@ block-stream@*: dependencies: inherits "~2.0.0" -bluebird@^3.0.1, bluebird@^3.0.5, bluebird@^3.3.4, bluebird@^3.4.5, bluebird@^3.4.6, bluebird@^3.4.7: - version "3.4.7" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" +bluebird@2.10.2: + version "2.10.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.10.2.tgz#024a5517295308857f14f91f1106fc3b555f446b" + +bluebird@^3.0.1, bluebird@^3.0.5, bluebird@^3.3.4, bluebird@^3.4.6, bluebird@^3.4.7, bluebird@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.6" @@ -1024,8 +1019,8 @@ broadway@~0.3.2, broadway@~0.3.6: winston "0.8.0" brorand@^1.0.1: - version "1.0.7" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.0.7.tgz#6677fa5e4901bdbf9c9ec2a748e28dca407a9bfc" + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" browser-resolve@^1.8.1: version "1.11.2" @@ -1096,20 +1091,17 @@ browserify-zlib@^0.1.4: dependencies: pako "~0.2.0" -browserslist@^1.0.1, browserslist@^1.5.2, browserslist@^1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.4.tgz#56a12da876f787223743a866224ccd8f97014628" - dependencies: - caniuse-db "^1.0.30000624" - electron-to-chromium "^1.2.2" - -browserslist@^1.7.6: +browserslist@^1.0.1, browserslist@^1.5.2, browserslist@^1.7.6: version "1.7.6" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.6.tgz#af98589ce6e7ab09618d29451faacb81220bd3ba" dependencies: caniuse-db "^1.0.30000631" electron-to-chromium "^1.2.5" +bson@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/bson/-/bson-1.0.4.tgz#93c10d39eaa5b58415cbc4052f3e53e562b0b72c" + buffer-shims@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" @@ -1193,21 +1185,13 @@ caniuse-api@^1.5.2: lodash.memoize "^4.1.0" lodash.uniq "^4.3.0" -caniuse-db@^1.0.30000346, caniuse-db@^1.0.30000624: - version "1.0.30000624" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000624.tgz#554b87547895e36f5fe128f4b7448a2ea5bf2213" - -caniuse-db@^1.0.30000631: - version "1.0.30000631" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000631.tgz#8aa6f65cff452c4aba1c2aaa1e724102fbb9114f" - -caniuse-db@^1.0.30000634: +caniuse-db@^1.0.30000346, caniuse-db@^1.0.30000631, caniuse-db@^1.0.30000634: version "1.0.30000637" resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000637.tgz#c02430cb29447eb561373bab360d834a2639b42c" -caseless@~0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" center-align@^0.1.1: version "0.1.3" @@ -1264,8 +1248,8 @@ circular-json@^0.3.1: resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" clap@^1.0.9: - version "1.1.2" - resolved "https://registry.yarnpkg.com/clap/-/clap-1.1.2.tgz#316545bf22229225a2cecaa6824cd2f56a9709ed" + version "1.1.3" + resolved "https://registry.yarnpkg.com/clap/-/clap-1.1.3.tgz#b3bd36e93dd4cbfb395a3c26896352445265c05b" dependencies: chalk "^1.1.3" @@ -1274,20 +1258,11 @@ classnames@^2.1.1: resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d" clean-css@4.0.x: - version "4.0.7" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.0.7.tgz#d8fa8b4d87a125f38fa3d64afc59abfc68ba7790" + version "4.0.9" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.0.9.tgz#63ff450b3f939508cc0cd2989bb9daaedc98333e" dependencies: source-map "0.5.x" -cli-color@~0.3.2: - version "0.3.3" - resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-0.3.3.tgz#12d5bdd158ff8a0b0db401198913c03df069f6f5" - dependencies: - d "~0.1.1" - es5-ext "~0.10.6" - memoizee "~0.3.8" - timers-ext "0.1" - cli-color@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-1.1.0.tgz#de188cdc4929d83b67aea04110fbed40fdbf6775" @@ -1299,6 +1274,17 @@ cli-color@~1.1.0: memoizee "^0.3.9" timers-ext "0.1" +cli-color@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-1.2.0.tgz#3a5ae74fd76b6267af666e69e2afbbd01def34d1" + dependencies: + ansi-regex "^2.1.1" + d "1" + es5-ext "^0.10.12" + es6-iterator "2" + memoizee "^0.4.3" + timers-ext "0.1" + cli-cursor@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" @@ -1341,17 +1327,6 @@ cliui@^3.2.0: strip-ansi "^3.0.1" wrap-ansi "^2.0.0" -<<<<<<< HEAD -clone-stats@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" - -clone@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f" - -clone@^1.0.0, clone@^1.0.2: -======= clone-deep@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-0.2.4.tgz#4e73dd09e9fb971cc38670c5dced9c1896481cc6" @@ -1362,8 +1337,15 @@ clone-deep@^0.2.4: lazy-cache "^1.0.3" shallow-clone "^0.1.2" -clone@^1.0.2: ->>>>>>> master +clone-stats@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + +clone@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f" + +clone@^1.0.0, clone@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" @@ -1392,8 +1374,8 @@ color-convert@^1.3.0: color-name "^1.1.1" color-name@^1.0.0, color-name@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" + version "1.1.2" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" color-string@^0.3.0: version "0.3.0" @@ -1516,14 +1498,6 @@ concat-stream@1.5.0: readable-stream "~2.0.0" typedarray "~0.0.5" -<<<<<<< HEAD -config-chain@~1.1.5: - version "1.1.11" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.11.tgz#aba09747dfbe4c3e70e766a6e41586e1859fc6f2" - dependencies: - ini "^1.3.4" - proto-list "~1.2.1" -======= concat-stream@^1.5.2: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" @@ -1531,7 +1505,13 @@ concat-stream@^1.5.2: inherits "^2.0.3" readable-stream "^2.2.2" typedarray "^0.0.6" ->>>>>>> master + +config-chain@~1.1.5: + version "1.1.11" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.11.tgz#aba09747dfbe4c3e70e766a6e41586e1859fc6f2" + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" configstore@^1.0.0: version "1.4.0" @@ -1646,18 +1626,27 @@ create-hmac@^1.1.0, create-hmac@^1.1.2: inherits "^2.0.1" cross-env@^3.1.2: - version "3.1.4" - resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-3.1.4.tgz#56e8bca96f17908a6eb1bc2012ca126f92842130" + version "3.2.4" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-3.2.4.tgz#9e0585f277864ed421ce756f81a980ff0d698aba" dependencies: - cross-spawn "^3.0.1" + cross-spawn "^5.1.0" + is-windows "^1.0.0" -cross-spawn@^3.0.0, cross-spawn@^3.0.1: +cross-spawn@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" dependencies: lru-cache "^4.0.1" which "^1.2.9" +cross-spawn@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + crypt@~0.0.1: version "0.0.2" resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" @@ -1775,8 +1764,8 @@ cssesc@^0.1.0: postcss-zindex "^2.0.1" csso@~2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.1.tgz#4f8d91a156f2f1c2aebb40b8fb1b5eb83d94d3b9" + version "2.3.2" + resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" dependencies: clap "^1.0.9" source-map "^0.5.3" @@ -1791,6 +1780,12 @@ cycle@1.0.x: version "1.0.3" resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + d@^0.1.1, d@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" @@ -1904,11 +1899,7 @@ delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" -<<<<<<< HEAD -depd@^1.1.0, depd@~1.1.0: -======= -depd@1.1.0, depd@~1.1.0: ->>>>>>> master +depd@1.1.0, depd@^1.1.0, depd@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" @@ -2087,37 +2078,36 @@ electron-download@^3.0.1: semver "^5.3.0" sumchecker "^1.2.0" -electron-to-chromium@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.2.2.tgz#e41bc9488c88e3cfa1e94bde28e8420d7d47c47c" - electron-to-chromium@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.2.5.tgz#d373727228843dfd8466c276089f13b40927a952" + version "1.2.7" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.2.7.tgz#4f748061407e478c76256d04496972b71f647407" electron@^1.4.4: - version "1.6.0" - resolved "https://registry.yarnpkg.com/electron/-/electron-1.6.0.tgz#d1d12024fe4e8d14128eb9c73b8a5253324ced06" + version "1.6.3" + resolved "https://registry.yarnpkg.com/electron/-/electron-1.6.3.tgz#95fc62899e50838563fa768baa2011ea860d04b1" dependencies: electron-download "^3.0.1" extract-zip "^1.0.3" elliptic@^6.0.0: - version "6.3.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.3.3.tgz#5482d9646d54bcb89fd7d994fc9e2e9568876e3f" + version "6.4.0" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" dependencies: bn.js "^4.4.0" brorand "^1.0.1" hash.js "^1.0.0" + hmac-drbg "^1.0.0" inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" emits@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/emits/-/emits-3.0.0.tgz#32752bba95e1707b219562384ab9bb8b1fd62f70" emoji-regex@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.1.0.tgz#d14ef743a7dfa6eaf436882bd1920a4aed84dd94" + version "6.4.1" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.4.1.tgz#77486fe9cd45421d260a6238b88d721e2fad2050" emojis-list@^2.0.0: version "2.1.0" @@ -2181,8 +2171,8 @@ errno@^0.1.3: prr "~0.0.0" error-ex@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9" + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" dependencies: is-arrayish "^0.2.1" @@ -2203,20 +2193,20 @@ es-to-primitive@^1.1.1: is-date-object "^1.0.1" is-symbol "^1.0.1" -es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.5, es5-ext@~0.10.6, es5-ext@~0.10.7: - version "0.10.12" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" +es5-ext@^0.10.12, es5-ext@^0.10.13, es5-ext@^0.10.14, es5-ext@^0.10.8, es5-ext@^0.10.9, es5-ext@~0.10.11, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.5, es5-ext@~0.10.6: + version "0.10.14" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.14.tgz#625bc9ab9cac0f6fb9dc271525823d1800b3d360" dependencies: es6-iterator "2" es6-symbol "~3.1" -es6-iterator@2: - version "2.0.0" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" +es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" dependencies: - d "^0.1.1" - es5-ext "^0.10.7" - es6-symbol "3" + d "1" + es5-ext "^0.10.14" + es6-symbol "^3.1" es6-iterator@~0.1.3: version "0.1.3" @@ -2227,40 +2217,44 @@ es6-iterator@~0.1.3: es6-symbol "~2.0.1" es6-map@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.4.tgz#a34b147be224773a4d7da8072794cefa3632b897" + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-set "~0.1.3" - es6-symbol "~3.1.0" - event-emitter "~0.3.4" + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + +es6-promise@3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.2.1.tgz#ec56233868032909207170c39448e24449dd1fc4" es6-promise@^3.0.2: version "3.3.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" es6-promise@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.0.5.tgz#7882f30adde5b240ccfa7f7d78c548330951ae42" + version "4.1.0" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.0.tgz#dda03ca8f9f89bc597e689842929de7ba8cebdf0" -es6-set@~0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-symbol "3" - event-emitter "~0.3.4" + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" -es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" +es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" + d "1" + es5-ext "~0.10.14" es6-symbol@~2.0.1: version "2.0.1" @@ -2270,13 +2264,13 @@ es6-symbol@~2.0.1: es5-ext "~0.10.5" es6-weak-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.1.tgz#0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81" + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" dependencies: - d "^0.1.1" - es5-ext "^0.10.8" - es6-iterator "2" - es6-symbol "3" + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" es6-weak-map@~0.1.4: version "0.1.4" @@ -2315,8 +2309,8 @@ escope@^3.6.0: estraverse "^4.1.1" eslint-config-airbnb-base@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.1.0.tgz#dc9b3ec70b8c74dcbe6d6257c9da3992c39ca2ca" + version "11.1.1" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.1.1.tgz#61e9e89e4eb89f474f6913ac817be9fbb59063e0" eslint-config-airbnb@^14.1.0: version "14.1.0" @@ -2432,6 +2426,10 @@ esprima@^2.6.0: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" +esprima@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + esprima@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.0.4.tgz#9f557e08fc3b4d26ece9dd34f8fbf476b62585ad" @@ -2477,12 +2475,12 @@ eve@~0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/eve/-/eve-0.4.2.tgz#7eea0afc0e4efb7c9365615315a3576833ead2ae" -event-emitter@~0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5" +event-emitter@^0.3.4, event-emitter@~0.3.4, event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" dependencies: - d "~0.1.1" - es5-ext "~0.10.7" + d "1" + es5-ext "~0.10.14" event-stream@~0.5: version "0.5.3" @@ -2516,7 +2514,7 @@ evp_bytestokey@^1.0.0: dependencies: create-hash "^1.1.1" -exenv@^1.2.0, exenv@^1.2.1: +exenv@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.1.tgz#75de1c8dee02e952b102aa17f8875973e0df14f9" @@ -2536,7 +2534,6 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -<<<<<<< HEAD expand-tilde@^1.2.1, expand-tilde@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449" @@ -2557,14 +2554,9 @@ express-session@^1.15.1: uid-safe "~2.1.3" utils-merge "1.0.0" -express@^4.14.1: - version "4.14.1" - resolved "https://registry.yarnpkg.com/express/-/express-4.14.1.tgz#646c237f766f148c2120aff073817b9e4d7e0d33" -======= express@^4.15.2: version "4.15.2" resolved "https://registry.yarnpkg.com/express/-/express-4.15.2.tgz#af107fc148504457f2dca9a6f2571d7129b97b35" ->>>>>>> master dependencies: accepts "~1.3.3" array-flatten "1.1.1" @@ -2698,19 +2690,7 @@ fill-range@^2.1.0: repeat-element "^1.1.2" repeat-string "^1.5.2" -finalhandler@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.0.tgz#b5691c2c0912092f18ac23e9416bde5cd7dc6755" - dependencies: - debug "2.6.1" - encodeurl "~1.0.1" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.1" - statuses "~1.3.1" - unpipe "~1.0.0" - -finalhandler@1.0.0: +finalhandler@1.0.0, finalhandler@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.0.tgz#b5691c2c0912092f18ac23e9416bde5cd7dc6755" dependencies: @@ -2805,15 +2785,19 @@ follow-redirects@1.0.0: dependencies: debug "^2.2.0" -for-in@^0.1.3, for-in@^0.1.5: - version "0.1.6" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" +for-in@^0.1.3: + version "0.1.8" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" for-own@^0.1.3, for-own@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.4.tgz#0149b41a39088c7515f51ebe1c1386d45f935072" + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" dependencies: - for-in "^0.1.5" + for-in "^1.0.1" foreach@^2.0.5: version "2.0.5" @@ -2870,12 +2854,12 @@ fresh@0.5.0: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.0.tgz#f474ca5e6a9246d6fd8e0953cfa9b9c805afa78e" from@~0: - version "0.1.3" - resolved "https://registry.yarnpkg.com/from/-/from-0.1.3.tgz#ef63ac2062ac32acf7862e0d40b44b896f22f3bc" + version "0.1.7" + resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" fs-exists-sync@^0.1.0: version "0.1.0" - resolved "http://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" fs-extra@^0.30.0: version "0.30.0" @@ -2887,13 +2871,12 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" -fs-extra@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" +fs-extra@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.1.2.tgz#046c70163cef9aad46b0e4a7fa467fb22d71de35" dependencies: graceful-fs "^4.1.2" jsonfile "^2.1.0" - klaw "^1.0.0" fs-readdir-recursive@^1.0.0: version "1.0.0" @@ -2919,8 +2902,8 @@ fstream-ignore@~1.0.5: minimatch "^3.0.0" fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822" + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" dependencies: graceful-fs "^4.1.2" inherits "~2.0.0" @@ -3216,14 +3199,16 @@ gulplog@^1.0.0: dependencies: glogg "^1.0.0" -har-validator@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" dependencies: - chalk "^1.1.1" - commander "^2.9.0" - is-my-json-valid "^2.12.4" - pinkie-promise "^2.0.0" + ajv "^4.9.1" + har-schema "^1.0.5" has-ansi@^2.0.0: version "2.0.0" @@ -3251,7 +3236,7 @@ has@^1.0.1: dependencies: function-bind "^1.0.2" -hash.js@^1.0.0: +hash.js@^1.0.0, hash.js@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.0.3.tgz#1332ff00156c0a0ffdd8236013d07b77a0451573" dependencies: @@ -3271,14 +3256,22 @@ he@1.1.x: resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" history@^3.0.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/history/-/history-3.2.1.tgz#71c7497f4e6090363d19a6713bb52a1bfcdd99aa" + version "3.3.0" + resolved "https://registry.yarnpkg.com/history/-/history-3.3.0.tgz#fcedcce8f12975371545d735461033579a6dae9c" dependencies: invariant "^2.2.1" loose-envify "^1.2.0" query-string "^4.2.2" warning "^3.0.0" +hmac-drbg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.0.tgz#3db471f45aae4a994a0688322171f51b8b91bee5" + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" @@ -3304,9 +3297,13 @@ homedir-polyfill@^1.0.0: dependencies: parse-passwd "^1.0.0" +hooks-fixed@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/hooks-fixed/-/hooks-fixed-2.0.0.tgz#a01d894d52ac7f6599bbb1f63dfc9c411df70cba" + hosted-git-info@^2.1.4: - version "2.2.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.2.0.tgz#7a0d097863d886c0fabbdcd37bf1758d8becf8a5" + version "2.3.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.3.1.tgz#ac439421605f0beb0ea1349de7d8bb28e50be1dd" html-comment-regex@^1.1.0: version "1.1.1" @@ -3317,8 +3314,8 @@ html-entities@^1.2.0: resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.0.tgz#41948caf85ce82fed36e4e6a0ed371a6664379e2" html-minifier@^3.2.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.3.3.tgz#5e85516b2aff3c3fb9bda351879375868386d6f6" + version "3.4.2" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.4.2.tgz#31896baaf735c1d95f7a0b7291f9dc36c0720752" dependencies: camel-case "3.0.x" clean-css "4.0.x" @@ -3327,7 +3324,7 @@ html-minifier@^3.2.3: ncname "1.0.x" param-case "2.1.x" relateurl "0.2.x" - uglify-js "2.7.x" + uglify-js "2.8.x" html-minify-loader@^1.1.0: version "1.1.0" @@ -3401,6 +3398,10 @@ https-proxy-agent@^1.0.0: debug "2" extend "3" +hyphenate-style-name@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.2.tgz#31160a36930adaf1fc04c6074f7eb41465d4ec4b" + i@0.3.x: version "0.3.5" resolved "https://registry.yarnpkg.com/i/-/i-0.3.5.tgz#1d2b854158ec8169113c6cb7f6b6801e99e211d5" @@ -3422,8 +3423,8 @@ ignore-by-default@^1.0.0: resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" ignore@^3.2.0: - version "3.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.4.tgz#4055e03596729a8fabe45a43c100ad5ed815c4e8" + version "3.2.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.6.tgz#26e8da0644be0bb4cb39516f6c79f0e0f4ffe48c" imurmurhash@^0.1.4: version "0.1.4" @@ -3462,15 +3463,11 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -<<<<<<< HEAD inherits@1: version "1.0.2" resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b" -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: -======= inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: ->>>>>>> master version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -3482,16 +3479,12 @@ ini@1.x.x, ini@^1.3.4, ini@~1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" -inline-style-prefix-all@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/inline-style-prefix-all/-/inline-style-prefix-all-2.0.2.tgz#44e23c00d3521a36041e07c9b1e81bf36770b08c" - -inline-style-prefixer@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-1.0.4.tgz#849f657373a5cfbd8141cfddb013df6f68c6df39" +inline-style-prefixer@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-2.0.5.tgz#c153c7e88fd84fef5c602e95a8168b2770671fe7" dependencies: bowser "^1.0.0" - inline-style-prefix-all "^2.0.2" + hyphenate-style-name "^1.0.1" inquirer@^0.12.0: version "0.12.0" @@ -3551,8 +3544,8 @@ is-binary-path@^1.0.0: binary-extensions "^1.0.0" is-buffer@^1.0.2, is-buffer@~1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" is-builtin-module@^1.0.0: version "1.0.0" @@ -3612,9 +3605,9 @@ is-glob@^2.0.0, is-glob@^2.0.1: dependencies: is-extglob "^1.0.0" -is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: - version "2.15.0" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" +is-my-json-valid@^2.10.0: + version "2.16.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" dependencies: generate-function "^2.0.0" generate-object-property "^1.1.0" @@ -3659,12 +3652,16 @@ is-plain-object@^2.0.1: is-posix-bracket@^0.1.0: version "0.1.1" - resolved "http://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" is-primitive@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" +is-promise@^2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + is-property@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" @@ -3723,6 +3720,10 @@ is-windows@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" +is-windows@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.0.tgz#c61d61020c3ebe99261b781bd3d1622395f547f8" + isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -3766,7 +3767,7 @@ js-base64@^2.1.9: version "2.1.9" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" -js-beautify@^1.5.4: +js-beautify@^1.6.11: version "1.6.11" resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.6.11.tgz#538a22867e669250935bcdc7b90a8cd6386ddab6" dependencies: @@ -3779,7 +3780,14 @@ js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" -js-yaml@^3.5.1, js-yaml@~3.7.0: +js-yaml@^3.5.1: + version "3.8.2" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.2.tgz#02d3e2c0f6beab20248d412c352203827d786721" + dependencies: + argparse "^1.0.7" + esprima "^3.1.1" + +js-yaml@~3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" dependencies: @@ -3839,9 +3847,10 @@ jsonpointer@^4.0.0: resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" jsprim@^1.2.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" dependencies: + assert-plus "1.0.0" extsprintf "1.0.2" json-schema "0.2.3" verror "1.3.6" @@ -3852,6 +3861,10 @@ jsx-ast-utils@^1.0.0, jsx-ast-utils@^1.3.4: dependencies: object-assign "^4.1.0" +kareem@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/kareem/-/kareem-1.2.1.tgz#acdb8c8119845834abbfa58ade1cf9dea63dc752" + keypress@0.1.x: version "0.1.0" resolved "https://registry.yarnpkg.com/keypress/-/keypress-0.1.0.tgz#4a3188d4291b66b4f65edb99f806aa9ae293592a" @@ -3961,8 +3974,8 @@ loader-utils@^0.2.16, loader-utils@^0.2.6: object-assign "^4.0.1" loader-utils@^1.0.1, loader-utils@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.0.2.tgz#a9f923c865a974623391a8602d031137fad74830" + version "1.1.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" dependencies: big.js "^3.1.3" emojis-list "^2.0.0" @@ -4161,15 +4174,11 @@ lodash@3.0.x: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.0.1.tgz#14d49028a38bc740241d11e2ecd57ec06d73c19a" -<<<<<<< HEAD lodash@4.12.0: version "4.12.0" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.12.0.tgz#2bd6dc46a040f59e686c972ed21d93dc59053258" -lodash@^4.0.0, lodash@^4.12.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.3, lodash@^4.2.0, lodash@^4.3.0: -======= lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0: ->>>>>>> master version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -4199,8 +4208,8 @@ loud-rejection@^1.0.0: signal-exit "^3.0.0" lower-case@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.3.tgz#c92393d976793eee5ba4edb583cf8eae35bd9bfb" + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" lowercase-keys@^1.0.0: version "1.0.0" @@ -4265,7 +4274,7 @@ media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" -memoizee@^0.3.9, memoizee@~0.3.8: +memoizee@^0.3.9: version "0.3.10" resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.3.10.tgz#4eca0d8aed39ec9d017f4c5c2f2f6432f42e5c8f" dependencies: @@ -4277,6 +4286,19 @@ memoizee@^0.3.9, memoizee@~0.3.8: next-tick "~0.2.2" timers-ext "0.1" +memoizee@^0.4.3: + version "0.4.4" + resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.4.tgz#ecf4b791a09cd11c970203f80682534730fad78f" + dependencies: + d "1" + es5-ext "^0.10.13" + es6-weak-map "^2.0.1" + event-emitter "^0.3.4" + is-promise "^2.1" + lru-queue "0.1" + next-tick "1" + timers-ext "0.1" + memory-fs@^0.4.0, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" @@ -4332,7 +4354,11 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -"mime-db@>= 1.24.0 < 2", mime-db@~1.26.0: +"mime-db@>= 1.24.0 < 2": + version "1.27.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" + +mime-db@~1.26.0: version "1.26.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff" @@ -4350,6 +4376,10 @@ minimalistic-assert@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + minimatch@^2.0.1: version "2.0.10" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" @@ -4437,21 +4467,47 @@ mocha@^3.2.0: mkdirp "0.5.1" supports-color "3.1.2" -<<<<<<< HEAD moment-timezone@^0.5.4: version "0.5.11" resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.11.tgz#9b76c03d8ef514c7e4249a7bbce649eed39ef29f" dependencies: moment ">= 2.6.0" -"moment@>= 2.6.0", moment@^2.13.0, moment@^2.15.1, moment@^2.17.1, moment@^2.8.3: - version "2.17.1" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.17.1.tgz#fed9506063f36b10f066c8b59a144d7faebe1d82" -======= -moment@^2.18.0: +"moment@>= 2.6.0", moment@^2.13.0, moment@^2.17.1, moment@^2.18.0, moment@^2.8.3: version "2.18.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.0.tgz#6cfec6a495eca915d02600a67020ed994937252c" ->>>>>>> master + +mongodb-core@2.1.8: + version "2.1.8" + resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-2.1.8.tgz#b33e0370d0a59d97b6cb1ec610527be9e95ca2c0" + dependencies: + bson "~1.0.4" + require_optional "~1.0.0" + +mongodb@2.2.24: + version "2.2.24" + resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-2.2.24.tgz#80f40d6ec5bdec0ddecf0f9ce0144e794c46449a" + dependencies: + es6-promise "3.2.1" + mongodb-core "2.1.8" + readable-stream "2.1.5" + +mongoose@^4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-4.9.0.tgz#5465fc3c1d4c9e43b035e9652412dcce3fa4d55c" + dependencies: + async "2.1.4" + bson "~1.0.4" + hooks-fixed "2.0.0" + kareem "1.2.1" + mongodb "2.2.24" + mpath "0.2.1" + mpromise "0.5.5" + mquery "2.3.0" + ms "0.7.2" + muri "1.2.1" + regexp-clone "0.0.1" + sliced "1.0.1" morgan@^1.8.1: version "1.8.1" @@ -4463,6 +4519,23 @@ morgan@^1.8.1: on-finished "~2.3.0" on-headers "~1.0.1" +mpath@0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.2.1.tgz#3a4e829359801de96309c27a6b2e102e89f9e96e" + +mpromise@0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mpromise/-/mpromise-0.5.5.tgz#f5b24259d763acc2257b0a0c8c6d866fd51732e6" + +mquery@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/mquery/-/mquery-2.3.0.tgz#3d1717ad8958d0c99e42ea2461a109f3e5f3e458" + dependencies: + bluebird "2.10.2" + debug "2.2.0" + regexp-clone "0.0.1" + sliced "0.0.5" + ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" @@ -4477,6 +4550,10 @@ multipipe@^0.1.2: dependencies: duplexer2 "0.0.2" +muri@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/muri/-/muri-1.2.1.tgz#ec7ea5ce6ca6a523eb1ab35bacda5fa816c9aa3c" + mute-stream@0.0.5, mute-stream@~0.0.4: version "0.0.5" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" @@ -4529,6 +4606,10 @@ netrc@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/netrc/-/netrc-0.1.4.tgz#6be94fcaca8d77ade0a9670dc460914c94472444" +next-tick@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + next-tick@~0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-0.2.2.tgz#75da4a927ee5887e39065880065b7336413b310d" @@ -4565,8 +4646,8 @@ node-fetch@^1.0.1: is-stream "^1.0.1" node-gyp@^3.3.1: - version "3.5.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.5.0.tgz#a8fe5e611d079ec16348a3eb960e78e11c85274a" + version "3.6.0" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.6.0.tgz#7474f63a3a0501161dda0b6341f022f14c423fa6" dependencies: fstream "^1.0.0" glob "^7.0.3" @@ -4578,7 +4659,7 @@ node-gyp@^3.3.1: osenv "0" request "2" rimraf "2" - semver "2.x || 3.x || 4 || 5" + semver "~5.3.0" tar "^2.0.0" which "1" @@ -4679,8 +4760,8 @@ nopt@~1.0.10: abbrev "1" normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: - version "2.3.5" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df" + version "2.3.6" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.6.tgz#498fa420c96401f787402ba21e600def9f981fff" dependencies: hosted-git-info "^2.1.4" is-builtin-module "^1.0.0" @@ -4696,8 +4777,8 @@ normalize-range@^0.1.2: resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" normalize-url@^1.4.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.0.tgz#c2bb50035edee62cd81edb2d45da68dc25e3423e" + version "1.9.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" dependencies: object-assign "^4.0.1" prepend-http "^1.0.0" @@ -4903,14 +4984,14 @@ pako@~0.2.0: resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" param-case@2.1.x: - version "2.1.0" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.0.tgz#2619f90fd6c829ed0b958f1c84ed03a745a6d70a" + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" dependencies: no-case "^2.2.0" parse-asn1@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.0.0.tgz#35060f6d5015d37628c770f4e091a0b5a278bc23" + version "5.1.0" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" dependencies: asn1.js "^4.0.0" browserify-aes "^1.0.0" @@ -4997,6 +5078,10 @@ path-is-inside@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + path-root-regex@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" @@ -5039,6 +5124,10 @@ pend@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -5107,8 +5196,8 @@ postcss-discard-comments@^2.0.4: postcss "^5.0.14" postcss-discard-duplicates@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.0.2.tgz#02be520e91571ffb10738766a981d5770989bb32" + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" dependencies: postcss "^5.0.4" @@ -5270,8 +5359,8 @@ postcss-reduce-transforms@^1.0.3: postcss-value-parser "^3.0.1" postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.2.tgz#3d70f5adda130da51c7c0c2fc023f56b1374fe08" + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" dependencies: flatten "^1.0.2" indexes-of "^1.0.1" @@ -5306,16 +5395,7 @@ postcss-zindex@^2.0.1: postcss "^5.0.4" uniqs "^2.0.0" -postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.14: - version "5.2.14" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.14.tgz#47b4fbde363fd4f81e547f7e0e43d6d300267330" - dependencies: - chalk "^1.1.3" - js-base64 "^2.1.9" - source-map "^0.5.6" - supports-color "^3.2.3" - -postcss@^5.2.16: +postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: version "5.2.16" resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.16.tgz#732b3100000f9ff8379a48a53839ed097376ad57" dependencies: @@ -5344,10 +5424,10 @@ pretty-bytes@^1.0.2: meow "^3.1.0" pretty-error@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.0.2.tgz#a7db19cbb529ca9f0af3d3a2f77d5caf8e5dec23" + version "2.0.3" + resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.0.3.tgz#bed3d816a008e76da617cde8216f4b778849b5d9" dependencies: - renderkid "~2.0.0" + renderkid "^2.0.1" utila "~0.4" pretty-hrtime@^1.0.0: @@ -5453,14 +5533,10 @@ q@^1.1.2: version "1.4.1" resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" -qs@6.4.0: +qs@6.4.0, qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" -qs@~6.3.0: - version "6.3.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.1.tgz#918c0b3bcd36679772baf135b1acb4c1651ed79d" - query-string@^4.1.0, query-string@^4.2.2: version "4.3.2" resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.2.tgz#ec0fd765f58a50031a3968c2431386f8947a5cdd" @@ -5477,13 +5553,13 @@ querystring@0.2.0, querystring@^0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" radium@^0.18.1: - version "0.18.1" - resolved "https://registry.yarnpkg.com/radium/-/radium-0.18.1.tgz#a01db9b4c6e6364de3b02d5976adf28d0b98351d" + version "0.18.2" + resolved "https://registry.yarnpkg.com/radium/-/radium-0.18.2.tgz#1e296966d0bcac6652085cbe84c7b8ed0196d7c1" dependencies: array-find "^1.0.0" - exenv "^1.2.0" - inline-style-prefixer "^1.0.3" - rimraf "^2.4.0" + exenv "^1.2.1" + inline-style-prefixer "^2.0.5" + rimraf "^2.6.1" ramda@^0.23.0: version "0.23.0" @@ -5641,9 +5717,21 @@ readable-stream@1.0, "readable-stream@>=1.0.33-1 <1.1.0-0": isarray "0.0.1" string_decoder "~0.10.x" +readable-stream@2.1.5, readable-stream@~2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.0, readable-stream@^2.1.5, readable-stream@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" + version "2.2.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.6.tgz#8b43aed76e71483938d12a8d46c6cf1a00b1f816" dependencies: buffer-shims "^1.0.0" core-util-is "~1.0.0" @@ -5673,18 +5761,6 @@ readable-stream@~2.0.0: string_decoder "~0.10.x" util-deprecate "~1.0.1" -readable-stream@~2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" - dependencies: - buffer-shims "^1.0.0" - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - readdirp@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" @@ -5756,6 +5832,10 @@ regex-cache@^0.4.2: is-equal-shallow "^0.1.3" is-primitive "^2.0.0" +regexp-clone@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/regexp-clone/-/regexp-clone-0.0.1.tgz#a7c2e09891fdbf38fbb10d376fb73003e68ac589" + regexpu-core@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" @@ -5792,9 +5872,9 @@ relateurl@0.2.x: version "0.2.7" resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" -renderkid@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.0.tgz#1859753e7a5adbf35443aba0d4e4579e78abee85" +renderkid@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.1.tgz#898cabfc8bede4b7b91135a3ffd323e58c0db319" dependencies: css-select "^1.1.0" dom-converter "~0.1" @@ -5827,17 +5907,17 @@ replace-ext@0.0.1: resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" request@2, request@^2.45.0, request@^2.61.0, request@^2.72.0, request@^2.79.0: - version "2.79.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" dependencies: aws-sign2 "~0.6.0" aws4 "^1.2.1" - caseless "~0.11.0" + caseless "~0.12.0" combined-stream "~1.0.5" extend "~3.0.0" forever-agent "~0.6.1" form-data "~2.1.1" - har-validator "~2.0.6" + har-validator "~4.2.1" hawk "~3.1.3" http-signature "~1.1.0" is-typedarray "~1.0.0" @@ -5845,10 +5925,12 @@ request@2, request@^2.45.0, request@^2.61.0, request@^2.72.0, request@^2.79.0: json-stringify-safe "~5.0.1" mime-types "~2.1.7" oauth-sign "~0.8.1" - qs "~6.3.0" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" stringstream "~0.0.4" tough-cookie "~2.3.0" - tunnel-agent "~0.4.1" + tunnel-agent "^0.6.0" uuid "^3.0.0" require-directory@^2.1.1: @@ -5866,6 +5948,13 @@ require-uncached@^1.0.2: caller-path "^0.1.0" resolve-from "^1.0.0" +require_optional@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/require_optional/-/require_optional-1.0.0.tgz#52a86137a849728eb60a55533617f8f914f59abf" + dependencies: + resolve-from "^2.0.0" + semver "^5.1.0" + resolve-dir@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e" @@ -5877,13 +5966,19 @@ resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" +resolve-from@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" + resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.0.0, resolve@^1.1.6, resolve@^1.1.7: - version "1.2.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" +resolve@^1.0.0, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235" + dependencies: + path-parse "^1.0.5" restore-cursor@^1.0.1: version "1.0.1" @@ -5916,7 +6011,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@2.x.x, rimraf@^2.2.8, rimraf@^2.4.0, rimraf@^2.4.3, rimraf@^2.6.1: +rimraf@2, rimraf@2.x.x, rimraf@^2.2.8, rimraf@^2.4.3, rimraf@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: @@ -5942,6 +6037,10 @@ rx-lite@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" +safe-buffer@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" + sass-graph@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.1.2.tgz#965104be23e8103cb7e5f710df65935b317da57b" @@ -5970,7 +6069,7 @@ semver-diff@^2.0.0: dependencies: semver "^5.0.3" -"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.0.1, semver@^5.0.3, semver@^5.3.0, semver@~5.3.0: +"semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -6000,23 +6099,22 @@ send@0.15.1: range-parser "~1.2.0" statuses "~1.3.1" -<<<<<<< HEAD -sequelize-cli@^2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/sequelize-cli/-/sequelize-cli-2.5.1.tgz#cea4c74fbbc069c3bad09fd0fdff7f6a8a24c1ef" +sequelize-cli@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/sequelize-cli/-/sequelize-cli-2.6.0.tgz#8fb7b1d4aa40a4ff26d33fd72f3d0223d9506baa" dependencies: - bluebird "^3.4.5" - cli-color "~0.3.2" + bluebird "^3.5.0" + cli-color "~1.2.0" findup-sync "^0.4.0" - fs-extra "^1.0.0" + fs-extra "^2.0.0" gulp "^3.9.1" gulp-help "~1.6.1" - js-beautify "^1.5.4" - lodash "^4.12.0" - moment "^2.15.1" - resolve "^1.0.0" - umzug "^1.9.1" - yargs "^6.5.0" + js-beautify "^1.6.11" + lodash "^4.17.4" + moment "^2.17.1" + resolve "^1.3.2" + umzug "^1.11.0" + yargs "^7.0.1" sequelize@^3.30.2: version "3.30.2" @@ -6043,14 +6141,9 @@ sequencify@~0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c" -serve-static@~1.11.2: - version "1.11.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.11.2.tgz#2cf9889bd4435a320cc36895c9aa57bd662e6ac7" -======= serve-static@1.12.1: version "1.12.1" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.12.1.tgz#7443a965e3ced647aceb5639fa06bf4d1bbe0039" ->>>>>>> master dependencies: encodeurl "~1.0.1" escape-html "~1.0.3" @@ -6094,9 +6187,19 @@ shallowequal@^0.2.2: dependencies: lodash.keys "^3.1.2" +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + shelljs@^0.7.5: - version "0.7.6" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad" + version "0.7.7" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -6137,11 +6240,11 @@ slice-ansi@0.0.4: sliced@0.0.5: version "0.0.5" - resolved "http://registry.npmjs.org/sliced/-/sliced-0.0.5.tgz#5edc044ca4eb6f7816d50ba2fc63e25d8fe4707f" + resolved "https://registry.yarnpkg.com/sliced/-/sliced-0.0.5.tgz#5edc044ca4eb6f7816d50ba2fc63e25d8fe4707f" sliced@1.0.1: version "1.0.1" - resolved "http://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz#0b3a662b5d04c3177b1926bea82b03f837a2ef41" + resolved "https://registry.yarnpkg.com/sliced/-/sliced-1.0.1.tgz#0b3a662b5d04c3177b1926bea82b03f837a2ef41" slide@^1.1.5: version "1.1.6" @@ -6176,10 +6279,10 @@ source-list-map@^0.1.7, source-list-map@~0.1.7: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" source-map-support@^0.4.2: - version "0.4.11" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.11.tgz#647f939978b38535909530885303daf23279f322" + version "0.4.14" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.14.tgz#9d4463772598b86271b4f523f6c1f4e02a7d6aef" dependencies: - source-map "^0.5.3" + source-map "^0.5.6" source-map@0.5.x, source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3: version "0.5.6" @@ -6237,8 +6340,8 @@ sqlite3@^3.1.1, sqlite3@^3.1.8: node-pre-gyp "~0.6.31" sshpk@^1.7.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.2.tgz#d5a804ce22695515638e798dbe23273de070a5fa" + version "1.11.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.11.0.tgz#2d8d5ebb4a6fab28ffba37fa62a90f4a3ea59d77" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" @@ -6393,13 +6496,13 @@ style-loader@^0.14.1: loader-utils "^1.0.2" sumchecker@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-1.3.0.tgz#6e3004d7bf3b5ad5567abf13a828946d8a19911b" + version "1.3.1" + resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-1.3.1.tgz#79bb3b4456dd04f18ebdbc0d703a1d1daec5105d" dependencies: debug "^2.2.0" es6-promise "^4.0.5" -supports-color@3.1.2, supports-color@^3.1.0: +supports-color@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" dependencies: @@ -6409,7 +6512,7 @@ supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" -supports-color@^3.2.3: +supports-color@^3.1.0, supports-color@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" dependencies: @@ -6542,11 +6645,11 @@ timers-browserify@^2.0.2: setimmediate "^1.0.4" timers-ext@0.1: - version "0.1.0" - resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.0.tgz#00345a2ca93089d1251322054389d263e27b77e2" + version "0.1.1" + resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.1.tgz#d6422f1ebd67772355f46c93f25e3933992c8b08" dependencies: - es5-ext "~0.10.2" - next-tick "~0.2.2" + es5-ext "~0.10.14" + next-tick "1" timespan@~2.3.0: version "2.3.0" @@ -6596,9 +6699,11 @@ tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" -tunnel-agent@~0.4.1: - version "0.4.3" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" @@ -6633,11 +6738,10 @@ ua-parser-js@^0.7.9: version "0.7.12" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.12.tgz#04c81a99bdd5dc52263ea29d24c6bf8d4818a4bb" -uglify-js@2.7.x, uglify-js@^2.7.5: - version "2.7.5" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8" +uglify-js@2.8.x, uglify-js@^2.7.5: + version "2.8.14" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.14.tgz#25b15d1af39b21752ee33703adbf432e8bc8f77d" dependencies: - async "~0.2.6" source-map "~0.5.1" uglify-to-browserify "~1.0.0" yargs "~3.10.0" @@ -6651,17 +6755,16 @@ uid-number@~0.0.6: resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" uid-safe@~2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/uid-safe/-/uid-safe-2.1.3.tgz#077e264a00b3187936b270bb7376a26473631071" + version "2.1.4" + resolved "https://registry.yarnpkg.com/uid-safe/-/uid-safe-2.1.4.tgz#3ad6f38368c6d4c8c75ec17623fb79aa1d071d81" dependencies: - base64-url "1.3.3" random-bytes "~1.0.0" uid2@0.0.x: version "0.0.3" resolved "https://registry.yarnpkg.com/uid2/-/uid2-0.0.3.tgz#483126e11774df2f71b8b639dcd799c376162b82" -umzug@^1.9.1: +umzug@^1.11.0: version "1.11.0" resolved "https://registry.yarnpkg.com/umzug/-/umzug-1.11.0.tgz#6531ad4b5b650957d1791f98189f435235d07cce" dependencies: @@ -6858,8 +6961,8 @@ warning@^3.0.0: loose-envify "^1.0.0" watchpack@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.2.1.tgz#01efa80c5c29e5c56ba55d6f5470a35b6402f0b2" + version "1.3.1" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.3.1.tgz#7d8693907b28ce6013e7f3610aa2a1acf07dad87" dependencies: async "^2.1.2" chokidar "^1.4.3" @@ -6884,8 +6987,8 @@ webpack-hot-middleware@^2.17.1: strip-ansi "^3.0.0" webpack-sources@^0.1.0, webpack-sources@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.1.4.tgz#ccc2c817e08e5fa393239412690bb481821393cd" + version "0.1.5" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.1.5.tgz#aa1f3abf0f0d74db7111c40e500b84f966640750" dependencies: source-list-map "~0.1.7" source-map "~0.5.3" @@ -6916,8 +7019,8 @@ webpack@^2.2.1: yargs "^6.0.0" whatwg-fetch@>=0.10.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.2.tgz#fe294d1d89e36c5be8b3195057f2e4bc74fc980e" + version "2.0.3" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" whet.extend@~0.9.9: version "0.9.9" @@ -7040,8 +7143,8 @@ y18n@^3.2.1: resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" yallist@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.0.0.tgz#306c543835f09ee1a4cb23b7bce9ab341c91cdd4" + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" yargs-parser@^2.4.1: version "2.4.1" @@ -7056,6 +7159,12 @@ yargs-parser@^4.2.0: dependencies: camelcase "^3.0.0" +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" + dependencies: + camelcase "^3.0.0" + yargs@^4.7.1: version "4.8.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" @@ -7075,7 +7184,7 @@ yargs@^4.7.1: y18n "^3.2.1" yargs-parser "^2.4.1" -yargs@^6.0.0, yargs@^6.5.0: +yargs@^6.0.0: version "6.6.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" dependencies: @@ -7093,6 +7202,24 @@ yargs@^6.0.0, yargs@^6.5.0: y18n "^3.2.1" yargs-parser "^4.2.0" +yargs@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.0.2.tgz#115b97df1321823e8b8648e8968c782521221f67" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^5.0.0" + yargs@~3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" From dbc185fc08b385b1dd3ee4856a8809d04321bbc7 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Thu, 23 Mar 2017 19:07:11 -0700 Subject: [PATCH 09/54] renamed pages to views --- app/components/Template/Header.js | 1 + app/entry.js | 20 ++++++++++---------- app/{pages => views}/About.js | 0 app/{pages => views}/Contact.js | 0 app/{pages => views}/Index.js | 0 app/{pages => views}/Login.js | 0 app/{pages => views}/Logout.js | 0 app/{pages => views}/Music.js | 0 app/{pages => views}/NotFound.js | 0 app/{pages => views}/Projects.js | 0 app/{pages => views}/Resume.js | 0 app/{pages => views}/Stats.js | 0 12 files changed, 11 insertions(+), 10 deletions(-) rename app/{pages => views}/About.js (100%) rename app/{pages => views}/Contact.js (100%) rename app/{pages => views}/Index.js (100%) rename app/{pages => views}/Login.js (100%) rename app/{pages => views}/Logout.js (100%) rename app/{pages => views}/Music.js (100%) rename app/{pages => views}/NotFound.js (100%) rename app/{pages => views}/Projects.js (100%) rename app/{pages => views}/Resume.js (100%) rename app/{pages => views}/Stats.js (100%) diff --git a/app/components/Template/Header.js b/app/components/Template/Header.js index 0ffa7c8b66..8308fb4762 100644 --- a/app/components/Template/Header.js +++ b/app/components/Template/Header.js @@ -19,6 +19,7 @@ const Header = () => ( {l.label} ))} + {/* {auth.loggedIn() ?
  • Logout
  • : null} */}
  • {auth.loggedIn() ? Logout : Login}
  • diff --git a/app/entry.js b/app/entry.js index af1b602453..2211047a8e 100644 --- a/app/entry.js +++ b/app/entry.js @@ -6,21 +6,21 @@ import ReactGA from 'react-ga'; // Layouts import Main from './layouts/Main'; -import Index from './pages/Index'; -import About from './pages/About'; -import Projects from './pages/Projects'; -import Resume from './pages/Resume'; -import Stats from './pages/Stats'; -import Contact from './pages/Contact'; +import Index from './views/Index'; +import About from './views/About'; +import Projects from './views/Projects'; +import Resume from './views/Resume'; +import Stats from './views/Stats'; +import Contact from './views/Contact'; import auth from './components/auth'; -import Login from './pages/Login'; -import Logout from './pages/Logout'; +import Login from './views/Login'; +import Logout from './views/Logout'; -import Music from './pages/Music'; +import Music from './views/Music'; -import NotFound from './pages/NotFound'; +import NotFound from './views/NotFound'; if (process.env.NODE_ENV === 'production') { ReactGA.initialize('UA-68649021-1'); diff --git a/app/pages/About.js b/app/views/About.js similarity index 100% rename from app/pages/About.js rename to app/views/About.js diff --git a/app/pages/Contact.js b/app/views/Contact.js similarity index 100% rename from app/pages/Contact.js rename to app/views/Contact.js diff --git a/app/pages/Index.js b/app/views/Index.js similarity index 100% rename from app/pages/Index.js rename to app/views/Index.js diff --git a/app/pages/Login.js b/app/views/Login.js similarity index 100% rename from app/pages/Login.js rename to app/views/Login.js diff --git a/app/pages/Logout.js b/app/views/Logout.js similarity index 100% rename from app/pages/Logout.js rename to app/views/Logout.js diff --git a/app/pages/Music.js b/app/views/Music.js similarity index 100% rename from app/pages/Music.js rename to app/views/Music.js diff --git a/app/pages/NotFound.js b/app/views/NotFound.js similarity index 100% rename from app/pages/NotFound.js rename to app/views/NotFound.js diff --git a/app/pages/Projects.js b/app/views/Projects.js similarity index 100% rename from app/pages/Projects.js rename to app/views/Projects.js diff --git a/app/pages/Resume.js b/app/views/Resume.js similarity index 100% rename from app/pages/Resume.js rename to app/views/Resume.js diff --git a/app/pages/Stats.js b/app/views/Stats.js similarity index 100% rename from app/pages/Stats.js rename to app/views/Stats.js From f12dc152702a19da48bbf63c392f8715a7c4fbf7 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Thu, 23 Mar 2017 19:35:31 -0700 Subject: [PATCH 10/54] initial working commit of react-router v4 --- .babelrc | 2 - app/components/About/LinkRenderer.js | 4 +- app/components/Resume/References.js | 4 +- app/components/Template/Hamburger.js | 8 +- app/components/Template/Header.js | 8 +- app/components/Template/Nav.js | 7 +- app/entry.js | 41 ++---- app/layouts/Main.js | 44 ++++--- app/views/About.js | 4 +- app/views/Contact.js | 4 +- app/views/Index.js | 7 +- app/views/Projects.js | 4 +- app/views/Resume.js | 4 +- app/views/Stats.js | 4 +- package.json | 19 +-- webpack/webpack.config.js | 2 +- yarn.lock | 188 +++++++++++++++------------ 17 files changed, 191 insertions(+), 163 deletions(-) diff --git a/.babelrc b/.babelrc index d26762f539..4ce3f7181b 100644 --- a/.babelrc +++ b/.babelrc @@ -3,7 +3,5 @@ "plugins": [ "add-module-exports", "transform-class-properties", - "transform-react-inline-elements", - "transform-react-remove-prop-types", ] } diff --git a/app/components/About/LinkRenderer.js b/app/components/About/LinkRenderer.js index d1ee599178..bb136d016d 100644 --- a/app/components/About/LinkRenderer.js +++ b/app/components/About/LinkRenderer.js @@ -1,5 +1,7 @@ import React, { PropTypes } from 'react'; -import { Link } from 'react-router'; +import { + Link, +} from 'react-router-dom'; const LinkRenderer = (props) => { if (props.href.match(/^(https?:)?\/\//)) { diff --git a/app/components/Resume/References.js b/app/components/Resume/References.js index 4630822a75..bab1f69f36 100644 --- a/app/components/Resume/References.js +++ b/app/components/Resume/References.js @@ -1,5 +1,7 @@ import React from 'react'; -import { Link } from 'react-router'; +import { + Link, +} from 'react-router-dom'; const References = () => (
    diff --git a/app/components/Template/Hamburger.js b/app/components/Template/Hamburger.js index 7756a377bd..a61976cb1d 100644 --- a/app/components/Template/Hamburger.js +++ b/app/components/Template/Hamburger.js @@ -1,5 +1,7 @@ import React, { Component } from 'react'; -import { Link, IndexLink } from 'react-router'; +import { + Link, +} from 'react-router-dom'; import Menus from 'react-burger-menu'; @@ -46,9 +48,9 @@ class Hamburger extends Component {
      {links.filter(l => l.index).map(l => (
    • - +

      {l.label}

      -
      +
    • ))} {links.filter(l => !l.index).map(l => ( diff --git a/app/components/Template/Header.js b/app/components/Template/Header.js index 8308fb4762..a2c5ec2918 100644 --- a/app/components/Template/Header.js +++ b/app/components/Template/Header.js @@ -1,5 +1,9 @@ import React from 'react'; -import { Link, IndexLink } from 'react-router'; +// import { Link, IndexLink } from 'react-router'; + +import { + Link, +} from 'react-router-dom'; import Hamburger from './Hamburger'; import links from '../../data/links'; @@ -9,7 +13,7 @@ const Header = () => (
    + ); } } diff --git a/app/views/Index.js b/app/views/Index.js index a2cbd43ceb..2632861ca6 100644 --- a/app/views/Index.js +++ b/app/views/Index.js @@ -4,7 +4,10 @@ import { Link, } from 'react-router-dom'; +import Main from '../layouts/Main'; + const Index = () => ( +
    @@ -20,6 +23,7 @@ const Index = () => ( or contact me.

    Source available here.

    +
    ); export default Index; diff --git a/app/views/Music.js b/app/views/Music.js index 8d85ce872f..6b6523da98 100644 --- a/app/views/Music.js +++ b/app/views/Music.js @@ -1,8 +1,11 @@ import React, { Component } from 'react'; -import { Link } from 'react-router'; +import { + Link, +} from 'react-router-dom'; import Helmet from 'react-helmet'; import axios from 'axios'; +import Main from '../layouts/Main'; class Music extends Component { @@ -25,6 +28,7 @@ class Music extends Component { render() { return ( +
    @@ -53,6 +57,7 @@ class Music extends Component {
    + ); } } diff --git a/app/views/NotFound.js b/app/views/NotFound.js index e3eed44413..ed80fef2e8 100644 --- a/app/views/NotFound.js +++ b/app/views/NotFound.js @@ -1,5 +1,7 @@ import React from 'react'; -import { Link } from 'react-router'; +import { + Link, +} from 'react-router-dom'; import Helmet from 'react-helmet'; const PageNotFound = () => ( diff --git a/app/views/Projects.js b/app/views/Projects.js index cc902b5d70..f887e246e7 100644 --- a/app/views/Projects.js +++ b/app/views/Projects.js @@ -4,6 +4,8 @@ import { } from 'react-router-dom'; import Helmet from 'react-helmet'; +import Main from '../layouts/Main'; + import Cell from '../components/Projects/Cell'; import data from '../data/projects'; @@ -17,6 +19,7 @@ const getRows = () => data.map(project => ( )); const Projects = () => ( +
    @@ -27,6 +30,7 @@ const Projects = () => (
    {getRows()}
    +
    ); export default Projects; diff --git a/app/views/Resume.js b/app/views/Resume.js index 42e3e5b69d..ed932574e8 100644 --- a/app/views/Resume.js +++ b/app/views/Resume.js @@ -4,6 +4,8 @@ import { } from 'react-router-dom'; import Helmet from 'react-helmet'; +import Main from '../layouts/Main'; + import Education from '../components/Resume/Education'; import Experience from '../components/Resume/Experience'; import Skills from '../components/Resume/Skills'; @@ -20,6 +22,7 @@ const sections = [ const Resume = () => ( +
    @@ -41,6 +44,7 @@ const Resume = () => (
    +
    ); export default Resume; diff --git a/app/views/Stats.js b/app/views/Stats.js index f5c30235d8..05ecacf98f 100644 --- a/app/views/Stats.js +++ b/app/views/Stats.js @@ -4,10 +4,13 @@ import { } from 'react-router-dom'; import Helmet from 'react-helmet'; +import Main from '../layouts/Main'; + import Personal from '../components/Stats/Personal'; import Site from '../components/Stats/Site'; const Stats = () => ( +
    @@ -18,6 +21,7 @@ const Stats = () => (
    +
    ); export default Stats; From f8d44ac59057387374141b5f6bc78241de2d2c6c Mon Sep 17 00:00:00 2001 From: mldangelo Date: Thu, 23 Mar 2017 21:03:59 -0700 Subject: [PATCH 12/54] fixed proptypes error --- app/layouts/Main.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/layouts/Main.js b/app/layouts/Main.js index 8297d9317b..815ef18a84 100644 --- a/app/layouts/Main.js +++ b/app/layouts/Main.js @@ -3,8 +3,6 @@ import Helmet from 'react-helmet'; import ReactGA from 'react-ga'; - - import Header from '../components/Template/Header'; import Nav from '../components/Template/Nav'; @@ -30,7 +28,7 @@ class Main extends Component {
    {this.props.children}
    - {this.props.fullPage ? '' :
      - {routes.filter(l => l.index).map(l => ( + {routes.map(l => (
    • -

      {l.label}

      - -
    • - ))} - {routes.filter(l => !l.index).map(l => ( -
    • - -

      {l.label}

      +

      {l.label}

    • ))} diff --git a/app/components/Template/Header.js b/app/components/Template/Header.js index 9eb5e3e858..1bef388d2f 100644 --- a/app/components/Template/Header.js +++ b/app/components/Template/Header.js @@ -18,8 +18,7 @@ const Header = () => ( {l.label} ))} - {/* {auth.loggedIn() ?
    • Logout
    • : null} */} -
    • {window.id ? Logout : Login}
    • +
    • {window.id ? Logout : Login}
    diff --git a/app/data/routes.js b/app/data/routes.js index 2881bea514..a9ac98e11c 100644 --- a/app/data/routes.js +++ b/app/data/routes.js @@ -3,7 +3,6 @@ const data = [ path: '/', label: 'Michael D\'Angelo', index: true, - exact: true, }, { path: '/about', diff --git a/routes/app.js b/routes/app.js index a7af700274..7c5b3621aa 100644 --- a/routes/app.js +++ b/routes/app.js @@ -33,7 +33,7 @@ const routes = (app) => { app.get('/*', (req, res) => { - const content = middleware.fileSystem.readFileSync(path.join(__dirname, 'dist/index.html')); + const content = middleware.fileSystem.readFileSync(path.join(__dirname, '../dist/index.html')); const key = '
    '; const index = content.indexOf(key) + key.length; const inject = req.user ? `` : ''; From fd38ad1cd0725d155d6d8e06892027a0c3ffb639 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Sat, 25 Mar 2017 03:24:13 -0700 Subject: [PATCH 36/54] styled login page --- app/views/Login.js | 9 ++------- public/css/views/_login.scss | 29 ++++++++++------------------- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/app/views/Login.js b/app/views/Login.js index 45d40d2ee0..5efba2a9bf 100644 --- a/app/views/Login.js +++ b/app/views/Login.js @@ -12,13 +12,8 @@ const Login = () => ( I only ask for your email address and I promise not to spam you. You can login with your google account below.

    - diff --git a/public/css/views/_login.scss b/public/css/views/_login.scss index 9323a22047..6fdaf44611 100644 --- a/public/css/views/_login.scss +++ b/public/css/views/_login.scss @@ -3,46 +3,37 @@ #login { width: 50%; margin: auto; - height: 15em; + left: auto; p { font-size: 0.9em; + margin: 0 0 1em 0; } - .horiztonal-container { - display: flex; - position: absolute; - left: 50%; - transform: translate(-50%); - margin-bottom: 5em; + .login-container { - .auth-label { - flex: 0; - white-space: nowrap; - padding: .1em 0; - } + display: flex; + align-items: center; + justify-content: center; + margin: 0 0 .5em 0; - .auth-button { - padding: 0 1em; - flex: 1; - } } } @media (max-width: 1200px) { #login { - width: 70%; + width: 60%; + border: solid 1px rgba(160, 160, 160, 0.3); } } @media (max-width: 1000px) { #login { - width: 80%; + width: 70%; } } @media (max-width: 800px) { #login { width: 100%; - margin: auto; } } From d5009c57c7c50ae0c3058b4d4b33a2116486e280 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Sat, 25 Mar 2017 03:31:14 -0700 Subject: [PATCH 37/54] styled logout button added hoverstates to hamburger --- app/components/Template/Hamburger.js | 1 + app/components/Template/Header.js | 2 +- public/css/components/_hamburger.scss | 12 ++++++++---- public/css/views/_login.scss | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/components/Template/Hamburger.js b/app/components/Template/Hamburger.js index 4a01da154b..d7135017e9 100644 --- a/app/components/Template/Hamburger.js +++ b/app/components/Template/Hamburger.js @@ -53,6 +53,7 @@ class Hamburger extends Component { ))} + {window.id ?
  • Logout

  • : null}
    diff --git a/app/components/Template/Header.js b/app/components/Template/Header.js index 1bef388d2f..368f4e1872 100644 --- a/app/components/Template/Header.js +++ b/app/components/Template/Header.js @@ -18,7 +18,7 @@ const Header = () => ( {l.label} ))} -
  • {window.id ? Logout : Login}
  • + {window.id ?
  • Logout
  • : null} diff --git a/public/css/components/_hamburger.scss b/public/css/components/_hamburger.scss index 8ecf5709d7..8e23c0d969 100644 --- a/public/css/components/_hamburger.scss +++ b/public/css/components/_hamburger.scss @@ -6,22 +6,26 @@ .hamburger-ul { display: block; - + li a h3 { border: 0; border-top: dotted 1px rgba(160, 160, 160, 0.3); margin: 1.5em 0 0 0; padding: 1.5em 0 0 0; } - + + li a h3:hover { + color: _palette(accent); + } + li { display: block !important; } - + h3 { font-size: 0.7em; } - + .index-li { border-top: none; } diff --git a/public/css/views/_login.scss b/public/css/views/_login.scss index 6fdaf44611..68e1fb410f 100644 --- a/public/css/views/_login.scss +++ b/public/css/views/_login.scss @@ -1,4 +1,4 @@ -// About page (/about) +// Login page (/login) #login { width: 50%; From d8463c79044286057b35f51c95b4fb2893ce8f43 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Sat, 25 Mar 2017 03:36:08 -0700 Subject: [PATCH 38/54] moved helmet around --- app/views/About.js | 2 +- app/views/Contact.js | 2 +- app/views/Login.js | 21 +++++++++++---------- app/views/Music.js | 2 +- app/views/Projects.js | 2 +- app/views/Resume.js | 2 +- app/views/Stats.js | 2 +- 7 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/views/About.js b/app/views/About.js index c83820b9af..6a90293c68 100644 --- a/app/views/About.js +++ b/app/views/About.js @@ -10,8 +10,8 @@ import markdown from '../data/about.md'; const About = () => (
    +
    -

    About Me

    diff --git a/app/views/Contact.js b/app/views/Contact.js index 6f5475801c..c41dda5f18 100644 --- a/app/views/Contact.js +++ b/app/views/Contact.js @@ -76,8 +76,8 @@ class Contact extends Component { const message = this.state.message; return (
    +
    -

    Contact

    diff --git a/app/views/Login.js b/app/views/Login.js index 5efba2a9bf..6be4634780 100644 --- a/app/views/Login.js +++ b/app/views/Login.js @@ -1,20 +1,21 @@ import React from 'react'; import { Link } from 'react-router-dom'; +import Helmet from 'react-helmet'; + import Main from '../layouts/Main'; const Login = () => (
    +
    -
    -

    Login

    -

    - You're about to learn a lot about me. Let me learn a little about you. - I only ask for your email address and I promise not to spam you. - You can login with your google account below. -

    - +

    Login

    +

    + You're about to learn a lot about me. Let me learn a little about you. + I only ask for your email address and I promise not to spam you. + You can login with your google account below. +

    +
    diff --git a/app/views/Music.js b/app/views/Music.js index 483bd2f4f8..00aeae5d55 100644 --- a/app/views/Music.js +++ b/app/views/Music.js @@ -27,8 +27,8 @@ class Music extends Component { render() { return (
    +
    -

    Some bands that I like

    diff --git a/app/views/Projects.js b/app/views/Projects.js index 808e31705e..d3b1f92383 100644 --- a/app/views/Projects.js +++ b/app/views/Projects.js @@ -18,8 +18,8 @@ const getRows = () => data.map(project => ( const Projects = () => (
    +
    -

    Projects

    diff --git a/app/views/Resume.js b/app/views/Resume.js index dcc2a2197c..03e0912063 100644 --- a/app/views/Resume.js +++ b/app/views/Resume.js @@ -45,8 +45,8 @@ class Resume extends Component { render() { return (
    +
    -

    Resume

    diff --git a/app/views/Stats.js b/app/views/Stats.js index 2ad63c619f..7f1b773b13 100644 --- a/app/views/Stats.js +++ b/app/views/Stats.js @@ -9,8 +9,8 @@ import Site from '../components/Stats/Site'; const Stats = () => (
    +
    -

    Stats

    From 2b9f46e39a7b9721d16008831984bafb59649c0d Mon Sep 17 00:00:00 2001 From: mldangelo Date: Sat, 25 Mar 2017 03:39:28 -0700 Subject: [PATCH 39/54] removed resume test --- test/helpers.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/helpers.js b/test/helpers.js index 77fc4113a0..cddd036d5f 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -15,11 +15,6 @@ const pages = [ title: 'About | Michael D\'Angelo', heading: 'ABOUT ME', }, - { - route: '/resume', - title: 'Resume | Michael D\'Angelo', - heading: 'RESUME', - }, { route: '/projects', title: 'Projects | Michael D\'Angelo', From 5792657f07ab2243cc7774c20b197b780b27379b Mon Sep 17 00:00:00 2001 From: mldangelo Date: Sat, 25 Mar 2017 03:42:00 -0700 Subject: [PATCH 40/54] fixed linter errors --- app/components/Template/Hamburger.js | 2 +- app/entry.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/components/Template/Hamburger.js b/app/components/Template/Hamburger.js index d7135017e9..73203ba4d8 100644 --- a/app/components/Template/Hamburger.js +++ b/app/components/Template/Hamburger.js @@ -53,7 +53,7 @@ class Hamburger extends Component { ))} - {window.id ?
  • Logout

  • : null} + {window.id ?
  • Logout

  • : null}
    diff --git a/app/entry.js b/app/entry.js index 58108e2806..8376401434 100644 --- a/app/entry.js +++ b/app/entry.js @@ -42,15 +42,14 @@ const PrivateRoute = ({ component, ...rest }) => ( /> ); - PrivateRoute.propTypes = { component: PropTypes.func, - location: PropTypes.object, + location: PropTypes.string, // TODO Verify this type }; PrivateRoute.defaultProps = { component: null, - location: {}, + location: '', }; From da5b1e7aa771a7c8b407f906bae3b266b03a629f Mon Sep 17 00:00:00 2001 From: mldangelo Date: Sat, 25 Mar 2017 04:03:16 -0700 Subject: [PATCH 41/54] added variables to pass tests --- .travis.yml | 41 +++++++++++++++-------------------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/.travis.yml b/.travis.yml index c202f019f8..56baf26ef6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,29 +1,28 @@ sudo: false language: node_js - +services: mongodb cache: yarn: true - env: global: - secure: RMzwEd88VFWIw8R5j2RMkpFeiLGUM6tpoVooi30SOu/AkC0YxYNcxskIxDo0lfSuckvvggBxDq30WSXLrGaxCegCM5N5EyCdt/J67hnoD5C0x+hGFOrzp+nps/xfNerc47MLxVjG+Nglc8wk+gJNohG+l5AbEf33zwrVxARWqAPsqiUFyYGRcCSNMdFbUQnQtYrHFfxVpKU/MQMvsVPDvR8jNKjllIgCHHupYPtvfNP1/e33iWduJmEwP2k2kY7kJuEjy15RClrdW0y8k+uUibyKrjJQ0UhnAom0vwwIKbOZw8hBKRhvaGlJmvNRWBtsetpD60/xHo8s0POHMM12pfD7YQ2NZdriDXDdpArontMw5V0u6zUzWPV92yS99WXk/ufZIvCQl03nHEb6dK+8NPKquUmqZWWQYJylZc/tjzJJNliX03erDwNhYl2S4u+o5Br6iMMtxfIv1j7rBUk0sCHQwERWsYFm1HegvW2rwdOKBOcn2fOMBvKHZPSbLfDbJtJPSTetsT5MWyGIOPx8C+JIhobUNq5VpynOw+EInPfqG+qAV8HXJrZxoss/48o8IyjTBz0MTxNKrZD3v4R/pZrerq/+Jx/meCi6xHuMg4MEUnzj2o1DdSJB8C1vFindq2QrMah8u0wDscSNr2ihZg6treAnKCMeLe2PToqnlB0= - secure: Pw7qEKKiSACRYWFrGA4Nej6ZWTHDEnZbLO111H36+jkpg3n/dAghzWwn9qxjfH4z7lEZ5dvIGAh8SAiAQGkhuhZ22S5Hl98SF+6akZPbpf3xfWvDZn5cwpJljcFJG8/gDwP9mM/zfkMVhnmvDs3Q9saHG+7OnnobDQd8clRWbqJnyWizOAXhelGg8oiS/3NwstHFIR0+0nGWL/Zc5r9Y0vIaOiR5ePa7CgRiWbhjf9l6x91wFFSx2/BpPIijHbtN+rsRxMzE2Dxr7Id35rhGmUx7y0KER87It8CYgzudrQLzyRVN33Uju2Sh/kjhVOJ8Afl8xIwc2sQfn9ChHDN7NZM2rzvh/Aajk/ShYDHARlqSy9ZrzVQh2DtMkcEwJZFD4WqbHE2OjIABKdO53YAUBXDlng8ght4kL8QVrvM1pEoKGu4LKZnrmuBWaV/lztBwx/2RHER42XVXWAk+FMR1h8fPBpSON2HIHx3h68SDSAHzjibMiI4e+JcA0VgeFBR8xTx9wdBDXlNSk2i/hlTuMMhp4lyS3MSNP4bXPwQ6KK4HvD+U+s765/tc5pFRr+xrCfBlMeHWSiGWDCPbCDycuU8lb3e3CApY2Sg5SyERRopGXS6CZGPqbqPGLtC1jGOgOgUcFhOCLUnhe7BKNHTgZDiC7OdpmUWp1P+ehnEA2X4= - secure: J3CiJWSSJGZJMgzWR5ESQMFXLDY3MRq0zJ0inthQY0YbDYxS44FU94ayPzF15pn3BjvJij32xZepnGiNSl3aDR0g1mbcKWI3tGojuaGPNSP5jG8BOiRu74iilUv5kFW8Ku2DumTfET45T13xsY/aIexnAe2JOc9NUzD+UuOIDlzGgTB38vC/hPVn+bRBmUH3iA+uuPtnDMMXpwczVOHJ4ekmvju28nXMwXFqSJcDE0sN5zhdfFaT63/nTYEGUg5VSfwWzNSkjDMGnq2Ed3919VMxoZbQIwCWPW6KZiwq+zw74dh1tD4GirnJFcVuLfYxr3I+LONojjYE3lLRCQWZeZkAggxkdAspE1RmMUDHaspFfPFBN2p2izpzcvAyRVDS3ZgW0mP3GXoNRse7Z02lELmrndvF8a5Acyqhgx7qCZOBrG4I0uv0LNH1TWnFqpz2KHYV86AZT82TvkNi7aiddnabokOtA4HfD//VYIa+lR/JReBRlctT33RVZpVObpYbKC9p1bFOhopGssljVnWxZ2JMCS4IiwCLIUbT2Rd7Xs7N1yBuFRXhBSwuraSdXgqYEWHYl8yZmSxkKraG0bHETAQCcfzRthQTBfoKshT2GRorgSF/hpzrSwbVBY14VMOlqpo2THNAOime4MAPIkZ07N+TORcM4SBtBGKjcY/q7aQ= - + - secure: NjjJblwWbnmclNYvei4sn8RHjsbhsYJJUur6Tlo1bE1iQbU2Z9txI0SI2zhyZqNJLBPkQp06VihHzZUkG8cnorK1C6zXwcRa72gdLUJDyYcuibT0P+odJEM5D0BbzaUe7z29ul6uOjVEKdzWPfCAKVh1pV7B2jTjRGo6KaZ+6ue26rlEC9xat9eJeeBRAVwK+0NAKFKvIZ6lKIhdxbZypIX/gEZQ73NgYrJju8+m47YeddDdHBOPjIzFEtFzSOoz/6HZTCdT9rfMG/8KQnVMlvpAMPxj5pwsFrQItQKUhF2PXn5JtfndFbV/VOyTJsl4lMyTvmvHyAekZ8G7EL1G5w3ETcU7A87KGdFm7DGpj3BWECK7UQ+1Ucnwo1LRUoR9ZjpZdaOsxewf5cNcLjbnaxVvyT/+dtA6NeIEcj2lGl881GFsrQimtPmVsjiAemXMHa+9LbTRyblHIVtUPBiYVUWI8pCZ9yduze8TeIhY669YTtgThpOmPMw4ywVtn+MSBPwEcSLcFTtpCM6JXgD42dWjYrSouljmJ8aX4RkygEOti6cZMgyTN41uh35u+RFxsXWEAmncyNh3xNxQRFq22WML4LWpq1581iuUJPo01e4BZNlhPWTSQfOlLLrl9asD4ByhW0yb6XJaDVw3wVvRB/su99uWvv9aKdon/8IidGE= + - secure: DBWxOpBhlAzO5zza4mJZkZa/XAIJdUlMVIqpCGJVGJsdjUIXlTdF/Vw+Q5U5ZUR2MQN1fbpvqOzllsBwHkQiND2lpztDXDn95UjW3SK8Fhb8+1TVfwR4HXXW4XV3nYQhGYXkPcJ1kTVtTLqkp4WCmXulkQ1WqQT1zGPmvu73Mj6QgowTGaHf0DrbfQQouQyt+ji1bn1RLwvaZuNmgoYw1N/8NVssQEeJqb0X8cK2cQv3iGk0lnTXc+k4nWTa+IOLBHbmCyRMoVRBt2CnIKc9SuG3dZRi6g7FIhlBEF21oyxC7vYOw7Hvgr4T6dLfZaArAd+th1RiKl1trXtz6es+KofWo/Fzw3NcSxrknA3HzDr+LjRUgWj+Bi0WF3o6G5EdUbaIZgolVy76xj4P9ZN4mDKIvrtS6ZoiPssT3zM3eNSzrqkvCZAgRO198oepUDG/9RGxnQrCZCJxIRWcCl5NybiKd+3Nk9hRT2ZdTDeskhH7h2as73IkVN9+Um0TszvaJMzZbyOAOFInJwZfcpS0uWX+3+bpahx3UDLqhDltSLV5O/THzhDoP2TselXZ5ZFzQ/U4MHxwesuRfEE37e0Uc2adoyzuVFtFNL+6S3G1kzJFO7kyAkJ4u5Sg+Qsw1r/WTZbvFvmnPr4wE9Mu4r1/AbHzcG1MJu8MfTRbRYTsKnA= matrix: include: - - os: linux - node_js: "7" - env: NODE_ENV=development - - os: linux - node_js: "7" - env: NODE_ENV=production + - os: linux + node_js: '7' + env: NODE_ENV=development + - os: linux + node_js: '7' + env: NODE_ENV=production fast_finish: true - addons: - code_climate: - repo_token: 321ece2c9941bf30bb07f0555343ad772bdbbc6235c866478afc7af46558a8b4 - + apt: + packages: + - xvfb before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash - export PATH=$HOME/.yarn/bin:$PATH @@ -32,29 +31,19 @@ before_install: - npm --version - gcc --version - g++ --version - -addons: - apt: - packages: - - xvfb - install: - - export DISPLAY=':99.0' - - Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - - NODE_ENV=development yarn - +- export DISPLAY=':99.0' +- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & +- NODE_ENV=development yarn before_script: - npm run lint - sleep 5 - script: - npm run build-dev - npm run build - npm test - notifications: email: - michael.l.dangelo@gmail.com - git: depth: 10 From 0bb29e208a2b63c52c604648f0a0da317a279434 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Sat, 25 Mar 2017 04:09:59 -0700 Subject: [PATCH 42/54] added wait period for tests --- app/layouts/Main.js | 2 -- test/test.js | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/layouts/Main.js b/app/layouts/Main.js index 4a2e27a9c9..5cbead6916 100644 --- a/app/layouts/Main.js +++ b/app/layouts/Main.js @@ -26,8 +26,6 @@ class Main extends Component { }); ReactGA.pageview(window.location.pathname); } - - // console.log('window.id', window.id); } render() { diff --git a/test/test.js b/test/test.js index da422f71b6..9de1f5f36d 100644 --- a/test/test.js +++ b/test/test.js @@ -37,6 +37,7 @@ describe('Page Load Tests:', function () { it(`check if ${args.route} renders`, function* () { let text = yield nightmare .goto(`http://localhost:${port}${args.route}`) + .wait(100) .evaluate(() => document.title); text.should.equal(args.title); From c4ba72339c48a3bb3ff69824c0fb43b0cd5a6488 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Sat, 25 Mar 2017 04:14:51 -0700 Subject: [PATCH 43/54] wait in 404 case too --- test/test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test.js b/test/test.js index 9de1f5f36d..12084e20b2 100644 --- a/test/test.js +++ b/test/test.js @@ -54,6 +54,7 @@ describe('Page Load Tests:', function () { it('check if 404 renders', function* () { let text = yield nightmare .goto(`http://localhost:${port}/${randomString(10)}`) + .wait(100) .evaluate(() => document.title); text.should.equal('404'); From d4a0fa5370966176a78d8ad884373990fa05c534 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Sat, 25 Mar 2017 14:31:16 -0700 Subject: [PATCH 44/54] redirect to login page when api call for resume is bad --- app/views/Resume.js | 12 +++++++----- package.json | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/views/Resume.js b/app/views/Resume.js index 03e0912063..36cb84d1ae 100644 --- a/app/views/Resume.js +++ b/app/views/Resume.js @@ -1,5 +1,7 @@ import React, { Component } from 'react'; import { Link } from 'react-router-dom'; +import { withRouter } from 'react-router'; + import Helmet from 'react-helmet'; import axios from 'axios'; @@ -32,13 +34,13 @@ class Resume extends Component { componentWillMount() { axios.get('/api/resume').then(({ data }) => { - if (data.success) { - this.setState({ data }); - } else { - console.error(data); + if (!data.success) { + return Promise.reject(data.error); } + return this.setState({ data }); }).catch((error) => { console.error('resume-api-fetch-error', error); + this.props.history.push('/login'); // eslint-disable-line react/prop-types }); } @@ -71,4 +73,4 @@ class Resume extends Component { } } -export default Resume; +export default withRouter(Resume); diff --git a/package.json b/package.json index d53782d4cd..2c1a6f4a45 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "react-ga": "^2.1.2", "react-helmet": "^5.0.1", "react-markdown": "^2.4.6", + "react-router": "^4.0.0", "react-router-dom": "^4.0.0", "rimraf": "^2.6.1", "sass-loader": "^6.0.3", From 22edc9cad0928127b1fc2c9b6b8cfc59e0e4b0ac Mon Sep 17 00:00:00 2001 From: mldangelo Date: Sun, 26 Mar 2017 22:47:02 -0700 Subject: [PATCH 45/54] started to refactor directory tree --- package.json | 10 +++++----- routes/index.js | 10 ++++++---- routes/{ => views}/app.js | 8 ++++---- routes/{ => views}/logout.js | 0 {routes => server}/auth.js | 0 server.js => server/server.js | 4 ++-- 6 files changed, 17 insertions(+), 15 deletions(-) rename routes/{ => views}/app.js (85%) rename routes/{ => views}/logout.js (100%) rename {routes => server}/auth.js (100%) rename server.js => server/server.js (94%) diff --git a/package.json b/package.json index 2c1a6f4a45..eb96fe55de 100644 --- a/package.json +++ b/package.json @@ -7,11 +7,11 @@ "build-dev": "rimraf ./dist && babel-node ./node_modules/webpack/bin/webpack --config ./webpack/webpack.config.js --progress --profile --colors", "clean": "rimraf ./dist && rimraf ./tmp", "deploy": "yarn && npm run build && npm run forever-stop || true && npm run forever-start", - "dev": "nodemon server.js --ignore app/ --ignore tests/ --exec babel-node", - "forever-start": "forever start --minUptime 1000ms --spinSleepTime 1000ms -a -l forever.log -o out.log -e err.log -c 'nodemon server.js --exitcrash --exec babel-node' server.js", - "forever-stop": "forever stop server.js", - "lint": "./node_modules/.bin/eslint app models routes server.js test webpack", - "start": "./node_modules/.bin/babel-node server", + "dev": "nodemon server/server.js --ignore app/ --ignore tests/ --exec babel-node", + "forever-start": "forever start --minUptime 1000ms --spinSleepTime 1000ms -a -l forever.log -o out.log -e err.log -c 'nodemon server/server.js --exitcrash --exec babel-node' server/server.js", + "forever-stop": "forever stop server/server.js", + "lint": "./node_modules/.bin/eslint app models routes server test webpack", + "start": "./node_modules/.bin/babel-node server/server.js", "test": "./node_modules/mocha/bin/mocha --compilers js:babel-core/register ./test/test.js" }, "dependencies": { diff --git a/routes/index.js b/routes/index.js index 28a4c08f3a..d1144a6691 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,8 +1,8 @@ /* eslint-disable global-require */ import 'dotenv/config'; -import auth from './auth'; -import reactApp from './app'; -import { requireUserAPI } from './middleware'; +import auth from '../server/auth'; +import reactApp from './views/app'; +import { requireUserAPI, requireAdminAPI } from './middleware'; const routes = (app) => { @@ -16,9 +16,11 @@ const routes = (app) => { res.redirect('/resume'); // the only protected page. this works for now }); - app.get('/logout', require('./logout')); + app.get('/logout', require('./views/logout')); + app.get('/api/github', require('./api/github')); app.get('/api/lastfm', require('./api/lastfm')); + app.get('/api/resume', requireUserAPI, require('./api/resume')); reactApp(app); // set up react routes diff --git a/routes/app.js b/routes/views/app.js similarity index 85% rename from routes/app.js rename to routes/views/app.js index 7c5b3621aa..74b5e5fd18 100644 --- a/routes/app.js +++ b/routes/views/app.js @@ -8,7 +8,7 @@ import express from 'express'; import webpack from 'webpack'; import webpackMiddleware from 'webpack-dev-middleware'; import webpackHotMiddleware from 'webpack-hot-middleware'; -import config from '../webpack/webpack.config'; +import config from '../../webpack/webpack.config'; const env = process.env.NODE_ENV || 'development'; @@ -33,15 +33,15 @@ const routes = (app) => { app.get('/*', (req, res) => { - const content = middleware.fileSystem.readFileSync(path.join(__dirname, '../dist/index.html')); + const content = middleware.fileSystem.readFileSync(path.join(__dirname, '../../dist/index.html')); const key = '
    '; const index = content.indexOf(key) + key.length; const inject = req.user ? `` : ''; res.send(content.slice(0, index) + inject + content.slice(index)); }); } else { - app.use('/dist', express.static(path.join(__dirname, '../dist'))); - const content = fs.readFileSync(path.join(__dirname, '../dist/index.html'), 'utf8'); + app.use('/dist', express.static(path.join(__dirname, '../../dist'))); + const content = fs.readFileSync(path.join(__dirname, '../../dist/index.html'), 'utf8'); const key = '
    '; const index = content.indexOf(key) + key.length; diff --git a/routes/logout.js b/routes/views/logout.js similarity index 100% rename from routes/logout.js rename to routes/views/logout.js diff --git a/routes/auth.js b/server/auth.js similarity index 100% rename from routes/auth.js rename to server/auth.js diff --git a/server.js b/server/server.js similarity index 94% rename from server.js rename to server/server.js index 3fc32db37d..33cc103990 100644 --- a/server.js +++ b/server/server.js @@ -13,7 +13,7 @@ import mongoose from 'mongoose'; import session from 'express-session'; import mongoStore from 'connect-mongodb-session'; -import routes from './routes'; +import routes from '../routes'; const port = process.env.PORT || 7999; const env = process.env.NODE_ENV || 'development'; @@ -51,7 +51,7 @@ app.use(session({ // prevents logs from polluting test results if (!module.parent) app.use(morgan('combined')); -app.use(express.static(path.join(__dirname, 'public'))); +app.use(express.static(path.join(__dirname, '../public'))); routes(app); From 2d7b7728a89e45847945b5b7b37544b7e214cef9 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Sun, 26 Mar 2017 22:54:10 -0700 Subject: [PATCH 46/54] contined refactoring --- routes/index.js | 6 ++---- server/auth.js | 2 -- server/server.js | 4 +++- test/test.js | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/routes/index.js b/routes/index.js index d1144a6691..d912c18fc8 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,13 +1,11 @@ /* eslint-disable global-require */ import 'dotenv/config'; -import auth from '../server/auth'; +import passport from 'passport'; import reactApp from './views/app'; -import { requireUserAPI, requireAdminAPI } from './middleware'; +import { requireUserAPI } from './middleware'; const routes = (app) => { - const passport = auth(app); - app.get('/login/google', passport.authenticate('google')); app.get('/login/google/return', passport.authenticate('google', { diff --git a/server/auth.js b/server/auth.js index 2bc6d403f9..7e57ab80c5 100644 --- a/server/auth.js +++ b/server/auth.js @@ -42,8 +42,6 @@ const auth = (app) => { done(err, user); }); }); - - return passport; }; export default auth; diff --git a/server/server.js b/server/server.js index 33cc103990..064bab11d4 100644 --- a/server/server.js +++ b/server/server.js @@ -14,6 +14,7 @@ import session from 'express-session'; import mongoStore from 'connect-mongodb-session'; import routes from '../routes'; +import auth from './auth'; const port = process.env.PORT || 7999; const env = process.env.NODE_ENV || 'development'; @@ -53,7 +54,8 @@ if (!module.parent) app.use(morgan('combined')); app.use(express.static(path.join(__dirname, '../public'))); -routes(app); +auth(app); // initialize authentication +routes(app); // initialize routes if (!module.parent) { app.listen(port, '0.0.0.0', (err) => { diff --git a/test/test.js b/test/test.js index 12084e20b2..a06224708a 100644 --- a/test/test.js +++ b/test/test.js @@ -2,7 +2,7 @@ import 'babel-polyfill'; import 'dotenv/config'; import Nightmare from 'nightmare'; -import server from '../server'; +import server from '../server/server'; import { pages, randomString } from './helpers'; require('mocha-generators').install(); From 7a84b4c74d29e6d2e97e0d269017094dc3710332 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Mon, 27 Mar 2017 03:18:30 -0700 Subject: [PATCH 47/54] sign in users on account creation --- models/User.js | 5 +++++ server/auth.js | 20 ++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/models/User.js b/models/User.js index 859f77810c..585b5b6ceb 100644 --- a/models/User.js +++ b/models/User.js @@ -11,6 +11,11 @@ const User = new Schema({ email: String, email_verified: Boolean, gender: String, + updatedAt: [ Date ], + isAdmin: { + type: Boolean, + default: false, + }, }); export default mongoose.model('users', User); diff --git a/server/auth.js b/server/auth.js index 7e57ab80c5..5ee5c7c4dd 100644 --- a/server/auth.js +++ b/server/auth.js @@ -20,16 +20,20 @@ const auth = (app) => { scope: ['email'], }, (token, tokenSecret, profile, done) => { // update the user if s/he exists or add a new user - User.findOneAndUpdate({ - email: profile._json.email, - }, Object.assign({}, profile._json, { updatedAt: Date.now() }), { - upsert: true, - }, (err, user) => { - if (err) { - return done(err); + User.findOne({ email: profile._json.email}) + .then(user => { + if (!user) { + console.log('data', Object.assign({ updatedAt: [ Date.now() ]}, profile._json)) + return User.create(Object.assign({ updatedAt: [ Date.now() ]}, profile._json)); + } else { + const data = Object.assign({ $push: { updatedAt: Date.now() } }, profile._json, user); + return user.update(data); } + }).then(user => { return done(null, user); - }); + }).catch(error => { + return done(error); + }) }, )); From eae9e069e302b99aaba39fb6e00d3bf8d559f875 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Mon, 27 Mar 2017 15:06:44 -0700 Subject: [PATCH 48/54] sign in user on first login --- models/User.js | 6 +----- server/auth.js | 18 ++++++------------ 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/models/User.js b/models/User.js index 585b5b6ceb..1f52404ec3 100644 --- a/models/User.js +++ b/models/User.js @@ -11,11 +11,7 @@ const User = new Schema({ email: String, email_verified: Boolean, gender: String, - updatedAt: [ Date ], - isAdmin: { - type: Boolean, - default: false, - }, + logins: [Date], }); export default mongoose.model('users', User); diff --git a/server/auth.js b/server/auth.js index 5ee5c7c4dd..81ede77187 100644 --- a/server/auth.js +++ b/server/auth.js @@ -20,20 +20,14 @@ const auth = (app) => { scope: ['email'], }, (token, tokenSecret, profile, done) => { // update the user if s/he exists or add a new user - User.findOne({ email: profile._json.email}) - .then(user => { + User.findOne({ email: profile._json.email }) + .then((user) => { if (!user) { - console.log('data', Object.assign({ updatedAt: [ Date.now() ]}, profile._json)) - return User.create(Object.assign({ updatedAt: [ Date.now() ]}, profile._json)); - } else { - const data = Object.assign({ $push: { updatedAt: Date.now() } }, profile._json, user); - return user.update(data); + return User.create(Object.assign({ logins: [Date.now()] }, profile._json)); } - }).then(user => { - return done(null, user); - }).catch(error => { - return done(error); - }) + user.logins.push(Date.now()); + return user.save(); + }).then(user => done(null, user)).catch(error => done(error)); }, )); From d7c8fc4ce7572e45e93cf4d9bddfa29099135b7f Mon Sep 17 00:00:00 2001 From: mldangelo Date: Mon, 27 Mar 2017 15:09:43 -0700 Subject: [PATCH 49/54] moved views into server directory --- {views => server/views}/index.tpl.html | 0 webpack/webpack.config.js | 2 +- webpack/webpack.production.config.js | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename {views => server/views}/index.tpl.html (100%) diff --git a/views/index.tpl.html b/server/views/index.tpl.html similarity index 100% rename from views/index.tpl.html rename to server/views/index.tpl.html diff --git a/webpack/webpack.config.js b/webpack/webpack.config.js index beae78f80b..085dabbd42 100644 --- a/webpack/webpack.config.js +++ b/webpack/webpack.config.js @@ -17,7 +17,7 @@ export default { }, plugins: [ new HtmlWebpackPlugin({ - template: 'views/index.tpl.html', + template: 'server/views/index.tpl.html', inject: 'body', filename: 'index.html', }), diff --git a/webpack/webpack.production.config.js b/webpack/webpack.production.config.js index 760acd33ab..6d982d3bfa 100644 --- a/webpack/webpack.production.config.js +++ b/webpack/webpack.production.config.js @@ -17,7 +17,7 @@ export default { }, plugins: [ new HtmlWebpackPlugin({ - template: 'views/index.tpl.html', + template: 'server/views/index.tpl.html', inject: 'body', filename: 'index.html', }), From c3a8ebb81526900dbd936e8f4f00bd4540ea6aaf Mon Sep 17 00:00:00 2001 From: mldangelo Date: Mon, 27 Mar 2017 15:13:16 -0700 Subject: [PATCH 50/54] moved other server code into server folder --- routes/api/resume.js | 15 --------------- server/auth.js | 2 +- {models => server/models}/User.js | 0 {routes => server/routes}/api/github.js | 2 +- {routes => server/routes}/api/lastfm.js | 0 server/routes/api/resume.js | 15 +++++++++++++++ {routes => server/routes}/index.js | 0 {routes => server/routes}/middleware.js | 0 {routes => server/routes}/views/app.js | 8 ++++---- {routes => server/routes}/views/logout.js | 0 server/server.js | 2 +- 11 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 routes/api/resume.js rename {models => server/models}/User.js (100%) rename {routes => server/routes}/api/github.js (95%) rename {routes => server/routes}/api/lastfm.js (100%) create mode 100644 server/routes/api/resume.js rename {routes => server/routes}/index.js (100%) rename {routes => server/routes}/middleware.js (100%) rename {routes => server/routes}/views/app.js (92%) rename {routes => server/routes}/views/logout.js (100%) diff --git a/routes/api/resume.js b/routes/api/resume.js deleted file mode 100644 index fe07444a2a..0000000000 --- a/routes/api/resume.js +++ /dev/null @@ -1,15 +0,0 @@ -import courses from '../../app/data/protected/courses'; -import degrees from '../../app/data/protected/degrees'; -import positions from '../../app/data/protected/positions'; -import { skills, categories } from '../../app/data/protected/skills'; - -export default (req, res) => { - res.json({ - success: true, - courses, - degrees, - positions, - skills, - categories, - }); -}; diff --git a/server/auth.js b/server/auth.js index 81ede77187..f6655a10f0 100644 --- a/server/auth.js +++ b/server/auth.js @@ -2,7 +2,7 @@ import 'dotenv/config'; import passport from 'passport'; import { Strategy } from 'passport-google-oauth20'; -import User from '../models/User'; +import User from './models/User'; const port = process.env.PORT || 7999; diff --git a/models/User.js b/server/models/User.js similarity index 100% rename from models/User.js rename to server/models/User.js diff --git a/routes/api/github.js b/server/routes/api/github.js similarity index 95% rename from routes/api/github.js rename to server/routes/api/github.js index 9ee76b0a97..e117460085 100644 --- a/routes/api/github.js +++ b/server/routes/api/github.js @@ -3,7 +3,7 @@ import moment from 'moment'; import GithubAPI from 'github'; -import { githubKeys as keys } from '../../app/data/github'; +import { githubKeys as keys } from '../../../app/data/github'; let cached = {}; diff --git a/routes/api/lastfm.js b/server/routes/api/lastfm.js similarity index 100% rename from routes/api/lastfm.js rename to server/routes/api/lastfm.js diff --git a/server/routes/api/resume.js b/server/routes/api/resume.js new file mode 100644 index 0000000000..7f46d17945 --- /dev/null +++ b/server/routes/api/resume.js @@ -0,0 +1,15 @@ +import courses from '../../../app/data/protected/courses'; +import degrees from '../../../app/data/protected/degrees'; +import positions from '../../../app/data/protected/positions'; +import { skills, categories } from '../../../app/data/protected/skills'; + +export default (req, res) => { + res.json({ + success: true, + courses, + degrees, + positions, + skills, + categories, + }); +}; diff --git a/routes/index.js b/server/routes/index.js similarity index 100% rename from routes/index.js rename to server/routes/index.js diff --git a/routes/middleware.js b/server/routes/middleware.js similarity index 100% rename from routes/middleware.js rename to server/routes/middleware.js diff --git a/routes/views/app.js b/server/routes/views/app.js similarity index 92% rename from routes/views/app.js rename to server/routes/views/app.js index 74b5e5fd18..893268bd23 100644 --- a/routes/views/app.js +++ b/server/routes/views/app.js @@ -8,7 +8,7 @@ import express from 'express'; import webpack from 'webpack'; import webpackMiddleware from 'webpack-dev-middleware'; import webpackHotMiddleware from 'webpack-hot-middleware'; -import config from '../../webpack/webpack.config'; +import config from '../../../webpack/webpack.config'; const env = process.env.NODE_ENV || 'development'; @@ -33,15 +33,15 @@ const routes = (app) => { app.get('/*', (req, res) => { - const content = middleware.fileSystem.readFileSync(path.join(__dirname, '../../dist/index.html')); + const content = middleware.fileSystem.readFileSync(path.join(__dirname, '../../../dist/index.html')); const key = '
    '; const index = content.indexOf(key) + key.length; const inject = req.user ? `` : ''; res.send(content.slice(0, index) + inject + content.slice(index)); }); } else { - app.use('/dist', express.static(path.join(__dirname, '../../dist'))); - const content = fs.readFileSync(path.join(__dirname, '../../dist/index.html'), 'utf8'); + app.use('/dist', express.static(path.join(__dirname, '../../../dist'))); + const content = fs.readFileSync(path.join(__dirname, '../../../dist/index.html'), 'utf8'); const key = '
    '; const index = content.indexOf(key) + key.length; diff --git a/routes/views/logout.js b/server/routes/views/logout.js similarity index 100% rename from routes/views/logout.js rename to server/routes/views/logout.js diff --git a/server/server.js b/server/server.js index 064bab11d4..fd48fc9725 100644 --- a/server/server.js +++ b/server/server.js @@ -13,7 +13,7 @@ import mongoose from 'mongoose'; import session from 'express-session'; import mongoStore from 'connect-mongodb-session'; -import routes from '../routes'; +import routes from './routes'; import auth from './auth'; const port = process.env.PORT || 7999; From 1e8c858dcc53679be0ce638ae336a07477138d59 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Mon, 27 Mar 2017 15:34:46 -0700 Subject: [PATCH 51/54] fixed nonresponsive element on resume upgraded packages --- package.json | 8 ++++---- public/css/views/_resume.scss | 18 +++++++++--------- test/helpers.js | 5 +++++ yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 33 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index eb96fe55de..a892325c38 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "css-loader": "^0.27.3", "dotenv": "^4.0.0", "express": "^4.15.2", - "express-session": "^1.15.1", + "express-session": "^1.15.2", "extract-text-webpack-plugin": "^2.1.0", "file-loader": "^0.10.1", "forever": "^0.15.3", @@ -44,11 +44,11 @@ "html-webpack-plugin": "^2.28.0", "last.fm.api": "^0.1.3", "moment": "^2.18.1", - "mongoose": "^4.9.1", + "mongoose": "^4.9.2", "morgan": "^1.8.1", "node-sass": "^4.5.1", "nodemon": "^1.11.0", - "normalize.css": "^5.0.0", + "normalize.css": "^6.0.0", "passport": "^0.3.2", "passport-google-oauth20": "^1.0.0", "raw-loader": "^0.5.1", @@ -63,7 +63,7 @@ "rimraf": "^2.6.1", "sass-loader": "^6.0.3", "script-ext-html-webpack-plugin": "^1.7.1", - "stats-webpack-plugin": "^0.5.0", + "stats-webpack-plugin": "^0.6.0", "strip-loader": "^0.1.2", "style-loader": "^0.16.0", "url-loader": "^0.5.8", diff --git a/public/css/views/_resume.scss b/public/css/views/_resume.scss index 0878a3c6db..83d4fb9198 100644 --- a/public/css/views/_resume.scss +++ b/public/css/views/_resume.scss @@ -1,16 +1,16 @@ -/* Resume */ +/* Resume */ #resume { - + .link-to { position: relative; top: -4.5em; } - + .link-container h4 { text-decoration:none; border-bottom: none; - display: inline; + display: inline-flex; a { padding: 0 .5em; @@ -36,7 +36,7 @@ } } } - + .jobs-container { .points { li { @@ -46,7 +46,7 @@ } } } - + .courses { padding-top: 1.6em; .title { @@ -54,13 +54,13 @@ } .course-list { text-align: center; - + h4 { white-space: nowrap; } } } - + .skills { margin-top: 2em; .title { @@ -86,7 +86,7 @@ h4 { font-weight: normal; } - + .degree { margin-bottom: .1em; text-transform: none; diff --git a/test/helpers.js b/test/helpers.js index cddd036d5f..dd3a2b8fd8 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -35,6 +35,11 @@ const pages = [ title: 'Music | Michael D\'Angelo', heading: 'SOME BANDS THAT I LIKE', }, + { + route: '/login', + title: 'Login | Michael D\'Angelo', + heading: 'LOGIN', + }, ]; export { pages, randomString }; diff --git a/yarn.lock b/yarn.lock index 426b8383f2..65f3aef44f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2434,18 +2434,18 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -express-session@^1.15.1: - version "1.15.1" - resolved "https://registry.yarnpkg.com/express-session/-/express-session-1.15.1.tgz#9abba15971beea7ad98da5a4d25ed92ba4a2984e" +express-session@^1.15.2: + version "1.15.2" + resolved "https://registry.yarnpkg.com/express-session/-/express-session-1.15.2.tgz#d98516443a4ccb8688e1725ae584c02daa4093d4" dependencies: cookie "0.3.1" cookie-signature "1.0.6" crc "3.4.4" - debug "2.6.1" + debug "2.6.3" depd "~1.1.0" on-headers "~1.0.1" parseurl "~1.3.1" - uid-safe "~2.1.3" + uid-safe "~2.1.4" utils-merge "1.0.0" express@^4.15.2: @@ -3981,9 +3981,9 @@ mongodb@2.2.25, mongodb@~2.2.0: mongodb-core "2.1.9" readable-stream "2.1.5" -mongoose@^4.9.1: - version "4.9.1" - resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-4.9.1.tgz#e621d9e7356f46d1e39980a71063857405fa9099" +mongoose@^4.9.2: + version "4.9.2" + resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-4.9.2.tgz#df137675eed76a14dc1e6952ede54497c7547926" dependencies: async "2.1.4" bson "~1.0.4" @@ -4267,9 +4267,9 @@ normalize-url@^1.4.0: query-string "^4.1.0" sort-keys "^1.0.0" -normalize.css@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/normalize.css/-/normalize.css-5.0.0.tgz#7cec875ce8178a5333c4de80b68ea9c18b9d7c37" +normalize.css@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/normalize.css/-/normalize.css-6.0.0.tgz#22188c2707c911fb3ad3c1aac0677ff68661bea8" "npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2: version "4.0.2" @@ -5711,9 +5711,9 @@ stack-trace@0.0.x: version "0.0.9" resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.9.tgz#a8f6eaeca90674c333e7c43953f275b451510695" -stats-webpack-plugin@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/stats-webpack-plugin/-/stats-webpack-plugin-0.5.0.tgz#d51806faf3f87dda75967721a0b3892abae43d10" +stats-webpack-plugin@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/stats-webpack-plugin/-/stats-webpack-plugin-0.6.0.tgz#05f9e4cf251b0d03d63abf93365b06128e17466a" dependencies: lodash "^4.17.4" @@ -6070,7 +6070,7 @@ uid-number@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" -uid-safe@~2.1.3: +uid-safe@~2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/uid-safe/-/uid-safe-2.1.4.tgz#3ad6f38368c6d4c8c75ec17623fb79aa1d071d81" dependencies: From 81eb3e55c3cbb79282b7767bc2265428fc73930c Mon Sep 17 00:00:00 2001 From: mldangelo Date: Mon, 27 Mar 2017 19:56:31 -0700 Subject: [PATCH 52/54] made database name configurable added script to copy database from production server --- sample.env | 2 + scripts/mongo-copy.sh | 115 ++++++++++++++++++++++++++++++++++++++++++ server/server.js | 5 +- 3 files changed, 120 insertions(+), 2 deletions(-) create mode 100755 scripts/mongo-copy.sh diff --git a/sample.env b/sample.env index 5604577a9e..ef57356698 100644 --- a/sample.env +++ b/sample.env @@ -1,6 +1,8 @@ NODE_ENV=production PORT=7999 + HOSTNAME=http://localhost:7999 +DB_NAME=mldangelo GITHUB_OAUTH=ABCDEFG diff --git a/scripts/mongo-copy.sh b/scripts/mongo-copy.sh new file mode 100755 index 0000000000..92363e50b9 --- /dev/null +++ b/scripts/mongo-copy.sh @@ -0,0 +1,115 @@ +#!/bin/bash + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# This scripts makes a copy of the production database for a # +# development server or your local machine. # +# run with -h for arguments or view file below # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +NOW=`date +%s` +PRODUCTION_USER="ubuntu" +PRODUCTION_HOST="mldangelo.com" + +# Parse arguments +while [[ $# > 0 ]] +do +key="$1" +case $key in + -s|--server) + SERVER="$2" + shift # past argument + ;; + -k|--key) + KEY="$2" + shift # past argument + ;; + -n|--name) + DB_NAME="$2" + shift # past argument + ;; + -h|--help) + HELP=1 + ;; + *) # unknown option + UNKNOWN=1 + ;; +esac +shift # past argument or value +done + +if [[ "$UNKNOWN" -eq 1 ]] + then + echo -e "\nError: Unkown argument." + HELP=1 +fi + +if [[ "$HELP" -eq 1 ]] + then + echo -e "\nMongo copy allows you to quickly make a copy of a remote" + echo -e "mongo database and add it to your local mongodb instance.\n" + echo -e "Allowed arguments:" + echo -e "\t --help, -h: Display this message" + echo -e "\t --key, -k: Specify path to ssh key" + echo -e "\t --name, -n: Specify mongodb database name" + echo -e "\t --server, -s: Specify user@host or ssh identity\n" + exit 2 +fi + +# set server +if [ -z "$SERVER" ] + then + SERVER=$PRODUCTION_USER@$PRODUCTION_HOST +fi + +# set key +if [ ! -z "$KEY" ] + then + SSHCMD="-i $KEY $SERVER" + else + SSHCMD="$SERVER" +fi + +if [ -z "$DB_NAME" ] + then + DB_NAME="mldangelo" +fi + +# Directory where temporary files will be temporarily stored +BACKUP_DIR=/tmp/${DB_NAME}_mongo_backup_${NOW} + +# Check if monogodb is running +if pgrep "mongod" > /dev/null + then + echo "Local instance of mongodb is running." + else + echo "Local instance of mongodb is not running. Please start mongodb and run script again." + exit -1 +fi + +# Check if ssh works +ssh -q $SSHCMD exit +if [ "$?" -eq "0" ] + then + echo "SSH CONNECTION SUCCESSFUL" + else + echo "SSH ERROR: check manual connection before trying again." + exit -1 +fi + +COPY_CMD="mkdir $BACKUP_DIR; mongodump -d $DB_NAME -o $BACKUP_DIR" +DELETE_CMD="rm -rf $BACKUP_DIR" + +echo "EXPORTING DB:$COPY_CMD" +ssh $SSHCMD $COPY_CMD + +echo "TRANSFERING DB" +rsync -avzP -e ssh $SSHCMD:$BACKUP_DIR /tmp + +echo "IMPORTING DB" +mongorestore --noIndexRestore -d $DB_NAME --drop $BACKUP_DIR/$DB_NAME + +echo "REMOVING TEMPORARY FILES" +ssh $SSHCMD $DELETE_CMD +rm -rf $BACKUP_DIR +END=`date +%s` +echo "Finished copying database. Operation took $((END - NOW)) seconds." diff --git a/server/server.js b/server/server.js index fd48fc9725..ac178bc0b4 100644 --- a/server/server.js +++ b/server/server.js @@ -18,6 +18,7 @@ import auth from './auth'; const port = process.env.PORT || 7999; const env = process.env.NODE_ENV || 'development'; +const database = process.env.DB_NAME || 'mldangelo'; const app = express(); @@ -28,10 +29,10 @@ app.use(cookieParser()); const MongoDBStore = mongoStore(session); -mongoose.connect('mongodb://localhost/mldangelo'); +mongoose.connect(`mongodb://localhost/${database}`); const store = new MongoDBStore({ - uri: 'mongodb://localhost/mldangelo', + uri: `mongodb://localhost/${database}`, collection: 'sessions', }); From 11eae135e281c12616708d2ad8819db33a5ba864 Mon Sep 17 00:00:00 2001 From: mldangelo Date: Mon, 27 Mar 2017 19:59:03 -0700 Subject: [PATCH 53/54] added a script to make a local copy of a database --- scripts/mongo-duplicate.sh | 64 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 scripts/mongo-duplicate.sh diff --git a/scripts/mongo-duplicate.sh b/scripts/mongo-duplicate.sh new file mode 100755 index 0000000000..c6cf38710f --- /dev/null +++ b/scripts/mongo-duplicate.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# This scripts makes a copy of the production database for a # +# development server or your local machine. # +# run with -h for arguments or view file below # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +NOW=`date +%s` + +# Parse arguments +while [[ $# > 0 ]] +do +key="$1" +case $key in + -i|--in) + DB_IN="$2" + shift # past argument + ;; + -o|--out) + DB_OUT="$2" + shift # past argument + ;; + -h|--help) + HELP=1 + ;; + *) # unknown option + UNKNOWN=1 + ;; +esac +shift # past argument or value +done + +if [[ "$UNKNOWN" -eq 1 ]] + then + echo -e "\nError: Unkown argument." + HELP=1 +fi + +if [[ "$HELP" -eq 1 ]] + then + echo -e "\nMongo clone allows you to quickly clone a local database" + echo -e "and add it back to your local mongodb instance under a new name.\n" + echo -e "Allowed arguments:" + echo -e "\t --help, -h: Display this message" + echo -e "\t --in, -i: Specify name of database to be copied" + echo -e "\t --out, -o: Specify name of copy\n" + exit 2 +fi + +if [ -z "$DB_IN" ] + then + DB_IN="mldangelo" +fi + +if [ -z "$DB_OUT" ] + then + DB_IN="mldangelobeta" +fi + +mongo $DB_OUT --eval "db.dropDatabase()" +mongo --eval "db.copyDatabase('$DB_IN','$DB_OUT')" +END=`date +%s` +echo "Finished cloning database. Operation took $((END - NOW)) seconds." From abbe91f70a79aa51fbae5dba78cf4fb3598e7dcd Mon Sep 17 00:00:00 2001 From: mldangelo Date: Tue, 28 Mar 2017 14:27:17 -0700 Subject: [PATCH 54/54] removed login test --- test/helpers.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/helpers.js b/test/helpers.js index dd3a2b8fd8..cddd036d5f 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -35,11 +35,6 @@ const pages = [ title: 'Music | Michael D\'Angelo', heading: 'SOME BANDS THAT I LIKE', }, - { - route: '/login', - title: 'Login | Michael D\'Angelo', - heading: 'LOGIN', - }, ]; export { pages, randomString };