From 44a6111f1fd279661787e1ec0840b4e8a3aa344f Mon Sep 17 00:00:00 2001 From: Will Timpson Date: Wed, 9 Aug 2017 10:05:32 -0400 Subject: [PATCH 01/20] Names --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 47801d7..68f945b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # project_mimirs_market A Viking eCommerce store for Thunder Gods that like to buy "Antique Wooden Pizzas" + +Ed and Will From fc5714feeffad3d45c1e29a011b15f7d4a9025a6 Mon Sep 17 00:00:00 2001 From: Will Timpson Date: Wed, 9 Aug 2017 11:31:56 -0400 Subject: [PATCH 02/20] Boilerplate --- .env | 1 + .gitignore | 2 + .sequelizerc.js | 14 + app.js | 65 + config/mongoUrl.js | 6 + config/mongoose.json | 13 + config/sequelize.js | 21 + helpers/FlashHelper.js | 11 + helpers/index.js | 5 + models/mongoose/index.js | 0 models/sequelize/index.js | 36 + mongo.js | 2 + package-lock.json | 3631 ++++++++++++++++++++++++++ package.json | 50 + repl.js | 45 + views/layouts/application.handlebars | 26 + views/shared/_flash.handlebars | 11 + views/shared/_nav.handlebars | 32 + 18 files changed, 3971 insertions(+) create mode 100644 .env create mode 100644 .gitignore create mode 100644 .sequelizerc.js create mode 100644 app.js create mode 100644 config/mongoUrl.js create mode 100644 config/mongoose.json create mode 100644 config/sequelize.js create mode 100644 helpers/FlashHelper.js create mode 100644 helpers/index.js create mode 100644 models/mongoose/index.js create mode 100644 models/sequelize/index.js create mode 100644 mongo.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 repl.js create mode 100644 views/layouts/application.handlebars create mode 100644 views/shared/_flash.handlebars create mode 100644 views/shared/_nav.handlebars diff --git a/.env b/.env new file mode 100644 index 0000000..11f57c4 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +USERNAME: "wil"; diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b37dd6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +.env.js diff --git a/.sequelizerc.js b/.sequelizerc.js new file mode 100644 index 0000000..d213fdf --- /dev/null +++ b/.sequelizerc.js @@ -0,0 +1,14 @@ +const path = require("path"); + +const config = { + config: "./config/sequelize", + "migrations-path": "./migrations/sequelize", + "seeders-path": "./seeds/sequelize", + "models-path": "./models/sequelize" +}; + +Object.keys(config).forEach(key => { + config[key] = path.resolve(config[key]); +}); + +module.exports = config; diff --git a/app.js b/app.js new file mode 100644 index 0000000..493ce4f --- /dev/null +++ b/app.js @@ -0,0 +1,65 @@ +const express = require("express"); +const app = express(); + +// Templates +const expressHandlebars = require("express-handlebars"); +const hbs = expressHandlebars.create({ + partialsDir: "views/", + defaultLayout: "application", + helpers: require("./helpers") +}); +app.engine("handlebars", hbs.engine); +app.set("view engine", "handlebars"); + +// Post Data +const bodyParser = require("body-parser"); +app.use(bodyParser.urlencoded({ extended: true })); + +// Session +const cookieSession = require("cookie-session"); +app.use( + cookieSession({ + name: "session", + keys: ["as908ffa9d08sadf89sadf89qjqwjkl"] + }) +); + +// Flash +const flash = require("express-flash-messages"); +app.use(flash()); + +// Log Request Info +const morgan = require("morgan"); +const morganToolkit = require("morgan-toolkit")(morgan); +app.use(morganToolkit()); + +// Method Overriding +const methodOverride = require("method-override"); +const getPostSupport = require("express-method-override-get-post-support"); +app.use(methodOverride(getPostSupport.callback, getPostSupport.options)); + +// Connect to Mongoose +const mongoose = require("mongoose"); +app.use((req, res, next) => { + if (mongoose.connection.readyState) next(); + else require("./mongo")().then(() => next()); +}); + +// Routes +// app.use("/posts", require("./routers/posts")); +// app.all("/", (req, res) => res.redirect("/posts")); +// app.use("/users", require("./routers/users")); +// app.use("/comments", require("./routers/comments")); + +// Set up port/host +const port = process.env.PORT || process.argv[2] || 3000; +const host = "localhost"; +let args = process.env.NODE_ENV === "production" ? [port] : [port, host]; + +// helpful log when the server starts +args.push(() => { + console.log(`Listening: http://${host}:${port}`); +}); + +// Use apply to pass the args to listen +app.listen.apply(app, args); diff --git a/config/mongoUrl.js b/config/mongoUrl.js new file mode 100644 index 0000000..69828e0 --- /dev/null +++ b/config/mongoUrl.js @@ -0,0 +1,6 @@ +const env = process.env.NODE_ENV || "development"; +const config = require("./mongo.json")[env]; +module.exports = + process.env.NODE_ENV === "production" + ? process.env[config.use_env_variable] + : `mongodb://${config.host}/${config.database}`; diff --git a/config/mongoose.json b/config/mongoose.json new file mode 100644 index 0000000..8b806dc --- /dev/null +++ b/config/mongoose.json @@ -0,0 +1,13 @@ +{ + "development": { + "database": "project_mimirs_market_development", + "host": "localhost" + }, + "test": { + "database": "project_mimirs_market_test", + "host": "localhost" + }, + "production": { + "use_env_variable": "MONGO_URL" + } +} diff --git a/config/sequelize.js b/config/sequelize.js new file mode 100644 index 0000000..4f3a0e9 --- /dev/null +++ b/config/sequelize.js @@ -0,0 +1,21 @@ +require("dotenv").config(); +module.exports = { + development: { + username: process.env.USERNAME, + password: null, + database: "project_mimirs_market_development", + host: "127.0.0.1", + dialect: "postgres" + }, + test: { + username: process.env.USERNAME, + password: null, + database: "project_mimirs_market_test", + host: "127.0.0.1", + dialect: "postgres" + }, + production: { + use_env_variable: "POSTGRES_URL", + dialect: "postgres" + } +}; diff --git a/helpers/FlashHelper.js b/helpers/FlashHelper.js new file mode 100644 index 0000000..83090f9 --- /dev/null +++ b/helpers/FlashHelper.js @@ -0,0 +1,11 @@ +module.exports = { + bootstrapAlertClassFor: key => { + return ( + { + error: "danger", + alert: "danger", + notice: "info" + }[key] || key + ); + } +}; diff --git a/helpers/index.js b/helpers/index.js new file mode 100644 index 0000000..4efd3b2 --- /dev/null +++ b/helpers/index.js @@ -0,0 +1,5 @@ +const LoadHelpers = require("load-helpers"); +const helperLoader = new LoadHelpers(); +const helpers = helperLoader.load("helpers/*Helper.js").cache; + +module.exports = helpers; diff --git a/models/mongoose/index.js b/models/mongoose/index.js new file mode 100644 index 0000000..e69de29 diff --git a/models/sequelize/index.js b/models/sequelize/index.js new file mode 100644 index 0000000..7540dba --- /dev/null +++ b/models/sequelize/index.js @@ -0,0 +1,36 @@ +'use strict'; + +var fs = require('fs'); +var path = require('path'); +var Sequelize = require('sequelize'); +var basename = path.basename(module.filename); +var env = process.env.NODE_ENV || 'development'; +var config = require(__dirname + '/../config/config.json')[env]; +var db = {}; + +if (config.use_env_variable) { + var sequelize = new Sequelize(process.env[config.use_env_variable]); +} else { + var sequelize = new Sequelize(config.database, config.username, config.password, config); +} + +fs + .readdirSync(__dirname) + .filter(function(file) { + return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js'); + }) + .forEach(function(file) { + var model = sequelize['import'](path.join(__dirname, file)); + db[model.name] = model; + }); + +Object.keys(db).forEach(function(modelName) { + if (db[modelName].associate) { + db[modelName].associate(db); + } +}); + +db.sequelize = sequelize; +db.Sequelize = Sequelize; + +module.exports = db; diff --git a/mongo.js b/mongo.js new file mode 100644 index 0000000..3e49b52 --- /dev/null +++ b/mongo.js @@ -0,0 +1,2 @@ +module.exports = () => + require("mongoose").connect(require("./config/mongoUrl")); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..f616cb2 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3631 @@ +{ + "name": "project_mimirs_market", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/geojson": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.2.tgz", + "integrity": "sha1-sC0QqwKOKSisWSoFGqpJgaGUHQM=" + }, + "@types/node": { + "version": "6.0.85", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.85.tgz", + "integrity": "sha512-6qLZpfQFO/g5Ns2e7RsW6brk0Q6Xzwiw7kVVU/XiQNOiJXSojhX76GP457PBYIsNMH2WfcGgcnZB4awFDHrwpA==" + }, + "abbrev": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", + "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=" + }, + "accepts": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", + "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=", + "requires": { + "mime-types": "2.1.16", + "negotiator": "0.6.1" + } + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" + }, + "ap": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ap/-/ap-0.2.0.tgz", + "integrity": "sha1-rglCYAspkS8NKxTsYMRejzMLYRA=" + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=" + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=" + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=" + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "array-slice": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.0.0.tgz", + "integrity": "sha1-5zA08A3MH0CHYAj9IP6ud71LfC8=" + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "async-array-reduce": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/async-array-reduce/-/async-array-reduce-0.2.1.tgz", + "integrity": "sha1-yL4BCitc0A3qlsgRFgNGk9/dgtE=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "basic-auth": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.1.0.tgz", + "integrity": "sha1-RSIe5Cn37h5QNb4/UVM/HN/SmIQ=" + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=" + }, + "bluebird": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", + "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=" + }, + "body-parser": { + "version": "1.17.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.17.2.tgz", + "integrity": "sha1-+IkqvI+eYn1Crtr7yma/WrmRBO4=", + "requires": { + "bytes": "2.4.0", + "content-type": "1.0.2", + "debug": "2.6.7", + "depd": "1.1.1", + "http-errors": "1.6.2", + "iconv-lite": "0.4.15", + "on-finished": "2.3.0", + "qs": "6.4.0", + "raw-body": "2.2.0", + "type-is": "1.6.15" + }, + "dependencies": { + "debug": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", + "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "bson": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.0.4.tgz", + "integrity": "sha1-k8ENOeqltYQVy8QFLz5T5WKwtyw=" + }, + "buffer-shims": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=" + }, + "buffer-writer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-1.0.1.tgz", + "integrity": "sha1-Iqk2kB4wKa/NdUfrRIfOtpejvwg=" + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, + "bytes": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", + "integrity": "sha1-fZcZb51br39pNeJZhVSe3SpsIzk=" + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "optional": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "cli-color": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.2.0.tgz", + "integrity": "sha1-OlrnT9drYmevZm5p4q+70B3vNNE=", + "requires": { + "ansi-regex": "2.1.1", + "d": "1.0.0", + "es5-ext": "0.10.26", + "es6-iterator": "2.0.1", + "memoizee": "0.4.5", + "timers-ext": "0.1.2" + } + }, + "cli-highlight": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-1.1.4.tgz", + "integrity": "sha1-5FWQwU+xjhOGXjiZ6CTFWSzCKSY=", + "requires": { + "chalk": "1.1.3", + "he": "1.1.1", + "highlight.js": "9.12.0", + "mz": "2.6.0", + "yargs": "4.8.1" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "1.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "0.2.1" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" + }, + "window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=" + }, + "yargs": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", + "requires": { + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "lodash.assign": "4.2.0", + "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", + "window-size": "0.2.0", + "y18n": "3.2.1", + "yargs-parser": "2.4.1" + } + }, + "yargs-parser": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", + "requires": { + "camelcase": "3.0.0", + "lodash.assign": "4.2.0" + } + } + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "clone": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", + "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=" + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" + }, + "cls-bluebird": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/cls-bluebird/-/cls-bluebird-2.0.1.tgz", + "integrity": "sha1-wlmkgK4CwOUGE0MHuxPbMERu4uc=", + "requires": { + "is-bluebird": "1.0.2", + "shimmer": "1.1.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "color-convert": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", + "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "config-chain": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.11.tgz", + "integrity": "sha1-q6CXR9++TD5w52am5BWG4YWfxvI=", + "requires": { + "ini": "1.3.4", + "proto-list": "1.2.4" + } + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "content-type": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", + "integrity": "sha1-t9ETrueo3Se9IRM8TcJSnfFyHu0=" + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "cookie-session": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/cookie-session/-/cookie-session-1.3.0.tgz", + "integrity": "sha512-ql3gtHDd0yn3fX3Kjtm1aS8wkpwr3qbx8MhQMYuPFu5ENQTNukSFCIxiX6mPtw2AKWYer8BMWdXk2V3Sbnft0g==", + "requires": { + "cookies": "0.7.0", + "debug": "2.6.8", + "on-headers": "1.0.1" + } + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "cookies": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.7.0.tgz", + "integrity": "sha1-C8lh2RDDUlSYD8fJ7/XaEgEbvwA=", + "requires": { + "depd": "1.1.1", + "keygrip": "1.0.1" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "requires": { + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "requires": { + "es5-ext": "0.10.26" + } + }, + "dateformat": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz", + "integrity": "sha1-J0Pjq7XD/CRi5SfcpEXgTp9N7hc=" + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "requires": { + "clone": "1.0.2" + } + }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "requires": { + "foreach": "2.0.5", + "object-keys": "1.0.11" + } + }, + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" + }, + "deprecated": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", + "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "detect-file": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-0.1.0.tgz", + "integrity": "sha1-STXe39lIhkjgBrASlWbpOGcR6mM=", + "requires": { + "fs-exists-sync": "0.1.0" + } + }, + "dotenv": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz", + "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0=" + }, + "dottie": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dottie/-/dottie-2.0.0.tgz", + "integrity": "sha1-2hkZgci41xPKARXViYzzl8Lw3dA=" + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "requires": { + "readable-stream": "1.1.14" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "editorconfig": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.13.2.tgz", + "integrity": "sha1-jleSbZ7mmrbLmZ8CfCFxRnrM6zU=", + "requires": { + "bluebird": "3.5.0", + "commander": "2.11.0", + "lru-cache": "3.2.0", + "sigmund": "1.0.1" + }, + "dependencies": { + "bluebird": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", + "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=" + }, + "lru-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-3.2.0.tgz", + "integrity": "sha1-cXibO39Tmb7IVl3aOKow0qCX7+4=", + "requires": { + "pseudomap": "1.0.2" + } + } + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "encodeurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", + "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=" + }, + "end-of-stream": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "requires": { + "once": "1.3.3" + } + }, + "env-cmd": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/env-cmd/-/env-cmd-5.1.0.tgz", + "integrity": "sha1-AjbbOTw/AzAFIE/NCpLuQHI6nJ4=", + "requires": { + "cross-spawn": "5.1.0" + } + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "requires": { + "is-arrayish": "0.2.1" + } + }, + "es5-ext": { + "version": "0.10.26", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.26.tgz", + "integrity": "sha1-UbISilMbcMT2dkCTpzy+u4IYY3I=", + "requires": { + "es6-iterator": "2.0.1", + "es6-symbol": "3.1.1" + } + }, + "es6-iterator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz", + "integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.26", + "es6-symbol": "3.1.1" + } + }, + "es6-promise": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz", + "integrity": "sha1-7FYjOGgDKQkgcXDDlEjiREndH8Q=" + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.26" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.26", + "es6-iterator": "2.0.1", + "es6-symbol": "3.1.1" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "etag": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz", + "integrity": "sha1-b2Ma7zNtbEY2K1F2QETOIWvjwFE=" + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.26" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "requires": { + "fill-range": "2.2.3" + } + }, + "expand-tilde": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", + "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=", + "requires": { + "os-homedir": "1.0.2" + } + }, + "express": { + "version": "4.15.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.15.4.tgz", + "integrity": "sha1-Ay4iU0ic+PzgJma+yj0R7XotrtE=", + "requires": { + "accepts": "1.3.3", + "array-flatten": "1.1.1", + "content-disposition": "0.5.2", + "content-type": "1.0.2", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.8", + "depd": "1.1.1", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "etag": "1.8.0", + "finalhandler": "1.0.4", + "fresh": "0.5.0", + "merge-descriptors": "1.0.1", + "methods": "1.1.2", + "on-finished": "2.3.0", + "parseurl": "1.3.1", + "path-to-regexp": "0.1.7", + "proxy-addr": "1.1.5", + "qs": "6.5.0", + "range-parser": "1.2.0", + "send": "0.15.4", + "serve-static": "1.12.4", + "setprototypeof": "1.0.3", + "statuses": "1.3.1", + "type-is": "1.6.15", + "utils-merge": "1.0.0", + "vary": "1.1.1" + }, + "dependencies": { + "qs": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.0.tgz", + "integrity": "sha512-fjVFjW9yhqMhVGwRExCXLhJKrLlkYSaxNWdyc9rmHlrVZbk35YHH312dFd7191uQeXkI3mKLZTIbSvIeFwFemg==" + } + } + }, + "express-flash-messages": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/express-flash-messages/-/express-flash-messages-0.1.1.tgz", + "integrity": "sha1-QCDOUXjDuzZjlN6QZiILwnBb1vI=" + }, + "express-handlebars": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/express-handlebars/-/express-handlebars-3.0.0.tgz", + "integrity": "sha1-gKBwu4GbCeSvLKbQeA91zgXnXC8=", + "requires": { + "glob": "6.0.4", + "graceful-fs": "4.1.11", + "handlebars": "4.0.10", + "object.assign": "4.0.4", + "promise": "7.3.1" + }, + "dependencies": { + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "2.0.10", + "once": "1.3.3", + "path-is-absolute": "1.0.1" + } + } + } + }, + "express-method-override-get-post-support": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/express-method-override-get-post-support/-/express-method-override-get-post-support-0.0.7.tgz", + "integrity": "sha512-aHO/iYL9GV4FoRZACHkhOYfHXVljwu5LbGMOuq8++6K2JpG6437oZt64w1k3Ff6oPq1/0AtsGYnZwyivKUi67A==" + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "requires": { + "is-extglob": "1.0.0" + } + }, + "faker": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/faker/-/faker-4.1.0.tgz", + "integrity": "sha1-HkW7vsxndLPBlfrSg1EJxtdIzD8=" + }, + "fancy-log": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", + "integrity": "sha1-Rb4X0Cu5kX1gzP/UmVyZnmyMmUg=", + "requires": { + "chalk": "1.1.3", + "time-stamp": "1.1.0" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "finalhandler": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.4.tgz", + "integrity": "sha512-16l/r8RgzlXKmFOhZpHBztvye+lAhC5SU7hXavnerC9UfZqZxxXl3BzL8MhffPT3kF61lj9Oav2LKEzh0ei7tg==", + "requires": { + "debug": "2.6.8", + "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-index": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=" + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "2.0.0" + } + }, + "findup-sync": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-1.0.0.tgz", + "integrity": "sha1-b35LV7buOkA3tEFOrt6j9Y9x4Ow=", + "requires": { + "detect-file": "0.1.0", + "is-glob": "2.0.1", + "micromatch": "2.3.11", + "resolve-dir": "0.1.1" + } + }, + "fined": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz", + "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", + "requires": { + "expand-tilde": "2.0.2", + "is-plain-object": "2.0.4", + "object.defaults": "1.1.0", + "object.pick": "1.2.0", + "parse-filepath": "1.0.1" + }, + "dependencies": { + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "requires": { + "homedir-polyfill": "1.0.1" + } + } + } + }, + "first-chunk-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=" + }, + "flagged-respawn": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz", + "integrity": "sha1-/xke3c1wiKZ1smEP/8l2vpuAdLU=" + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "requires": { + "for-in": "1.0.2" + } + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, + "forwarded": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz", + "integrity": "sha1-Ge+YdMSuHCl7zweP3mOgm2aoQ2M=" + }, + "fresh": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz", + "integrity": "sha1-9HTKXmqSRtb9jglTz6m5yAWvp44=" + }, + "fs-exists-sync": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", + "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=" + }, + "fs-extra": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.1.tgz", + "integrity": "sha1-f8DGyJV/mD9X8waiTlud3Y0N2IA=", + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "3.0.1", + "universalify": "0.1.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "function-bind": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", + "integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=" + }, + "gaze": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", + "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", + "requires": { + "globule": "0.1.0" + } + }, + "generic-pool": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-3.1.7.tgz", + "integrity": "sha1-2sIrLHp6BOQXMvfY0tJaMDyI9mI=" + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "2.0.10", + "once": "1.3.3" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "requires": { + "is-glob": "2.0.1" + } + }, + "glob-stream": { + "version": "3.1.18", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", + "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", + "requires": { + "glob": "4.5.3", + "glob2base": "0.0.12", + "minimatch": "2.0.10", + "ordered-read-streams": "0.1.0", + "through2": "0.6.5", + "unique-stream": "1.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "glob-watcher": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", + "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", + "requires": { + "gaze": "0.5.2" + } + }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "requires": { + "find-index": "0.1.1" + } + }, + "global-modules": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", + "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=", + "requires": { + "global-prefix": "0.1.5", + "is-windows": "0.2.0" + } + }, + "global-prefix": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", + "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=", + "requires": { + "homedir-polyfill": "1.0.1", + "ini": "1.3.4", + "is-windows": "0.2.0", + "which": "1.3.0" + } + }, + "globule": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", + "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", + "requires": { + "glob": "3.1.21", + "lodash": "1.0.2", + "minimatch": "0.2.14" + }, + "dependencies": { + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "requires": { + "graceful-fs": "1.2.3", + "inherits": "1.0.2", + "minimatch": "0.2.14" + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=" + }, + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=" + }, + "lodash": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=" + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + } + } + }, + "glogg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", + "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=", + "requires": { + "sparkles": "1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "gulp": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", + "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", + "requires": { + "archy": "1.0.0", + "chalk": "1.1.3", + "deprecated": "0.0.1", + "gulp-util": "3.0.8", + "interpret": "1.0.3", + "liftoff": "2.3.0", + "minimist": "1.2.0", + "orchestrator": "0.3.8", + "pretty-hrtime": "1.0.3", + "semver": "4.3.6", + "tildify": "1.2.0", + "v8flags": "2.1.1", + "vinyl-fs": "0.3.14" + }, + "dependencies": { + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=" + } + } + }, + "gulp-help": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/gulp-help/-/gulp-help-1.6.1.tgz", + "integrity": "sha1-Jh2xhuGDl/7z9qLCLpwxW/qIrgw=", + "requires": { + "chalk": "1.1.3", + "object-assign": "3.0.0" + } + }, + "gulp-util": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", + "requires": { + "array-differ": "1.0.0", + "array-uniq": "1.0.3", + "beeper": "1.1.1", + "chalk": "1.1.3", + "dateformat": "2.0.0", + "fancy-log": "1.3.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.6.2", + "minimist": "1.2.0", + "multipipe": "0.1.2", + "object-assign": "3.0.0", + "replace-ext": "0.0.1", + "through2": "2.0.3", + "vinyl": "0.5.3" + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "requires": { + "glogg": "1.0.0" + } + }, + "handlebars": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.10.tgz", + "integrity": "sha1-PTDHGLCaPZbyPqTMH0A8TTup/08=", + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "has-glob": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/has-glob/-/has-glob-0.1.1.tgz", + "integrity": "sha1-omHEwqbGZ+DHe3AKfyl8Oe86pYk=", + "requires": { + "is-glob": "2.0.1" + } + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "requires": { + "sparkles": "1.0.0" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=" + }, + "highlight.js": { + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.12.0.tgz", + "integrity": "sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4=" + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "requires": { + "parse-passwd": "1.0.0" + } + }, + "hooks-fixed": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hooks-fixed/-/hooks-fixed-2.0.0.tgz", + "integrity": "sha1-oB2JTVKsf2WZu7H2PfycQR33DLo=" + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": "1.3.1" + } + }, + "iconv-lite": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", + "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=" + }, + "inflection": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.10.0.tgz", + "integrity": "sha1-W//LEZetPoEFD44X4hZoCH7p6y8=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.3.3", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" + }, + "interpret": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz", + "integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=" + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "ipaddr.js": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz", + "integrity": "sha1-KWrKh4qCGBbluF0KKFqZvP9FgvA=" + }, + "is-absolute": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", + "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", + "requires": { + "is-relative": "0.2.1", + "is-windows": "0.2.0" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-bluebird": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-bluebird/-/is-bluebird-1.0.2.tgz", + "integrity": "sha1-CWQ5Bg9KpBGr7hkUOoTWpVNG1uI=" + }, + "is-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", + "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "requires": { + "kind-of": "3.2.2" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + }, + "is-relative": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", + "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", + "requires": { + "is-unc-path": "0.1.2" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-unc-path": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", + "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", + "requires": { + "unc-path-regex": "0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "is-valid-glob": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz", + "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=" + }, + "is-windows": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "js-beautify": { + "version": "1.6.14", + "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.6.14.tgz", + "integrity": "sha1-07j3Mi0CuSd9WL0jgmTDJ+WARM0=", + "requires": { + "config-chain": "1.1.11", + "editorconfig": "0.13.2", + "mkdirp": "0.5.1", + "nopt": "3.0.6" + } + }, + "jsonfile": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", + "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", + "requires": { + "graceful-fs": "4.1.11" + } + }, + "kareem": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-1.5.0.tgz", + "integrity": "sha1-4+QQHZ3P3imXadr0tNtk2JXRdEg=" + }, + "keygrip": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.0.1.tgz", + "integrity": "sha1-sC+kgW7vIajEs1yp5Skh/8iaMOk=" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "optional": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "1.0.0" + } + }, + "liftoff": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz", + "integrity": "sha1-qY8v9nGD2Lp8+soQVIvX/wVQs4U=", + "requires": { + "extend": "3.0.1", + "findup-sync": "0.4.3", + "fined": "1.1.0", + "flagged-respawn": "0.3.2", + "lodash.isplainobject": "4.0.6", + "lodash.isstring": "4.0.1", + "lodash.mapvalues": "4.6.0", + "rechoir": "0.6.2", + "resolve": "1.4.0" + }, + "dependencies": { + "findup-sync": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz", + "integrity": "sha1-QAQ5Kee8YK3wt/SCfExudaDeyhI=", + "requires": { + "detect-file": "0.1.0", + "is-glob": "2.0.1", + "micromatch": "2.3.11", + "resolve-dir": "0.1.1" + } + } + } + }, + "load-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/load-helpers/-/load-helpers-1.0.1.tgz", + "integrity": "sha1-ZoEbwF/PBwSO9w9lRzC0Ip5qrLM=", + "requires": { + "component-emitter": "1.2.1", + "extend-shallow": "2.0.1", + "is-glob": "3.1.0", + "is-valid-glob": "0.3.0", + "kind-of": "3.2.2", + "matched": "0.4.4", + "resolve-dir": "0.1.1", + "set-value": "0.4.3" + }, + "dependencies": { + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "2.1.1" + } + } + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=" + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=" + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=" + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=" + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=" + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=" + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=" + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=" + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "requires": { + "lodash._root": "3.0.1" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=" + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "requires": { + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" + } + }, + "lodash.mapvalues": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", + "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=" + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=" + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "requires": { + "lodash._basecopy": "3.0.1", + "lodash._basetostring": "3.0.1", + "lodash._basevalues": "3.0.0", + "lodash._isiterateecall": "3.0.9", + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0", + "lodash.keys": "3.1.2", + "lodash.restparam": "3.6.1", + "lodash.templatesettings": "3.1.1" + } + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "requires": { + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0" + } + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + }, + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "requires": { + "es5-ext": "0.10.26" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "matched": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/matched/-/matched-0.4.4.tgz", + "integrity": "sha1-Vte36xgDPwz5vFLrIJD6x9weifo=", + "requires": { + "arr-union": "3.1.0", + "async-array-reduce": "0.2.1", + "extend-shallow": "2.0.1", + "fs-exists-sync": "0.1.0", + "glob": "7.1.2", + "has-glob": "0.1.1", + "is-valid-glob": "0.3.0", + "lazy-cache": "2.0.2", + "resolve-dir": "0.1.1" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.3", + "path-is-absolute": "1.0.1" + } + }, + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "0.1.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + } + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "requires": { + "mimic-fn": "1.1.0" + } + }, + "memoizee": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.5.tgz", + "integrity": "sha1-G8PqHkvgVt1HXVIZede+PV5bIcg=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.26", + "es6-weak-map": "2.0.2", + "event-emitter": "0.3.5", + "is-promise": "2.1.0", + "lru-queue": "0.1.0", + "next-tick": "1.0.0", + "timers-ext": "0.1.2" + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "method-override": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/method-override/-/method-override-2.3.9.tgz", + "integrity": "sha1-vRUfLONM8Bp2ykAKuVwBKxAtj3E=", + "requires": { + "debug": "2.6.8", + "methods": "1.1.2", + "parseurl": "1.3.1", + "vary": "1.1.1" + } + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.3" + } + }, + "mime": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", + "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=" + }, + "mime-db": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz", + "integrity": "sha1-SNJtI1WJZRcErFkWygYAGRQmaHg=" + }, + "mime-types": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz", + "integrity": "sha1-K4WKUuXs1RbbiXrCvodIeDBpjiM=", + "requires": { + "mime-db": "1.29.0" + } + }, + "mimic-fn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", + "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=" + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } + } + }, + "moment": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", + "integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=" + }, + "moment-timezone": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.13.tgz", + "integrity": "sha1-mc5cfYJyYusPH3AgRBd/YHRde5A=", + "requires": { + "moment": "2.18.1" + } + }, + "mongodb": { + "version": "2.2.30", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.30.tgz", + "integrity": "sha1-jM2AH2dsgXIEDC8rR+lgKg1WNKs=", + "requires": { + "es6-promise": "3.2.1", + "mongodb-core": "2.1.14", + "readable-stream": "2.2.7" + } + }, + "mongodb-core": { + "version": "2.1.14", + "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.14.tgz", + "integrity": "sha1-E8uidkImtb49GJkq8Mljzl6g8P0=", + "requires": { + "bson": "1.0.4", + "require_optional": "1.0.1" + } + }, + "mongoose": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-4.11.6.tgz", + "integrity": "sha512-TZQo1u8zd67ixiWFFoOhu3P7CB73XthLDX0GuGlFGR+49mi5L3I688GsMuayJo7bJhvCrMsG1d8BKJ2Lqdrsvg==", + "requires": { + "async": "2.1.4", + "bson": "1.0.4", + "hooks-fixed": "2.0.0", + "kareem": "1.5.0", + "mongodb": "2.2.30", + "mpath": "0.3.0", + "mpromise": "0.5.5", + "mquery": "2.3.1", + "ms": "2.0.0", + "muri": "1.2.2", + "regexp-clone": "0.0.1", + "sliced": "1.0.1" + }, + "dependencies": { + "async": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.1.4.tgz", + "integrity": "sha1-LSFgx3iAMuTdbL4lAvH5osj2zeQ=", + "requires": { + "lodash": "4.17.4" + } + } + } + }, + "morgan": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.8.2.tgz", + "integrity": "sha1-eErHc05KRTqcbm6GgKkyknXItoc=", + "requires": { + "basic-auth": "1.1.0", + "debug": "2.6.8", + "depd": "1.1.1", + "on-finished": "2.3.0", + "on-headers": "1.0.1" + } + }, + "morgan-toolkit": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/morgan-toolkit/-/morgan-toolkit-1.0.2.tgz", + "integrity": "sha512-tFhfamRSNrnGlaVfY384lFyeHZl8Y4IwSt2219+6YEuVeEJKVBlAQHT/NSAF5hlHrloI0G578zRy0Hxv4Iv10Q==", + "requires": { + "chalk": "2.1.0", + "cli-highlight": "1.1.4" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.2.1" + } + }, + "supports-color": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.2.1.tgz", + "integrity": "sha512-qxzYsob3yv6U+xMzPrv170y8AwGP7i74g+pbixCfD6rgso8BscLT2qXIuz6TpOaiJZ3mFgT5O9lyT9nMU4LfaA==", + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "mpath": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.3.0.tgz", + "integrity": "sha1-elj3iem1/TyUUgY0FXlg8mvV70Q=" + }, + "mpromise": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mpromise/-/mpromise-0.5.5.tgz", + "integrity": "sha1-9bJCWddjrMIlewoMjG2Gb9UXMuY=" + }, + "mquery": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-2.3.1.tgz", + "integrity": "sha1-mrNnSXFIAP8LtTpoHOS8TV8HyHs=", + "requires": { + "bluebird": "2.10.2", + "debug": "2.6.8", + "regexp-clone": "0.0.1", + "sliced": "0.0.5" + }, + "dependencies": { + "bluebird": { + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.10.2.tgz", + "integrity": "sha1-AkpVFylTCIV/FPkfEQb8O1VfRGs=" + }, + "sliced": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-0.0.5.tgz", + "integrity": "sha1-XtwETKTrb3gW1Qui/GPiXY/kcH8=" + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "requires": { + "duplexer2": "0.0.2" + } + }, + "muri": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/muri/-/muri-1.2.2.tgz", + "integrity": "sha1-YxmBMmUNsIoEzHnM0A3Tia/SYxw=" + }, + "mz": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.6.0.tgz", + "integrity": "sha1-yLhSHZWN8KTydoAl22nHGe5O8c4=", + "requires": { + "any-promise": "1.3.0", + "object-assign": "4.1.1", + "thenify-all": "1.6.0" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + } + } + }, + "natives": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz", + "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=" + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "requires": { + "abbrev": "1.1.0" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "1.0.2" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "2.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=" + }, + "object-keys": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" + }, + "object.assign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.0.4.tgz", + "integrity": "sha1-scnMBE7xuf5jYG/BQau7MuFHMMw=", + "requires": { + "define-properties": "1.1.2", + "function-bind": "1.1.0", + "object-keys": "1.0.11" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "requires": { + "array-each": "1.0.1", + "array-slice": "1.0.0", + "for-own": "1.0.0", + "isobject": "3.0.1" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "requires": { + "for-in": "1.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "object.pick": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.2.0.tgz", + "integrity": "sha1-tTkr7peC2m2ft9avr1OXefEjTCs=", + "requires": { + "isobject": "2.1.0" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=" + }, + "once": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "requires": { + "wrappy": "1.0.2" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "requires": { + "minimist": "0.0.10", + "wordwrap": "0.0.3" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" + } + } + }, + "orchestrator": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", + "requires": { + "end-of-stream": "0.1.5", + "sequencify": "0.0.7", + "stream-consume": "0.1.0" + } + }, + "ordered-read-streams": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", + "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=" + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", + "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=" + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "1.1.0" + } + }, + "packet-reader": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-0.3.1.tgz", + "integrity": "sha1-zWLmCvjX/qinBexP+ZCHHEaHHyc=" + }, + "parse-filepath": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.1.tgz", + "integrity": "sha1-FZ1hVdQ5BNFsEO9piRHaHpGWm3M=", + "requires": { + "is-absolute": "0.2.6", + "map-cache": "0.2.2", + "path-root": "0.1.1" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "1.3.1" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" + }, + "parseurl": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", + "integrity": "sha1-yKuMkiO6NIiKpkopeyiFO+wY2lY=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "requires": { + "path-root-regex": "0.1.2" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "requires": { + "pify": "2.3.0" + } + }, + "pg": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-7.1.0.tgz", + "integrity": "sha1-naPwnTmDUhUhwdg2m22aEwbP6f4=", + "requires": { + "buffer-writer": "1.0.1", + "packet-reader": "0.3.1", + "pg-connection-string": "0.1.3", + "pg-pool": "2.0.1", + "pg-types": "1.12.0", + "pgpass": "1.0.2", + "semver": "4.3.2" + }, + "dependencies": { + "semver": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.2.tgz", + "integrity": "sha1-x6BxWKgL7dBSNVt3DYLWZA+AO+c=" + } + } + }, + "pg-connection-string": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-0.1.3.tgz", + "integrity": "sha1-2hhHsglA5C7hSSvq9l1J2RskXfc=" + }, + "pg-hstore": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/pg-hstore/-/pg-hstore-2.3.2.tgz", + "integrity": "sha1-9+8FPnubiSrphq8vfL6GQy388k8=", + "requires": { + "underscore": "1.8.3" + } + }, + "pg-pool": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-2.0.1.tgz", + "integrity": "sha1-ixJUHfJxtX9wIMUKP1VmRx+Cx34=" + }, + "pg-types": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-1.12.0.tgz", + "integrity": "sha1-itO3uJfj/UY+Yt4kGtX8ZAtKZvA=", + "requires": { + "ap": "0.2.0", + "postgres-array": "1.0.2", + "postgres-bytea": "1.0.0", + "postgres-date": "1.0.3", + "postgres-interval": "1.1.1" + } + }, + "pgpass": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.2.tgz", + "integrity": "sha1-Knu0G2BltnkH6R2hsHwYR8h3swY=", + "requires": { + "split": "1.0.1" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "2.0.4" + } + }, + "postgres-array": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-1.0.2.tgz", + "integrity": "sha1-jgsy6wO/d6XAp4UeBEHBaaJWojg=" + }, + "postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=" + }, + "postgres-date": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.3.tgz", + "integrity": "sha1-4tiXAu/bJY/52c7g/pG9BpdSV6g=" + }, + "postgres-interval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.1.1.tgz", + "integrity": "sha512-OkuCi9t/3CZmeQreutGgx/OVNv9MKHGIT5jH8KldQ4NLYXkvmT9nDVxEuCENlNwhlGPE374oA/xMqn05G49pHA==", + "requires": { + "xtend": "4.0.1" + } + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=" + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "requires": { + "asap": "2.0.6" + } + }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=" + }, + "proxy-addr": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.5.tgz", + "integrity": "sha1-ccDuOxAt4/IC87ZPYI0XP8uhqRg=", + "requires": { + "forwarded": "0.1.0", + "ipaddr.js": "1.4.0" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "1.1.5" + } + } + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "raw-body": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.2.0.tgz", + "integrity": "sha1-mUl2z2pQlqQRYoQEkvC9xdbn+5Y=", + "requires": { + "bytes": "2.4.0", + "iconv-lite": "0.4.15", + "unpipe": "1.0.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "requires": { + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + } + }, + "readable-stream": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.7.tgz", + "integrity": "sha1-BwV6y+JGeyIELTb5jFrVBwVOlbE=", + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "1.4.0" + } + }, + "redefine": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/redefine/-/redefine-0.2.1.tgz", + "integrity": "sha1-6J7npvJNGf/2JZBWkzLcYDgKiaM=" + }, + "regex-cache": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", + "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=", + "requires": { + "is-equal-shallow": "0.1.3", + "is-primitive": "2.0.0" + } + }, + "regexp-clone": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz", + "integrity": "sha1-p8LgmJH9vzj7sQ03b7cwA+aKxYk=" + }, + "remove-trailing-separator": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz", + "integrity": "sha1-abBi2XhyetFNxrVrpKt3L9jXBRE=" + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" + }, + "require_optional": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", + "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", + "requires": { + "resolve-from": "2.0.0", + "semver": "5.4.1" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "resolve": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", + "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==", + "requires": { + "path-parse": "1.0.5" + } + }, + "resolve-dir": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", + "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=", + "requires": { + "expand-tilde": "1.2.2", + "global-modules": "0.2.3" + } + }, + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" + }, + "retry-as-promised": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/retry-as-promised/-/retry-as-promised-2.3.0.tgz", + "integrity": "sha1-J79czZmZMrMWZWloJc82MMJ8Vi0=", + "requires": { + "bluebird": "3.5.0", + "debug": "2.6.8" + }, + "dependencies": { + "bluebird": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", + "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=" + } + } + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "optional": true, + "requires": { + "align-text": "0.1.4" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + }, + "send": { + "version": "0.15.4", + "resolved": "https://registry.npmjs.org/send/-/send-0.15.4.tgz", + "integrity": "sha1-mF+qPihLAnPHkzZKNcZze9k5Bbk=", + "requires": { + "debug": "2.6.8", + "depd": "1.1.1", + "destroy": "1.0.4", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "etag": "1.8.0", + "fresh": "0.5.0", + "http-errors": "1.6.2", + "mime": "1.3.4", + "ms": "2.0.0", + "on-finished": "2.3.0", + "range-parser": "1.2.0", + "statuses": "1.3.1" + } + }, + "sequelize": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-4.4.2.tgz", + "integrity": "sha1-lSkuCnUuJYbskqDnI2K3bk/Ljq4=", + "requires": { + "bluebird": "3.5.0", + "cls-bluebird": "2.0.1", + "debug": "2.6.8", + "depd": "1.1.1", + "dottie": "2.0.0", + "env-cmd": "5.1.0", + "generic-pool": "3.1.7", + "inflection": "1.10.0", + "lodash": "4.17.4", + "moment": "2.18.1", + "moment-timezone": "0.5.13", + "retry-as-promised": "2.3.0", + "semver": "5.4.1", + "terraformer-wkt-parser": "1.1.2", + "toposort-class": "1.0.1", + "uuid": "3.1.0", + "validator": "6.3.0", + "wkx": "0.4.1" + }, + "dependencies": { + "bluebird": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", + "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=" + } + } + }, + "sequelize-cli": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/sequelize-cli/-/sequelize-cli-2.8.0.tgz", + "integrity": "sha1-QwTM5g5JkWlgP4ON7bq0IcmEnnQ=", + "requires": { + "bluebird": "3.5.0", + "cli-color": "1.2.0", + "findup-sync": "1.0.0", + "fs-extra": "4.0.1", + "gulp": "3.9.1", + "gulp-help": "1.6.1", + "js-beautify": "1.6.14", + "lodash": "4.17.4", + "moment": "2.18.1", + "resolve": "1.4.0", + "umzug": "1.12.0", + "yargs": "8.0.2" + }, + "dependencies": { + "bluebird": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", + "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=" + } + } + }, + "sequencify": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", + "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=" + }, + "serve-static": { + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.4.tgz", + "integrity": "sha1-m2qpjutyU8Tu3Ewfb9vKYJkBqWE=", + "requires": { + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "parseurl": "1.3.1", + "send": "0.15.4" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "set-getter": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", + "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=", + "requires": { + "to-object-path": "0.3.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" + } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "shimmer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.1.0.tgz", + "integrity": "sha1-l9c3cTf/u6tCVSLkKf4KqJpIizU=" + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "sliced": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", + "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "requires": { + "amdefine": "1.0.1" + } + }, + "sparkles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", + "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=" + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" + }, + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "requires": { + "through": "2.3.8" + } + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" + }, + "stream-consume": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", + "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=" + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", + "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", + "requires": { + "first-chunk-stream": "1.0.0", + "is-utf8": "0.2.1" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + }, + "stripe": { + "version": "4.23.2", + "resolved": "https://registry.npmjs.org/stripe/-/stripe-4.23.2.tgz", + "integrity": "sha512-GvK+8Ighu2EaXEoYwXfcbdU6TN8kv2fREBc4/KnyCEwXbCm8aXPoTCRuuLVqqFKaeHdzgRuwcGdQ3Pxdhb/TOg==", + "requires": { + "bluebird": "2.11.0", + "lodash.isplainobject": "4.0.6", + "object-assign": "4.1.1", + "qs": "6.0.4" + }, + "dependencies": { + "bluebird": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "qs": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.0.4.tgz", + "integrity": "sha1-UQGdhHIMk5uCc36EVWp4Izjs6ns=" + } + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "terraformer": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/terraformer/-/terraformer-1.0.8.tgz", + "integrity": "sha1-UeCtiXRvzyFh3G9lqnDkI3fItZM=", + "requires": { + "@types/geojson": "1.0.2" + } + }, + "terraformer-wkt-parser": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/terraformer-wkt-parser/-/terraformer-wkt-parser-1.1.2.tgz", + "integrity": "sha1-M2oMj8gglKWv+DKI9prt7NNpvww=", + "requires": { + "terraformer": "1.0.8" + } + }, + "thenify": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", + "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", + "requires": { + "any-promise": "1.3.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", + "requires": { + "thenify": "3.3.0" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "requires": { + "readable-stream": "2.2.7", + "xtend": "4.0.1" + } + }, + "tildify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "requires": { + "os-homedir": "1.0.2" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=" + }, + "timers-ext": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.2.tgz", + "integrity": "sha1-YcxHp2wavTGV8UUn+XjViulMUgQ=", + "requires": { + "es5-ext": "0.10.26", + "next-tick": "1.0.0" + } + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "3.2.2" + } + }, + "toposort-class": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toposort-class/-/toposort-class-1.0.1.tgz", + "integrity": "sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg=" + }, + "type-is": { + "version": "1.6.15", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", + "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=", + "requires": { + "media-typer": "0.3.0", + "mime-types": "2.1.16" + } + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "optional": true, + "requires": { + "source-map": "0.5.6", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "optional": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + } + }, + "source-map": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", + "optional": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "optional": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "optional": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "optional": true + }, + "umzug": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/umzug/-/umzug-1.12.0.tgz", + "integrity": "sha1-p5yR8oYu7jEwxsNH8rkK1opm6Lg=", + "requires": { + "bluebird": "3.5.0", + "lodash": "4.17.4", + "moment": "2.18.1", + "redefine": "0.2.1", + "resolve": "1.4.0" + }, + "dependencies": { + "bluebird": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", + "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=" + } + } + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + }, + "unique-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", + "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=" + }, + "universalify": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", + "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg=" + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "requires": { + "user-home": "1.1.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "validator": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-6.3.0.tgz", + "integrity": "sha1-R84j7Y1Ord+p1LjvAHG2zxB418g=" + }, + "vary": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz", + "integrity": "sha1-Z1Neu2lMHVIldFeYRmUyP1h+jTc=" + }, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "requires": { + "clone": "1.0.2", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", + "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", + "requires": { + "defaults": "1.0.3", + "glob-stream": "3.1.18", + "glob-watcher": "0.0.6", + "graceful-fs": "3.0.11", + "mkdirp": "0.5.1", + "strip-bom": "1.0.0", + "through2": "0.6.5", + "vinyl": "0.4.6" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=" + }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "requires": { + "natives": "1.1.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "requires": { + "clone": "0.2.0", + "clone-stats": "0.0.1" + } + } + } + }, + "voca": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/voca/-/voca-1.3.0.tgz", + "integrity": "sha1-AnUayDm/DJLiz+iOScOTyU3VCsM=" + }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "requires": { + "isexe": "2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "optional": true + }, + "wkx": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.4.1.tgz", + "integrity": "sha1-L8FxtenLVcYlb+9L3h8hvkE77+4=", + "requires": { + "@types/node": "6.0.85" + } + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "yargs": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", + "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "requires": { + "camelcase": "4.1.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "read-pkg-up": "2.0.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "7.0.0" + } + }, + "yargs-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "requires": { + "camelcase": "4.1.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..cfa7926 --- /dev/null +++ b/package.json @@ -0,0 +1,50 @@ +{ + "name": "project_mimirs_market", + "version": "1.0.0", + "description": "A Viking eCommerce store for Thunder Gods that like to buy \"Antique Wooden Pizzas\"", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "sql:migrate:undo": "npm run sql db:migrate:undo:all", + "sql:migrate": "npm run sql db:migrate", + "sql:seed:undo": "npm run sql db:seed:undo:all", + "sql:seed": "npm run sql db:seed:all", + "sql:s": "npm run sql:migrate:undo && npm run sql:migrate && npm run sql:seed", + "mg:seed": "node seeds/mongoose", + "console": "node repl.js", + "sql": "./node_modules/sequelize-cli/bin/sequelize" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/thebopshoobop/project_mimirs_market.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/thebopshoobop/project_mimirs_market/issues" + }, + "homepage": "https://github.com/thebopshoobop/project_mimirs_market#readme", + "dependencies": { + "bluebird": "^3.5.0", + "body-parser": "^1.17.2", + "cookie-session": "^1.3.0", + "dotenv": "^4.0.0", + "express": "^4.15.4", + "express-flash-messages": "^0.1.1", + "express-handlebars": "^3.0.0", + "express-method-override-get-post-support": "0.0.7", + "faker": "^4.1.0", + "handlebars": "^4.0.10", + "load-helpers": "^1.0.1", + "method-override": "^2.3.9", + "mongoose": "^4.11.6", + "morgan": "^1.8.2", + "morgan-toolkit": "^1.0.2", + "pg": "^7.1.0", + "pg-hstore": "^2.3.2", + "sequelize": "^4.4.2", + "sequelize-cli": "^2.8.0", + "stripe": "^4.23.2", + "voca": "^1.3.0" + } +} diff --git a/repl.js b/repl.js new file mode 100644 index 0000000..a238ba3 --- /dev/null +++ b/repl.js @@ -0,0 +1,45 @@ +const mongoose = require("mongoose"); +const repl = require("repl").start({}); +const models = { + mongoose: require("./models/mongoose"), + sequelize: require("./models/sequelize") +}; +const helpers = require("./helpers"); + +require("./mongo")().then(() => { + repl.context.models = models; + repl.context.helpers = helpers; + + // ---------------------------------------- + // Helpers + // ---------------------------------------- + Object.keys(helpers).forEach(key => { + repl.context[key] = helpers[key]; + }); + + // ---------------------------------------- + // Mongoose + // ---------------------------------------- + Object.keys(models.mongoose).forEach(modelName => { + repl.context[modelName] = mongoose.model(modelName); + }); + + // ---------------------------------------- + // Sequelize + // ---------------------------------------- + Object.keys(models.sequelize).forEach(modelName => { + repl.context[modelName] = models.sequelize[modelName]; + }); + + // ---------------------------------------- + // Logging + // ---------------------------------------- + repl.context.lg = data => { + if (Array.isArray(data)) { + if (data.length && data[0].dataValues) { + data = data.map(item => item.dataValues); + } + } + console.log(data); + }; +}); diff --git a/views/layouts/application.handlebars b/views/layouts/application.handlebars new file mode 100644 index 0000000..f10007d --- /dev/null +++ b/views/layouts/application.handlebars @@ -0,0 +1,26 @@ + + + + + + + + + Mimir's Market{{#if title }} | {{ title }} {{/if }} + + + + + + + + + {{> shared/_nav }} +
+ {{> shared/_flash }} {{{ body }}} +
+ + + diff --git a/views/shared/_flash.handlebars b/views/shared/_flash.handlebars new file mode 100644 index 0000000..e814a82 --- /dev/null +++ b/views/shared/_flash.handlebars @@ -0,0 +1,11 @@ +
+
+ {{#each getMessages as |messages key| }} {{#each messages as |message| }} + + {{/each }} {{/each }} +
+
diff --git a/views/shared/_nav.handlebars b/views/shared/_nav.handlebars new file mode 100644 index 0000000..eb37e9f --- /dev/null +++ b/views/shared/_nav.handlebars @@ -0,0 +1,32 @@ + From 874ddc4db787ef41cc80ea9b57dbd7664ac9b379 Mon Sep 17 00:00:00 2001 From: EdTriplett Date: Wed, 9 Aug 2017 12:02:06 -0400 Subject: [PATCH 03/20] plans --- .env | 2 +- scratchpad.txt | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 scratchpad.txt diff --git a/.env b/.env index 11f57c4..f007209 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -USERNAME: "wil"; +USERNAME = 'anapaulac' diff --git a/scratchpad.txt b/scratchpad.txt new file mode 100644 index 0000000..532298d --- /dev/null +++ b/scratchpad.txt @@ -0,0 +1,59 @@ +Products: + id: + sku: STRING + name: STRING + description: TEXT + price: INTEGER + + +Users: + id: + fname: STRING + lname: STRING + email: STRING (?EMAIL?) + + +Addresses: + id: + fname: STRING + lname: STRING + street: STRING + city: STRING + StateId: INTEGER + zip: INTEGER + +Join: UsersAddresses + id: + name: STRING + UserId: + AddressId: + +Categories: + id: + name: STRING + + +Carts: (join user and product) + UserId: + ProductId: + quantity: INTEGER + +Join: ProductCategory: + CategoryId: + ProductId: + +Orders: + id: + UserId: + AddressId: + +Join: OrderProduct: + id: + OrderId: + ProductId: + price: INTEGER + quantity: INTEGER + +States: + id: + name: STRING From fa3792b32e6efd501cf327be03eb2063fcc00d6d Mon Sep 17 00:00:00 2001 From: Will Timpson Date: Wed, 9 Aug 2017 12:36:03 -0400 Subject: [PATCH 04/20] Design ALL THE THINGS --- MongoSchema.txt | 22 +++++++++++++++++ RelationalSchema.txt | 39 +++++++++++++++++++++++++++++ Views.txt | 26 +++++++++++++++++++ scratchpad.txt | 59 -------------------------------------------- 4 files changed, 87 insertions(+), 59 deletions(-) create mode 100644 MongoSchema.txt create mode 100644 RelationalSchema.txt create mode 100644 Views.txt delete mode 100644 scratchpad.txt diff --git a/MongoSchema.txt b/MongoSchema.txt new file mode 100644 index 0000000..4de5880 --- /dev/null +++ b/MongoSchema.txt @@ -0,0 +1,22 @@ +Order: (document) + Product: (array) + Name: + Price: + SKU: + Description: + Categories: + Quantity: + Customer: + fname: + lname: + email + Address: + street: + city: + state: + zip: + Metadata: + dateTime: + stripeToken: + cardType: + total: diff --git a/RelationalSchema.txt b/RelationalSchema.txt new file mode 100644 index 0000000..89ed580 --- /dev/null +++ b/RelationalSchema.txt @@ -0,0 +1,39 @@ +Product: + sku: VARCHAR + name: VARCHAR + description: TEXT + price: INTEGER + +User: + fname: VARCHAR + lname: VARCHAR + email: VARCHAR (?EMAIL?) + +Addresse: + fname: VARCHAR + lname: VARCHAR + street: VARCHAR + city: VARCHAR + StateId: INTEGER + zip: INTEGER + +State: + name: VARCHAR + +Join: UserAddress + name: VARCHAR + UserId: INTEGER + AddressId: INTEGER + +Category: + name: VARCHAR + +Join: ProductCategory: + CategoryId: INTEGER + ProductId: INTEGER + +Join: ProductUser as Cart + ProductId: INTEGER + UserId: INTEGER + quantity: INTEGER + diff --git a/Views.txt b/Views.txt new file mode 100644 index 0000000..be66829 --- /dev/null +++ b/Views.txt @@ -0,0 +1,26 @@ +Product: + index + single + (edit) + +Category: + index + single + (edit) + +User: + single + +Address: + index + edit + +Cart: + index + checkout + +Admin: + User index + Orders index + Orders single + Analytics diff --git a/scratchpad.txt b/scratchpad.txt deleted file mode 100644 index 532298d..0000000 --- a/scratchpad.txt +++ /dev/null @@ -1,59 +0,0 @@ -Products: - id: - sku: STRING - name: STRING - description: TEXT - price: INTEGER - - -Users: - id: - fname: STRING - lname: STRING - email: STRING (?EMAIL?) - - -Addresses: - id: - fname: STRING - lname: STRING - street: STRING - city: STRING - StateId: INTEGER - zip: INTEGER - -Join: UsersAddresses - id: - name: STRING - UserId: - AddressId: - -Categories: - id: - name: STRING - - -Carts: (join user and product) - UserId: - ProductId: - quantity: INTEGER - -Join: ProductCategory: - CategoryId: - ProductId: - -Orders: - id: - UserId: - AddressId: - -Join: OrderProduct: - id: - OrderId: - ProductId: - price: INTEGER - quantity: INTEGER - -States: - id: - name: STRING From ff056a258701363266ea552c7615f63c772395b5 Mon Sep 17 00:00:00 2001 From: EdTriplett Date: Wed, 9 Aug 2017 12:55:44 -0400 Subject: [PATCH 05/20] pre-modeling --- RelationalSchema.txt | 71 ++++++++++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 25 deletions(-) diff --git a/RelationalSchema.txt b/RelationalSchema.txt index 89ed580..55b2d19 100644 --- a/RelationalSchema.txt +++ b/RelationalSchema.txt @@ -1,39 +1,60 @@ Product: - sku: VARCHAR - name: VARCHAR + sku: string + name: string description: TEXT - price: INTEGER + price: integer + +sequelize model:create --name Product --attributes "sku:string name:string description:string price:integer" User: - fname: VARCHAR - lname: VARCHAR - email: VARCHAR (?EMAIL?) - -Addresse: - fname: VARCHAR - lname: VARCHAR - street: VARCHAR - city: VARCHAR - StateId: INTEGER - zip: INTEGER + fname: string + lname: string + email: string + +sequelize model:create --name User --attributes "fname:string lname:string email:string" + + +Address: + fname: string + lname: string + street: string + city: string + StateId: integer + zip: integer + +sequelize model:create --name Address --attributes "fname:string lname:string street:string city:string StateId:integer zip:integer" + State: - name: VARCHAR + name: string + +sequelize model:create --name State --attributes "name:string" + Join: UserAddress - name: VARCHAR - UserId: INTEGER - AddressId: INTEGER + name: string + UserId: integer + AddressId: integer + +sequelize model:create --name UserAddress --attributes "name:string UserId:integer AddressId:integer" + Category: - name: VARCHAR - + name: string + +sequelize model:create --name Category --attributes "name:string" + + Join: ProductCategory: - CategoryId: INTEGER - ProductId: INTEGER + CategoryId: integer + ProductId: integer + +sequelize model:create --name ProductCategory --attributes "CategoryId:integer ProductId:integer" + Join: ProductUser as Cart - ProductId: INTEGER - UserId: INTEGER - quantity: INTEGER + ProductId: integer + UserId: integer + quantity: integer +sequelize model:create --name Cart --attributes "ProductId:integer UserId:integer quantity:integer" \ No newline at end of file From 0b4c7a27c070dc109b31ec26885d41312704489c Mon Sep 17 00:00:00 2001 From: EdTriplett Date: Wed, 9 Aug 2017 13:00:51 -0400 Subject: [PATCH 06/20] models --- .sequelizerc.js => .sequelizerc | 0 .../20170809165851-create-product.js | 36 ++++++++++++++++ .../sequelize/20170809165905-create-user.js | 33 +++++++++++++++ .../20170809165916-create-address.js | 42 +++++++++++++++++++ .../sequelize/20170809165925-create-state.js | 27 ++++++++++++ .../20170809165931-create-user-address.js | 33 +++++++++++++++ .../20170809165941-create-category.js | 27 ++++++++++++ .../20170809165954-create-product-category.js | 30 +++++++++++++ .../sequelize/20170809170005-create-cart.js | 33 +++++++++++++++ models/sequelize/address.js | 18 ++++++++ models/sequelize/cart.js | 15 +++++++ models/sequelize/category.js | 13 ++++++ models/sequelize/product.js | 16 +++++++ models/sequelize/productcategory.js | 14 +++++++ models/sequelize/state.js | 13 ++++++ models/sequelize/user.js | 15 +++++++ models/sequelize/useraddress.js | 15 +++++++ 17 files changed, 380 insertions(+) rename .sequelizerc.js => .sequelizerc (100%) create mode 100644 migrations/sequelize/20170809165851-create-product.js create mode 100644 migrations/sequelize/20170809165905-create-user.js create mode 100644 migrations/sequelize/20170809165916-create-address.js create mode 100644 migrations/sequelize/20170809165925-create-state.js create mode 100644 migrations/sequelize/20170809165931-create-user-address.js create mode 100644 migrations/sequelize/20170809165941-create-category.js create mode 100644 migrations/sequelize/20170809165954-create-product-category.js create mode 100644 migrations/sequelize/20170809170005-create-cart.js create mode 100644 models/sequelize/address.js create mode 100644 models/sequelize/cart.js create mode 100644 models/sequelize/category.js create mode 100644 models/sequelize/product.js create mode 100644 models/sequelize/productcategory.js create mode 100644 models/sequelize/state.js create mode 100644 models/sequelize/user.js create mode 100644 models/sequelize/useraddress.js diff --git a/.sequelizerc.js b/.sequelizerc similarity index 100% rename from .sequelizerc.js rename to .sequelizerc diff --git a/migrations/sequelize/20170809165851-create-product.js b/migrations/sequelize/20170809165851-create-product.js new file mode 100644 index 0000000..939f978 --- /dev/null +++ b/migrations/sequelize/20170809165851-create-product.js @@ -0,0 +1,36 @@ +'use strict'; +module.exports = { + up: function(queryInterface, Sequelize) { + return queryInterface.createTable('Products', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + sku: { + type: Sequelize.STRING + }, + name: { + type: Sequelize.STRING + }, + description: { + type: Sequelize.STRING + }, + price: { + type: Sequelize.INTEGER + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + down: function(queryInterface, Sequelize) { + return queryInterface.dropTable('Products'); + } +}; \ No newline at end of file diff --git a/migrations/sequelize/20170809165905-create-user.js b/migrations/sequelize/20170809165905-create-user.js new file mode 100644 index 0000000..5e06c7b --- /dev/null +++ b/migrations/sequelize/20170809165905-create-user.js @@ -0,0 +1,33 @@ +'use strict'; +module.exports = { + up: function(queryInterface, Sequelize) { + return queryInterface.createTable('Users', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + fname: { + type: Sequelize.STRING + }, + lname: { + type: Sequelize.STRING + }, + email: { + type: Sequelize.STRING + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + down: function(queryInterface, Sequelize) { + return queryInterface.dropTable('Users'); + } +}; \ No newline at end of file diff --git a/migrations/sequelize/20170809165916-create-address.js b/migrations/sequelize/20170809165916-create-address.js new file mode 100644 index 0000000..2022a52 --- /dev/null +++ b/migrations/sequelize/20170809165916-create-address.js @@ -0,0 +1,42 @@ +'use strict'; +module.exports = { + up: function(queryInterface, Sequelize) { + return queryInterface.createTable('Addresses', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + fname: { + type: Sequelize.STRING + }, + lname: { + type: Sequelize.STRING + }, + street: { + type: Sequelize.STRING + }, + city: { + type: Sequelize.STRING + }, + StateId: { + type: Sequelize.INTEGER + }, + zip: { + type: Sequelize.INTEGER + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + down: function(queryInterface, Sequelize) { + return queryInterface.dropTable('Addresses'); + } +}; \ No newline at end of file diff --git a/migrations/sequelize/20170809165925-create-state.js b/migrations/sequelize/20170809165925-create-state.js new file mode 100644 index 0000000..5a3c589 --- /dev/null +++ b/migrations/sequelize/20170809165925-create-state.js @@ -0,0 +1,27 @@ +'use strict'; +module.exports = { + up: function(queryInterface, Sequelize) { + return queryInterface.createTable('States', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + name: { + type: Sequelize.STRING + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + down: function(queryInterface, Sequelize) { + return queryInterface.dropTable('States'); + } +}; \ No newline at end of file diff --git a/migrations/sequelize/20170809165931-create-user-address.js b/migrations/sequelize/20170809165931-create-user-address.js new file mode 100644 index 0000000..768dec8 --- /dev/null +++ b/migrations/sequelize/20170809165931-create-user-address.js @@ -0,0 +1,33 @@ +'use strict'; +module.exports = { + up: function(queryInterface, Sequelize) { + return queryInterface.createTable('UserAddresses', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + name: { + type: Sequelize.STRING + }, + UserId: { + type: Sequelize.INTEGER + }, + AddressId: { + type: Sequelize.INTEGER + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + down: function(queryInterface, Sequelize) { + return queryInterface.dropTable('UserAddresses'); + } +}; \ No newline at end of file diff --git a/migrations/sequelize/20170809165941-create-category.js b/migrations/sequelize/20170809165941-create-category.js new file mode 100644 index 0000000..0cf7f38 --- /dev/null +++ b/migrations/sequelize/20170809165941-create-category.js @@ -0,0 +1,27 @@ +'use strict'; +module.exports = { + up: function(queryInterface, Sequelize) { + return queryInterface.createTable('Categories', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + name: { + type: Sequelize.STRING + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + down: function(queryInterface, Sequelize) { + return queryInterface.dropTable('Categories'); + } +}; \ No newline at end of file diff --git a/migrations/sequelize/20170809165954-create-product-category.js b/migrations/sequelize/20170809165954-create-product-category.js new file mode 100644 index 0000000..9f05e2d --- /dev/null +++ b/migrations/sequelize/20170809165954-create-product-category.js @@ -0,0 +1,30 @@ +'use strict'; +module.exports = { + up: function(queryInterface, Sequelize) { + return queryInterface.createTable('ProductCategories', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + CategoryId: { + type: Sequelize.INTEGER + }, + ProductId: { + type: Sequelize.INTEGER + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + down: function(queryInterface, Sequelize) { + return queryInterface.dropTable('ProductCategories'); + } +}; \ No newline at end of file diff --git a/migrations/sequelize/20170809170005-create-cart.js b/migrations/sequelize/20170809170005-create-cart.js new file mode 100644 index 0000000..1005e23 --- /dev/null +++ b/migrations/sequelize/20170809170005-create-cart.js @@ -0,0 +1,33 @@ +'use strict'; +module.exports = { + up: function(queryInterface, Sequelize) { + return queryInterface.createTable('Carts', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + ProductId: { + type: Sequelize.INTEGER + }, + UserId: { + type: Sequelize.INTEGER + }, + quantity: { + type: Sequelize.INTEGER + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + down: function(queryInterface, Sequelize) { + return queryInterface.dropTable('Carts'); + } +}; \ No newline at end of file diff --git a/models/sequelize/address.js b/models/sequelize/address.js new file mode 100644 index 0000000..2282fc0 --- /dev/null +++ b/models/sequelize/address.js @@ -0,0 +1,18 @@ +'use strict'; +module.exports = function(sequelize, DataTypes) { + var Address = sequelize.define('Address', { + fname: DataTypes.STRING, + lname: DataTypes.STRING, + street: DataTypes.STRING, + city: DataTypes.STRING, + StateId: DataTypes.INTEGER, + zip: DataTypes.INTEGER + }, { + classMethods: { + associate: function(models) { + // associations can be defined here + } + } + }); + return Address; +}; \ No newline at end of file diff --git a/models/sequelize/cart.js b/models/sequelize/cart.js new file mode 100644 index 0000000..8c967a2 --- /dev/null +++ b/models/sequelize/cart.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = function(sequelize, DataTypes) { + var Cart = sequelize.define('Cart', { + ProductId: DataTypes.INTEGER, + UserId: DataTypes.INTEGER, + quantity: DataTypes.INTEGER + }, { + classMethods: { + associate: function(models) { + // associations can be defined here + } + } + }); + return Cart; +}; \ No newline at end of file diff --git a/models/sequelize/category.js b/models/sequelize/category.js new file mode 100644 index 0000000..69656ef --- /dev/null +++ b/models/sequelize/category.js @@ -0,0 +1,13 @@ +'use strict'; +module.exports = function(sequelize, DataTypes) { + var Category = sequelize.define('Category', { + name: DataTypes.STRING + }, { + classMethods: { + associate: function(models) { + // associations can be defined here + } + } + }); + return Category; +}; \ No newline at end of file diff --git a/models/sequelize/product.js b/models/sequelize/product.js new file mode 100644 index 0000000..bd2db45 --- /dev/null +++ b/models/sequelize/product.js @@ -0,0 +1,16 @@ +'use strict'; +module.exports = function(sequelize, DataTypes) { + var Product = sequelize.define('Product', { + sku: DataTypes.STRING, + name: DataTypes.STRING, + description: DataTypes.STRING, + price: DataTypes.INTEGER + }, { + classMethods: { + associate: function(models) { + // associations can be defined here + } + } + }); + return Product; +}; \ No newline at end of file diff --git a/models/sequelize/productcategory.js b/models/sequelize/productcategory.js new file mode 100644 index 0000000..f9e161d --- /dev/null +++ b/models/sequelize/productcategory.js @@ -0,0 +1,14 @@ +'use strict'; +module.exports = function(sequelize, DataTypes) { + var ProductCategory = sequelize.define('ProductCategory', { + CategoryId: DataTypes.INTEGER, + ProductId: DataTypes.INTEGER + }, { + classMethods: { + associate: function(models) { + // associations can be defined here + } + } + }); + return ProductCategory; +}; \ No newline at end of file diff --git a/models/sequelize/state.js b/models/sequelize/state.js new file mode 100644 index 0000000..47fdbfc --- /dev/null +++ b/models/sequelize/state.js @@ -0,0 +1,13 @@ +'use strict'; +module.exports = function(sequelize, DataTypes) { + var State = sequelize.define('State', { + name: DataTypes.STRING + }, { + classMethods: { + associate: function(models) { + // associations can be defined here + } + } + }); + return State; +}; \ No newline at end of file diff --git a/models/sequelize/user.js b/models/sequelize/user.js new file mode 100644 index 0000000..f5cb4af --- /dev/null +++ b/models/sequelize/user.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = function(sequelize, DataTypes) { + var User = sequelize.define('User', { + fname: DataTypes.STRING, + lname: DataTypes.STRING, + email: DataTypes.STRING + }, { + classMethods: { + associate: function(models) { + // associations can be defined here + } + } + }); + return User; +}; \ No newline at end of file diff --git a/models/sequelize/useraddress.js b/models/sequelize/useraddress.js new file mode 100644 index 0000000..59d8e78 --- /dev/null +++ b/models/sequelize/useraddress.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = function(sequelize, DataTypes) { + var UserAddress = sequelize.define('UserAddress', { + name: DataTypes.STRING, + UserId: DataTypes.INTEGER, + AddressId: DataTypes.INTEGER + }, { + classMethods: { + associate: function(models) { + // associations can be defined here + } + } + }); + return UserAddress; +}; \ No newline at end of file From b3552e8a07a5df7abc1c134552a78f493df53d94 Mon Sep 17 00:00:00 2001 From: Will Timpson Date: Wed, 9 Aug 2017 13:32:36 -0400 Subject: [PATCH 07/20] tweaking models & migrations --- RelationalSchema.txt | 13 ++-- .../20170809165851-create-product.js | 71 +++++++++++-------- .../sequelize/20170809165905-create-user.js | 62 ++++++++-------- .../sequelize/20170809165925-create-state.js | 14 ++-- .../20170809165931-create-user-address.js | 33 --------- .../20170809165941-create-category.js | 14 ++-- .../20170809165954-create-product-category.js | 20 +++--- .../sequelize/20170809170005-create-cart.js | 23 +++--- ...ss.js => 20170809172527-create-address.js} | 30 +++++--- models/sequelize/address.js | 14 ++-- models/sequelize/cart.js | 12 +--- models/sequelize/category.js | 12 +--- models/sequelize/product.js | 12 +--- models/sequelize/productcategory.js | 12 +--- models/sequelize/state.js | 12 +--- models/sequelize/user.js | 11 +-- models/sequelize/useraddress.js | 15 ---- 17 files changed, 163 insertions(+), 217 deletions(-) delete mode 100644 migrations/sequelize/20170809165931-create-user-address.js rename migrations/sequelize/{20170809165916-create-address.js => 20170809172527-create-address.js} (53%) delete mode 100644 models/sequelize/useraddress.js diff --git a/RelationalSchema.txt b/RelationalSchema.txt index 55b2d19..adca511 100644 --- a/RelationalSchema.txt +++ b/RelationalSchema.txt @@ -15,6 +15,8 @@ sequelize model:create --name User --attributes "fname:string lname:string email Address: + name: string + UserId: integer fname: string lname: string street: string @@ -22,7 +24,7 @@ Address: StateId: integer zip: integer -sequelize model:create --name Address --attributes "fname:string lname:string street:string city:string StateId:integer zip:integer" +sequelize model:create --name Address --attributes "name:string UserId:integer fname:string lname:string street:string city:string StateId:integer zip:integer" State: @@ -31,13 +33,6 @@ State: sequelize model:create --name State --attributes "name:string" -Join: UserAddress - name: string - UserId: integer - AddressId: integer - -sequelize model:create --name UserAddress --attributes "name:string UserId:integer AddressId:integer" - Category: name: string @@ -57,4 +52,4 @@ Join: ProductUser as Cart UserId: integer quantity: integer -sequelize model:create --name Cart --attributes "ProductId:integer UserId:integer quantity:integer" \ No newline at end of file +sequelize model:create --name Cart --attributes "ProductId:integer UserId:integer quantity:integer" diff --git a/migrations/sequelize/20170809165851-create-product.js b/migrations/sequelize/20170809165851-create-product.js index 939f978..b1fbe6b 100644 --- a/migrations/sequelize/20170809165851-create-product.js +++ b/migrations/sequelize/20170809165851-create-product.js @@ -1,36 +1,45 @@ -'use strict'; +"use strict"; module.exports = { up: function(queryInterface, Sequelize) { - return queryInterface.createTable('Products', { - id: { - allowNull: false, - autoIncrement: true, - primaryKey: true, - type: Sequelize.INTEGER - }, - sku: { - type: Sequelize.STRING - }, - name: { - type: Sequelize.STRING - }, - description: { - type: Sequelize.STRING - }, - price: { - type: Sequelize.INTEGER - }, - createdAt: { - allowNull: false, - type: Sequelize.DATE - }, - updatedAt: { - allowNull: false, - type: Sequelize.DATE - } - }); + return queryInterface + .createTable("Products", { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + sku: { + type: Sequelize.STRING, + allowNull: false + }, + name: { + type: Sequelize.STRING, + allowNull: false + }, + description: { + type: Sequelize.STRING + }, + price: { + type: Sequelize.INTEGER, + allowNull: false + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") + } + }) + .then(() => { + return queryInterface.addIndex("Products", ["sku", "name"]); + }); }, down: function(queryInterface, Sequelize) { - return queryInterface.dropTable('Products'); + return queryInterface.dropTable("Products"); } -}; \ No newline at end of file +}; diff --git a/migrations/sequelize/20170809165905-create-user.js b/migrations/sequelize/20170809165905-create-user.js index 5e06c7b..eb447a1 100644 --- a/migrations/sequelize/20170809165905-create-user.js +++ b/migrations/sequelize/20170809165905-create-user.js @@ -1,33 +1,39 @@ -'use strict'; +"use strict"; module.exports = { up: function(queryInterface, Sequelize) { - return queryInterface.createTable('Users', { - id: { - allowNull: false, - autoIncrement: true, - primaryKey: true, - type: Sequelize.INTEGER - }, - fname: { - type: Sequelize.STRING - }, - lname: { - type: Sequelize.STRING - }, - email: { - type: Sequelize.STRING - }, - createdAt: { - allowNull: false, - type: Sequelize.DATE - }, - updatedAt: { - allowNull: false, - type: Sequelize.DATE - } - }); + return queryInterface + .createTable("Users", { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + fname: { + type: Sequelize.STRING + }, + lname: { + type: Sequelize.STRING + }, + email: { + type: Sequelize.STRING + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") + } + }) + .then(() => { + return queryInterface.addIndex("Users", ["email", "id"]); + }); }, down: function(queryInterface, Sequelize) { - return queryInterface.dropTable('Users'); + return queryInterface.dropTable("Users"); } -}; \ No newline at end of file +}; diff --git a/migrations/sequelize/20170809165925-create-state.js b/migrations/sequelize/20170809165925-create-state.js index 5a3c589..8ef3911 100644 --- a/migrations/sequelize/20170809165925-create-state.js +++ b/migrations/sequelize/20170809165925-create-state.js @@ -1,7 +1,7 @@ -'use strict'; +"use strict"; module.exports = { up: function(queryInterface, Sequelize) { - return queryInterface.createTable('States', { + return queryInterface.createTable("States", { id: { allowNull: false, autoIncrement: true, @@ -13,15 +13,17 @@ module.exports = { }, createdAt: { allowNull: false, - type: Sequelize.DATE + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") }, updatedAt: { allowNull: false, - type: Sequelize.DATE + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") } }); }, down: function(queryInterface, Sequelize) { - return queryInterface.dropTable('States'); + return queryInterface.dropTable("States"); } -}; \ No newline at end of file +}; diff --git a/migrations/sequelize/20170809165931-create-user-address.js b/migrations/sequelize/20170809165931-create-user-address.js deleted file mode 100644 index 768dec8..0000000 --- a/migrations/sequelize/20170809165931-create-user-address.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; -module.exports = { - up: function(queryInterface, Sequelize) { - return queryInterface.createTable('UserAddresses', { - id: { - allowNull: false, - autoIncrement: true, - primaryKey: true, - type: Sequelize.INTEGER - }, - name: { - type: Sequelize.STRING - }, - UserId: { - type: Sequelize.INTEGER - }, - AddressId: { - type: Sequelize.INTEGER - }, - createdAt: { - allowNull: false, - type: Sequelize.DATE - }, - updatedAt: { - allowNull: false, - type: Sequelize.DATE - } - }); - }, - down: function(queryInterface, Sequelize) { - return queryInterface.dropTable('UserAddresses'); - } -}; \ No newline at end of file diff --git a/migrations/sequelize/20170809165941-create-category.js b/migrations/sequelize/20170809165941-create-category.js index 0cf7f38..4892362 100644 --- a/migrations/sequelize/20170809165941-create-category.js +++ b/migrations/sequelize/20170809165941-create-category.js @@ -1,7 +1,7 @@ -'use strict'; +"use strict"; module.exports = { up: function(queryInterface, Sequelize) { - return queryInterface.createTable('Categories', { + return queryInterface.createTable("Categories", { id: { allowNull: false, autoIncrement: true, @@ -13,15 +13,17 @@ module.exports = { }, createdAt: { allowNull: false, - type: Sequelize.DATE + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") }, updatedAt: { allowNull: false, - type: Sequelize.DATE + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") } }); }, down: function(queryInterface, Sequelize) { - return queryInterface.dropTable('Categories'); + return queryInterface.dropTable("Categories"); } -}; \ No newline at end of file +}; diff --git a/migrations/sequelize/20170809165954-create-product-category.js b/migrations/sequelize/20170809165954-create-product-category.js index 9f05e2d..bf4a999 100644 --- a/migrations/sequelize/20170809165954-create-product-category.js +++ b/migrations/sequelize/20170809165954-create-product-category.js @@ -1,7 +1,7 @@ -'use strict'; +"use strict"; module.exports = { up: function(queryInterface, Sequelize) { - return queryInterface.createTable('ProductCategories', { + return queryInterface.createTable("ProductCategories", { id: { allowNull: false, autoIncrement: true, @@ -9,22 +9,26 @@ module.exports = { type: Sequelize.INTEGER }, CategoryId: { - type: Sequelize.INTEGER + type: Sequelize.INTEGER, + allowNull: false }, ProductId: { - type: Sequelize.INTEGER + type: Sequelize.INTEGER, + allowNull: false }, createdAt: { allowNull: false, - type: Sequelize.DATE + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") }, updatedAt: { allowNull: false, - type: Sequelize.DATE + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") } }); }, down: function(queryInterface, Sequelize) { - return queryInterface.dropTable('ProductCategories'); + return queryInterface.dropTable("ProductCategories"); } -}; \ No newline at end of file +}; diff --git a/migrations/sequelize/20170809170005-create-cart.js b/migrations/sequelize/20170809170005-create-cart.js index 1005e23..fbb8887 100644 --- a/migrations/sequelize/20170809170005-create-cart.js +++ b/migrations/sequelize/20170809170005-create-cart.js @@ -1,7 +1,7 @@ -'use strict'; +"use strict"; module.exports = { up: function(queryInterface, Sequelize) { - return queryInterface.createTable('Carts', { + return queryInterface.createTable("Carts", { id: { allowNull: false, autoIncrement: true, @@ -9,25 +9,30 @@ module.exports = { type: Sequelize.INTEGER }, ProductId: { - type: Sequelize.INTEGER + type: Sequelize.INTEGER, + allowNull: false }, UserId: { - type: Sequelize.INTEGER + type: Sequelize.INTEGER, + allowNull: false }, quantity: { - type: Sequelize.INTEGER + type: Sequelize.INTEGER, + allowNull: false }, createdAt: { allowNull: false, - type: Sequelize.DATE + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") }, updatedAt: { allowNull: false, - type: Sequelize.DATE + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") } }); }, down: function(queryInterface, Sequelize) { - return queryInterface.dropTable('Carts'); + return queryInterface.dropTable("Carts"); } -}; \ No newline at end of file +}; diff --git a/migrations/sequelize/20170809165916-create-address.js b/migrations/sequelize/20170809172527-create-address.js similarity index 53% rename from migrations/sequelize/20170809165916-create-address.js rename to migrations/sequelize/20170809172527-create-address.js index 2022a52..08a1b0f 100644 --- a/migrations/sequelize/20170809165916-create-address.js +++ b/migrations/sequelize/20170809172527-create-address.js @@ -1,13 +1,20 @@ -'use strict'; +"use strict"; module.exports = { up: function(queryInterface, Sequelize) { - return queryInterface.createTable('Addresses', { + return queryInterface.createTable("Addresses", { id: { allowNull: false, autoIncrement: true, primaryKey: true, type: Sequelize.INTEGER }, + name: { + type: Sequelize.STRING + }, + UserId: { + type: Sequelize.INTEGER, + allowNull: false + }, fname: { type: Sequelize.STRING }, @@ -15,28 +22,33 @@ module.exports = { type: Sequelize.STRING }, street: { - type: Sequelize.STRING + type: Sequelize.STRING, + allowNull: false }, city: { - type: Sequelize.STRING + type: Sequelize.STRING, + allowNull: false }, StateId: { - type: Sequelize.INTEGER + type: Sequelize.INTEGER, + allowNull: false }, zip: { type: Sequelize.INTEGER }, createdAt: { allowNull: false, - type: Sequelize.DATE + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") }, updatedAt: { allowNull: false, - type: Sequelize.DATE + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") } }); }, down: function(queryInterface, Sequelize) { - return queryInterface.dropTable('Addresses'); + return queryInterface.dropTable("Addresses"); } -}; \ No newline at end of file +}; diff --git a/models/sequelize/address.js b/models/sequelize/address.js index 2282fc0..9aa015d 100644 --- a/models/sequelize/address.js +++ b/models/sequelize/address.js @@ -1,18 +1,14 @@ -'use strict'; +"use strict"; module.exports = function(sequelize, DataTypes) { - var Address = sequelize.define('Address', { + var Address = sequelize.define("Address", { + name: DataTypes.STRING, + UserId: DataTypes.INTEGER, fname: DataTypes.STRING, lname: DataTypes.STRING, street: DataTypes.STRING, city: DataTypes.STRING, StateId: DataTypes.INTEGER, zip: DataTypes.INTEGER - }, { - classMethods: { - associate: function(models) { - // associations can be defined here - } - } }); return Address; -}; \ No newline at end of file +}; diff --git a/models/sequelize/cart.js b/models/sequelize/cart.js index 8c967a2..20217de 100644 --- a/models/sequelize/cart.js +++ b/models/sequelize/cart.js @@ -1,15 +1,9 @@ -'use strict'; +"use strict"; module.exports = function(sequelize, DataTypes) { - var Cart = sequelize.define('Cart', { + var Cart = sequelize.define("Cart", { ProductId: DataTypes.INTEGER, UserId: DataTypes.INTEGER, quantity: DataTypes.INTEGER - }, { - classMethods: { - associate: function(models) { - // associations can be defined here - } - } }); return Cart; -}; \ No newline at end of file +}; diff --git a/models/sequelize/category.js b/models/sequelize/category.js index 69656ef..1cc1cc6 100644 --- a/models/sequelize/category.js +++ b/models/sequelize/category.js @@ -1,13 +1,7 @@ -'use strict'; +"use strict"; module.exports = function(sequelize, DataTypes) { - var Category = sequelize.define('Category', { + var Category = sequelize.define("Category", { name: DataTypes.STRING - }, { - classMethods: { - associate: function(models) { - // associations can be defined here - } - } }); return Category; -}; \ No newline at end of file +}; diff --git a/models/sequelize/product.js b/models/sequelize/product.js index bd2db45..b3227a1 100644 --- a/models/sequelize/product.js +++ b/models/sequelize/product.js @@ -1,16 +1,10 @@ -'use strict'; +"use strict"; module.exports = function(sequelize, DataTypes) { - var Product = sequelize.define('Product', { + var Product = sequelize.define("Product", { sku: DataTypes.STRING, name: DataTypes.STRING, description: DataTypes.STRING, price: DataTypes.INTEGER - }, { - classMethods: { - associate: function(models) { - // associations can be defined here - } - } }); return Product; -}; \ No newline at end of file +}; diff --git a/models/sequelize/productcategory.js b/models/sequelize/productcategory.js index f9e161d..7ceaee1 100644 --- a/models/sequelize/productcategory.js +++ b/models/sequelize/productcategory.js @@ -1,14 +1,8 @@ -'use strict'; +"use strict"; module.exports = function(sequelize, DataTypes) { - var ProductCategory = sequelize.define('ProductCategory', { + var ProductCategory = sequelize.define("ProductCategory", { CategoryId: DataTypes.INTEGER, ProductId: DataTypes.INTEGER - }, { - classMethods: { - associate: function(models) { - // associations can be defined here - } - } }); return ProductCategory; -}; \ No newline at end of file +}; diff --git a/models/sequelize/state.js b/models/sequelize/state.js index 47fdbfc..8d8c743 100644 --- a/models/sequelize/state.js +++ b/models/sequelize/state.js @@ -1,13 +1,7 @@ -'use strict'; +"use strict"; module.exports = function(sequelize, DataTypes) { - var State = sequelize.define('State', { + var State = sequelize.define("State", { name: DataTypes.STRING - }, { - classMethods: { - associate: function(models) { - // associations can be defined here - } - } }); return State; -}; \ No newline at end of file +}; diff --git a/models/sequelize/user.js b/models/sequelize/user.js index f5cb4af..7d12f3b 100644 --- a/models/sequelize/user.js +++ b/models/sequelize/user.js @@ -3,13 +3,6 @@ module.exports = function(sequelize, DataTypes) { var User = sequelize.define('User', { fname: DataTypes.STRING, lname: DataTypes.STRING, - email: DataTypes.STRING - }, { - classMethods: { - associate: function(models) { - // associations can be defined here - } - } - }); + ); return User; -}; \ No newline at end of file +}; diff --git a/models/sequelize/useraddress.js b/models/sequelize/useraddress.js deleted file mode 100644 index 59d8e78..0000000 --- a/models/sequelize/useraddress.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -module.exports = function(sequelize, DataTypes) { - var UserAddress = sequelize.define('UserAddress', { - name: DataTypes.STRING, - UserId: DataTypes.INTEGER, - AddressId: DataTypes.INTEGER - }, { - classMethods: { - associate: function(models) { - // associations can be defined here - } - } - }); - return UserAddress; -}; \ No newline at end of file From 613b7b0330f705d9c10589fd2d3de2fcd007c944 Mon Sep 17 00:00:00 2001 From: EdTriplett Date: Wed, 9 Aug 2017 14:06:46 -0400 Subject: [PATCH 08/20] associations --- .../20170809165851-create-product.js | 2 +- .../sequelize/20170809165905-create-user.js | 5 +++- .../sequelize/20170809165925-create-state.js | 7 +++-- .../20170809165941-create-category.js | 5 +++- .../20170809165954-create-product-category.js | 4 ++- .../sequelize/20170809170005-create-cart.js | 4 ++- .../20170809172527-create-address.js | 11 +++++-- models/sequelize/address.js | 9 ++++++ models/sequelize/cart.js | 6 ++++ models/sequelize/category.js | 7 +++++ models/sequelize/product.js | 8 +++++ models/sequelize/productcategory.js | 6 ++++ models/sequelize/state.js | 5 ++++ models/sequelize/user.js | 8 +++++ package-lock.json | 30 ++++++++++++++----- package.json | 2 +- 16 files changed, 101 insertions(+), 18 deletions(-) diff --git a/migrations/sequelize/20170809165851-create-product.js b/migrations/sequelize/20170809165851-create-product.js index b1fbe6b..7757147 100644 --- a/migrations/sequelize/20170809165851-create-product.js +++ b/migrations/sequelize/20170809165851-create-product.js @@ -36,7 +36,7 @@ module.exports = { } }) .then(() => { - return queryInterface.addIndex("Products", ["sku", "name"]); + return queryInterface.addIndex("Products", ["id", "sku", "name"], {unique:true}); }); }, down: function(queryInterface, Sequelize) { diff --git a/migrations/sequelize/20170809165905-create-user.js b/migrations/sequelize/20170809165905-create-user.js index eb447a1..9833099 100644 --- a/migrations/sequelize/20170809165905-create-user.js +++ b/migrations/sequelize/20170809165905-create-user.js @@ -10,12 +10,15 @@ module.exports = { type: Sequelize.INTEGER }, fname: { + allowNull: false, type: Sequelize.STRING }, lname: { + allowNull: false, type: Sequelize.STRING }, email: { + allowNull: false, type: Sequelize.STRING }, createdAt: { @@ -30,7 +33,7 @@ module.exports = { } }) .then(() => { - return queryInterface.addIndex("Users", ["email", "id"]); + return queryInterface.addIndex("Users", ["email", "id"], {unique:true}); }); }, down: function(queryInterface, Sequelize) { diff --git a/migrations/sequelize/20170809165925-create-state.js b/migrations/sequelize/20170809165925-create-state.js index 8ef3911..141cf11 100644 --- a/migrations/sequelize/20170809165925-create-state.js +++ b/migrations/sequelize/20170809165925-create-state.js @@ -9,7 +9,8 @@ module.exports = { type: Sequelize.INTEGER }, name: { - type: Sequelize.STRING + type: Sequelize.STRING, + allowNull: false }, createdAt: { allowNull: false, @@ -21,7 +22,9 @@ module.exports = { type: Sequelize.DATE, defaultValue: Sequelize.fn("NOW") } - }); + }).then(() => { + return queryInterface.addIndex("States", ["id", "sku", "name"], {unique:true}); + }) }, down: function(queryInterface, Sequelize) { return queryInterface.dropTable("States"); diff --git a/migrations/sequelize/20170809165941-create-category.js b/migrations/sequelize/20170809165941-create-category.js index 4892362..a3525ee 100644 --- a/migrations/sequelize/20170809165941-create-category.js +++ b/migrations/sequelize/20170809165941-create-category.js @@ -9,6 +9,7 @@ module.exports = { type: Sequelize.INTEGER }, name: { + allowNull: false, type: Sequelize.STRING }, createdAt: { @@ -21,7 +22,9 @@ module.exports = { type: Sequelize.DATE, defaultValue: Sequelize.fn("NOW") } - }); + }).then(() => { + return queryInterface.addIndex("Categories", ["id", "name"], {unique:true}); + }); }, down: function(queryInterface, Sequelize) { return queryInterface.dropTable("Categories"); diff --git a/migrations/sequelize/20170809165954-create-product-category.js b/migrations/sequelize/20170809165954-create-product-category.js index bf4a999..f72eef5 100644 --- a/migrations/sequelize/20170809165954-create-product-category.js +++ b/migrations/sequelize/20170809165954-create-product-category.js @@ -26,7 +26,9 @@ module.exports = { type: Sequelize.DATE, defaultValue: Sequelize.fn("NOW") } - }); + }).then(() => { + return queryInterface.addIndex("ProductCategories", ["id", "CategoryId", "ProductId"]); + }); }, down: function(queryInterface, Sequelize) { return queryInterface.dropTable("ProductCategories"); diff --git a/migrations/sequelize/20170809170005-create-cart.js b/migrations/sequelize/20170809170005-create-cart.js index fbb8887..1bf944f 100644 --- a/migrations/sequelize/20170809170005-create-cart.js +++ b/migrations/sequelize/20170809170005-create-cart.js @@ -30,7 +30,9 @@ module.exports = { type: Sequelize.DATE, defaultValue: Sequelize.fn("NOW") } - }); + }).then(() => { + return queryInterface.addIndex("Cart", ["id", "ProductId", "UserId"]); + }); }, down: function(queryInterface, Sequelize) { return queryInterface.dropTable("Carts"); diff --git a/migrations/sequelize/20170809172527-create-address.js b/migrations/sequelize/20170809172527-create-address.js index 08a1b0f..ce0c93d 100644 --- a/migrations/sequelize/20170809172527-create-address.js +++ b/migrations/sequelize/20170809172527-create-address.js @@ -9,11 +9,14 @@ module.exports = { type: Sequelize.INTEGER }, name: { - type: Sequelize.STRING + allowNull: false, + type: Sequelize.STRING, + unique: 'userAddress' }, UserId: { type: Sequelize.INTEGER, - allowNull: false + allowNull: false, + unique: 'userAddress' }, fname: { type: Sequelize.STRING @@ -46,7 +49,9 @@ module.exports = { type: Sequelize.DATE, defaultValue: Sequelize.fn("NOW") } - }); + }).then(() => { + return queryInterface.addIndex("Addresses", ["id", "name", "UserId"]); + }); }, down: function(queryInterface, Sequelize) { return queryInterface.dropTable("Addresses"); diff --git a/models/sequelize/address.js b/models/sequelize/address.js index 9aa015d..830915b 100644 --- a/models/sequelize/address.js +++ b/models/sequelize/address.js @@ -1,4 +1,5 @@ "use strict"; + module.exports = function(sequelize, DataTypes) { var Address = sequelize.define("Address", { name: DataTypes.STRING, @@ -10,5 +11,13 @@ module.exports = function(sequelize, DataTypes) { StateId: DataTypes.INTEGER, zip: DataTypes.INTEGER }); + + Address.associate = function(models) { + Address.belongsTo(models.User); + Address.belongsTo(models.State); + } + + + return Address; }; diff --git a/models/sequelize/cart.js b/models/sequelize/cart.js index 20217de..6e38374 100644 --- a/models/sequelize/cart.js +++ b/models/sequelize/cart.js @@ -5,5 +5,11 @@ module.exports = function(sequelize, DataTypes) { UserId: DataTypes.INTEGER, quantity: DataTypes.INTEGER }); + + Cart.associate = function(models) { + Cart.belongsTo(models.User); + Cart.belongsTo(models.Product); + } + return Cart; }; diff --git a/models/sequelize/category.js b/models/sequelize/category.js index 1cc1cc6..46da855 100644 --- a/models/sequelize/category.js +++ b/models/sequelize/category.js @@ -3,5 +3,12 @@ module.exports = function(sequelize, DataTypes) { var Category = sequelize.define("Category", { name: DataTypes.STRING }); + + Category.associate = function(models) { + Category.belongsToMany(models.Product, {through: models.ProductCategory}); + Category.hasMany(models.ProductCategory); + + } + return Category; }; diff --git a/models/sequelize/product.js b/models/sequelize/product.js index b3227a1..73f9938 100644 --- a/models/sequelize/product.js +++ b/models/sequelize/product.js @@ -6,5 +6,13 @@ module.exports = function(sequelize, DataTypes) { description: DataTypes.STRING, price: DataTypes.INTEGER }); + + Product.associate = function(models) { + Product.belongsToMany(models.Category, {through: models.ProductCategory}); + Product.hasMany(models.ProductCategory); + Product.belongsToMany(models.User, {through: models.Cart}); + Product.hasMany(models.Cart); + } + return Product; }; diff --git a/models/sequelize/productcategory.js b/models/sequelize/productcategory.js index 7ceaee1..bd52023 100644 --- a/models/sequelize/productcategory.js +++ b/models/sequelize/productcategory.js @@ -4,5 +4,11 @@ module.exports = function(sequelize, DataTypes) { CategoryId: DataTypes.INTEGER, ProductId: DataTypes.INTEGER }); + + ProductCategory.associate = function(models) { + ProductCategory.belongsTo(models.Category); + ProductCategory.belongsTo(models.Product); + } + return ProductCategory; }; diff --git a/models/sequelize/state.js b/models/sequelize/state.js index 8d8c743..924dcc3 100644 --- a/models/sequelize/state.js +++ b/models/sequelize/state.js @@ -3,5 +3,10 @@ module.exports = function(sequelize, DataTypes) { var State = sequelize.define("State", { name: DataTypes.STRING }); + + State.associate = function(models) { + State.hasMany(models.Address); + } + return State; }; diff --git a/models/sequelize/user.js b/models/sequelize/user.js index 7d12f3b..a3310e1 100644 --- a/models/sequelize/user.js +++ b/models/sequelize/user.js @@ -4,5 +4,13 @@ module.exports = function(sequelize, DataTypes) { fname: DataTypes.STRING, lname: DataTypes.STRING, ); + } + + User.associate = function(models) { + User.hasMany(models.Address); + User.belongsToMany(models.Product, {through:models.Cart}) + User.hasMany(models.Cart) + } + return User; }; diff --git a/package-lock.json b/package-lock.json index f616cb2..4e5ea4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2550,14 +2550,14 @@ } }, "pg": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/pg/-/pg-7.1.0.tgz", - "integrity": "sha1-naPwnTmDUhUhwdg2m22aEwbP6f4=", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/pg/-/pg-6.4.1.tgz", + "integrity": "sha1-PqvYygVoFEN8dp8X/3oMNqxwI8U=", "requires": { "buffer-writer": "1.0.1", "packet-reader": "0.3.1", "pg-connection-string": "0.1.3", - "pg-pool": "2.0.1", + "pg-pool": "1.8.0", "pg-types": "1.12.0", "pgpass": "1.0.2", "semver": "4.3.2" @@ -2584,9 +2584,25 @@ } }, "pg-pool": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-2.0.1.tgz", - "integrity": "sha1-ixJUHfJxtX9wIMUKP1VmRx+Cx34=" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-1.8.0.tgz", + "integrity": "sha1-9+xzgkw3oD8Hb1G/33DjQBR8Tzc=", + "requires": { + "generic-pool": "2.4.3", + "object-assign": "4.1.0" + }, + "dependencies": { + "generic-pool": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-2.4.3.tgz", + "integrity": "sha1-eAw29p360FpaBF3Te+etyhGk9v8=" + }, + "object-assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", + "integrity": "sha1-ejs9DpgGPUP0wD8uiubNUahog6A=" + } + } }, "pg-types": { "version": "1.12.0", diff --git a/package.json b/package.json index cfa7926..fd71666 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "mongoose": "^4.11.6", "morgan": "^1.8.2", "morgan-toolkit": "^1.0.2", - "pg": "^7.1.0", + "pg": "6.4.1", "pg-hstore": "^2.3.2", "sequelize": "^4.4.2", "sequelize-cli": "^2.8.0", From 319983359f1381383ed33f36973936cde1b17ed1 Mon Sep 17 00:00:00 2001 From: EdTriplett Date: Wed, 9 Aug 2017 15:49:47 -0400 Subject: [PATCH 09/20] simplified schema --- RelationalSchema.txt | 45 +++----------------------------------------- 1 file changed, 3 insertions(+), 42 deletions(-) diff --git a/RelationalSchema.txt b/RelationalSchema.txt index adca511..bc34f60 100644 --- a/RelationalSchema.txt +++ b/RelationalSchema.txt @@ -1,37 +1,11 @@ Product: sku: string name: string - description: TEXT + description: string price: integer + CategoryId: Integer -sequelize model:create --name Product --attributes "sku:string name:string description:string price:integer" - -User: - fname: string - lname: string - email: string - -sequelize model:create --name User --attributes "fname:string lname:string email:string" - - -Address: - name: string - UserId: integer - fname: string - lname: string - street: string - city: string - StateId: integer - zip: integer - -sequelize model:create --name Address --attributes "name:string UserId:integer fname:string lname:string street:string city:string StateId:integer zip:integer" - - -State: - name: string - -sequelize model:create --name State --attributes "name:string" - +sequelize model:create --name Product --attributes "sku:string name:string description:string price:integer CategoryId:integer" Category: @@ -40,16 +14,3 @@ Category: sequelize model:create --name Category --attributes "name:string" -Join: ProductCategory: - CategoryId: integer - ProductId: integer - -sequelize model:create --name ProductCategory --attributes "CategoryId:integer ProductId:integer" - - -Join: ProductUser as Cart - ProductId: integer - UserId: integer - quantity: integer - -sequelize model:create --name Cart --attributes "ProductId:integer UserId:integer quantity:integer" From d33ce48f38717b3fc02a0d0b8ccab5d6e8e84bd7 Mon Sep 17 00:00:00 2001 From: Will Timpson Date: Wed, 9 Aug 2017 16:24:59 -0400 Subject: [PATCH 10/20] Beginning to seed after database culling --- .env | 1 - .gitignore | 2 +- .sequelizerc | 2 +- MongoSchema.txt | 31 ++++---- RelationalSchema.txt | 4 ++ config/mongoUrl.js | 2 +- .../sequelize/20170809165925-create-state.js | 32 --------- .../20170809165941-create-category.js | 32 --------- .../20170809165954-create-product-category.js | 36 ---------- .../sequelize/20170809170005-create-cart.js | 40 ----------- .../20170809172527-create-address.js | 59 --------------- ...ct.js => 20170809195343-create-product.js} | 19 +++-- ...r.js => 20170809195350-create-category.js} | 18 ++--- .../sequelize/20170809195403-create-state.js | 36 ++++++++++ models/sequelize/address.js | 23 ------ models/sequelize/cart.js | 15 ---- models/sequelize/category.js | 10 +-- models/sequelize/index.js | 32 +++++---- models/sequelize/product.js | 14 ++-- models/sequelize/productcategory.js | 14 ---- models/sequelize/state.js | 7 +- models/sequelize/user.js | 16 ----- seeds/sequelize/20170809200816-states.js | 72 +++++++++++++++++++ 23 files changed, 180 insertions(+), 337 deletions(-) delete mode 100644 .env delete mode 100644 migrations/sequelize/20170809165925-create-state.js delete mode 100644 migrations/sequelize/20170809165941-create-category.js delete mode 100644 migrations/sequelize/20170809165954-create-product-category.js delete mode 100644 migrations/sequelize/20170809170005-create-cart.js delete mode 100644 migrations/sequelize/20170809172527-create-address.js rename migrations/sequelize/{20170809165851-create-product.js => 20170809195343-create-product.js} (70%) rename migrations/sequelize/{20170809165905-create-user.js => 20170809195350-create-category.js} (66%) create mode 100644 migrations/sequelize/20170809195403-create-state.js delete mode 100644 models/sequelize/address.js delete mode 100644 models/sequelize/cart.js delete mode 100644 models/sequelize/productcategory.js delete mode 100644 models/sequelize/user.js create mode 100644 seeds/sequelize/20170809200816-states.js diff --git a/.env b/.env deleted file mode 100644 index f007209..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -USERNAME = 'anapaulac' diff --git a/.gitignore b/.gitignore index 8b37dd6..37d7e73 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ node_modules -.env.js +.env diff --git a/.sequelizerc b/.sequelizerc index d213fdf..18ace10 100644 --- a/.sequelizerc +++ b/.sequelizerc @@ -1,7 +1,7 @@ const path = require("path"); const config = { - config: "./config/sequelize", + config: "./config/sequelize.js", "migrations-path": "./migrations/sequelize", "seeders-path": "./seeds/sequelize", "models-path": "./models/sequelize" diff --git a/MongoSchema.txt b/MongoSchema.txt index 4de5880..ec1b4ff 100644 --- a/MongoSchema.txt +++ b/MongoSchema.txt @@ -1,22 +1,27 @@ -Order: (document) - Product: (array) - Name: - Price: - SKU: - Description: - Categories: - Quantity: +Order: (collection) + + Product: [ productId, productId] + Customer: fname: lname: email - Address: - street: - city: - state: - zip: + street: + city: + state: + zip: + Metadata: dateTime: stripeToken: cardType: total: + + +Product: (collection) + Name: + Price: + SKU: + Description: + Categories: + Quantity: diff --git a/RelationalSchema.txt b/RelationalSchema.txt index bc34f60..9936b72 100644 --- a/RelationalSchema.txt +++ b/RelationalSchema.txt @@ -14,3 +14,7 @@ Category: sequelize model:create --name Category --attributes "name:string" +State: + name: string + +sequelize model:create --name State --attributes "name:string" diff --git a/config/mongoUrl.js b/config/mongoUrl.js index 69828e0..b6f03e0 100644 --- a/config/mongoUrl.js +++ b/config/mongoUrl.js @@ -1,5 +1,5 @@ const env = process.env.NODE_ENV || "development"; -const config = require("./mongo.json")[env]; +const config = require("./mongoose.json")[env]; module.exports = process.env.NODE_ENV === "production" ? process.env[config.use_env_variable] diff --git a/migrations/sequelize/20170809165925-create-state.js b/migrations/sequelize/20170809165925-create-state.js deleted file mode 100644 index 141cf11..0000000 --- a/migrations/sequelize/20170809165925-create-state.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -module.exports = { - up: function(queryInterface, Sequelize) { - return queryInterface.createTable("States", { - id: { - allowNull: false, - autoIncrement: true, - primaryKey: true, - type: Sequelize.INTEGER - }, - name: { - type: Sequelize.STRING, - allowNull: false - }, - createdAt: { - allowNull: false, - type: Sequelize.DATE, - defaultValue: Sequelize.fn("NOW") - }, - updatedAt: { - allowNull: false, - type: Sequelize.DATE, - defaultValue: Sequelize.fn("NOW") - } - }).then(() => { - return queryInterface.addIndex("States", ["id", "sku", "name"], {unique:true}); - }) - }, - down: function(queryInterface, Sequelize) { - return queryInterface.dropTable("States"); - } -}; diff --git a/migrations/sequelize/20170809165941-create-category.js b/migrations/sequelize/20170809165941-create-category.js deleted file mode 100644 index a3525ee..0000000 --- a/migrations/sequelize/20170809165941-create-category.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -module.exports = { - up: function(queryInterface, Sequelize) { - return queryInterface.createTable("Categories", { - id: { - allowNull: false, - autoIncrement: true, - primaryKey: true, - type: Sequelize.INTEGER - }, - name: { - allowNull: false, - type: Sequelize.STRING - }, - createdAt: { - allowNull: false, - type: Sequelize.DATE, - defaultValue: Sequelize.fn("NOW") - }, - updatedAt: { - allowNull: false, - type: Sequelize.DATE, - defaultValue: Sequelize.fn("NOW") - } - }).then(() => { - return queryInterface.addIndex("Categories", ["id", "name"], {unique:true}); - }); - }, - down: function(queryInterface, Sequelize) { - return queryInterface.dropTable("Categories"); - } -}; diff --git a/migrations/sequelize/20170809165954-create-product-category.js b/migrations/sequelize/20170809165954-create-product-category.js deleted file mode 100644 index f72eef5..0000000 --- a/migrations/sequelize/20170809165954-create-product-category.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -module.exports = { - up: function(queryInterface, Sequelize) { - return queryInterface.createTable("ProductCategories", { - id: { - allowNull: false, - autoIncrement: true, - primaryKey: true, - type: Sequelize.INTEGER - }, - CategoryId: { - type: Sequelize.INTEGER, - allowNull: false - }, - ProductId: { - type: Sequelize.INTEGER, - allowNull: false - }, - createdAt: { - allowNull: false, - type: Sequelize.DATE, - defaultValue: Sequelize.fn("NOW") - }, - updatedAt: { - allowNull: false, - type: Sequelize.DATE, - defaultValue: Sequelize.fn("NOW") - } - }).then(() => { - return queryInterface.addIndex("ProductCategories", ["id", "CategoryId", "ProductId"]); - }); - }, - down: function(queryInterface, Sequelize) { - return queryInterface.dropTable("ProductCategories"); - } -}; diff --git a/migrations/sequelize/20170809170005-create-cart.js b/migrations/sequelize/20170809170005-create-cart.js deleted file mode 100644 index 1bf944f..0000000 --- a/migrations/sequelize/20170809170005-create-cart.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -module.exports = { - up: function(queryInterface, Sequelize) { - return queryInterface.createTable("Carts", { - id: { - allowNull: false, - autoIncrement: true, - primaryKey: true, - type: Sequelize.INTEGER - }, - ProductId: { - type: Sequelize.INTEGER, - allowNull: false - }, - UserId: { - type: Sequelize.INTEGER, - allowNull: false - }, - quantity: { - type: Sequelize.INTEGER, - allowNull: false - }, - createdAt: { - allowNull: false, - type: Sequelize.DATE, - defaultValue: Sequelize.fn("NOW") - }, - updatedAt: { - allowNull: false, - type: Sequelize.DATE, - defaultValue: Sequelize.fn("NOW") - } - }).then(() => { - return queryInterface.addIndex("Cart", ["id", "ProductId", "UserId"]); - }); - }, - down: function(queryInterface, Sequelize) { - return queryInterface.dropTable("Carts"); - } -}; diff --git a/migrations/sequelize/20170809172527-create-address.js b/migrations/sequelize/20170809172527-create-address.js deleted file mode 100644 index ce0c93d..0000000 --- a/migrations/sequelize/20170809172527-create-address.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; -module.exports = { - up: function(queryInterface, Sequelize) { - return queryInterface.createTable("Addresses", { - id: { - allowNull: false, - autoIncrement: true, - primaryKey: true, - type: Sequelize.INTEGER - }, - name: { - allowNull: false, - type: Sequelize.STRING, - unique: 'userAddress' - }, - UserId: { - type: Sequelize.INTEGER, - allowNull: false, - unique: 'userAddress' - }, - fname: { - type: Sequelize.STRING - }, - lname: { - type: Sequelize.STRING - }, - street: { - type: Sequelize.STRING, - allowNull: false - }, - city: { - type: Sequelize.STRING, - allowNull: false - }, - StateId: { - type: Sequelize.INTEGER, - allowNull: false - }, - zip: { - type: Sequelize.INTEGER - }, - createdAt: { - allowNull: false, - type: Sequelize.DATE, - defaultValue: Sequelize.fn("NOW") - }, - updatedAt: { - allowNull: false, - type: Sequelize.DATE, - defaultValue: Sequelize.fn("NOW") - } - }).then(() => { - return queryInterface.addIndex("Addresses", ["id", "name", "UserId"]); - }); - }, - down: function(queryInterface, Sequelize) { - return queryInterface.dropTable("Addresses"); - } -}; diff --git a/migrations/sequelize/20170809165851-create-product.js b/migrations/sequelize/20170809195343-create-product.js similarity index 70% rename from migrations/sequelize/20170809165851-create-product.js rename to migrations/sequelize/20170809195343-create-product.js index 7757147..9a38558 100644 --- a/migrations/sequelize/20170809165851-create-product.js +++ b/migrations/sequelize/20170809195343-create-product.js @@ -10,19 +10,22 @@ module.exports = { type: Sequelize.INTEGER }, sku: { - type: Sequelize.STRING, - allowNull: false + allowNull: false, + type: Sequelize.STRING }, name: { - type: Sequelize.STRING, - allowNull: false + allowNull: false, + type: Sequelize.STRING }, description: { type: Sequelize.STRING }, price: { - type: Sequelize.INTEGER, - allowNull: false + allowNull: false, + type: Sequelize.INTEGER + }, + CategoryId: { + type: Sequelize.INTEGER }, createdAt: { allowNull: false, @@ -36,7 +39,9 @@ module.exports = { } }) .then(() => { - return queryInterface.addIndex("Products", ["id", "sku", "name"], {unique:true}); + return queryInterface.addIndex("Products", ["name", "sku"], { + unique: true + }); }); }, down: function(queryInterface, Sequelize) { diff --git a/migrations/sequelize/20170809165905-create-user.js b/migrations/sequelize/20170809195350-create-category.js similarity index 66% rename from migrations/sequelize/20170809165905-create-user.js rename to migrations/sequelize/20170809195350-create-category.js index 9833099..740aad0 100644 --- a/migrations/sequelize/20170809165905-create-user.js +++ b/migrations/sequelize/20170809195350-create-category.js @@ -2,22 +2,14 @@ module.exports = { up: function(queryInterface, Sequelize) { return queryInterface - .createTable("Users", { + .createTable("Categories", { id: { allowNull: false, autoIncrement: true, primaryKey: true, type: Sequelize.INTEGER }, - fname: { - allowNull: false, - type: Sequelize.STRING - }, - lname: { - allowNull: false, - type: Sequelize.STRING - }, - email: { + name: { allowNull: false, type: Sequelize.STRING }, @@ -33,10 +25,12 @@ module.exports = { } }) .then(() => { - return queryInterface.addIndex("Users", ["email", "id"], {unique:true}); + return queryInterface.addIndex("Categories", ["name"], { + unique: true + }); }); }, down: function(queryInterface, Sequelize) { - return queryInterface.dropTable("Users"); + return queryInterface.dropTable("Categories"); } }; diff --git a/migrations/sequelize/20170809195403-create-state.js b/migrations/sequelize/20170809195403-create-state.js new file mode 100644 index 0000000..cea9726 --- /dev/null +++ b/migrations/sequelize/20170809195403-create-state.js @@ -0,0 +1,36 @@ +"use strict"; +module.exports = { + up: function(queryInterface, Sequelize) { + return queryInterface + .createTable("States", { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + name: { + allowNull: false, + type: Sequelize.STRING + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE, + defaultValue: Sequelize.fn("NOW") + } + }) + .then(() => { + return queryInterface.addIndex("States", ["name"], { + unique: true + }); + }); + }, + down: function(queryInterface, Sequelize) { + return queryInterface.dropTable("States"); + } +}; diff --git a/models/sequelize/address.js b/models/sequelize/address.js deleted file mode 100644 index 830915b..0000000 --- a/models/sequelize/address.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -module.exports = function(sequelize, DataTypes) { - var Address = sequelize.define("Address", { - name: DataTypes.STRING, - UserId: DataTypes.INTEGER, - fname: DataTypes.STRING, - lname: DataTypes.STRING, - street: DataTypes.STRING, - city: DataTypes.STRING, - StateId: DataTypes.INTEGER, - zip: DataTypes.INTEGER - }); - - Address.associate = function(models) { - Address.belongsTo(models.User); - Address.belongsTo(models.State); - } - - - - return Address; -}; diff --git a/models/sequelize/cart.js b/models/sequelize/cart.js deleted file mode 100644 index 6e38374..0000000 --- a/models/sequelize/cart.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -module.exports = function(sequelize, DataTypes) { - var Cart = sequelize.define("Cart", { - ProductId: DataTypes.INTEGER, - UserId: DataTypes.INTEGER, - quantity: DataTypes.INTEGER - }); - - Cart.associate = function(models) { - Cart.belongsTo(models.User); - Cart.belongsTo(models.Product); - } - - return Cart; -}; diff --git a/models/sequelize/category.js b/models/sequelize/category.js index 46da855..930a534 100644 --- a/models/sequelize/category.js +++ b/models/sequelize/category.js @@ -1,14 +1,10 @@ "use strict"; module.exports = function(sequelize, DataTypes) { - var Category = sequelize.define("Category", { + const Category = sequelize.define("Category", { name: DataTypes.STRING }); - Category.associate = function(models) { - Category.belongsToMany(models.Product, {through: models.ProductCategory}); - Category.hasMany(models.ProductCategory); - - } - + Category.hasMany(models.Product); + }; return Category; }; diff --git a/models/sequelize/index.js b/models/sequelize/index.js index 7540dba..e07dba6 100644 --- a/models/sequelize/index.js +++ b/models/sequelize/index.js @@ -1,26 +1,34 @@ -'use strict'; +"use strict"; -var fs = require('fs'); -var path = require('path'); -var Sequelize = require('sequelize'); -var basename = path.basename(module.filename); -var env = process.env.NODE_ENV || 'development'; -var config = require(__dirname + '/../config/config.json')[env]; -var db = {}; +var fs = require("fs"); +var path = require("path"); +var Sequelize = require("sequelize"); +var basename = path.basename(module.filename); +var env = process.env.NODE_ENV || "development"; +var config = require(__dirname + "/../../config/sequelize")[env]; +var db = {}; +let sequelize; if (config.use_env_variable) { - var sequelize = new Sequelize(process.env[config.use_env_variable]); + sequelize = new Sequelize(process.env[config.use_env_variable]); } else { - var sequelize = new Sequelize(config.database, config.username, config.password, config); + sequelize = new Sequelize( + config.database, + config.username, + config.password, + config + ); } fs .readdirSync(__dirname) .filter(function(file) { - return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js'); + return ( + file.indexOf(".") !== 0 && file !== basename && file.slice(-3) === ".js" + ); }) .forEach(function(file) { - var model = sequelize['import'](path.join(__dirname, file)); + var model = sequelize["import"](path.join(__dirname, file)); db[model.name] = model; }); diff --git a/models/sequelize/product.js b/models/sequelize/product.js index 73f9938..0e1c409 100644 --- a/models/sequelize/product.js +++ b/models/sequelize/product.js @@ -1,18 +1,14 @@ "use strict"; module.exports = function(sequelize, DataTypes) { - var Product = sequelize.define("Product", { + const Product = sequelize.define("Product", { sku: DataTypes.STRING, name: DataTypes.STRING, description: DataTypes.STRING, - price: DataTypes.INTEGER + price: DataTypes.INTEGER, + CategoryId: DataTypes.INTEGER }); - Product.associate = function(models) { - Product.belongsToMany(models.Category, {through: models.ProductCategory}); - Product.hasMany(models.ProductCategory); - Product.belongsToMany(models.User, {through: models.Cart}); - Product.hasMany(models.Cart); - } - + Product.belongsTo(models.Category); + }; return Product; }; diff --git a/models/sequelize/productcategory.js b/models/sequelize/productcategory.js deleted file mode 100644 index bd52023..0000000 --- a/models/sequelize/productcategory.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -module.exports = function(sequelize, DataTypes) { - var ProductCategory = sequelize.define("ProductCategory", { - CategoryId: DataTypes.INTEGER, - ProductId: DataTypes.INTEGER - }); - - ProductCategory.associate = function(models) { - ProductCategory.belongsTo(models.Category); - ProductCategory.belongsTo(models.Product); - } - - return ProductCategory; -}; diff --git a/models/sequelize/state.js b/models/sequelize/state.js index 924dcc3..4ae9afa 100644 --- a/models/sequelize/state.js +++ b/models/sequelize/state.js @@ -1,12 +1,7 @@ "use strict"; module.exports = function(sequelize, DataTypes) { - var State = sequelize.define("State", { + const State = sequelize.define("State", { name: DataTypes.STRING }); - - State.associate = function(models) { - State.hasMany(models.Address); - } - return State; }; diff --git a/models/sequelize/user.js b/models/sequelize/user.js deleted file mode 100644 index a3310e1..0000000 --- a/models/sequelize/user.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; -module.exports = function(sequelize, DataTypes) { - var User = sequelize.define('User', { - fname: DataTypes.STRING, - lname: DataTypes.STRING, - ); - } - - User.associate = function(models) { - User.hasMany(models.Address); - User.belongsToMany(models.Product, {through:models.Cart}) - User.hasMany(models.Cart) - } - - return User; -}; diff --git a/seeds/sequelize/20170809200816-states.js b/seeds/sequelize/20170809200816-states.js new file mode 100644 index 0000000..b30c090 --- /dev/null +++ b/seeds/sequelize/20170809200816-states.js @@ -0,0 +1,72 @@ +"use strict"; + +module.exports = { + up: function(queryInterface, Sequelize) { + let stateNames = [ + "Alabama", + "Alaska", + "Arizona", + "Arkansas", + "California", + "Colorado", + "Connecticut", + "Delaware", + "District of Columbia", + "Florida", + "Georgia", + "Hawaii", + "Idaho", + "Illinois", + "Indiana", + "Iowa", + "Kansas", + "Kentucky", + "Louisiana", + "Maine", + "Maryland", + "Massachusetts", + "Michigan", + "Minnesota", + "Mississippi", + "Missouri", + "Montana", + "Nebraska", + "Nevada", + "New Hampshire", + "New Jersey", + "New Mexico", + "New York", + "North Carolina", + "North Dakota", + "Ohio", + "Oklahoma", + "Oregon", + "Pennsylvania", + "Rhode Island", + "South Carolina", + "South Dakota", + "Tennessee", + "Texas", + "Utah", + "Vermont", + "Virginia", + "Washington", + "West Virginia", + "Wisconsin", + "Wyoming" + ]; + let states = stateNames.map(name => { + return { name }; + }); + return queryInterface.bulkInsert("States", states); + }, + + down: function(queryInterface, Sequelize) { + return queryInterface.bulkDelete( + "States", + null, + {}, + Sequelize.models.State + ); + } +}; From 4813d42b9cab908eb5f9ea5711ee1069ced07c77 Mon Sep 17 00:00:00 2001 From: EdTriplett Date: Wed, 9 Aug 2017 17:04:16 -0400 Subject: [PATCH 11/20] seeding? --- seeds/mongoose/index.js | 1 + seeds/sequelize/20170809203329-categories.js | 26 ++++++++++++++++++ seeds/sequelize/20170809205348-products.js | 29 ++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 seeds/mongoose/index.js create mode 100644 seeds/sequelize/20170809203329-categories.js create mode 100644 seeds/sequelize/20170809205348-products.js diff --git a/seeds/mongoose/index.js b/seeds/mongoose/index.js new file mode 100644 index 0000000..945ce43 --- /dev/null +++ b/seeds/mongoose/index.js @@ -0,0 +1 @@ +index.js \ No newline at end of file diff --git a/seeds/sequelize/20170809203329-categories.js b/seeds/sequelize/20170809203329-categories.js new file mode 100644 index 0000000..e850726 --- /dev/null +++ b/seeds/sequelize/20170809203329-categories.js @@ -0,0 +1,26 @@ +'use strict'; + +const faker = require('faker') +const voca = require('voca') + +module.exports = { + up: function (queryInterface, Sequelize) { + + let categories = []; + for (let i = 0; i < 10; i++) { + categories.push({ + name: voca.titleCase(faker.commerce.productAdjective(1)) + }); + } + return queryInterface.bulkInsert('Categories', categories); + }, + + down: function(queryInterface, Sequelize) { + return queryInterface.bulkDelete( + "Categories", + null, + {}, + Sequelize.models.Category + ); + } +}; diff --git a/seeds/sequelize/20170809205348-products.js b/seeds/sequelize/20170809205348-products.js new file mode 100644 index 0000000..99c5ca2 --- /dev/null +++ b/seeds/sequelize/20170809205348-products.js @@ -0,0 +1,29 @@ +'use strict'; + +const faker = require('faker') +const voca = require('voca') + +module.exports = { + up: function (queryInterface, Sequelize) { + + let products = []; + for (let i = 0; i < 10; i++) { + products.push({ + name: voca.titleCase(faker.commerce.productName());, + sku: faker.random.uuid();, + price: faker.commerce.price(1, 100, 2, '$'); + }); + } + console.log(products) + return queryInterface.bulkInsert('Products', products); + }, + + down: function(queryInterface, Sequelize) { + return queryInterface.bulkDelete( + "Products", + null, + {}, + Sequelize.models.Product + ); + } +}; From f6b51ddab4a3e6251710aa1b727d3b9d24a5f662 Mon Sep 17 00:00:00 2001 From: Will Timpson Date: Wed, 9 Aug 2017 17:23:59 -0400 Subject: [PATCH 12/20] Seeds! --- seeds/sequelize/20170809203329-categories.js | 25 ++++++++++++-------- seeds/sequelize/20170809205348-products.js | 24 +++++++++---------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/seeds/sequelize/20170809203329-categories.js b/seeds/sequelize/20170809203329-categories.js index e850726..e657ce1 100644 --- a/seeds/sequelize/20170809203329-categories.js +++ b/seeds/sequelize/20170809203329-categories.js @@ -1,18 +1,23 @@ -'use strict'; +"use strict"; -const faker = require('faker') -const voca = require('voca') +const faker = require("faker"); +const voca = require("voca"); module.exports = { - up: function (queryInterface, Sequelize) { - - let categories = []; - for (let i = 0; i < 10; i++) { - categories.push({ - name: voca.titleCase(faker.commerce.productAdjective(1)) + up: function(queryInterface, Sequelize) { + let categories = []; + for (let i = 0; i < 10; i++) { + categories.push({ + name: voca.titleCase( + [ + faker.commerce.productAdjective(), + faker.commerce.productAdjective(), + faker.commerce.productAdjective() + ].join(" ") + ) }); } - return queryInterface.bulkInsert('Categories', categories); + return queryInterface.bulkInsert("Categories", categories); }, down: function(queryInterface, Sequelize) { diff --git a/seeds/sequelize/20170809205348-products.js b/seeds/sequelize/20170809205348-products.js index 99c5ca2..926622f 100644 --- a/seeds/sequelize/20170809205348-products.js +++ b/seeds/sequelize/20170809205348-products.js @@ -1,21 +1,19 @@ -'use strict'; +"use strict"; -const faker = require('faker') -const voca = require('voca') +const faker = require("faker"); +const voca = require("voca"); module.exports = { - up: function (queryInterface, Sequelize) { - - let products = []; - for (let i = 0; i < 10; i++) { - products.push({ - name: voca.titleCase(faker.commerce.productName());, - sku: faker.random.uuid();, - price: faker.commerce.price(1, 100, 2, '$'); + up: function(queryInterface, Sequelize) { + let products = []; + for (let i = 0; i < 10; i++) { + products.push({ + name: voca.titleCase(faker.commerce.productName()), + sku: faker.random.uuid(), + price: +faker.commerce.price(1, 100) }); } - console.log(products) - return queryInterface.bulkInsert('Products', products); + return queryInterface.bulkInsert("Products", products); }, down: function(queryInterface, Sequelize) { From ad41d6b1ac9136a24b038b7bb6e8ca4b26455549 Mon Sep 17 00:00:00 2001 From: Will Timpson Date: Wed, 9 Aug 2017 17:26:56 -0400 Subject: [PATCH 13/20] view boilerplates --- routers/products.js | 100 +++++++++++++++++++++++++++++++ views/products/index.handlebars | 59 ++++++++++++++++++ views/products/single.handlebars | 47 +++++++++++++++ 3 files changed, 206 insertions(+) create mode 100644 routers/products.js create mode 100644 views/products/index.handlebars create mode 100644 views/products/single.handlebars diff --git a/routers/products.js b/routers/products.js new file mode 100644 index 0000000..150f272 --- /dev/null +++ b/routers/products.js @@ -0,0 +1,100 @@ +var express = require("express"); +var router = express.Router(); +var models = require("./../models"); + +// ---------------------------------------- +// Index +// ---------------------------------------- +router.get("/", (req, res) => { + User.find({}) + .then(users => { + res.render("users/index", { users }); + }) + .catch(e => res.status(500).send(e.stack)); +}); + +// ---------------------------------------- +// New +// ---------------------------------------- +router.get("/new", (req, res) => { + res.render("users/new"); +}); + +// ---------------------------------------- +// Edit +// ---------------------------------------- +router.get("/:id/edit", (req, res) => { + User.findById(req.params.id) + .then(user => { + res.render("users/edit", { user }); + }) + .catch(e => res.status(500).send(e.stack)); +}); + +// ---------------------------------------- +// Show +// ---------------------------------------- +router.get("/:id", (req, res) => { + User.findById(req.params.id) + .then(user => { + res.render("users/show", { user }); + }) + .catch(e => res.status(500).send(e.stack)); +}); + +// ---------------------------------------- +// Create +// ---------------------------------------- +router.post("/", (req, res) => { + var user = new User({ + fname: req.body.user.fname, + lname: req.body.user.lname, + username: req.body.user.username, + email: req.body.user.email + }); + + user + .save() + .then(user => { + res.redirect(`/users/${user.id}`); + }) + .catch(e => res.status(500).send(e.stack)); +}); + +// ---------------------------------------- +// Update +// ---------------------------------------- +router.put("/:id", (req, res) => { + var userParams = { + fname: req.body.user.fname, + lname: req.body.user.lname, + username: req.body.user.username, + email: req.body.user.email + }; + + User.findByIdAndUpdate(req.params.id, userParams) + .then(user => { + req.method = "GET"; + res.redirect(`/users/${user.id}`); + }) + .catch(e => res.status(500).send(e.stack)); +}); + +// ---------------------------------------- +// Destroy +// ---------------------------------------- +router.delete("/:id", (req, res) => { + var currentUser = req.session.currentUser; + User.findByIdAndRemove(req.params.id) + .then(() => { + req.method = "GET"; + if (currentUser.id === req.params.id) { + res.redirect("/logout"); + } else { + res.redirect("/users"); + } + }) + .catch(e => res.status(500).send(e.stack)); +}); + +module.exports = router; diff --git a/views/products/index.handlebars b/views/products/index.handlebars new file mode 100644 index 0000000..204235f --- /dev/null +++ b/views/products/index.handlebars @@ -0,0 +1,59 @@ + + + + + +{{#if users.length }} + + + + + + + + + + + + + {{#each users as |user| }} + + + + + + + + + {{/each }} + +
First NameLast NameUsernameEmail
+ {{ user.fname }} + + {{ user.lname }} + + {{ user.username }} + + {{ user.email }} + + Edit + + Delete +
+{{else }} +

No users

+{{/if }} + + + + + + + + + + + diff --git a/views/products/single.handlebars b/views/products/single.handlebars new file mode 100644 index 0000000..38fa4bd --- /dev/null +++ b/views/products/single.handlebars @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyValue
First Name{{ user.fname }}
Last Name{{ user.lname }}
Username{{ user.username }}
Email{{ user.email }}
+ + + + + + + + + + + + From a70d343de347a973be25c8942fbd44c6ee4f6036 Mon Sep 17 00:00:00 2001 From: EdTriplett Date: Wed, 9 Aug 2017 18:03:21 -0400 Subject: [PATCH 14/20] where are products? --- app.js | 7 ++- helpers/productHelper.js | 9 ++++ routers/products.js | 94 ++++++--------------------------- views/products/index.handlebars | 35 ++++++------ 4 files changed, 45 insertions(+), 100 deletions(-) create mode 100644 helpers/productHelper.js diff --git a/app.js b/app.js index 493ce4f..36fbea6 100644 --- a/app.js +++ b/app.js @@ -46,9 +46,12 @@ app.use((req, res, next) => { }); // Routes -// app.use("/posts", require("./routers/posts")); -// app.all("/", (req, res) => res.redirect("/posts")); +app.all("/", (req, res) => res.redirect("/products")); + +app.use("/products", require("./routers/products")); + // app.use("/users", require("./routers/users")); + // app.use("/comments", require("./routers/comments")); // Set up port/host diff --git a/helpers/productHelper.js b/helpers/productHelper.js new file mode 100644 index 0000000..e2880d9 --- /dev/null +++ b/helpers/productHelper.js @@ -0,0 +1,9 @@ +let ProductHelper = {}; + +ProductHelper.productsPath = () => '/products/'; +ProductHelper.productPath = (id) => `/products/${ id }`; +ProductHelper.addProductPath = () => '/products/add'; +// ProductHelper.editProductPath = (id) => `/products/${ id }/edit`; +// ProductHelper.destroyProductPath = (id) => `/products/${ id }/?_method=delete`; + +module.exports = ProductHelper; \ No newline at end of file diff --git a/routers/products.js b/routers/products.js index 150f272..6bfe9b5 100644 --- a/routers/products.js +++ b/routers/products.js @@ -1,100 +1,38 @@ var express = require("express"); var router = express.Router(); -var models = require("./../models"); +var models = require("./../models/sequelize"); +const Product = models.Product // ---------------------------------------- // Index // ---------------------------------------- router.get("/", (req, res) => { - User.find({}) - .then(users => { - res.render("users/index", { users }); + Product.find({}) + .then(products => { + res.render("products/index", { products }); }) .catch(e => res.status(500).send(e.stack)); }); // ---------------------------------------- -// New +// Add // ---------------------------------------- -router.get("/new", (req, res) => { - res.render("users/new"); -}); +// router.get("/add", (req, res) => { +// res.render("users/new"); +// }); -// ---------------------------------------- -// Edit -// ---------------------------------------- -router.get("/:id/edit", (req, res) => { - User.findById(req.params.id) - .then(user => { - res.render("users/edit", { user }); - }) - .catch(e => res.status(500).send(e.stack)); -}); // ---------------------------------------- // Show // ---------------------------------------- -router.get("/:id", (req, res) => { - User.findById(req.params.id) - .then(user => { - res.render("users/show", { user }); - }) - .catch(e => res.status(500).send(e.stack)); -}); +// router.get("/:id", (req, res) => { +// User.findById(req.params.id) +// .then(user => { +// res.render("users/show", { user }); +// }) +// .catch(e => res.status(500).send(e.stack)); +// }); -// ---------------------------------------- -// Create -// ---------------------------------------- -router.post("/", (req, res) => { - var user = new User({ - fname: req.body.user.fname, - lname: req.body.user.lname, - username: req.body.user.username, - email: req.body.user.email - }); - user - .save() - .then(user => { - res.redirect(`/users/${user.id}`); - }) - .catch(e => res.status(500).send(e.stack)); -}); - -// ---------------------------------------- -// Update -// ---------------------------------------- -router.put("/:id", (req, res) => { - var userParams = { - fname: req.body.user.fname, - lname: req.body.user.lname, - username: req.body.user.username, - email: req.body.user.email - }; - - User.findByIdAndUpdate(req.params.id, userParams) - .then(user => { - req.method = "GET"; - res.redirect(`/users/${user.id}`); - }) - .catch(e => res.status(500).send(e.stack)); -}); - -// ---------------------------------------- -// Destroy -// ---------------------------------------- -router.delete("/:id", (req, res) => { - var currentUser = req.session.currentUser; - User.findByIdAndRemove(req.params.id) - .then(() => { - req.method = "GET"; - if (currentUser.id === req.params.id) { - res.redirect("/logout"); - } else { - res.redirect("/users"); - } - }) - .catch(e => res.status(500).send(e.stack)); -}); module.exports = router; diff --git a/views/products/index.handlebars b/views/products/index.handlebars index 204235f..eea89d8 100644 --- a/views/products/index.handlebars +++ b/views/products/index.handlebars @@ -1,50 +1,45 @@ -{{#if users.length }} +{{#if products.length }} - - - - - + + + - {{#each users as |user| }} + {{#each products as |product| }} - + + - {{/each }}
First NameLast NameUsernameEmailNameCategoryPrice
- {{ user.fname }} - - {{ user.lname }} + {{ product.name }} - {{ user.username }} + {{ product.category }} - {{ user.email }} + {{ product.price }} - Edit - - Delete + + +
{{else }} -

No users

+

No products

{{/if }} From 3911432d1e7efc75070e2f19832a9b4ae6b355e3 Mon Sep 17 00:00:00 2001 From: Will Timpson Date: Wed, 9 Aug 2017 18:15:33 -0400 Subject: [PATCH 15/20] First view!!!! --- package.json | 3 +- routers/products.js | 7 +- seeds/sequelize/20170809205348-products.js | 3 +- views/products/index.handlebars | 77 +++++++++------------- 4 files changed, 38 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index fd71666..a7d0690 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,9 @@ "sql:seed": "npm run sql db:seed:all", "sql:s": "npm run sql:migrate:undo && npm run sql:migrate && npm run sql:seed", "mg:seed": "node seeds/mongoose", + "sql": "./node_modules/sequelize-cli/bin/sequelize", "console": "node repl.js", - "sql": "./node_modules/sequelize-cli/bin/sequelize" + "start": "which nodemon > /dev/null && nodemon app.js || node app.js" }, "repository": { "type": "git", diff --git a/routers/products.js b/routers/products.js index 6bfe9b5..437fd3e 100644 --- a/routers/products.js +++ b/routers/products.js @@ -1,13 +1,13 @@ var express = require("express"); var router = express.Router(); var models = require("./../models/sequelize"); -const Product = models.Product +const Product = models.Product; // ---------------------------------------- // Index // ---------------------------------------- router.get("/", (req, res) => { - Product.find({}) + Product.findAll({ include: ["Category"] }) .then(products => { res.render("products/index", { products }); }) @@ -21,7 +21,6 @@ router.get("/", (req, res) => { // res.render("users/new"); // }); - // ---------------------------------------- // Show // ---------------------------------------- @@ -33,6 +32,4 @@ router.get("/", (req, res) => { // .catch(e => res.status(500).send(e.stack)); // }); - - module.exports = router; diff --git a/seeds/sequelize/20170809205348-products.js b/seeds/sequelize/20170809205348-products.js index 926622f..90edc0a 100644 --- a/seeds/sequelize/20170809205348-products.js +++ b/seeds/sequelize/20170809205348-products.js @@ -10,7 +10,8 @@ module.exports = { products.push({ name: voca.titleCase(faker.commerce.productName()), sku: faker.random.uuid(), - price: +faker.commerce.price(1, 100) + price: +faker.commerce.price(1, 100), + CategoryId: i + 1 }); } return queryInterface.bulkInsert("Products", products); diff --git a/views/products/index.handlebars b/views/products/index.handlebars index eea89d8..4302ead 100644 --- a/views/products/index.handlebars +++ b/views/products/index.handlebars @@ -1,54 +1,41 @@ - - {{#if products.length }} - - - - - - - - - - - {{#each products as |product| }} - - - - - - - + + {{/each }} + +
NameCategoryPrice
- {{ product.name }} - - {{ product.category }} - - {{ product.price }} - - - + + + + + + + + + + + {{#each products as |product| }} + + + + + + + - - {{/each }} - -
NameCategoryPrice
+ {{ product.name }} + + {{ product.Category.name }} + + {{ product.price }} + + + -
+
{{else }} -

No products

+

No products

{{/if }} - - - - - - - - - - - From cb3b72a438f0c9988c907148d5c5c422071327e7 Mon Sep 17 00:00:00 2001 From: Will Timpson Date: Wed, 9 Aug 2017 18:40:32 -0400 Subject: [PATCH 16/20] single view? --- helpers/CategoryHelper.js | 9 ++++ helpers/ProductHelper.js | 9 ++++ helpers/productHelper.js | 9 ---- routers/products.js | 19 ++++--- seeds/sequelize/20170809205348-products.js | 4 +- views/products/index.handlebars | 4 +- views/products/single.handlebars | 63 ++++++++++------------ 7 files changed, 61 insertions(+), 56 deletions(-) create mode 100644 helpers/CategoryHelper.js create mode 100644 helpers/ProductHelper.js delete mode 100644 helpers/productHelper.js diff --git a/helpers/CategoryHelper.js b/helpers/CategoryHelper.js new file mode 100644 index 0000000..c3e8b81 --- /dev/null +++ b/helpers/CategoryHelper.js @@ -0,0 +1,9 @@ +let CategoryHelper = {}; + +CategoryHelper.categoriesPath = () => "/categories/"; +CategoryHelper.categoryPath = id => `/categories/${id}`; +// CategoryHelper.addProductPath = () => "/products/add"; +// CategoryHelper.editProductPath = (id) => `/products/${ id }/edit`; +// CategoryHelper.destroyProductPath = (id) => `/products/${ id }/?_method=delete`; + +module.exports = CategoryHelper; diff --git a/helpers/ProductHelper.js b/helpers/ProductHelper.js new file mode 100644 index 0000000..aebd303 --- /dev/null +++ b/helpers/ProductHelper.js @@ -0,0 +1,9 @@ +let ProductHelper = {}; + +ProductHelper.productsPath = () => "/products/"; +ProductHelper.productPath = id => `/products/${id}`; +ProductHelper.addProductPath = id => `/products/${id}`; +// ProductHelper.editProductPath = (id) => `/products/${ id }/edit`; +// ProductHelper.destroyProductPath = (id) => `/products/${ id }/?_method=delete`; + +module.exports = ProductHelper; diff --git a/helpers/productHelper.js b/helpers/productHelper.js deleted file mode 100644 index e2880d9..0000000 --- a/helpers/productHelper.js +++ /dev/null @@ -1,9 +0,0 @@ -let ProductHelper = {}; - -ProductHelper.productsPath = () => '/products/'; -ProductHelper.productPath = (id) => `/products/${ id }`; -ProductHelper.addProductPath = () => '/products/add'; -// ProductHelper.editProductPath = (id) => `/products/${ id }/edit`; -// ProductHelper.destroyProductPath = (id) => `/products/${ id }/?_method=delete`; - -module.exports = ProductHelper; \ No newline at end of file diff --git a/routers/products.js b/routers/products.js index 437fd3e..24a5cb6 100644 --- a/routers/products.js +++ b/routers/products.js @@ -7,7 +7,7 @@ const Product = models.Product; // Index // ---------------------------------------- router.get("/", (req, res) => { - Product.findAll({ include: ["Category"] }) + Product.findAll({ include: models.Category }) .then(products => { res.render("products/index", { products }); }) @@ -24,12 +24,15 @@ router.get("/", (req, res) => { // ---------------------------------------- // Show // ---------------------------------------- -// router.get("/:id", (req, res) => { -// User.findById(req.params.id) -// .then(user => { -// res.render("users/show", { user }); -// }) -// .catch(e => res.status(500).send(e.stack)); -// }); +router.get("/:id", (req, res) => { + Product.findById(req.params.id, { + include: { model: models.Category, include: { model: models.Product } } + }) + .then(product => { + console.log(product); + res.render("products/single", { product }); + }) + .catch(e => res.status(500).send(e.stack)); +}); module.exports = router; diff --git a/seeds/sequelize/20170809205348-products.js b/seeds/sequelize/20170809205348-products.js index 90edc0a..0f74600 100644 --- a/seeds/sequelize/20170809205348-products.js +++ b/seeds/sequelize/20170809205348-products.js @@ -6,12 +6,12 @@ const voca = require("voca"); module.exports = { up: function(queryInterface, Sequelize) { let products = []; - for (let i = 0; i < 10; i++) { + for (let i = 1; i < 101; i++) { products.push({ name: voca.titleCase(faker.commerce.productName()), sku: faker.random.uuid(), price: +faker.commerce.price(1, 100), - CategoryId: i + 1 + CategoryId: i % 10 + 1 }); } return queryInterface.bulkInsert("Products", products); diff --git a/views/products/index.handlebars b/views/products/index.handlebars index 4302ead..bdbe047 100644 --- a/views/products/index.handlebars +++ b/views/products/index.handlebars @@ -29,8 +29,8 @@ - - + + Add to Cart {{/each }} diff --git a/views/products/single.handlebars b/views/products/single.handlebars index 38fa4bd..aac4c49 100644 --- a/views/products/single.handlebars +++ b/views/products/single.handlebars @@ -1,47 +1,40 @@ - - +
+
+

{{ product.price }}

+

{{ product.description}}

+ Add to Cart +
+
+

Related Products

- - + + + + + {{#each relatedProducts as |product| }} - - - - - - - - - - - - - - + + + + - -
KeyValueNameCategoryPrice
First Name{{ user.fname }}
Last Name{{ user.lname }}
Username{{ user.username }}
Email{{ user.email }} + {{ product.name }} + + {{ product.Category.name }} + + {{ product.price }} + + Add to Cart +
- - - - - - - - - - - - + {{/each }} From 471a9d9b18ab652d2adf61172a2b337acdbdf395 Mon Sep 17 00:00:00 2001 From: EdTriplett Date: Wed, 9 Aug 2017 19:01:54 -0400 Subject: [PATCH 17/20] promise deprecation warning --- models/mongoose/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/models/mongoose/index.js b/models/mongoose/index.js index e69de29..37aa87d 100644 --- a/models/mongoose/index.js +++ b/models/mongoose/index.js @@ -0,0 +1,7 @@ +const mongoose = require('mongoose'); +mongoose.Promise = require('bluebird'); + + +module.exports = { + +} \ No newline at end of file From bdd7a3f2ef34d1a07bf372dfa702785de108cb9c Mon Sep 17 00:00:00 2001 From: EdTriplett Date: Thu, 10 Aug 2017 16:06:10 -0400 Subject: [PATCH 18/20] categories filter dropdown populating --- app.js | 2 +- helpers/ProductHelper.js | 2 +- routers/products.js | 14 +++++++-- views/products/index.handlebars | 52 ++++++++++++++++++++++++++++++++- 4 files changed, 64 insertions(+), 6 deletions(-) diff --git a/app.js b/app.js index 36fbea6..e9525c0 100644 --- a/app.js +++ b/app.js @@ -46,7 +46,7 @@ app.use((req, res, next) => { }); // Routes -app.all("/", (req, res) => res.redirect("/products")); +app.all("/", (req, res) => {return res.redirect("/products")}); app.use("/products", require("./routers/products")); diff --git a/helpers/ProductHelper.js b/helpers/ProductHelper.js index aebd303..c6c84c0 100644 --- a/helpers/ProductHelper.js +++ b/helpers/ProductHelper.js @@ -2,7 +2,7 @@ let ProductHelper = {}; ProductHelper.productsPath = () => "/products/"; ProductHelper.productPath = id => `/products/${id}`; -ProductHelper.addProductPath = id => `/products/${id}`; +ProductHelper.addProductPath = id => `/products/add/${id}`; // ProductHelper.editProductPath = (id) => `/products/${ id }/edit`; // ProductHelper.destroyProductPath = (id) => `/products/${ id }/?_method=delete`; diff --git a/routers/products.js b/routers/products.js index 24a5cb6..3490e8a 100644 --- a/routers/products.js +++ b/routers/products.js @@ -2,20 +2,28 @@ var express = require("express"); var router = express.Router(); var models = require("./../models/sequelize"); const Product = models.Product; +const Category = models.Category; // ---------------------------------------- // Index // ---------------------------------------- router.get("/", (req, res) => { + let categories; + let products; Product.findAll({ include: models.Category }) - .then(products => { - res.render("products/index", { products }); + .then(result => { + products = result; + return Category.findAll(); + }) + .then(result => { + categories = result; + res.render("products/index", { products, categories }); }) .catch(e => res.status(500).send(e.stack)); }); // ---------------------------------------- -// Add +// Add to Cart // ---------------------------------------- // router.get("/add", (req, res) => { // res.render("users/new"); diff --git a/views/products/index.handlebars b/views/products/index.handlebars index bdbe047..7f66004 100644 --- a/views/products/index.handlebars +++ b/views/products/index.handlebars @@ -1,8 +1,58 @@ -