diff --git a/.envTEMPLATE b/.envTEMPLATE new file mode 100644 index 0000000..b7c6186 --- /dev/null +++ b/.envTEMPLATE @@ -0,0 +1,7 @@ +NODE_ENV = development + +PORT = 3000 + +# Database Info +DB_USER = +DB_PASS = diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..9fef59a --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,38 @@ +{ + "env": { + "browser": true, + "es6": true, + "node": true + }, + "extends": "eslint:recommended", + "globals": { + "Atomics": "readonly", + "SharedArrayBuffer": "readonly" + }, + "parserOptions": { + "ecmaVersion": 2015, + "sourceType": "module" + }, + "rules": { + "comma-dangle": [ + "error", + "always" + ], + "indent": [ + "error", + 2 + ], + "linebreak-style": [ + "error", + "windows" + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "always" + ] + } +} \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..ed0b4f6 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,20 @@ +## Description +(Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.) + +Fixes #(issue name) + +## Solution +(What did you do to fix this issue?) + +## Known Issues +(Are there any knew issues caused or exposed by your changes, or things you would like clarified before merging?) + +## Testing Procedures +(What should reviewers do to validate your changes? What steps should be taken and what is the expected outcome?) + +## Checklist for author +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation (if any) +- [ ] My changes generate no new warnings diff --git a/.gitignore b/.gitignore index fed6fcc..adc15ce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ +screenshots/ + # Ignore the node modules. They will be installed through 'npm install' node_modules/ # Ignore .env file, to be kept locally on machine running the server for security .env -.envTEMPLATE RPI Campus Map Project Proposal Summer 19.pdf RPI Campus Map Project Proposal Fall 19.pdf diff --git a/Engineering Resources.pdf b/Engineering Resources.pdf deleted file mode 100644 index 6282801..0000000 Binary files a/Engineering Resources.pdf and /dev/null differ diff --git a/README.md b/README.md index cff461a..daa3e32 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,15 @@ We are currently in the middle of a large refactor, but heavy construction will ### Current Contributors: * Justin Gaskins +* Jon-Pierre Antoine +* Darrian Gardea +* Aidan Duane +* Cody Messina +* Kristina Adams + +### Project Managers: +* Spring 2020: Jon-Pierre Antoine +* Fall 2019: Justin Gaskins ### Founders: * Justin Gaskins @@ -16,6 +25,8 @@ We are currently in the middle of a large refactor, but heavy construction will * Sebastien Boulas ### Version History: +* 2/16/2020 - v0.4.0 Login and registration implemented. Messages are flashed on error state i.e. invalid email, +user not found, login to see admin page etc. New welcome page also added (page before map access). Code has been rebased making it more modular. All html converted to ejs and views used (modularity). * 5/27/2019 - v0.3.0 All basic map functionality is now restored! You can show a location on the map from the info page, search for locations, or go to the information page from the location on the map. * 3/26/2019 - v0.2.0 Began refactor and translation from XAMPP to MEAN Stack! * 1/25/2019 - v0.1.0 Initial stages of functionality are complete! More locations and authorization will be added for the release of v1.0. @@ -23,24 +34,30 @@ We are currently in the middle of a large refactor, but heavy construction will ### Getting Started This project uses the MEAN stack (MongoDB, Express.JS, AngularJS 1.7, Node.js). You will need a working installation of [Node.js](https://nodejs.org/en/) (LTS version recommended), and a [MongoDB Atlas Cloud account](https://www.mongodb.com/cloud/atlas) (free is fine). -Once you have that taken care of, there are a few more steps before you can begin work. +Once you have that taken care of, there are a few more steps to take before you can begin work. 1. Install the nodemon package by running `npm install -g nodemon` in your node configured shell. 2. Clone the repository by either running `git clone https://github.com/gaskij/rpicampusmap.git` in a terminal shell with Git installed, or using your preferred Git UI. Change to the newly downloaded folder using `cd rpicampusmap` 3. Run `npm install` to download the required Node packages. -4. Open the ".envTEMPLATE" file in your preferred text editor. Change the and fields to match your Mongo Atlas account information. Don't worry, this file will only be saved on your local machine, so nobody will see it! Save the file as ".env" +4. Make a copy of the ".envTEMPLATE" file and open it in your preferred text editor. Change the and fields to match your Mongo Atlas account information. Don't worry, this file will only be saved on your local machine, so nobody will see it! Save the file as ".env" 5. Run `git status` to make sure you are up to date with the current branch. If so, you can begin! ### Running the Server To start the server, run `npm start` to have the server auto-restart if you make any changes, or `node server.js` if you would rather manually restart in case of changes. -### Contributing to RPI Machines Map -RPI Machines Map is a separate project that branches from RPI Campus Map. While it has many of the same features, it has additional features that allow users to easily find machine shops on campus, and the contents of those shops. To contribute to this project, use `git checkout forgemill` to access the stable project branch, and `git checkout forgemill-dev` to access the developer's branch, where we are working to build and improve the Machine Map. Also, check out the README in those branches for more information. - -### Project Guidelines -* We use JavaScript ES6 syntax for defining variables (const, let) - * You can use Arrow functions or more conventional ES5 functions. -* Try to use [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) instead of string concatenation when possible. -* Please do not attempt to commit directly to master! Commit instead to the branch for the feature currently being worked on. +### Project Contribution Guidelines +* DO **NOT** attempt to push directly to `master`! Instead, follow this basic workflow: + 1. Create a new branch dedicated only to the task at hand. Give it a name starting with the type of work it pertains to. For example, `hotfix/broken_github_link` or `feature/create_new_page` + 2. Commit and push your changes to the branch for the feature currently being worked on. + 3. When you believe you are finished making changes, open a Pull Request to have your changes merged into `master`. + 4. While you're there, why not give someone else's pull request a review, too? * You can switch branches with the command `git checkout [branch]` +* When writing code, adhere to the RPI CampusMap [Style Guide](https://github.com/gaskij/rpicampusmap/wiki/Style-Guide). The most important/basic rules are: + * We use [JavaScript ES6 syntax](https://www.freecodecamp.org/news/write-less-do-more-with-javascript-es6-5fd4a8e50ee2/) for many aspects of the code, like defining variables (const, let) + * Use [Arrow functions](https://javascript.info/arrow-functions-basics) instead of conventional ES5 functions when possible. + * Use [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) instead of string concatenation when possible. + * Use 2 spaces (not tabs) for indentation. Most IDEs and editors can be configured to use tab-width of 2 and use spaces instead of tabs. + +### Contributing to RPI Machines Map +RPI Machines Map is a separate project that branches from RPI Campus Map. While it has many of the same features, it has additional features that allow users to easily find machine shops on campus, and the contents of those shops. To contribute to that project, see the [RPI Machines repo](https://github.com/gwild37/RPI-Machines). Have fun making a big impact on campus! diff --git a/app.js b/app.js new file mode 100644 index 0000000..0b050ce --- /dev/null +++ b/app.js @@ -0,0 +1,65 @@ +const http = require('http'); +const express = require('express'); +const bodyParser = require('body-parser'); +const expressLayouts = require('express-ejs-layouts'); +const passport = require('passport'); +const flash = require('connect-flash'); +const session = require('express-session'); +const geolocations = require('./geolocations.json'); +const Location = require('./models/Locations'); +const database = require('./scripts/database'); +const assert = require('assert'); + +const app = express(); + + +// Passport Config +require('./config/passport')(passport); + +//adding locations for first run +let db = database._connect(); +Location.collection.insertMany(geolocations, {ordered: false}) +.then(() => console.log("DONE Loading")) +.catch((err) => console.log(err)); + +// EJS +app.use(expressLayouts); +app.set('view engine', 'ejs'); +//app.use(express.static(__dirname)).use(bodyParser.urlencoded({extended: true})).use(bodyParser.json()); + +// Bodyparser +app.use(express.urlencoded({ extended: false})); +app.use(bodyParser.json()) + +// Express Session +app.use(session({ + secret: 'secret', + resave: true, + saveUninitialized: true, + //cookie: { secure: true } +})); + +// Passport middleware +app.use(passport.initialize()); +app.use(passport.session()); + +// Connect Flash +app.use(flash()); + +// Global vars +app.use((req, res, next) => { + res.locals.success_msg = req.flash('success_msg'); + res.locals.error_msg = req.flash('err_msg'); + res.locals.error = req.flash('error'); + next(); +}); + +// Routers +app.use('/', require('./scripts/routes/index')); +app.use('/user', require('./scripts/routes/user')); +app.use(express.static(__dirname)); + + +const PORT = process.env.PORT || 3000; + +app.listen(PORT, console.log(`Server started on port ${PORT}`)); diff --git a/campusmap.sql b/campusmap.sql index efd401d..874bdc7 100644 --- a/campusmap.sql +++ b/campusmap.sql @@ -108,6 +108,7 @@ INSERT INTO `images` (`location`, `link`) VALUES ('Nugent Hall', 'http://www.rpi.edu/dept/cct/apps/reslife/images/pictures/nugent1.jpg'), ('Experimental Media and Performing Arts Center at Rensselaer', 'http://empac.rpi.edu/sites/default/files/styles/empac_cms_slideshow__default/public/ESTO_AaronEsto_50.jpg?itok=9rVzDof9'); + -- -------------------------------------------------------- -- @@ -130,14 +131,19 @@ INSERT INTO `main` (`location`, `description`, `address`, `phone`) VALUES ('Academy Hall', 'Home to the Student Health Center, Bursar, and registrar. This building also includes an auditorium.', '110 8th St, Troy, NY 12180', 518), ('Admissions', 'This is where the admissions department is located at RPI.', '110 8th St, Troy, NY 12180', 518), ('Amos Eaton Hall', 'Home of the Mathematics Department and part of the Computer Science Department. Many Math and Computer science courses are taught inside. It is names after Amos Eaton, Co-Founder of RPI.', 'Amos Eaton Hall, 110 8th Street, Troy, NY, 12180', NULL), +('Anderson Field', 'Sports field on campus. Many other sports play here besides rugby', 'Sage Ave, Troy, NY 12180', NULL), ('Barton Hall', 'One of the residence halls on campus. Located on freshman hill.', '1999 Burdett Ave, Troy, NY 12180', NULL), ('Blitman Commons', 'Campus residence hall. Includes various ammenities such as a dining hall.', '1800 6th Ave, Troy, NY 12180', NULL), ('Bray Hall', 'One of the residence halls on campus. Located on freshman hill.', '1999 Burdett Ave, Troy, NY 12180', NULL), +('Cary Hall', 'One of the residence halls on campus. Located on freshman hill.', '1999 Burdett Ave, Troy, NY 12180', NULL), ('Carnegie Building', 'Academic building on campus.', '110 8th St, Troy, NY 12180', NULL), ('Center for Biotechnology and Interdisciplinary Studies', 'Research facility on campus. This is a popular destination for guest speakers on campus.', '1623 15th St, Troy, NY 12180', 518), ('Cogswell Laboratory', 'A chemistry-biology research center on campus. Recieves government funding from the National Science Foundation as well as the New York State Dormitory Authority.', '110 8th St, Troy, NY 12180', NULL), ('Commons Dining Hall', 'One of the main dining hills on campus. Located on freshman hill. The mailing center is also located in this building.', '1999 Burdett Ave, Troy, NY 12180', 518), +('Crockett Hall', 'One of the residence halls on campus. Located on freshman hill.', '1999 Burdett Ave, Troy, NY 12180', NULL), ('Darrin Communications Center', 'Main lecture hall on campus. Also where the CCPD has their office. This is the building where most large lectures are held.', '110 8th Street, Troy, NY, 12180', NULL), +('Davison Hall', 'One of the residence halls on campus. Located on freshman hill.', '1999 Burdett Ave, Troy, NY 12180', NULL), +('E-Complex', 'One of the residence halls on campus. Located on Sage Ave.', '110 8th St, Troy, NY 12180', NULL), ('Experimental Media and Performing Arts Center at Rensselaer', 'Alot of extracurricular activities happen here. The building includes a 1,200 seat concert hall and a 400 seat theater.', '44 8th St, Troy, NY 12180', 518), ('Folsom Library', 'The main library on campus. 4 floors of study spaces, bookshelves and even a cafe. A great place to study quietly.', '110 8th St, Troy, NY 12180', NULL), ('Greene Building', 'Academic building on campus. Home to the School of Architecture.', '110 8th St, Troy, NY 12180', NULL), @@ -150,12 +156,13 @@ INSERT INTO `main` (`location`, `description`, `address`, `phone`) VALUES ('Low Center for Industrial Innovation', 'Commonly known as the CII. Acadmic building on campus that has a number of larger academic buildings and auditoriums.', '110 8th St, Troy, NY 12180', NULL), ('Mueller Center', 'Fitness and wellness center on campus. This building has a gym that extends for two floors with various yoga and wellness classes offered on the third floor. This building also includes the armory and the campus swimming pools.', '110 8th St, Troy, NY 12180', 518), ('Nason Hall', 'One of the residence halls on campus. Located on freshman hill.', '1999 Burdett Ave, Troy, NY 12180', NULL), +('North Hall', 'One of the residence halls on campus. Located on Sage Ave.', '110 8th St, Troy, NY 12180', NULL), ('Nugent Hall', 'One of the residence halls on campus. Located on freshman hill.', '1999 Burdett Ave, Troy, NY 12180', NULL), ('Pittsburgh Building', 'Academic building on campus. Home of the Lally School of Management.', '110 8th St, Troy, NY 12180', 518), ('Public Safety', 'Home to the campus police.', '110 8th St, Troy, NY 12180', NULL), ('Rensselaer Union', 'Home to a number of different recreation centers, food courts, study rooms, and the campus store.', '110 8th St, Troy, NY 12180', 518), ('Rickets Building', 'Academic building on campus. Home to the Chemical Engineering Department.', '110 8th St, Troy, NY 12180', NULL), -('Rugby Field', 'Sports field on campus. Many other sports play here besides rugby', 'Sage Ave, Troy, NY 12180', NULL), +('Robinson Field', 'Sports field on campus. Mainly used for baseball', 'Eagle St, Troy, NY 12180', NULL), ('Russell Sage Laboratory', 'Academic building on campus. Home of the School of Humanities, Arts, and Social Sciences.', '110 8th St, Troy, NY 12180', NULL), ('Sage Dining Hall', 'One of the main dining halls on campus', '110 8th St, Troy, NY 12180', NULL), ('Sigma Phi Epsilon', 'Worst frat on campus, don\'t join!', '2005 15th St, Troy, NY 12180', NULL), diff --git a/config/auth.js b/config/auth.js new file mode 100644 index 0000000..efa4af4 --- /dev/null +++ b/config/auth.js @@ -0,0 +1,12 @@ +// check if user trying to access the admin panel is already loged in +// if the are not it redirects them to the login page +module.exports = { + ensureAuthenticated: function(req, res, next) { + if(req.isAuthenticated()){ + console.log("checking auth"); + return next(); + } + req.flash('error_msg', 'Please log in to view this resource'); + res.redirect('/user/login'); + } +} \ No newline at end of file diff --git a/config/keys.js b/config/keys.js new file mode 100644 index 0000000..86bd18e --- /dev/null +++ b/config/keys.js @@ -0,0 +1,13 @@ + +const path = require('path'); +require('dotenv').config({ path: path.resolve(__dirname, '../.env') }); + + +const user = process.env.DB_USER; +const pass = process.env.DB_PASS; +const uri = `mongodb+srv://${user}:${pass}@rpicampusmap-fwvzb.gcp.mongodb.net/test?retryWrites=true`; +const options = {useNewUrlParser: true}; + +module.exports = { + MongoURI: uri +} \ No newline at end of file diff --git a/config/passport.js b/config/passport.js new file mode 100644 index 0000000..5f8860e --- /dev/null +++ b/config/passport.js @@ -0,0 +1,45 @@ +const LocalStrategy = require('passport-local').Strategy; +const mogoose = require('mongoose'); +const bcrypt = require('bcryptjs'); + + +// Local user model +const User = require('../models/User'); + +module.exports = function(passport) { + passport.use( + new LocalStrategy({ usernameField: 'email'}, (email, password, done) => { + //Match User + User.findOne({email: email}) + .then(user => { + if(!user){ + return done(null, false, {message: 'That email is not registered'}); + } + // Match password + bcrypt.compare(password, user.password, (err, isMatch) =>{ + if(err)throw(err); + + if(isMatch){ + return done(null, user); + } else { + return done(null, false, { message: 'Password Incorrect'}) + } + }); + }) + .catch(err => { + console.log("error in auth"); + console.log(err); + }) + }) + ); + + passport.serializeUser((user, done) => { + done(null, user.id); + }); + + passport.deserializeUser((id, done) => { + User.findById(id, (err, user) => { + done(err, user); + }); + }); +} \ No newline at end of file diff --git a/css/admin.css b/css/admin.css new file mode 100644 index 0000000..5f1c740 --- /dev/null +++ b/css/admin.css @@ -0,0 +1,5 @@ +html, body{ + height: 100%; + width: 100%; + padding: 0%; +} \ No newline at end of file diff --git a/public/style/homepage.css b/css/homepage.css similarity index 52% rename from public/style/homepage.css rename to css/homepage.css index f7d3237..1ec0b9f 100644 --- a/public/style/homepage.css +++ b/css/homepage.css @@ -1,33 +1,47 @@ body { background-color: #000000; height: 100%; + width: 100%; margin: 0; padding: 0; } a { - text-decoration: none; + text-decoration: none; +} + +footer a { + text-decoration: underline; + color: inherit; } #mapPopup { background-color: #ffffff; - min-height: 88%; + min-height: 85%; width: 80%; margin: auto; } #mapPopupInfo { background-color: #ffffff; - min-height: 88%; + min-height: 85%; width: 100%; margin: auto; } -/* Always set the map height explicitly to define the size of the div - * element that contains the map. */ +map-page { + height: 100%; + position: absolute; + min-height: 100%; + top: 0; + bottom: 0; + left: 0; + right: 0; +} + #mapContainer { - height: 85%; - width: 100%; + height: 100%; + min-height: 100%; } .popup:hover { diff --git a/css/layout.css b/css/layout.css new file mode 100644 index 0000000..428c285 --- /dev/null +++ b/css/layout.css @@ -0,0 +1,7 @@ +html, body { + background-color: #000000; + height: 100%; + width: 100%; + margin: 0%; + padding: 0%; +} \ No newline at end of file diff --git a/css/layout2.css b/css/layout2.css new file mode 100644 index 0000000..d1471df --- /dev/null +++ b/css/layout2.css @@ -0,0 +1,26 @@ +html, body { + background-color: #e6e6e6; + height: 100%; + width: 100%; + margin: 0%; + padding: 0%; +} + +a { + color: white; +} + +#footerText{ + color: white; +} + +#footer { + bottom: 0%; + position: relative; +} + +.mainContent { + display: flex; + flex-direction: column; + position: relative; +} diff --git a/public/style/locationInfo.css b/css/locationInfo.css similarity index 57% rename from public/style/locationInfo.css rename to css/locationInfo.css index 810a70b..6659df9 100644 --- a/public/style/locationInfo.css +++ b/css/locationInfo.css @@ -6,3 +6,11 @@ width: 100%; background-color: beige; } + +#photos { + height: 50vh; +} + +#photos img { + max-height: 100%; +} diff --git a/css/login.css b/css/login.css new file mode 100644 index 0000000..466872e --- /dev/null +++ b/css/login.css @@ -0,0 +1,16 @@ +html, body{ + height: 100%; + width: 100%; + padding: 0%; +} + +.background{ + background-color: black; +} + +#get_acc a{ + color: rgb(78, 119, 1); +} + + + diff --git a/css/register.css b/css/register.css new file mode 100644 index 0000000..5f1c740 --- /dev/null +++ b/css/register.css @@ -0,0 +1,5 @@ +html, body{ + height: 100%; + width: 100%; + padding: 0%; +} \ No newline at end of file diff --git a/css/searchResults.css b/css/searchResults.css new file mode 100644 index 0000000..5f17bd6 --- /dev/null +++ b/css/searchResults.css @@ -0,0 +1,6 @@ +body { + height: 100%; + width: 100%; + margin: 0; + padding: 0; +} \ No newline at end of file diff --git a/public/style/style.css b/css/style.css similarity index 64% rename from public/style/style.css rename to css/style.css index f386500..712bf51 100644 --- a/public/style/style.css +++ b/css/style.css @@ -1,9 +1,11 @@ html, body { height: 100%; + overflow: auto; } main { min-height: 81vh; + padding-bottom: 4em; } header { @@ -13,9 +15,13 @@ header { } footer { - max-height: 11vh; - max-width: 100%; + font-size: small; + /* position: absolute; */ + bottom: 0; + width: 100%; + /* height: 4em; */ color: #eeeeee; + z-index: 950; } footer a { @@ -37,3 +43,14 @@ footer a { font-size: 3.5rem; } } + +#seal { + float: left; + clear: none; + height: 3em; + width: 3em; +} + +#footerText { + margin: 0 3em 0 0; +} diff --git a/css/welcome.css b/css/welcome.css new file mode 100644 index 0000000..4e874fa --- /dev/null +++ b/css/welcome.css @@ -0,0 +1,41 @@ +html, body { + width: 100%; + height: 100%; +} + +.wrapper{ + width: 100%; + height: 100%; + justify-content: center; +} + + +.background{ + position: absolute; + background-image: url("/images/rpi_image.jpg"); + background-repeat: no-repeat; + background-position: center; + background-attachment: fixed; + background-size:cover; + -webkit-filter: blur(5px); + -moz-filter: blur(5px); + -o-filter: blur(5px); + -ms-filter: blur(5px); + filter: blur(5px); + + height: 100%; + width: 100%; +} + + +#main_img{ + justify-content: center; + width: 100%; + height: 100%; + z-index: 10; +}; + +.card-body{ + justify-content: center; + width: 10%; +}; diff --git a/geolocations.json b/geolocations.json index beb1f5b..256fa36 100644 --- a/geolocations.json +++ b/geolocations.json @@ -986,22 +986,6 @@ "coordinates": [-73.680893, 42.732037] } }, - { - "type": "Feature", - "_id": "alumni", - "id": "alumni", - "properties": { - "name": "Heffner Alumni House", - "nick": "Heffner Alumni House", - "category": "Operations & Administration", - "description": "alumni events", - "popupContent": "Alumni House (Heffner)" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.678216, 42.732883] - } - }, { "type": "Feature", "_id": "boiler11", diff --git a/public/images/campusmap_logo.png b/images/campusmap_logo.png similarity index 100% rename from public/images/campusmap_logo.png rename to images/campusmap_logo.png diff --git a/public/images/favicon.ico b/images/favicon.ico similarity index 100% rename from public/images/favicon.ico rename to images/favicon.ico diff --git a/public/images/logo.png b/images/logo.png similarity index 100% rename from public/images/logo.png rename to images/logo.png diff --git a/public/images/pin-128x128.png b/images/pin-128x128.png similarity index 100% rename from public/images/pin-128x128.png rename to images/pin-128x128.png diff --git a/public/images/pin-144x144.png b/images/pin-144x144.png similarity index 100% rename from public/images/pin-144x144.png rename to images/pin-144x144.png diff --git a/public/images/pin-152x152.png b/images/pin-152x152.png similarity index 100% rename from public/images/pin-152x152.png rename to images/pin-152x152.png diff --git a/public/images/pin-192x192.png b/images/pin-192x192.png similarity index 100% rename from public/images/pin-192x192.png rename to images/pin-192x192.png diff --git a/public/images/pin-256x256.png b/images/pin-256x256.png similarity index 100% rename from public/images/pin-256x256.png rename to images/pin-256x256.png diff --git a/public/images/pin-512x512.png b/images/pin-512x512.png similarity index 100% rename from public/images/pin-512x512.png rename to images/pin-512x512.png diff --git a/public/images/pin.png b/images/pin.png similarity index 100% rename from public/images/pin.png rename to images/pin.png diff --git a/public/images/rensselaer_logo.png b/images/rensselaer_logo.png similarity index 100% rename from public/images/rensselaer_logo.png rename to images/rensselaer_logo.png diff --git a/images/rpi_image.jpg b/images/rpi_image.jpg new file mode 100644 index 0000000..89abfb3 Binary files /dev/null and b/images/rpi_image.jpg differ diff --git a/public/images/seal.png b/images/seal.png similarity index 100% rename from public/images/seal.png rename to images/seal.png diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..fabd20f --- /dev/null +++ b/manifest.json @@ -0,0 +1,48 @@ +{ + "dir" : "ltr", + "lang" : "English", + "name" : "RPI Campus Map", + "scope" : "/", + "display" : "fullscreen", + "start_url" : "https://rpicampusmap.glitch.me/", + "short_name" : "RPI Map", + "background_color": "#dc3545", + "theme_color": "#000000", + "description" : "RPI Interactive Campus Map", + "orientation" : "portrait", + "related_applications" : [""], + "prefer_related_applications" : false, + "generated" : "true", + "icons" : [ + { + "src": "/images/pin-128x128.png", + "sizes": "128x128", + "type": "image/png" + }, + { + "src": "/images/pin-144x144.png", + "sizes": "144x144", + "type": "image/png" + }, + { + "src": "/images/pin-152x152.png", + "sizes": "152x152", + "type": "image/png" + }, + { + "src": "/images/pin-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/images/pin-256x256.png", + "sizes": "256x256", + "type": "image/png" + }, + { + "src": "/images/pin-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} diff --git a/models/Locations.js b/models/Locations.js new file mode 100644 index 0000000..5c6dec3 --- /dev/null +++ b/models/Locations.js @@ -0,0 +1,49 @@ +const mongoose = require('mongoose'); + + +const LocationSchema = new mongoose.Schema({ + + _id: { + type: String, + require: true + }, + + id: { + type: String, + require: true + }, + properties: { + name: { + type: String, + require: true + }, + nick: { + type: String, + require: true + }, + category: { + type: String, + require: true + }, + description: { + type: String, + require: true + }, + popupContent:{ + type: String, + require: true + }, + }, + + geometry: { + type: String, + coordinates: { + type: Array, + require: true + } + } +}); + +const Location = mongoose.model('Location', LocationSchema); + +module.exports = Location; \ No newline at end of file diff --git a/models/User.js b/models/User.js new file mode 100644 index 0000000..5de158e --- /dev/null +++ b/models/User.js @@ -0,0 +1,24 @@ +const mongoose = require('mongoose'); + +const UserSchema = new mongoose.Schema({ + name: { + type: String, + require: true + }, + email: { + type: String, + require: true + }, + password: { + type: String, + require: true + }, + date: { + type: Date, + default: Date.now + } +}); + +const User = mongoose.model('User', UserSchema); + +module.exports = User; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 074dcd9..1065c10 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,20 +4,63 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + }, + "dependencies": { + "mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" + }, + "mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "requires": { + "mime-db": "1.40.0" + } + } } }, + "acorn": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", + "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==" + }, + "acorn-jsx": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", + "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==" + }, "ajv": { "version": "6.10.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", @@ -29,6 +72,31 @@ "uri-js": "^4.2.2" } }, + "angular": { + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/angular/-/angular-1.7.9.tgz", + "integrity": "sha512-5se7ZpcOtu0MBFlzGv5dsM1quQDoDeUTwZrWjGtTNA7O88cD8TEk5IEKCTDa3uECV9XnvKREVUr7du1ACiWGFQ==" + }, + "angular-animate": { + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/angular-animate/-/angular-animate-1.7.9.tgz", + "integrity": "sha512-fV+AISy/HTzurQH2ngsJg+lLIvfu0ahc1h4AYKauaXVw97rZc2k4iUA1bMstiEyClsdayQX568kjQc1NK+oYhw==" + }, + "angular-mocks": { + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/angular-mocks/-/angular-mocks-1.7.9.tgz", + "integrity": "sha512-LQRqqiV3sZ7NTHBnNmLT0bXtE5e81t97+hkJ56oU0k3dqKv1s6F+nBWRlOVzqHWPGFOiPS8ZJVdrS8DFzHyNIA==" + }, + "angular-resource": { + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/angular-resource/-/angular-resource-1.7.9.tgz", + "integrity": "sha512-rXXhCE2qT31Pn4Sl+2XL+ntv4zxnA2OzY+clCl8/pOp/s/gIzxpQlEtXipo3QK8Qur3glbIkeF/bJw+gjVAdUw==" + }, + "angular-route": { + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/angular-route/-/angular-route-1.7.9.tgz", + "integrity": "sha512-vRoj5hzdQtWbODhWJqDzD1iNOEfCKshO6GFBuPVV7RHlPjzIc4R2dHCc7Qiv/8F3LDxJDohc6vSnTDMLHuaqeA==" + }, "ansi-align": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", @@ -37,6 +105,14 @@ "string-width": "^2.0.0" } }, + "ansi-escapes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", + "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", + "requires": { + "type-fest": "^0.8.1" + } + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", @@ -69,6 +145,14 @@ } } }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", @@ -112,6 +196,11 @@ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" + }, "async-each": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", @@ -200,26 +289,43 @@ "tweetnacl": "^0.14.3" } }, + "bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms=" + }, "binary-extensions": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + }, "body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", "requires": { - "bytes": "3.0.0", + "bytes": "3.1.0", "content-type": "~1.0.4", "debug": "2.6.9", "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "dependencies": { + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + } } }, "boxen": { @@ -278,9 +384,9 @@ "integrity": "sha512-jCGVYLoYMHDkOsbwJZBCqwMHyH4c+wzgI9hG7Z6SZJRXWr+x58pdIbm2i9a/jFGCkRJqRUr8eoI7lDWa0hTkxg==" }, "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" }, "cache-base": { "version": "1.0.1", @@ -298,6 +404,11 @@ "unset-value": "^1.0.0" } }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + }, "camelcase": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", @@ -323,6 +434,11 @@ "supports-color": "^5.3.0" } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + }, "chokidar": { "version": "2.1.6", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.6.tgz", @@ -373,6 +489,19 @@ "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=" }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" + }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -426,10 +555,18 @@ "xdg-basedir": "^3.0.0" } }, + "connect-flash": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/connect-flash/-/connect-flash-0.1.1.tgz", + "integrity": "sha1-2GMPJtlaf4UfmVax6MxnMvO2qjA=" + }, "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } }, "content-type": { "version": "1.0.4", @@ -437,9 +574,9 @@ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" }, "cookie-signature": { "version": "1.0.6", @@ -505,6 +642,11 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -557,6 +699,14 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "requires": { + "esutils": "^2.0.2" + } + }, "dot-prop": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", @@ -589,6 +739,16 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, + "ejs": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", + "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -604,6 +764,178 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, + "eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "requires": { + "is-glob": "^4.0.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==" + } + } + }, + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==" + }, + "espree": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", + "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", + "requires": { + "acorn": "^7.1.0", + "acorn-jsx": "^5.1.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -656,40 +988,79 @@ } }, "express": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", - "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", "requires": { - "accepts": "~1.3.5", + "accepts": "~1.3.7", "array-flatten": "1.1.1", - "body-parser": "1.18.3", - "content-disposition": "0.5.2", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", "content-type": "~1.0.4", - "cookie": "0.3.1", + "cookie": "0.4.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "~1.1.2", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.1.1", + "finalhandler": "~1.1.2", "fresh": "0.5.2", "merge-descriptors": "1.0.1", "methods": "~1.1.2", "on-finished": "~2.3.0", - "parseurl": "~1.3.2", + "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.4", - "qs": "6.5.2", - "range-parser": "~1.2.0", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", "safe-buffer": "5.1.2", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" + }, + "dependencies": { + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + } + } + }, + "express-ejs-layouts": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/express-ejs-layouts/-/express-ejs-layouts-2.5.0.tgz", + "integrity": "sha512-27Kza3FR8UqvQsq1ewaxC2IwpgrQttYDEFN5s8D74Fv1VPdzsXFWsiKhPMlNauG+DrgMAmh7FhQl5hKHffd+wQ==" + }, + "express-session": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.17.0.tgz", + "integrity": "sha512-t4oX2z7uoSqATbMfsxWMbNjAL0T5zpvcJCk3Z9wnPPN7ibddhnmDZXHfEcoBMG2ojKXZoCyPMc5FbtK+G7SoDg==", + "requires": { + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-headers": "~1.0.2", + "parseurl": "~1.3.3", + "safe-buffer": "5.2.0", + "uid-safe": "~2.1.5" + }, + "dependencies": { + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + } } }, "extend": { @@ -716,6 +1087,26 @@ } } }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } + } + }, "extglob": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", @@ -790,6 +1181,27 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "figures": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", + "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "requires": { + "flat-cache": "^2.0.1" + } + }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -812,19 +1224,34 @@ } }, "finalhandler": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", "unpipe": "~1.0.0" } }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", + "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==" + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -863,6 +1290,11 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, "fsevents": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", @@ -880,7 +1312,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -898,11 +1331,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -915,15 +1350,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -1026,7 +1464,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -1036,6 +1475,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1048,17 +1488,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -1075,6 +1518,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -1147,7 +1591,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -1157,6 +1602,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -1232,7 +1678,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -1262,6 +1709,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -1279,6 +1727,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -1317,14 +1766,21 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true + "bundled": true, + "optional": true } } }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + }, "get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", @@ -1343,6 +1799,19 @@ "assert-plus": "^1.0.0" } }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, "glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", @@ -1370,6 +1839,14 @@ "ini": "^1.3.4" } }, + "globals": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", + "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "requires": { + "type-fest": "^0.8.1" + } + }, "got": { "version": "6.7.1", "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", @@ -1442,14 +1919,15 @@ } }, "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", "requires": { "depd": "~1.1.2", "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" } }, "http-signature": { @@ -1463,18 +1941,39 @@ } }, "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "requires": { "safer-buffer": ">= 2.1.2 < 3" } }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + }, "ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=" }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + } + } + }, "import-lazy": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", @@ -1485,6 +1984,15 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", @@ -1495,10 +2003,77 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, + "inquirer": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.3.tgz", + "integrity": "sha512-+OiOVeVydu4hnCGLCSX+wedovR/Yzskv9BFqUNNKq9uU2qg7LCcCo3R86S2E7WLo0y/x2pnEZfZe1CoYnORUAw==", + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^2.4.2", + "cli-cursor": "^3.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", + "run-async": "^2.2.0", + "rxjs": "^6.5.3", + "string-width": "^4.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + } + } + } + } + }, "ipaddr.js": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", - "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", + "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" }, "is-accessor-descriptor": { "version": "0.1.6", @@ -1650,6 +2225,11 @@ "isobject": "^3.0.1" } }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + }, "is-redirect": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", @@ -1695,6 +2275,20 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", @@ -1710,6 +2304,11 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -1726,6 +2325,11 @@ "verror": "1.10.0" } }, + "kareem": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.1.tgz", + "integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==" + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -1739,6 +2343,20 @@ "package-json": "^4.0.0" } }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, "lowercase-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", @@ -1816,9 +2434,9 @@ } }, "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { "version": "1.38.0", @@ -1833,6 +2451,11 @@ "mime-db": "~1.38.0" } }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -1847,9 +2470,9 @@ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" @@ -1865,6 +2488,21 @@ } } }, + "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=" + } + } + }, "mongodb": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.2.3.tgz", @@ -1885,11 +2523,84 @@ "saslprep": "^1.0.0" } }, + "mongoose": { + "version": "5.8.1", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.8.1.tgz", + "integrity": "sha512-8Cffl52cMK2iBlpLipoRKW/RdrhkxvVzXsy+xVsfbKHQBCWkFiS0T0jU4smYzomTMP4gW0sReJoRA7Gu/7VVgQ==", + "requires": { + "bson": "~1.1.1", + "kareem": "2.3.1", + "mongodb": "3.3.5", + "mongoose-legacy-pluralize": "1.0.2", + "mpath": "0.6.0", + "mquery": "3.2.2", + "ms": "2.1.2", + "regexp-clone": "1.0.0", + "safe-buffer": "5.1.2", + "sift": "7.0.1", + "sliced": "1.0.1" + }, + "dependencies": { + "mongodb": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.3.5.tgz", + "integrity": "sha512-6NAv5gTFdwRyVfCz+O+KDszvjpyxmZw+VlmqmqKR2GmpkeKrKFRv/ZslgTtZba2dc9JYixIf99T5Gih7TIWv7Q==", + "requires": { + "bson": "^1.1.1", + "require_optional": "^1.0.1", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "mongoose-legacy-pluralize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", + "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" + }, + "mpath": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.6.0.tgz", + "integrity": "sha512-i75qh79MJ5Xo/sbhxrDrPSEG0H/mr1kcZXJ8dH6URU5jD/knFxCVqVC/gVSW7GIXL/9hHWlT9haLbCXWOll3qw==" + }, + "mquery": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.2.tgz", + "integrity": "sha512-XB52992COp0KP230I3qloVUbkLUxJIu328HBP2t2EsxSFtf4W1HPSOBWOXf1bqxK4Xbb66lfMJ+Bpfd9/yZE1Q==", + "requires": { + "bluebird": "3.5.1", + "debug": "3.1.0", + "regexp-clone": "^1.0.0", + "safe-buffer": "5.1.2", + "sliced": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + }, "nan": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", @@ -1914,10 +2625,20 @@ "to-regex": "^3.0.1" } }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + }, "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "nodemon": { "version": "1.19.1", @@ -2029,6 +2750,45 @@ "ee-first": "1.1.1" } }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -2045,16 +2805,46 @@ "semver": "^5.1.0" } }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "requires": { + "callsites": "^3.0.0" + } + }, "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" }, + "passport": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/passport/-/passport-0.4.1.tgz", + "integrity": "sha512-IxXgZZs8d7uFSt3eqNjM9NQ3g3uQCW5avD8mRNoXV99Yig50vjuaez6dQK2qC0kVWPRTujxY0dWgGfT09adjYg==", + "requires": { + "passport-strategy": "1.x.x", + "pause": "0.0.1" + } + }, + "passport-local": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/passport-local/-/passport-local-1.0.0.tgz", + "integrity": "sha1-H+YyaMkudWBmJkN+O5BmYsFbpu4=", + "requires": { + "passport-strategy": "1.x.x" + } + }, + "passport-strategy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", + "integrity": "sha1-tVOaqPwiWj0a0XlHbd8ja0QPUuQ=" + }, "path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", @@ -2080,6 +2870,11 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, + "pause": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", + "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10=" + }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -2095,6 +2890,11 @@ "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, "prepend-http": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", @@ -2105,13 +2905,18 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" + }, "proxy-addr": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", - "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", + "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", "requires": { "forwarded": "~0.1.2", - "ipaddr.js": "1.8.0" + "ipaddr.js": "1.9.0" } }, "pseudomap": { @@ -2139,19 +2944,24 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, + "random-bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", + "integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs=" + }, "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, "raw-body": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", "unpipe": "1.0.0" } }, @@ -2199,6 +3009,16 @@ "safe-regex": "^1.1.0" } }, + "regexp-clone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", + "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==" + }, "registry-auth-token": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz", @@ -2277,11 +3097,44 @@ "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "requires": { + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", + "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", + "requires": { + "tslib": "^1.9.0" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -2323,9 +3176,9 @@ } }, "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", "requires": { "debug": "2.6.9", "depd": "~1.1.2", @@ -2334,29 +3187,36 @@ "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } } }, "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" + "parseurl": "~1.3.3", + "send": "0.17.1" } }, "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -2375,9 +3235,9 @@ } }, "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" }, "shebang-command": { "version": "1.2.0", @@ -2392,11 +3252,31 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, + "sift": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz", + "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" + }, "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=" + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -2533,6 +3413,11 @@ "extend-shallow": "^3.0.0" } }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -2569,9 +3454,9 @@ } }, "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, "string-width": { "version": "2.1.1", @@ -2616,6 +3501,58 @@ "has-flag": "^3.0.0" } }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "term-size": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", @@ -2624,11 +3561,29 @@ "execa": "^0.7.0" } }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -2667,6 +3622,11 @@ "repeat-string": "^1.6.1" } }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, "touch": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", @@ -2691,6 +3651,11 @@ } } }, + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -2704,13 +3669,49 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + }, "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "requires": { "media-typer": "0.3.0", - "mime-types": "~2.1.18" + "mime-types": "~2.1.24" + }, + "dependencies": { + "mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" + }, + "mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "requires": { + "mime-db": "1.40.0" + } + } + } + }, + "uid-safe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", + "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", + "requires": { + "random-bytes": "~1.0.0" } }, "undefsafe": { @@ -2722,35 +3723,14 @@ } }, "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "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.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.1", - "to-object-path": "^0.3.0" - } - } + "set-value": "^2.0.1" } }, "unique-string": { @@ -2870,6 +3850,11 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, + "v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==" + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -2901,6 +3886,24 @@ "string-width": "^2.1.1" } }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "requires": { + "mkdirp": "^0.5.1" + } + }, "write-file-atomic": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", diff --git a/package.json b/package.json index e586be3..74692e6 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,12 @@ "name": "rpicampusmap", "version": "1.0.0", "description": "An interactive map for the Rensselaer Polytechnic Institute campus.", - "main": "index.html", + "main": "app.js", "scripts": { - "start": "nodemon server.js", + "start": "node app.js", + "dev": "nodemon app.js", + "lint": "eslint --ext .js,.ts \"./\"", + "lint-fix": "eslint --fix --ext .js,.ts \"./\"", "test": "ECHO \"no test command found\"; exit(1);" }, "repository": { @@ -21,10 +24,26 @@ }, "homepage": "https://github.com/gaskij/rpicampusmap#readme", "dependencies": { + "angular": "^1.7.9", + "angular-animate": "^1.7.9", + "angular-mocks": "^1.7.9", + "angular-resource": "^1.7.9", + "angular-route": "^1.7.9", + "bcryptjs": "^2.4.3", + "connect-flash": "^0.1.1", "dotenv": "^7.0.0", - "express": "^4.16.4", + "ejs": "^2.7.4", + "express": "^4.17.1", + "express-ejs-layouts": "^2.5.0", + "express-session": "^1.17.0", "mongodb": "^3.2.3", + "mongoose": "^5.8.1", "nodemon": "^1.19.1", + "passport": "^0.4.1", + "passport-local": "^1.0.0", "request": "^2.88.0" + }, + "devDependencies": { + "eslint": "^6.8.0" } -} \ No newline at end of file +} diff --git a/public/controllers/admin.js b/public/controllers/admin.js deleted file mode 100644 index 802e57e..0000000 --- a/public/controllers/admin.js +++ /dev/null @@ -1,39 +0,0 @@ -app.controller('infoController', function($scope, $http) { - console.log("infoController activated!"); - - const location = getParams(); - console.log(location); - - $http.post(`/info?loc=${location.loc}`, {query: location.loc}) - .then(function(httpResponse, err) { - if (err) throw err; - console.log(httpResponse.data); - - $scope.id = location.loc; - $scope.name = httpResponse.data[0].properties.name; - $scope.nick = 'Nicknames: ' + httpResponse.data[0].properties.nick; - $scope.desc = httpResponse.data[0].properties.description; - }); - - $scope.comment = function(title, body) { - if (!title || !body) return; - - let data = { - comment: { - title: title, - body: body - } - }; - - console.log(data); - - $http.post(`/info?loc=${location.loc}`, data) - .then(function(httpResponse, err) { - if (err) throw err; - console.log(httpResponse.data); - - $scope.cmtTitle = ""; - $scope.cmtBody = ""; - }); - } -}); diff --git a/public/controllers/mapController.js b/public/controllers/mapController.js deleted file mode 100644 index b302fa6..0000000 --- a/public/controllers/mapController.js +++ /dev/null @@ -1,47 +0,0 @@ -app.controller('mapController', function($scope, $http) { - console.log("mapController activated!"); - - const parameters = getParams(); - console.log(parameters); - const location = parameters.loc; - $scope.isMachine = parameters.machine; - - if (parameters != null) { - $http.post(`/index?loc=${location}`, {query: location, machine: $scope.isMachine}) - .then(function(httpResponse, err) { - if (err) throw err; - console.log(httpResponse.data); - - $scope.name = httpResponse.data[0].properties.name; - $scope.nick = `Nicknames: ${httpResponse.data[0].properties.nick}`; - $scope.desc = httpResponse.data[0].properties.description; - - let latitude = httpResponse.data[0].geometry.coordinates[1]; - let longitude = httpResponse.data[0].geometry.coordinates[0]; - - let newPopupContent = ''; - if (httpResponse.data[0].properties.type == "machine") { - newPopupContent += `` - } - else { - console.log(httpResponse.data[0].properties.type); - newPopupContent += ``; - } - newPopupContent += ` - \ - \ - `; - - mymap.setView([latitude, longitude], 19); - let marker = L.marker([latitude, longitude]); - marker.addTo(mymap).bindPopup(newPopupContent).openPopup(); - // mymap.on('click', marker.remove()); - - }); - } - -}); diff --git a/public/geolocations.js b/public/geolocations.js deleted file mode 100644 index 713689f..0000000 --- a/public/geolocations.js +++ /dev/null @@ -1,1308 +0,0 @@ -/* -Each point on the map is a "Feature" type object. These Features -specifically are "Points" that show on the map. -There are many methods that can be used on points, described here: -https://leafletjs.com/reference-1.3.4.html#point - -**IMPORTANT** -**Coordinates for Point objects are used backwards (long, lat) -for some reason according to the API** -*/ - -var locations = { - "type": "FeatureCollection", - "features": [ - { - "type": "Feature", - "_id": "amos", - "id": "amos", - "properties": { - "name": "Amos Eaton Hall", - "nick": "JEC", - "category": "Academic & Research", - "description": "Math/CS Department", - "popupContent": "Amos Eaton" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.682596, 42.730189] - } - }, - { - "type": "Feature", - "_id": "carn", - "id": "carn", - "properties": { - "name": "Carnegie Building", - "nick": "CARNEG", - "category": "Academic & Research", - "description": "CogSci Department", - "popupContent": "Carnegie Building" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.68321, 42.730448] - } - }, - { - "type": "Feature", - "_id": "cbis", - "id": "cbis", - "properties": { - "name": "Center for Biotechnology and Interdisciplinary Studies", - "nick": "CBIS", - "category": "Academic & Research", - "description": "Biotech Building", - "popupContent": "Center for Biotechnology and Interdisciplinary Studies" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.678419, 42.728252] - } - }, - { - "type": "Feature", - "_id": "cogs", - "id": "cogs", - "properties": { - "name": "Cogswell Laboratory", - "nick": "Cogswell", - "category": "Academic & Research", - "description": "Science Laboratory", - "popupContent": "Cogswell Laboratory" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.681343, 42.728189] - } - }, - { - "type": "Feature", - "_id": "dcc", - "id": "dcc", - "properties": { - "name": "Darrin Communications Center", - "nick": "DCC, DARRIN", - "category": "Academic & Research", - "amenity": "CCPD, Starbucks, DCC Cafe", - "description": "One of the main lecture hall buildings on campus.", - "popupContent": "Darrin Communications Center" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.679059, 42.729226] - } - }, - { - "type": "Feature", - "_id": "empire", - "id": "empire", - "properties": { - "name": "Empire State Hall", - "nick": "Empire", - "category": "Academic & Research", - "description": "Building housing Cogswell Lab and Engineering department", - "popupContent": "Empire State Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.68217, 42.728373] - } - }, - { - "type": "Feature", - "_id": "empac", - "id": "empac", - "properties": { - "name": "Experimental Media and Performing Arts Center at Rensselaer", - "nick": "EMPAC", - "category": "Academic & Research", - "description": "Performing Arts", - "popupContent": "Experimental Media & Performing Arts Center" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.683828, 42.728883] - } - }, - { - "type": "Feature", - "_id": "lib", - "id": "lib", - "properties": { - "name": "Folsom Library", - "nick": "FOLSOM, LIB", - "category": "Academic & Research", - "amenity": "Observatory, Library Cafe", - "description": "Engineering Department", - "popupContent": "Folsom Library" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.682654, 42.729408] - } - }, - { - "type": "Feature", - "_id": "greene", - "id": "greene", - "properties": { - "name": "Greene Building", - "nick": "Greene", - "category": "Academic & Research", - "description": "Houses the Department of Architecture", - "popupContent": "Greene Building" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.681216, 42.730023] - } - }, - { - "type": "Feature", - "_id": "jec", - "id": "jec", - "properties": { - "name": "Jonsson Engineering Center", - "nick": "JEC", - "category": "Academic & Research", - "description": "Engineering Department", - "popupContent": "Jonsson Engineering Center" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.6804, 42.72957] - } - }, - { - "type": "Feature", - "_id": "jrowl", - "id": "jrowl", - "properties": { - "name": "Jonsson Rowland Science Center", - "nick": "J-ROWL, JROWL", - "category": "Academic & Research", - "description": "Science Building", - "popupContent": "Jonsson-Rowland Science Center" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.680432, 42.728776] - } - }, - { - "type": "Feature", - "_id": "lally", - "id": "lally", - "properties": { - "name": "Lally Hall", - "nick": "LALLY", - "category": "Academic & Research", - "description": "IT Department", - "popupContent": "Lally Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.681929, 42.73007] - } - }, - { - "type": "Feature", - "_id": "linac", - "id": "linac", - "properties": { - "name": "LINAC Facility (Gaerttner Laboratory)", - "nick": "LINAC", - "category": "Academic & Research", - "description": "What even is this bro lol", - "popupContent": "LINAC Facility" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.662296, 42.732647] - } - }, - { - "type": "Feature", - "_id": "cii", - "id": "cii", - "properties": { - "name": "Low Center for Industrial Innovation", - "nick": "LOW, CII", - "nicknames": ["low", "cii"], - "category": "Academic & Research", - "description": "Right side of the DCC", - "popupContent": "Low Center for Industrial Innovation" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.67921, 42.729732] - } - }, - { - "type": "Feature", - "_id": "mrc", - "id": "mrc", - "properties": { - "name": "Materials Research Center", - "nick": "MRC", - "category": "Academic & Research", - "description": "Right side of the DCC", - "popupContent": "Low Center for Industrial Innovation" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.682706, 42.72849] - } - }, - { - "type": "Feature", - "_id": "pitt", - "id": "pitt", - "properties": { - "name": "Pittsburgh Building", - "nick": "PITT", - "category": "Academic & Research", - "description": "Business Building", - "popupContent": "Pittsburgh Building" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.683313, 42.731174] - } - }, - { - "type": "Feature", - "_id": "rick", - "id": "rick", - "properties": { - "name": "Ricketts Building", - "nick": "Ricketts, RIC", - "category": "Academic & Research", - "description": "Who knows what's in here", - "popupContent": "Ricketts Building" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.679757, 42.730906] - } - }, - { - "type": "Feature", - "_id": "sage", - "id": "sage", - "properties": { - "name": "Russell Sage Laboratory", - "nick": "SAGE, RIC", - "category": "Academic & Research", - "amenity": "Sage Beanery", - "description": "Second biggest lecture hall on campus, not to be confused with Sage Dining Hall.", - "popupContent": "Russell Sage Laboratory" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.681671, 42.730898] - } - }, - { - "type": "Feature", - "_id": "walk", - "id": "walk", - "properties": { - "name": "Walker Laboratory", - "nick": "WALKER", - "category": "Academic & Research", - "description": "Biochem laboratory building", - "popupContent": "Walker Laboratory" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.682562, 42.730863] - } - }, - { - "type": "Feature", - "_id": "west", - "id": "west", - "properties": { - "name": "West Hall", - "nick": "WEST", - "category": "Academic & Research", - "description": "Halfway down the hill, dumb far and haunted", - "popupContent": "West Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.683146, 42.731702] - } - }, - { - "type": "Feature", - "_id": "winslow", - "id": "winslow", - "properties": { - "name": "Winslow Building", - "nick": "Winslow", - "category": "Academic & Research", - "description": "Who knows what's in here", - "popupContent": "Winslow Building" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.684296, 42.730929] - } - }, - { - "type": "Feature", - "_id": "87", - "id": "87", - "properties": { - "name": "87 Gymnasium", - "nick": "87", - "category": "Student Life", - "description": "Open gyms for clubs or recreation", - "popupContent": "87 Gymnasium" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.67879, 42.73078] - } - }, - { - "type": "Feature", - "_id": "acad", - "id": "acad", - "properties": { - "name": "Academy Hall", - "nick": "ACADMY", - "category": "Student Life", - "amenity": "Student Health Center, Registrar, Bursar, Financial Aid, Student Success Office", - "description": "Various offices and the Academy Hall Auditorium", - "popupContent": "Academy Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.678715, 42.727454] - } - }, - { - "type": "Feature", - "_id": "asrc", - "id": "asrc", - "properties": { - "name": "Alumni Sports & Recreation Center", - "nick": "ASRC", - "category": "Student Life", - "description": "???", - "popupContent": "Alumni Sports & Recreation Center" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.676878, 42.728467] - } - }, - { - "type": "Feature", - "_id": "anderson", - "id": "anderson", - "properties": { - "name": "Anderson Field", - "nick": "Rugby Field", - "category": "Student Life", - "description": "Used for rugby practice", - "popupContent": "Anderson Field" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.666956, 42.734426] - } - }, - { - "type": "Feature", - "_id": "chapel", - "id": "chapel", - "properties": { - "name": "Chapel + Cultural Center", - "nick": "Chapel", - "category": "Student Life", - "description": "On campus chapel", - "popupContent": "Chapel + Cultural Center" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.672276, 42.731818] - } - }, - { - "type": "Feature", - "_id": "commons", - "id": "commons", - "properties": { - "name": "Commons Dining Hall", - "nick": "Commons", - "category": "Student Life", - "description": "Largest dining hall on campus", - "popupContent": "Commons Dining Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.674332, 42.728289] - } - }, - { - "type": "Feature", - "_id": "ecav", - "id": "ecav", - "properties": { - "name": "East Campus Athletic Village Arena", - "nick": "ECAV", - "category": "Student Life", - "description": "Official basketball, volleyball courts", - "popupContent": "East Campus Athletic Village Arena (ECAV)" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.66743, 42.732301] - } - }, - { - "type": "Feature", - "_id": "ecavstad", - "id": "ecavstad", - "properties": { - "name": "East Campus Athletic Village Stadium", - "nick": "ECAV Stadium", - "category": "Student Life", - "description": "Official football field", - "popupContent": "East Campus Athletic Village Stadium" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.666954, 42.733093] - } - }, - { - "type": "Feature", - "_id": "houston", - "id": "houston", - "properties": { - "name": "Houston Field House", - "nick": "field house", - "category": "Student Life", - "description": "hockey events", - "popupContent": "Houston Field House" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.669483, 42.732059] - } - }, - { - "type": "Feature", - "_id": "mueller", - "id": "mueller", - "properties": { - "name": "Mueller Center", - "nick": "Mueller", - "category": "Student Life", - "description": "Multi-story weight and workout gym", - "popupContent": "Mueller Center" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.676902, 42.728829] - } - }, - { - "type": "Feature", - "_id": "play", - "id": "play", - "properties": { - "name": "Rensselaer Playhouse", - "nick": "Playhouse", - "category": "Student Life", - "description": "Drama club, plays are held here", - "popupContent": "Rensselaer Playhouse" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.678227, 42.729227] - } - }, - { - "type": "Feature", - "_id": "radio", - "id": "radio", - "properties": { - "name": "Radio Club W2SZ", - "nick": "Radio", - "category": "Student Life", - "description": "RPI Student run radio station", - "popupContent": "Radio Club W2SZ" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.663192, 42.734229] - } - }, - { - "type": "Feature", - "_id": "union", - "id": "union", - "properties": { - "name": "Rensselaer Student Union", - "nick": "Union", - "category": "Student Life", - "amenity": "Rathskellar Dining (Cusato's Pizza, Collar City, Halal Shack, Thunder Mountain Curry), McNeil Room, Panera Bread, Union Games Room, Clubhouse Pub", - "description": "Oldest student run union blah blah blah", - "popupContent": "Rensselaer Student Union" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.676647, 42.729995] - } - }, - { - "type": "Feature", - "_id": "pool", - "id": "pool", - "properties": { - "name": "Robison Swimming Pool", - "nick": "Pool", - "category": "Student Life", - "description": "Multi-lane pool and open swim", - "popupContent": "Robison Swimming Pool" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.677313, 42.728007] - } - }, - { - "type": "Feature", - "_id": "sagedin", - "id": "sagedin", - "properties": { - "name": "Russell Sage Dining Hall", - "nick": "RSDH, Sage", - "category": "Student Life", - "amenity": "Sage-To-Go, Russell Sage Banquet Hall", - "description": "Dining hall on cmapus, not to be confused with Russell Sage Laboratory", - "popupContent": "Russell Sage Dining Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.678264, 42.729778] - } - }, - { - "type": "Feature", - "_id": "barton", - "id": "barton", - "properties": { - "name": "Barton Hall", - "nick": "Barton", - "category": "Student Housing", - "description": "Most recently renoved residence hall on Freshman Hill", - "popupContent": "Barton Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.674091, 42.729136] - } - }, - { - "type": "Feature", - "_id": "blitman", - "id": "blitman", - "properties": { - "name": "Blitman Commons", - "nick": "blitman", - "category": "Student Housing", - "description": "Residence Hall", - "popupContent": "Blitman Commons" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.685893, 42.731215] - } - }, - { - "type": "Feature", - "_id": "bray", - "id": "bray", - "properties": { - "name": "Bray Hall", - "nick": "Bray, Freshman Five, Freshman Hill", - "category": "Student Housing", - "description": "One of five identical housing buildings in the 'Freshman Five'", - "popupContent": "Bray Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.673686, 42.728713] - } - }, - { - "type": "Feature", - "_id": "bryck", - "id": "bryck", - "properties": { - "name": "Bryckwyck", - "nick": "Bryck", - "category": "Student Housing", - "description": "Iss brick", - "popupContent": "Bryckwyck" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.663865, 42.734785] - } - }, - { - "type": "Feature", - "_id": "barh", - "id": "barh", - "properties": { - "name": "Burdett Avenue Residence Hall", - "nick": "BARH, BAR-H", - "category": "Student Housing", - "description": "Residence Hall on ECAV with its own dining hall.", - "popupContent": "Burdett Avenue Residence Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.671231, 42.731026] - } - }, - { - "type": "Feature", - "_id": "colonie", - "id": "colonie", - "properties": { - "name": "Colonie Apartments", - "nick": "Colonie", - "category": "Student Housing", - "description": "Deep Residence Hall", - "popupContent": "Colonie Apartments" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.669785, 42.737063] - } - }, - { - "type": "Feature", - "_id": "hall", - "id": "hall", - "properties": { - "name": "Hall Hall", - "nick": "Hall Hall", - "category": "Student Housing", - "description": "Freshman Five Residence Hall", - "popupContent": "Hall Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.675048, 42.728552] - } - }, - { - "type": "Feature", - "_id": "nason", - "id": "nason", - "properties": { - "name": "Nason Hall", - "nick": "Nason", - "category": "Student Housing", - "description": "Residence Hall", - "popupContent": "Nason Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.673598, 42.727664] - } - }, - { - "type": "Feature", - "_id": "north", - "id": "north", - "properties": { - "name": "North Hall", - "nick": "North", - "category": "Student Housing", - "description": "Residence Hall", - "popupContent": "North Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.679844, 42.731357] - } - }, - { - "type": "Feature", - "_id": "nugent", - "id": "nugent", - "properties": { - "name": "Nugent Hall", - "nick": "Nugent", - "category": "Student Housing", - "description": "Residence Hall", - "popupContent": "Nugent Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.675031, 42.727411] - } - }, - { - "type": "Feature", - "_id": "poly", - "id": "poly", - "properties": { - "name": "Polytechnic Residence Commons", - "nick": "Poly", - "category": "Student Housing", - "description": "Residence Hall", - "popupContent": "Polytechnic Residence Commons" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.679528, 42.722276] - } - }, - { - "type": "Feature", - "_id": "quad", - "id": "quad", - "properties": { - "name": "Quadrangle Complex", - "nick": "Quad", - "category": "Student Housing", - "description": "Residence Hall", - "popupContent": "Quadrangle Complex" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.677616, 42.730189] - } - }, - { - "type": "Feature", - "_id": "rahpsa", - "id": "rahpsa", - "properties": { - "name": "Rensselaer Apartment Housing Project A", - "nick": "RAHPS A, RAHP", - "category": "Student Housing", - "description": "Residence Hall", - "popupContent": "Rensselaer Apartment Housing Project A" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.669557, 42.730833] - } - }, - { - "type": "Feature", - "_id": "rahpsb", - "id": "rahpsb", - "properties": { - "name": "Rensselaer Apartment Housing Project B", - "nick": "RAHPS B, RAHP", - "category": "Student Housing", - "description": "Residence Hall", - "popupContent": "Rensselaer Apartment Housing Project" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.665257, 42.734795] - } - }, - { - "type": "Feature", - "_id": "rousseau", - "id": "rousseau", - "properties": { - "name": "Rousseau Apartments", - "nick": "Rousseau, Stack, Stacwyck", - "category": "Student Housing", - "description": "Residence Hall", - "popupContent": "Rousseau Apartments (Stacwyck)" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.664306, 42.734362] - } - }, - { - "type": "Feature", - "_id": "sharp", - "id": "sharp", - "properties": { - "name": "Sharp Hall", - "nick": "Sharp", - "category": "Student Housing", - "description": "Residence Hall", - "popupContent": "Sharp Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.674582, 42.727008] - } - }, - { - "type": "Feature", - "_id": "stack", - "id": "stack", - "properties": { - "name": "Stacwyck Apartments", - "nick": "Staccc, Stack", - "category": "Student Housing", - "description": "The Thiccest Residence Hall", - "popupContent": "Blitman Commons" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.664715, 42.733772] - } - }, - { - "type": "Feature", - "_id": "warren", - "id": "warren", - "properties": { - "name": "Warren Hall", - "nick": "Warren", - "category": "Student Housing", - "description": "Residence Hall", - "popupContent": "Warren Hall" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.67525, 42.727911] - } - }, - { - "type": "Feature", - "_id": "williams", - "id": "williams", - "properties": { - "name": "Williams Apartments", - "nick": "Williams, Stack", - "category": "Student Housing", - "description": "Residence Hall", - "popupContent": "Williams Apartments" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.664544, 42.733971] - } - }, - { - "type": "Feature", - "_id": "exops", - "id": "exops", - "properties": { - "name": "2021 15th Street", - "nick": "Government & Community Relations, Media Relations", - "category": "Operations & Administration", - "description": "External Relations offices", - "popupContent": "2021 15th Street" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.676977, 42.732908] - } - }, - { - "type": "Feature", - "_id": "parking", - "id": "parking", - "properties": { - "name": "2144 Burdett Avenue", - "nick": "Parking Building", - "category": "Operations & Administration", - "description": "Go here for parking pass stuffs", - "popupContent": "2144 Burdett Avenue" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.671402, 42.732192] - } - }, - { - "type": "Feature", - "_id": "419th", - "id": "419th", - "properties": { - "name": "41 Ninth Street", - "nick": "41 Ninth Street", - "category": "Operations & Administration", - "description": "what even is this", - "popupContent": "41 Ninth Street" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.682864, 42.732476] - } - }, - { - "type": "Feature", - "_id": "admissions", - "id": "admissions", - "properties": { - "name": "Admissions Building", - "nick": "Admissions", - "category": "Operations & Administration", - "description": "Admissions office is located here", - "popupContent": "Admissions Building" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.675528, 42.730648] - } - }, - { - "type": "Feature", - "_id": "alumni", - "id": "alumni", - "properties": { - "name": "Heffner Alumni House", - "nick": "Heffner Alumni House", - "category": "Operations & Administration", - "description": "alumni events", - "popupContent": "Alumni House (Heffner)" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.678216, 42.732883] - } - }, - { - "type": "Feature", - "_id": "blaw", - "id": "blaw", - "properties": { - "name": "Blaw Knox 1 & 2", - "nick": "Blaw", - "category": "Operations & Administration", - "description": "Rusty building", - "popupContent": "Blaw Knox 1 & 2" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.680893, 42.732037] - } - }, - { - "type": "Feature", - "_id": "alumni", - "id": "alumni", - "properties": { - "name": "Heffner Alumni House", - "nick": "Heffner Alumni House", - "category": "Operations & Administration", - "description": "alumni events", - "popupContent": "Alumni House (Heffner)" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.678216, 42.732883] - } - }, - { - "type": "Feature", - "_id": "boiler11", - "id": "boiler11", - "properties": { - "name": "Boiler House, 11th Street", - "nick": "Boiler House", - "category": "Operations & Administration", - "description": "Non-Student Mail service", - "popupContent": "Boiler House, 11th Street" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.680229, 42.73268] - } - }, - { - "type": "Feature", - "_id": "boilersage", - "id": "boilersage", - "properties": { - "name": "Boiler House, Sage Avenue", - "nick": "Boiler House", - "category": "Operations & Administration", - "description": "Non-Student Mail service", - "popupContent": "Boiler House, Sage Avenue" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.681762, 42.73117] - } - }, - { - "type": "Feature", - "_id": "grad", - "id": "grad", - "properties": { - "name": "Graduate Education", - "nick": "Graduate Education", - "category": "Operations & Administration", - "description": "Graduate Education office building", - "popupContent": "Graduate Education" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.675926, 42.732659] - } - }, - { - "type": "Feature", - "_id": "grounds", - "id": "grounds", - "properties": { - "name": "Greenhouses and Grounds Barn", - "nick": "Greenhouses and Grounds Barn", - "category": "Operations & Administration", - "description": "Site for plants for Grounds crew", - "popupContent": "Greenhouses and Grounds Barn" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.66791, 42.728718] - } - }, - { - "type": "Feature", - "_id": "hbuild", - "id": "hbuild", - "properties": { - "name": "H Building", - "nick": "H Building", - "category": "Operations & Administration", - "description": "What is in here?", - "popupContent": "H Building" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.679231, 42.732592] - } - }, - { - "type": "Feature", - "_id": "jbuild", - "id": "jbuild", - "properties": { - "name": "J Building", - "nick": "J Building", - "category": "Operations & Administration", - "description": "Storage??", - "popupContent": "J Building" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.679803, 42.733148] - } - }, - { - "type": "Feature", - "_id": "patroon", - "id": "patroon", - "properties": { - "name": "Patroon Manor", - "nick": "Patroon Manor", - "category": "Operations & Administration", - "description": "Private property?", - "popupContent": "Patroon Manor" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.663714, 42.736883] - } - }, - { - "type": "Feature", - "_id": "pubsafe", - "id": "pubsafe", - "properties": { - "name": "Public Safety", - "nick": "pubsafe", - "category": "Operations & Administration", - "description": "pubsafe Building", - "popupContent": "Public Safety" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.677031, 42.729261] - } - }, - { - "type": "Feature", - "_id": "service", - "id": "service", - "properties": { - "name": "Service Building", - "nick": "Service", - "category": "Operations & Administration", - "description": "Various servicing services", - "popupContent": "Service Building" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.681052, 42.732793] - } - }, - { - "type": "Feature", - "_id": "troy", - "id": "troy", - "properties": { - "name": "Troy Building", - "nick": "TROY", - "category": "Operations & Administration", - "description": "Location of President Jackson's office", - "popupContent": "Troy Building" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.680525, 42.731029] - } - }, - { - "type": "Feature", - "_id": "vcc", - "id": "vcc", - "properties": { - "name": "Voorhees Computing Center", - "nick": "VCC", - "category": "Operations & Administration", - "description": "An old converted chapel, it is now the central building for all issues computer related", - "popupContent": "Voorhees Computing Center (VCC)" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.681755, 42.729231] - } - }, - { - "type": "Feature", - "_id": "garage", - "id": "garage", - "properties": { - "name": "College Ave Parking Garage", - "nick": "Parking Garage", - "category": "Operations & Administration", - "description": "Multilevel parking garage, located off College Ave, close to EMPAC", - "popupContent": "College Ave Parking Garage" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.681549, 42.727745] - } - }, - { - "type": "Feature", - "_id": "sigep", - "id": "sigep", - "properties": { - "name": "Sigma Phi Epsilon (ΣΦΕ)", - "nick": "SigEp, SPE", - "category": "Fraternity/Sorrority", - "description": "10/10 would recommend", - "popupContent": "Sigma Phi Epsilon (ΣΦΕ)" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.677091, 42.732331] - } - } - ] -}; - -/* -Locations: -ACADEMIC & RESEARCH -Amos Eaton Hall -Carnegie Building -Center for Biotechnology and Interdisciplinary Studies (CBIS) -Cogswell Laboratory -Darrin Communications Center -Empire State Hall -Experimental Media & Performing Arts Center (EMPAC) -Folsom Library -Greene Building -Jonsson Engineering Center (JEC) -Jonsson-Rowland Science Center -Lally Hall -LINAC Facility (Gaerttner Laboratory) -Low Center for Industrial Innovation (CII) -Materials Research Center (MRC) -Pittsburgh Building -Ricketts Building -Russell Sage Laboratory -Walker Laboratory -West Hall -Winslow Building - -STUDENT LIFE -87 Gymnasium -Academy Hall -Alumni Sports & Recreation Center -Chapel + Cultural Center -Commons Dining Hall -East Campus Athletic Village Arena (ECAV) -East Campus Athletic Village Stadium -Houston Field House -Mueller Center -Playhouse -Radio Club W2SZ -Rensselaer Union -Robison Swimming Pool -Russell Sage Dining Hall - -STUDENT HOUSING -Barton Hall -Blitman Commons -Bray Hall -Bryckwyck -Burdett Avenue Residence Hall -Colonie Apartments -Hall Hall -Nason Hall -North Hall -Nugent Hall -Polytechnic Residence Commons -Quadrangle Complex -Rensselaer Apartment Housing Project A -Rensselaer Apartment Housing Project B -Rousseau Apartments -Sharp Hall -Stacwyck Apartments -Warren Hall -Williams Apartments - -OPERATIONS & ADMINISTRATION -2021 15th Street -2144 Burdett Avenue -41 Ninth Street -Admissions -Alumni House (Heffner) -Blaw-Knox 1 & 2 -Boiler House, 11th Street -Boiler House, Sage Avenue -Graduate Education -Greenhouses and Grounds Barn -H Building -J Building -Patroon Manor -Public Safety -Service Building -Troy Building -Voorhees Computing Center (VCC) - -PARKING -Parking Garage -*/ diff --git a/public/imagePreview.js b/public/imagePreview.js deleted file mode 100644 index b98bf82..0000000 --- a/public/imagePreview.js +++ /dev/null @@ -1,11 +0,0 @@ -//Function to update the preview image for the image submission form -function updatePreview(){ - //get the image link - var link = $("#imageFormLink").val(); - //save the image into variable for optimization - var image = $("#imageFormPreview"); - //change the image link - image.attr('src',link); - //set the css to display the image - image.css("display", "block"); -} \ No newline at end of file diff --git a/public/machine_sites.js b/public/machine_sites.js deleted file mode 100644 index 40ece21..0000000 --- a/public/machine_sites.js +++ /dev/null @@ -1,201 +0,0 @@ -var locations_shops = { - "type": "FeatureCollection", - "features": [ - { - "type": "Feature", - "id": "jec_shop", - "properties": { - "name": "JEC Student Machines Shop", - "nick": "Processes Shop", - "thumbnail":"https://www.rpiviews.com/images/rpi/card00188_fr.jpg", - "description": "Machine Shop located in JEC", - "popupContent": "JEC Student Machines Shop", - "type": "machine" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.680042, 42.729716] - }, - "room": { - "hours": { - "mon":"9 a.m.-noon and 2-8 p.m.", - "tues":"9 a.m.—noon and 1-7 p.m. ", - "weds": "10 a.m.—1 p.m. and 2-8 p.m.", - "thurs":"9 a.m.—noon and 2-8 p.m.", - "fri":"8-11 a.m. and noon-3 p.m.", - "sat":"11 a.m. -3 p.m.,", - "sun":"2-6 p.m." - }, - "info": "All students who intend to use the machines in this room\n\ - must pass the SOE Safety Test Rensselaer Manufacturing and Prototyping\n\ - Laboratories-Safety Orientation listed on RPI HR Skillport Site. \n\ - They must show proof of taking and passing the class to shop supervisors.\n\ - Afterwards, all students are welcome to use the machines in the JEC Student Machines Shop.\n\ - No prior knowledge of machining is required. However, it is recommended\n\ - that students take Engineering Processes (ENGR 1300).", - "location": "Jonsson Engineering Center (JEC) 1010" - }, - "contents": { - "machines": ["Haas TL 1 CNC Lathe", "Acer 3-Axis CNC Milling Machine", - "Laguna Swift 4’x4’ CNC Router", "Thunder Mars90 100w laser Cutter", - "Snap-on Sandblaster", "General Machining and Fabrication Equipment", - "Metal and Plastic Forming and Shearing Equipment", - "Steel and Plastic Welding Equipment" ], - "available_materials": "", - "equipment": "" - } - }, - { - "type": "Feature", - "id": "ied_shop", - "properties": { - "name": "Design Lab/IED Shop", - "nick": "IED Shop", - "thumbnail": "", - "description": "Machine Shop located in JEC", - "popupContent": "Design Lab/IED Shop", - "type": "machine" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.68053,42.729704] - }, - "room": { - "hours": { - "mon":"9 am - 4 pm and 5-9 pm", - "tues":"9 am - 4 pm and 5-9 pm", - "weds":"9 am - 4 pm and 5-9 pm", - "thurs":"9 am - 4 pm and 5-9 pm", - "fri":"9 am - 4 pm and 5-7 pm", - "sat":"", - "sun":"" - }, - "info": "All students who intend to use the machines in this room\n\ - must pass the SOE Safety Test Rensselaer Manufacturing and Prototyping\n\ - Laboratories-Safety Orientation listed on RPI HR Skillport Site. \n\ - They must show proof of taking and passing the class to shop supervisors.\n\ - Afterwards, usage of machines is determined on case-by-case basis.\n\ - Students are always welcome to see the shop supervisor to discuss their projects.", - "location": "Jonsson Engineering Center (JEC) Room 2332" - }, - "contents": { - "machines": ["Haas CNC Control Simulators", "Haas Mini Mill", "Haas SL 10", - "Haas Super VF 2", "Haas Tool Room Mill", "Mitutoyo Crysta-Plus M574 CMM", - "Paint Booth", "General Machining and Fabrication Equipment", - "Electronic Scopes and Meters"], - "available_materials": "", - "equipment": "" - } - }, - { - "type": "Feature", - "id": "forge_shop", - "properties": { - "name": "Maker Space: The Forge", - "nick": "The Forge", - "thumbnail": "http://manufacturing.eng.rpi.edu/sites/default/files/facilities/Forge.jpg", - "description": "Maker Space located in", - "popupContent": "Design Lab/IED Shop", - "type": "machine" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.678974, 42.729574] - }, - "room": { - "hours": { - "mon":"", - "tues":"", - "weds": "", - "thurs":"", - "fri":"", - "sat":"", - "sun":"" - }, - "info": "The Forge charges $10 per semester for students to gain access to\n\ - all of the machines. Afterwards, students are charged $0.05/gram of filament\n\ - for the 3D Printer and $0.50 per hour of light time for the laser cutter.", - "location": "George M. Low Center for Industrial Innovation (CII) Room 2037" - }, - "contents": { - "machines": ["3D Scanners","Form 1+ 3D Printer","gCreate 3D Printer", - "Laser Cutter","Makerbot Mini","Makerbot Z18’s","Prusa i3’s", - "Sewing Machine","Taz 5","Taz Mini","Taz MOAR-Struder","Taz Quadfusion", - "Vinyl Cutter"], - "available_materials": ["PLA", "ABS", "PETG"], - "equipment": "" - } - }, - { - "type": "Feature", - "id": "mill_shop", - "properties": { - "name": "Manufacturing Innovation Learning Laboratory", - "nick": "The MILL", - "thumbnail":"", - "description": "Manufacturing/maching shop located in the CII.", - "popupContent": "Manufacturing Innovation Learning Laboratory", - "type": "machine" - }, - "geometry": { - "type": "Point", - "coordinates": [-73.679208, 42.72975] - }, - "room": { - "hours": { - "mon":"", - "tues":"", - "weds": "", - "thurs":"", - "fri":"", - "sat":"", - "sun":"" - }, - "info": "All students who intend to use the machines in this room\n\ - must pass the SOE Safety Test Rensselaer Manufacturing and Prototyping\n\ - Laboratories-Safety Orientation listed on RPI HR Skillport Site. \n\ - They must show proof of taking and passing the class to shop supervisors.\n\ - Afterwards, usage of machines is determined on case-by-case basis.\n\ - Students are always welcome to see the shop supervisor to discuss their projects.", - "location": "George M. Low Center for Industrial Innovation (CII) Room 1027" - }, - "contents": { - "machines": ["Haas VF 1 – CNC Milling Machine", - "Haas OM-2 CNC Milling Machine", - "Moore Nanotechnology Systems 350 UPL Lathe", - "Hurricane Laser Cutter Category 4 Charley 80W", - "Adept Cobra 800 SCARA Robot", - "SONY Conveyor System", - "Staubli RX 90 Robot", - "Fanuc LR Mate, with Vision, Robot Educational Training System", - "Stratasys Dimension FDM Machine", - "Stratasys UPrint FDM Machine", - "Z-Corporation Z310 3D Printer", - "B-9 Creator Stereolithography Printer", - "Phenix Direct Metal Selective Laser Sintering 3D Printer", - "Brown and Sharpe Gage 2000 CMM", - "Faro Platinum Inspection Arm", - "Arburg Allrounder 270c Injection Molder", - "Arburg Allrounder 221k Injection Molder", - "Battenfeld Injection Molder", - "Formech 660 Vacuum Former", - "Flow Mach2 Abrasive Water-Jet Cutter", - "Sonitek S840 Ultrasonic Welder", - "Sonitek TS500 Thermal Press", - "Branson Ultrasonic Welder 2000 D", - "Branson Ultrasonic Welder 2000 DT", - "General Machining Equipment"], - "available_materials": [], - "equipment": "" - } - } - ] -}; - -/* -Locations: -JEC Student Machines Shop -Design Lab/IED Shop -Maker Space: The Forge -Manufacturing Innovation Learning Laboratory -*/ diff --git a/public/manifest.json b/public/manifest.json deleted file mode 100644 index 146b589..0000000 --- a/public/manifest.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "RPI Campus Map", - "short_name" : "RPI Map", - "icons": [{ - "src": "/public/images/pin-128x128.png", - "sizes": "128x128", - "type": "image/png" - }, { - "src": "/public/images/pin-144x144.png", - "sizes": "144x144", - "type": "image/png" - }, { - "src": "/public/images/pin-152x152.png", - "sizes": "152x152", - "type": "image/png" - }, { - "src": "/public/images/pin-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, { - "src": "/public/images/pin-256x256.png", - "sizes": "256x256", - "type": "image/png" - }, { - "src": "/public/images/pin-512x512.png", - "sizes": "512x512", - "type": "image/png" - }], - "start_url": "https://rpicampusmap.glitch.me/public/views/index.html", - "display": "standalone", - "background_color": "#dc3545", - "theme_color": "#000000", - "lang": "English", - "orientation": "portrait", - "scope": "https://rpicampusmap.glitch.me/public/views/" -} \ No newline at end of file diff --git a/public/map.js b/public/map.js deleted file mode 100644 index 2e73a9a..0000000 --- a/public/map.js +++ /dev/null @@ -1,197 +0,0 @@ -/* -* This is the main file responsible for handling the map. -* -* In all locations below, "L" refers to the Leaflet API. - -Each point on the map is a "Feature" type object. These Features -specifically are "Points" that show on the map. -There are many methods that can be used on points, described here: -https://leafletjs.com/reference-1.3.4.html#point - -**IMPORTANT** -**Coordinates for Point objects are used backwards (long, lat) -for some reason according to the API** -*/ - - -/* -Display the map on the page at id 'map' - -setView() focuses the map around the given point. -In this case, it does so on creation of the map (pageload) -Usage: setView([latitude, longitude], zoomlevel) -*/ - -let mymap = L.map('mapContainer', { - center: [42.729453, -73.6802], - zoom: 16, - layers: [] -}) - -/* -Tile Layer is the display style (satellite, street, etc.) -Attribution refers to the creeator of the layer (accreditation) -*/ -L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', { - maxZoom: 18, - attribution: 'Map data © OpenStreetMap contributors, ' + - 'CC-BY-SA, ' + - 'Imagery © Mapbox', - id: 'mapbox.streets' -}).addTo(mymap); - - -// Highlight campus on the map using points as an outline, connect-the-dots style -const campus = [ - [42.728116, -73.684807], - [42.73027, -73.684294], - [42.730538, -73.686504], - [42.733585, -73.685709], - [42.733408, -73.684616], - [42.73396, -73.682277], - [42.732967, -73.676569], - [42.738941, -73.674831], - [42.737521, -73.665197], - [42.737805, -73.662837], - [42.733979, -73.66342], - [42.730811, -73.667131], - [42.732214, -73.671357], - [42.726067, -73.673395], - [42.728116, -73.684765] -]; -L.polygon(campus, {color: 'gray', opacity: 0.1}).addTo(mymap); - -// Default popup object that would show on the map if a nonregistered point is clicked -const popup = L.popup(); - -/** - * Perform the following operations every time the map layer is clicked - * @param e an event, in this case a click - */ -const onMapClick = function(e) { - popup - .setLatLng(e.latlng) - .setContent("You clicked the map at " + e.latlng.toString()) - .openOn(mymap); -} - -mymap.on('click', onMapClick); - -/** - * Fetch the coordinates of a location in an array [longitude, latitude] - * @param id The id of the given location - */ -const getCoords = function(id) { - for (let i=0; i < locations['features'].length; i++) { - if (locations['features'][i]['id'] == id) { - point = locations['features'][i]['geometry']['coordinates']; - return point; - } - } - return 0; -} - -/** - * Binds properties to each Feature in a Feature Collection - * @param feature the feature object that will be operated on - * @param layer the layer the feature will be added to - */ -const onEachFeature = function(feature, layer) { - // does this feature have a property named popupContent? - if (feature.properties && feature.properties.popupContent) { - layer.bindPopup(`
${feature.properties.popupContent}
`); - - const building = feature.id; - const point = getCoords(building); - console.log(feature.properties); - let newPopupContent = ''; - if (feature.properties.type == "machine") { - newPopupContent += `` - } - else { - newPopupContent += ``; - } - newPopupContent += ` - \ - \ - `; - layer.bindPopup(newPopupContent); - } -} - -//Array of circleMarkers -let locations_arr = []; -let locations_shops_arr = []; - -/** - * Style and add the campus points to the map -*/ - -L.geoJSON(locations, { - style: function (feature) { - return feature.properties && feature.properties.style; - }, - // For each feature added to the map, it will perform the onEachFeature() function - onEachFeature: onEachFeature, - - // Adds a circleMarker at the point specified by the coords of the feature - pointToLayer: function (feature, latlng) { - const campus_circle_settings = { - radius: 8, - fillColor: "#ff7800", - color: "#000", - weight: 1, - opacity: 1, - fillOpacity: 0.8 - } - locations_arr.push(L.circleMarker(latlng,campus_circle_settings)); - return locations_arr[locations_arr.length-1]; - }, -}); - -/** - * Style and add the machine site points to the map -*/ -L.geoJSON(locations_shops, { - style: function (feature) { - return feature.properties && feature.properties.style; - }, - // For each feature added to the map, it will perform the onEachFeature() function - onEachFeature: onEachFeature, - - // Adds a circleMarker at the point specified by the coords of the feature - pointToLayer: function (feature, latlng) { - const machine_circle_settings = { - // circleMarker shows at the Point's location - radius: 8, - fillColor: "#0000ff", - color: "#000", - weight: 1, - opacity: 1, - fillOpacity: 0.8 - } - locations_shops_arr.push(L.circleMarker(latlng,machine_circle_settings)); - return locations_shops_arr[locations_shops_arr.length-1]; - }, -}); - - -/* Creating layer groups to hold arrays of locations -* These layer groups will be added to the map, and will be represented by -* the map keys. The maps keys filter which dots are shown on the map. -*/ -let campus_locations_layer = L.layerGroup(locations_arr); -let machine_locations_layer = L.layerGroup(locations_shops_arr); - -let overlayMaps = { - "Campus Locations": campus_locations_layer, - "Machine Shop Locations": machine_locations_layer - // add more layer groups here -}; - -// adding the layer groups in overlayMaps to the map (but it doesn't render yet) -L.control.layers(null, overlayMaps).addTo(mymap); diff --git a/public/offline.html b/public/offline.html deleted file mode 100644 index 3c701bc..0000000 --- a/public/offline.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - Weather PWA - - - - - - -
-

- Weather PWA - - Powered by Dark Sky - -

-
-
-
- -
- Oops, you appear to be offline, this app requires an internet - connection. -
-
-
- - \ No newline at end of file diff --git a/public/service-worker.js b/public/service-worker.js deleted file mode 100644 index 9babb35..0000000 --- a/public/service-worker.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * @license - * Your First PWA Codelab (https://g.co/codelabs/pwa) - * Copyright 2019 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License - */ -'use strict'; - -// CODELAB: Update cache names any time any of the cached files change. -const CACHE_NAME = 'static-cache-v1'; - -// CODELAB: Add list of files to cache here. -const FILES_TO_CACHE = [ - '/public/ offline.html', -]; - -self.addEventListener('install', (evt) => { - console.log('[ServiceWorker] Install'); - // CODELAB: Precache static resources here. - evt.waitUntil( - caches.open(CACHE_NAME).then((cache) => { - console.log('[ServiceWorker] Pre-caching offline page'); - return cache.addAll(FILES_TO_CACHE); - }) - ); - self.skipWaiting(); -}); - -self.addEventListener('activate', (evt) => { - console.log('[ServiceWorker] Activate'); - // CODELAB: Remove previous cached data from disk. - evt.waitUntil( - caches.keys().then((keyList) => { - return Promise.all(keyList.map((key) => { - if (key !== CACHE_NAME) { - console.log('[ServiceWorker] Removing old cache', key); - return caches.delete(key); - } - })); - }) - ); - self.clients.claim(); -}); - -self.addEventListener('fetch', (evt) => { - console.log('[ServiceWorker] Fetch', evt.request.url); - // CODELAB: Add fetch event handler here. - if (evt.request.mode !== 'navigate') { - // Not a page navigation, bail. - return; - } - evt.respondWith( - fetch(evt.request) - .catch(() => { - return caches.open(CACHE_NAME) - .then((cache) => { - return cache.match('offline.html'); - }); - }) - ); -}); diff --git a/public/style/login.css b/public/style/login.css deleted file mode 100644 index 8b13789..0000000 --- a/public/style/login.css +++ /dev/null @@ -1 +0,0 @@ - diff --git a/public/style/searchResults.css b/public/style/searchResults.css deleted file mode 100644 index c438254..0000000 --- a/public/style/searchResults.css +++ /dev/null @@ -1,3 +0,0 @@ -.row { - max-width: 100%; -} diff --git a/public/views/admin.html b/public/views/admin.html deleted file mode 100644 index 1a0d4df..0000000 --- a/public/views/admin.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - Admin Panel - - - - - - - - - - - - - - - - - - - - - -
- Hello - -
- - - - - - - - - - - - diff --git a/public/views/index.html b/public/views/index.html deleted file mode 100644 index f3a2f12..0000000 --- a/public/views/index.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - RPI Campus Map - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

This is where the map goes... lol

-
- - - - - - - - - - - - - - - - - - - - diff --git a/public/views/info.html b/public/views/info.html deleted file mode 100644 index a6ed91a..0000000 --- a/public/views/info.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - - - - - Info - {{name}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
-
-
-
-

{{name}}

-
-

{{desc}}

-

{{nick}}

- - Show On Map -
- -
- -
-
-
-
-
- - -
-
-

Comments:

-
-

No comments found. Be the first to leave a comment!

-
-
- - - -
Post a Comment:
-
-
-
-
- -
-
- -
-
-
- -
-
-
-
- -
- -
Add an Image:
-
-
-
- -
-
- -
-
-
-
-
- - - - -
- -
- -
- - - - - - - - - - - - - diff --git a/public/views/login.html b/public/views/login.html deleted file mode 100644 index cf13ebb..0000000 --- a/public/views/login.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - Login - - - - - - - - - - - - - - - - - - - - -
-
-

You must login with an administrator account to view this page.

- -
- -
-
- - -
-
- - -
- - -
- -
- -

Don't have an account? Request admin access.

-
- -
- - - - - - - - - - - - diff --git a/public/views/machine_sites_info.html b/public/views/machine_sites_info.html deleted file mode 100644 index 128b589..0000000 --- a/public/views/machine_sites_info.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - - - - Campus Map - Search Results - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
-

{{name}}

-

{{nick}}

-

{{desc}}

- -
- -
-

Sunday: {{sunHours}}

-

Monday: {{monHours}}

-

Tuesday: {{tuesHours}}

-

Wednesday: {{wedHours}}

-

Thursday: {{thurHours}}

-

Friday: {{friHours}}

-

Saturday: {{satHours}}

-
- -

Room info/permissions: {{info}}

-

List of Machines

-
  • - {{x}} -
  • -
    -

    Materials Inventory

    -
  • - {{x}} -
  • -
    -

    Available Equipment

    -
  • - {{x}} -
  • -
    - - Show On Map - -
    - -
    - -
    -
    - -
    - - - - - - - - - - - - - - diff --git a/public/views/notfound.html b/public/views/notfound.html deleted file mode 100644 index 1c5a688..0000000 --- a/public/views/notfound.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - Page Not Found - - - - - - - - - - - - - - - - - - - - -
    -
    -

    We couldn't find the page you were looking for 😢

    - -

    The URL may have been mistyped or the page may have moved:

    -
      -
    • Please try navigating back to the homepage to find what you are looking for.
    • -
    • Alternatively you can contact us here.
    • -
    -
    -
    - - - - - - - - - - - - diff --git a/public/views/offline.html b/public/views/offline.html deleted file mode 100644 index ab75025..0000000 --- a/public/views/offline.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - Weather PWA - - - - - - -
    -

    - RPI Campus Map -

    -
    -
    -
    - - -
    - Oops, you appear to be offline, this app requires an internet - connection. -
    -
    -
    - - \ No newline at end of file diff --git a/public/views/pwabuilder-sw-register.js b/public/views/pwabuilder-sw-register.js deleted file mode 100644 index fe1b735..0000000 --- a/public/views/pwabuilder-sw-register.js +++ /dev/null @@ -1,19 +0,0 @@ -// This is the service worker with the Advanced caching - -// Add this below content to your HTML page, or add the js file to your page at the very top to register service worker - -// Check compatibility for the browser we're running this in -if ("serviceWorker" in navigator) { - if (navigator.serviceWorker.controller) { - console.log("[PWA Builder] active service worker found, no need to register"); - } else { - // Register the service worker - navigator.serviceWorker - .register("pwabuilder-sw.js", { - scope: "./" - }) - .then(function (reg) { - console.log("[PWA Builder] Service worker has been registered for scope: " + reg.scope); - }); - } -} diff --git a/public/views/register.html b/public/views/register.html deleted file mode 100644 index 58f8567..0000000 --- a/public/views/register.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - Register - - - - - - - - - - - - - - - - - - - - -
    -
    -

    Sign up to request access to an administrator account.

    - -
    - -
    -
    - - -
    -
    - - -
    -
    - - -
    - - -
    - -
    -
    - -
    - - - - - - - - - - - - diff --git a/public/views/searchResults.html b/public/views/searchResults.html deleted file mode 100644 index 2994fe8..0000000 --- a/public/views/searchResults.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - Search Results - "{{params.query}}" - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - - - - diff --git a/pwabuilder-sw.js b/pwabuilder-sw.js deleted file mode 100644 index 6e0491f..0000000 --- a/pwabuilder-sw.js +++ /dev/null @@ -1,173 +0,0 @@ -//This is the service worker with the Advanced caching - -const CACHE = "pwabuilder-adv-cache"; -const precacheFiles = [ - /\/public\/controllers\/.*/, - /\/public\/images\/.*/, - /\/public\/style\/.*/, - "/public/views/searchResults.html", - "/public/views/index.html", - "/public/views/pwabuilder-sw-register.js", - "/public/map.js", - "/public/manifest.json", - "/pwabuilder-sw.js" - /* Add an array of files to precache for your app */ -]; - -// TODO: replace the following with the correct offline fallback page i.e.: const offlineFallbackPage = "offline.html"; -const offlineFallbackPage = "/public/views/offline.html"; - -const networkFirstPaths = [ - "/public/imagePreview.js", - "/public/infoPreview.js", - "/public/views/info.html", - "/public/views/machine_sites_info.html", - "/public/geolocations.js", - "/public/machine_sites.js" - /* Add an array of regex of paths that should go network first */ - // Example: /\/api\/.*/ -]; - -const avoidCachingPaths = [ - "/server.js", - - /* Add an array of regex of paths that shouldn't be cached */ - // Example: /\/api\/.*/ -]; - -function pathComparer(requestUrl, pathRegEx) { - return requestUrl.match(new RegExp(pathRegEx)); -} - -function comparePaths(requestUrl, pathsArray) { - if (requestUrl) { - for (let index = 0; index < pathsArray.length; index++) { - const pathRegEx = pathsArray[index]; - if (pathComparer(requestUrl, pathRegEx)) { - return true; - } - } - } - - return false; -} - -self.addEventListener("install", function (event) { - console.log("[PWA Builder] Install Event processing"); - - console.log("[PWA Builder] Skip waiting on install"); - self.skipWaiting(); - - event.waitUntil( - caches.open(CACHE).then(function (cache) { - console.log("[PWA Builder] Caching pages during install"); - - return cache.addAll(precacheFiles).then(function () { - if (offlineFallbackPage === "ToDo-replace-this-name.html") { - return cache.add(new Response("TODO: Update the value of the offlineFallbackPage constant in the serviceworker.")); - } - - return cache.add(offlineFallbackPage); - }); - }) - ); -}); - -// Allow sw to control of current page -self.addEventListener("activate", function (event) { - console.log("[PWA Builder] Claiming clients for current page"); - event.waitUntil(self.clients.claim()); -}); - -// If any fetch fails, it will look for the request in the cache and serve it from there first -self.addEventListener("fetch", function (event) { - if (event.request.method !== "GET") return; - - if (comparePaths(event.request.url, networkFirstPaths)) { - networkFirstFetch(event); - } else { - cacheFirstFetch(event); - } -}); - -function cacheFirstFetch(event) { - event.respondWith( - fromCache(event.request).then( - function (response) { - // The response was found in the cache so we responde with it and update the entry - - // This is where we call the server to get the newest version of the - // file to use the next time we show view - event.waitUntil( - fetch(event.request).then(function (response) { - return updateCache(event.request, response); - }) - ); - - return response; - }, - function () { - // The response was not found in the cache so we look for it on the server - return fetch(event.request) - .then(function (response) { - // If request was success, add or update it in the cache - event.waitUntil(updateCache(event.request, response.clone())); - - return response; - }) - .catch(function (error) { - // The following validates that the request was for a navigation to a new document - if (event.request.destination !== "document" || event.request.mode !== "navigate") { - return; - } - - console.log("[PWA Builder] Network request failed and no cache." + error); - // Use the precached offline page as fallback - return caches.open(CACHE).then(function (cache) { - cache.match(offlineFallbackPage); - }); - }); - } - ) - ); -} - -function networkFirstFetch(event) { - event.respondWith( - fetch(event.request) - .then(function (response) { - // If request was success, add or update it in the cache - event.waitUntil(updateCache(event.request, response.clone())); - return response; - }) - .catch(function (error) { - console.log("[PWA Builder] Network request Failed. Serving content from cache: " + error); - return fromCache(event.request); - }) - ); -} - -function fromCache(request) { - // Check to see if you have it in the cache - // Return response - // If not in the cache, then return error page - return caches.open(CACHE).then(function (cache) { - return cache.match(request).then(function (matching) { - if (!matching || matching.status === 404) { - return Promise.reject("no-match"); - } - - return matching; - }); - }); -} - -function updateCache(request, response) { - if (!comparePaths(request.url, avoidCachingPaths)) { - return caches.open(CACHE).then(function (cache) { - return cache.put(request, response); - }); - } - - return Promise.resolve(); -} diff --git a/public/controllers/infoController.js b/scripts/controllers/infoController.js similarity index 54% rename from public/controllers/infoController.js rename to scripts/controllers/infoController.js index 2f938fb..71e200d 100644 --- a/public/controllers/infoController.js +++ b/scripts/controllers/infoController.js @@ -1,19 +1,19 @@ app.controller('infoController', function($scope, $http) { - console.log("infoController activated!"); + console.log('infoController activated!'); const location = getParams(); console.log(location); $http.post(`/info?loc=${location.loc}`, {query: location.loc}) - .then(function(httpResponse, err) { - if (err) throw err; - console.log(httpResponse.data); + .then(function(httpResponse, err) { + if (err) throw err; + console.log(httpResponse.data); - $scope.id = location.loc; - $scope.name = httpResponse.data[0].properties.name; - $scope.nick = 'Nicknames: ' + httpResponse.data[0].properties.nick; - $scope.desc = httpResponse.data[0].properties.description; - }); + $scope.id = location.loc; + $scope.name = httpResponse.data[0].properties.name; + $scope.nick = 'Nicknames: ' + httpResponse.data[0].properties.nick; + $scope.desc = httpResponse.data[0].properties.description; + }); $scope.comment = function(title, body) { if (!title || !body) return; @@ -28,12 +28,12 @@ app.controller('infoController', function($scope, $http) { console.log(data); $http.post(`/info?loc=${location.loc}`, data) - .then(function(httpResponse, err) { - if (err) throw err; - console.log(httpResponse.data); + .then(function(httpResponse, err) { + if (err) throw err; + console.log(httpResponse.data); - $scope.cmtTitle = ""; - $scope.cmtBody = ""; - }); - } + $scope.cmtTitle = ''; + $scope.cmtBody = ''; + }); + }; }); diff --git a/public/controllers/machineInfoController.js b/scripts/controllers/machineInfoController.js similarity index 70% rename from public/controllers/machineInfoController.js rename to scripts/controllers/machineInfoController.js index c03fabd..e168d09 100644 --- a/public/controllers/machineInfoController.js +++ b/scripts/controllers/machineInfoController.js @@ -1,5 +1,5 @@ app.controller('machineInfoController', function($scope, $http) { - console.log("machineInfoController activated!"); + console.log('machineInfoController activated!'); const parameters = getParams(); console.log(parameters); @@ -7,15 +7,15 @@ app.controller('machineInfoController', function($scope, $http) { $scope.isMachine = parameters.machine; $http.post(`/info?loc=${location}`, {query: location, machine: $scope.isMachine}) - .then(function(httpResponse, err) { - if (err) throw err; - console.log(httpResponse.data); + .then(function(httpResponse, err) { + if (err) throw err; + console.log(httpResponse.data); - $scope.id = location; - $scope.name = httpResponse.data[0].properties.name; - $scope.nick = 'Nicknames: ' + httpResponse.data[0].properties.nick; - $scope.desc = httpResponse.data[0].properties.description; - if ($scope.isMachine) { + $scope.id = location; + $scope.name = httpResponse.data[0].properties.name; + $scope.nick = 'Nicknames: ' + httpResponse.data[0].properties.nick; + $scope.desc = httpResponse.data[0].properties.description; + if ($scope.isMachine) { $scope.sunHours = httpResponse.data[0].room.hours.sun; $scope.monHours = httpResponse.data[0].room.hours.mon; $scope.tuesHours = httpResponse.data[0].room.hours.tues; @@ -27,6 +27,6 @@ app.controller('machineInfoController', function($scope, $http) { $scope.machines = httpResponse.data[0].contents.machines; $scope.materials = httpResponse.data[0].contents.available_materials; $scope.equipment = httpResponse.data[0].contents.equipment; - } - }) + } + }); }); diff --git a/public/controllers/app.js b/scripts/controllers/mapApp.js similarity index 91% rename from public/controllers/app.js rename to scripts/controllers/mapApp.js index 9c9c8ba..e6adb9f 100644 --- a/public/controllers/app.js +++ b/scripts/controllers/mapApp.js @@ -6,7 +6,7 @@ let getParams = function() { let queryString = url.split('?'); if (queryString.length == 1) { - console.log("no queries given"); + console.log('no queries given'); return null; } paramString = queryString[1].split('&'); @@ -17,4 +17,4 @@ let getParams = function() { } console.log(params); return params; -} +}; diff --git a/scripts/controllers/mapController.js b/scripts/controllers/mapController.js new file mode 100644 index 0000000..6cae91c --- /dev/null +++ b/scripts/controllers/mapController.js @@ -0,0 +1,47 @@ +app.controller('mapController', function($scope, $http) { + console.log('mapController activated!'); + + const parameters = getParams(); + console.log(parameters); + const location = parameters.loc; + $scope.isMachine = parameters.machine; + + if (parameters != null) { + $http.post(`/index?loc=${location}`, {query: location, machine: $scope.isMachine}) + .then(function(httpResponse, err) { + if (err) throw err; + console.log(httpResponse.data); + + $scope.name = httpResponse.data[0].properties.name; + $scope.nick = `Nicknames: ${httpResponse.data[0].properties.nick}`; + $scope.desc = httpResponse.data[0].properties.description; + + let latitude = httpResponse.data[0].geometry.coordinates[1]; + let longitude = httpResponse.data[0].geometry.coordinates[0]; + + let newPopupContent = ''; + if (httpResponse.data[0].properties.type == 'machine') { + newPopupContent += ``; + } + else { + console.log(httpResponse.data[0].properties.type); + newPopupContent += ``; + } + newPopupContent += ` + \ + \ + `; + + mymap.setView([latitude, longitude], 19); + let marker = L.marker([latitude, longitude]); + marker.addTo(mymap).bindPopup(newPopupContent).openPopup(); + // mymap.on('click', marker.remove()); + + }); + } + +}); diff --git a/public/controllers/searchController.js b/scripts/controllers/searchController.js similarity index 80% rename from public/controllers/searchController.js rename to scripts/controllers/searchController.js index c383555..ce5f67b 100644 --- a/public/controllers/searchController.js +++ b/scripts/controllers/searchController.js @@ -1,12 +1,12 @@ app.controller('searchController', function($scope, $http) { - console.log("searchController activated!"); + console.log('searchController activated!'); $scope.search = function(q) { if (q == undefined) // Browse All Results q=''; console.log(`Angular get '${q}'`); - return $http.post('http://localhost:3000/search', {query: q}); - } + return $http.post('/search', {query: q}); + }; $scope.params = getParams(); console.log($scope.params); diff --git a/scripts/database.js b/scripts/database.js new file mode 100644 index 0000000..28a7cbd --- /dev/null +++ b/scripts/database.js @@ -0,0 +1,19 @@ +const mongoose = require('mongoose'); + +// DB Config +const db = require('../config/keys').MongoURI; + +// Connect to Mongo +class Database { + constructor() { + this._connect() + } + + _connect() { + mongoose.connect(db, {useUnifiedTopology: true,useNewUrlParser: true}) + .then(() => console.log('MongoDB Connected...')) + .catch(err=> console.log(err)) + } +}; + +module.exports = new Database(); \ No newline at end of file diff --git a/scripts/routes/geolocations.js b/scripts/routes/geolocations.js new file mode 100644 index 0000000..0d2ed4a --- /dev/null +++ b/scripts/routes/geolocations.js @@ -0,0 +1,1393 @@ +/* +Each point on the map is a "Feature" type object. These Features +specifically are "Points" that show on the map. +There are many methods that can be used on points, described here: +https://leafletjs.com/reference-1.3.4.html#point + +**IMPORTANT** +**Coordinates for Point objects are used backwards (long, lat) +for some reason according to the API** +*/ + +var locations = { + 'type': 'FeatureCollection', + 'features': [ + { + 'type': 'Feature', + '_id': 'amos', + 'id': 'amos', + 'properties': { + 'name': 'Amos Eaton Hall', + 'nick': 'JEC', + 'category': 'Academic & Research', + 'description': 'Math/CS Department', + 'popupContent': 'Amos Eaton' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.682596, 42.730189] + } + }, + { + 'type': 'Feature', + '_id': 'carn', + 'id': 'carn', + 'properties': { + 'name': 'Carnegie Building', + 'nick': 'CARNEG', + 'category': 'Academic & Research', + 'description': 'CogSci Department', + 'popupContent': 'Carnegie Building' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.68321, 42.730448] + } + }, + { + 'type': 'Feature', + '_id': 'cbis', + 'id': 'cbis', + 'properties': { + 'name': 'Center for Biotechnology and Interdisciplinary Studies', + 'nick': 'CBIS', + 'category': 'Academic & Research', + 'description': 'Biotech Building', + 'popupContent': 'Center for Biotechnology and Interdisciplinary Studies' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.678419, 42.728252] + } + }, + { + 'type': 'Feature', + '_id': 'cogs', + 'id': 'cogs', + 'properties': { + 'name': 'Cogswell Laboratory', + 'nick': 'Cogswell', + 'category': 'Academic & Research', + 'description': 'Science Laboratory', + 'popupContent': 'Cogswell Laboratory' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.681343, 42.728189] + } + }, + { + 'type': 'Feature', + '_id': 'dcc', + 'id': 'dcc', + 'properties': { + 'name': 'Darrin Communications Center', + 'nick': 'DCC, DARRIN', + 'category': 'Academic & Research', + 'amenity': 'CCPD, Starbucks, DCC Cafe', + 'description': 'One of the main lecture hall buildings on campus.', + 'popupContent': 'Darrin Communications Center' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.679059, 42.729226] + } + }, + { + 'type': 'Feature', + '_id': 'empire', + 'id': 'empire', + 'properties': { + 'name': 'Empire State Hall', + 'nick': 'Empire', + 'category': 'Academic & Research', + 'description': 'Building housing Cogswell Lab and Engineering department', + 'popupContent': 'Empire State Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.68217, 42.728373] + } + }, + { + 'type': 'Feature', + '_id': 'empac', + 'id': 'empac', + 'properties': { + 'name': 'Experimental Media and Performing Arts Center at Rensselaer', + 'nick': 'EMPAC', + 'category': 'Academic & Research', + 'description': 'Performing Arts', + 'popupContent': 'Experimental Media & Performing Arts Center' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.683828, 42.728883] + } + }, + { + 'type': 'Feature', + '_id': 'lib', + 'id': 'lib', + 'properties': { + 'name': 'Folsom Library', + 'nick': 'FOLSOM, LIB', + 'category': 'Academic & Research', + 'amenity': 'Observatory, Library Cafe', + 'description': 'Engineering Department', + 'popupContent': 'Folsom Library' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.682654, 42.729408] + } + }, + { + 'type': 'Feature', + '_id': 'greene', + 'id': 'greene', + 'properties': { + 'name': 'Greene Building', + 'nick': 'Greene', + 'category': 'Academic & Research', + 'description': 'Houses the Department of Architecture', + 'popupContent': 'Greene Building' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.681216, 42.730023] + } + }, + { + 'type': 'Feature', + '_id': 'jec', + 'id': 'jec', + 'properties': { + 'name': 'Jonsson Engineering Center', + 'nick': 'JEC', + 'category': 'Academic & Research', + 'description': 'Engineering Department', + 'popupContent': 'Jonsson Engineering Center' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.6804, 42.72957] + } + }, + { + 'type': 'Feature', + '_id': 'jrowl', + 'id': 'jrowl', + 'properties': { + 'name': 'Jonsson Rowland Science Center', + 'nick': 'J-ROWL, JROWL', + 'category': 'Academic & Research', + 'description': 'Science Building', + 'popupContent': 'Jonsson-Rowland Science Center' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.680432, 42.728776] + } + }, + { + 'type': 'Feature', + '_id': 'lally', + 'id': 'lally', + 'properties': { + 'name': 'Lally Hall', + 'nick': 'LALLY', + 'category': 'Academic & Research', + 'description': 'IT Department', + 'popupContent': 'Lally Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.681929, 42.73007] + } + }, + { + 'type': 'Feature', + '_id': 'linac', + 'id': 'linac', + 'properties': { + 'name': 'LINAC Facility (Gaerttner Laboratory)', + 'nick': 'LINAC', + 'category': 'Academic & Research', + 'description': 'What even is this bro lol', + 'popupContent': 'LINAC Facility' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.662296, 42.732647] + } + }, + { + 'type': 'Feature', + '_id': 'cii', + 'id': 'cii', + 'properties': { + 'name': 'Low Center for Industrial Innovation', + 'nick': 'LOW, CII', + 'nicknames': ['low', 'cii'], + 'category': 'Academic & Research', + 'description': 'Right side of the DCC', + 'popupContent': 'Low Center for Industrial Innovation' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.67921, 42.729732] + } + }, + { + 'type': 'Feature', + '_id': 'mrc', + 'id': 'mrc', + 'properties': { + 'name': 'Materials Research Center', + 'nick': 'MRC', + 'category': 'Academic & Research', + 'description': 'Right side of the DCC', + 'popupContent': 'Low Center for Industrial Innovation' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.682706, 42.72849] + } + }, + { + 'type': 'Feature', + '_id': 'pitt', + 'id': 'pitt', + 'properties': { + 'name': 'Pittsburgh Building', + 'nick': 'PITT', + 'category': 'Academic & Research', + 'description': 'Business Building', + 'popupContent': 'Pittsburgh Building' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.683313, 42.731174] + } + }, + { + 'type': 'Feature', + '_id': 'rick', + 'id': 'rick', + 'properties': { + 'name': 'Ricketts Building', + 'nick': 'Ricketts, RIC', + 'category': 'Academic & Research', + 'description': 'Who knows what\'s in here', + 'popupContent': 'Ricketts Building' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.679757, 42.730906] + } + }, + { + 'type': 'Feature', + '_id': 'sage', + 'id': 'sage', + 'properties': { + 'name': 'Russell Sage Laboratory', + 'nick': 'SAGE, RIC', + 'category': 'Academic & Research', + 'amenity': 'Sage Beanery', + 'description': 'Second biggest lecture hall on campus, not to be confused with Sage Dining Hall.', + 'popupContent': 'Russell Sage Laboratory' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.681671, 42.730898] + } + }, + { + 'type': 'Feature', + '_id': 'walk', + 'id': 'walk', + 'properties': { + 'name': 'Walker Laboratory', + 'nick': 'WALKER', + 'category': 'Academic & Research', + 'description': 'Biochem laboratory building', + 'popupContent': 'Walker Laboratory' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.682562, 42.730863] + } + }, + { + 'type': 'Feature', + '_id': 'west', + 'id': 'west', + 'properties': { + 'name': 'West Hall', + 'nick': 'WEST', + 'category': 'Academic & Research', + 'description': 'Halfway down the hill, dumb far and haunted', + 'popupContent': 'West Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.683146, 42.731702] + } + }, + { + 'type': 'Feature', + '_id': 'winslow', + 'id': 'winslow', + 'properties': { + 'name': 'Winslow Building', + 'nick': 'Winslow', + 'category': 'Academic & Research', + 'description': 'Who knows what\'s in here', + 'popupContent': 'Winslow Building' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.684296, 42.730929] + } + }, + { + 'type': 'Feature', + '_id': '87', + 'id': '87', + 'properties': { + 'name': '87 Gymnasium', + 'nick': '87', + 'category': 'Student Life', + 'description': 'Open gyms for clubs or recreation', + 'popupContent': '87 Gymnasium' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.67879, 42.73078] + } + }, + { + 'type': 'Feature', + '_id': 'acad', + 'id': 'acad', + 'properties': { + 'name': 'Academy Hall', + 'nick': 'ACADMY', + 'category': 'Student Life', + 'amenity': 'Student Health Center, Registrar, Bursar, Financial Aid, Student Success Office', + 'description': 'Various offices and the Academy Hall Auditorium', + 'popupContent': 'Academy Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.678715, 42.727454] + } + }, + { + 'type': 'Feature', + '_id': 'asrc', + 'id': 'asrc', + 'properties': { + 'name': 'Alumni Sports & Recreation Center', + 'nick': 'ASRC', + 'category': 'Student Life', + 'description': '???', + 'popupContent': 'Alumni Sports & Recreation Center' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.676878, 42.728467] + } + }, + { + 'type': 'Feature', + '_id': 'anderson', + 'id': 'anderson', + 'properties': { + 'name': 'Anderson Field', + 'nick': 'Rugby Field', + 'category': 'Student Life', + 'description': 'Used for rugby practice', + 'popupContent': 'Anderson Field' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.666956, 42.734426] + } + }, + { + 'type': 'Feature', + '_id': 'chapel', + 'id': 'chapel', + 'properties': { + 'name': 'Chapel + Cultural Center', + 'nick': 'Chapel', + 'category': 'Student Life', + 'description': 'On campus chapel', + 'popupContent': 'Chapel + Cultural Center' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.672276, 42.731818] + } + }, + { + 'type': 'Feature', + '_id': 'commons', + 'id': 'commons', + 'properties': { + 'name': 'Commons Dining Hall', + 'nick': 'Commons', + 'category': 'Student Life', + 'description': 'Largest dining hall on campus', + 'popupContent': 'Commons Dining Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.674332, 42.728289] + } + }, + { + 'type': 'Feature', + '_id': 'ecav', + 'id': 'ecav', + 'properties': { + 'name': 'East Campus Athletic Village Arena', + 'nick': 'ECAV', + 'category': 'Student Life', + 'description': 'Official basketball, volleyball courts', + 'popupContent': 'East Campus Athletic Village Arena (ECAV)' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.66743, 42.732301] + } + }, + { + 'type': 'Feature', + '_id': 'ecavstad', + 'id': 'ecavstad', + 'properties': { + 'name': 'East Campus Athletic Village Stadium', + 'nick': 'ECAV Stadium', + 'category': 'Student Life', + 'description': 'Official football field', + 'popupContent': 'East Campus Athletic Village Stadium' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.666954, 42.733093] + } + }, + { + 'type': 'Feature', + '_id': 'houston', + 'id': 'houston', + 'properties': { + 'name': 'Houston Field House', + 'nick': 'field house', + 'category': 'Student Life', + 'description': 'hockey events', + 'popupContent': 'Houston Field House' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.669483, 42.732059] + } + }, + { + 'type': 'Feature', + '_id': 'mueller', + 'id': 'mueller', + 'properties': { + 'name': 'Mueller Center', + 'nick': 'Mueller', + 'category': 'Student Life', + 'description': 'Multi-story weight and workout gym', + 'popupContent': 'Mueller Center' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.676902, 42.728829] + } + }, + { + 'type': 'Feature', + '_id': 'play', + 'id': 'play', + 'properties': { + 'name': 'Rensselaer Playhouse', + 'nick': 'Playhouse', + 'category': 'Student Life', + 'description': 'Drama club, plays are held here', + 'popupContent': 'Rensselaer Playhouse' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.678227, 42.729227] + } + }, + { + 'type': 'Feature', + '_id': 'radio', + 'id': 'radio', + 'properties': { + 'name': 'Radio Club W2SZ', + 'nick': 'Radio', + 'category': 'Student Life', + 'description': 'RPI Student run radio station', + 'popupContent': 'Radio Club W2SZ' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.663192, 42.734229] + } + }, + { + 'type': 'Feature', + '_id': 'union', + 'id': 'union', + 'properties': { + 'name': 'Rensselaer Student Union', + 'nick': 'Union', + 'category': 'Student Life', + 'amenity': 'Rathskellar Dining (Cusato\'s Pizza, Collar City, Halal Shack, Thunder Mountain Curry), McNeil Room, Panera Bread, Union Games Room, Clubhouse Pub', + 'description': 'Oldest student run union blah blah blah', + 'popupContent': 'Rensselaer Student Union' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.676647, 42.729995] + } + }, + { + 'type': 'Feature', + '_id': 'pool', + 'id': 'pool', + 'properties': { + 'name': 'Robison Swimming Pool', + 'nick': 'Pool', + 'category': 'Student Life', + 'description': 'Multi-lane pool and open swim', + 'popupContent': 'Robison Swimming Pool' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.677313, 42.728007] + } + }, + { + 'type': 'Feature', + '_id': 'sagedin', + 'id': 'sagedin', + 'properties': { + 'name': 'Russell Sage Dining Hall', + 'nick': 'RSDH, Sage', + 'category': 'Student Life', + 'amenity': 'Sage-To-Go, Russell Sage Banquet Hall', + 'description': 'Dining hall on cmapus, not to be confused with Russell Sage Laboratory', + 'popupContent': 'Russell Sage Dining Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.678264, 42.729778] + } + }, + { + 'type': 'Feature', + '_id': 'barton', + 'id': 'barton', + 'properties': { + 'name': 'Barton Hall', + 'nick': 'Barton', + 'category': 'Student Housing', + 'description': 'Most recently renoved residence hall on Freshman Hill', + 'popupContent': 'Barton Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.674091, 42.729136] + } + }, + { + 'type': 'Feature', + '_id': 'blitman', + 'id': 'blitman', + 'properties': { + 'name': 'Blitman Commons', + 'nick': 'blitman', + 'category': 'Student Housing', + 'description': 'Residence Hall', + 'popupContent': 'Blitman Commons' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.685893, 42.731215] + } + }, + { + 'type': 'Feature', + '_id': 'bray', + 'id': 'bray', + 'properties': { + 'name': 'Bray Hall', + 'nick': 'Bray, Freshman Five, Freshman Hill', + 'category': 'Student Housing', + 'description': 'One of five identical housing buildings in the \'Freshman Five\'', + 'popupContent': 'Bray Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.673686, 42.728713] + } + }, + { + 'type': 'Feature', + '_id': 'bryck', + 'id': 'bryck', + 'properties': { + 'name': 'Bryckwyck', + 'nick': 'Bryck', + 'category': 'Student Housing', + 'description': 'Iss brick', + 'popupContent': 'Bryckwyck' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.663865, 42.734785] + } + }, + { + 'type': 'Feature', + '_id': 'barh', + 'id': 'barh', + 'properties': { + 'name': 'Burdett Avenue Residence Hall', + 'nick': 'BARH, BAR-H', + 'category': 'Student Housing', + 'description': 'Residence Hall on ECAV with its own dining hall.', + 'popupContent': 'Burdett Avenue Residence Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.671231, 42.731026] + } + }, + { + 'type': 'Feature', + '_id': 'colonie', + 'id': 'colonie', + 'properties': { + 'name': 'Colonie Apartments', + 'nick': 'Colonie', + 'category': 'Student Housing', + 'description': 'Deep Residence Hall', + 'popupContent': 'Colonie Apartments' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.669785, 42.737063] + } + }, + { + 'type': 'Feature', + '_id': 'hall', + 'id': 'hall', + 'properties': { + 'name': 'Hall Hall', + 'nick': 'Hall Hall', + 'category': 'Student Housing', + 'description': 'Freshman Five Residence Hall', + 'popupContent': 'Hall Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.675048, 42.728552] + } + }, + { + 'type': 'Feature', + '_id': 'nason', + 'id': 'nason', + 'properties': { + 'name': 'Nason Hall', + 'nick': 'Nason', + 'category': 'Student Housing', + 'description': 'Residence Hall', + 'popupContent': 'Nason Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.673598, 42.727664] + } + }, + { + 'type': 'Feature', + '_id': 'north', + 'id': 'north', + 'properties': { + 'name': 'North Hall', + 'nick': 'North', + 'category': 'Student Housing', + 'description': 'Residence Hall', + 'popupContent': 'North Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.679844, 42.731357] + } + }, + { + 'type': 'Feature', + '_id': 'nugent', + 'id': 'nugent', + 'properties': { + 'name': 'Nugent Hall', + 'nick': 'Nugent', + 'category': 'Student Housing', + 'description': 'Residence Hall', + 'popupContent': 'Nugent Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.675031, 42.727411] + } + }, + { + 'type': 'Feature', + '_id': 'poly', + 'id': 'poly', + 'properties': { + 'name': 'Polytechnic Residence Commons', + 'nick': 'Poly', + 'category': 'Student Housing', + 'description': 'Residence Hall', + 'popupContent': 'Polytechnic Residence Commons' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.679528, 42.722276] + } + }, + { + 'type': 'Feature', + '_id': 'quad', + 'id': 'quad', + 'properties': { + 'name': 'Quadrangle Complex', + 'nick': 'Quad', + 'category': 'Student Housing', + 'description': 'Residence Hall', + 'popupContent': 'Quadrangle Complex' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.677616, 42.730189] + } + }, + { + 'type': 'Feature', + '_id': 'rahpsa', + 'id': 'rahpsa', + 'properties': { + 'name': 'Rensselaer Apartment Housing Project A', + 'nick': 'RAHPS A, RAHP', + 'category': 'Student Housing', + 'description': 'Residence Hall', + 'popupContent': 'Rensselaer Apartment Housing Project A' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.669557, 42.730833] + } + }, + { + 'type': 'Feature', + '_id': 'rahpsb', + 'id': 'rahpsb', + 'properties': { + 'name': 'Rensselaer Apartment Housing Project B', + 'nick': 'RAHPS B, RAHP', + 'category': 'Student Housing', + 'description': 'Residence Hall', + 'popupContent': 'Rensselaer Apartment Housing Project' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.665257, 42.734795] + } + }, + { + 'type': 'Feature', + '_id': 'rousseau', + 'id': 'rousseau', + 'properties': { + 'name': 'Rousseau Apartments', + 'nick': 'Rousseau, Stack, Stacwyck', + 'category': 'Student Housing', + 'description': 'Residence Hall', + 'popupContent': 'Rousseau Apartments (Stacwyck)' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.664306, 42.734362] + } + }, + { + 'type': 'Feature', + '_id': 'sharp', + 'id': 'sharp', + 'properties': { + 'name': 'Sharp Hall', + 'nick': 'Sharp', + 'category': 'Student Housing', + 'description': 'Residence Hall', + 'popupContent': 'Sharp Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.674582, 42.727008] + } + }, + { + 'type': 'Feature', + '_id': 'stack', + 'id': 'stack', + 'properties': { + 'name': 'Stacwyck Apartments', + 'nick': 'Staccc, Stack', + 'category': 'Student Housing', + 'description': 'The Thiccest Residence Hall', + 'popupContent': 'Blitman Commons' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.664715, 42.733772] + } + }, + { + 'type': 'Feature', + '_id': 'warren', + 'id': 'warren', + 'properties': { + 'name': 'Warren Hall', + 'nick': 'Warren', + 'category': 'Student Housing', + 'description': 'Residence Hall', + 'popupContent': 'Warren Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.67525, 42.727911] + } + }, + { + 'type': 'Feature', + '_id': 'williams', + 'id': 'williams', + 'properties': { + 'name': 'Williams Apartments', + 'nick': 'Williams, Stack', + 'category': 'Student Housing', + 'description': 'Residence Hall', + 'popupContent': 'Williams Apartments' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.664544, 42.733971] + } + }, + { + 'type': 'Feature', + '_id': 'exops', + 'id': 'exops', + 'properties': { + 'name': '2021 15th Street', + 'nick': 'Government & Community Relations, Media Relations', + 'category': 'Operations & Administration', + 'description': 'External Relations offices', + 'popupContent': '2021 15th Street' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.676977, 42.732908] + } + }, + { + 'type': 'Feature', + '_id': 'parking', + 'id': 'parking', + 'properties': { + 'name': '2144 Burdett Avenue', + 'nick': 'Parking Building', + 'category': 'Operations & Administration', + 'description': 'Go here for parking pass stuffs', + 'popupContent': '2144 Burdett Avenue' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.671402, 42.732192] + } + }, + { + 'type': 'Feature', + '_id': '419th', + 'id': '419th', + 'properties': { + 'name': '41 Ninth Street', + 'nick': '41 Ninth Street', + 'category': 'Operations & Administration', + 'description': 'what even is this', + 'popupContent': '41 Ninth Street' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.682864, 42.732476] + } + }, + { + 'type': 'Feature', + '_id': 'admissions', + 'id': 'admissions', + 'properties': { + 'name': 'Admissions Building', + 'nick': 'Admissions', + 'category': 'Operations & Administration', + 'description': 'Admissions office is located here', + 'popupContent': 'Admissions Building' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.675528, 42.730648] + } + }, + { + 'type': 'Feature', + '_id': 'alumni', + 'id': 'alumni', + 'properties': { + 'name': 'Heffner Alumni House', + 'nick': 'Heffner Alumni House', + 'category': 'Operations & Administration', + 'description': 'alumni events', + 'popupContent': 'Alumni House (Heffner)' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.678216, 42.732883] + } + }, + { + 'type': 'Feature', + '_id': 'blaw', + 'id': 'blaw', + 'properties': { + 'name': 'Blaw Knox 1 & 2', + 'nick': 'Blaw', + 'category': 'Operations & Administration', + 'description': 'Rusty building', + 'popupContent': 'Blaw Knox 1 & 2' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.680893, 42.732037] + } + }, + { + 'type': 'Feature', + '_id': 'alumni', + 'id': 'alumni', + 'properties': { + 'name': 'Heffner Alumni House', + 'nick': 'Heffner Alumni House', + 'category': 'Operations & Administration', + 'description': 'alumni events', + 'popupContent': 'Alumni House (Heffner)' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.678216, 42.732883] + } + }, + { + 'type': 'Feature', + '_id': 'boiler11', + 'id': 'boiler11', + 'properties': { + 'name': 'Boiler House, 11th Street', + 'nick': 'Boiler House', + 'category': 'Operations & Administration', + 'description': 'Non-Student Mail service', + 'popupContent': 'Boiler House, 11th Street' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.680229, 42.73268] + } + }, + { + 'type': 'Feature', + '_id': 'boilersage', + 'id': 'boilersage', + 'properties': { + 'name': 'Boiler House, Sage Avenue', + 'nick': 'Boiler House', + 'category': 'Operations & Administration', + 'description': 'Non-Student Mail service', + 'popupContent': 'Boiler House, Sage Avenue' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.681762, 42.73117] + } + }, + { + 'type': 'Feature', + '_id': 'grad', + 'id': 'grad', + 'properties': { + 'name': 'Graduate Education', + 'nick': 'Graduate Education', + 'category': 'Operations & Administration', + 'description': 'Graduate Education office building', + 'popupContent': 'Graduate Education' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.675926, 42.732659] + } + }, + { + 'type': 'Feature', + '_id': 'grounds', + 'id': 'grounds', + 'properties': { + 'name': 'Greenhouses and Grounds Barn', + 'nick': 'Greenhouses and Grounds Barn', + 'category': 'Operations & Administration', + 'description': 'Site for plants for Grounds crew', + 'popupContent': 'Greenhouses and Grounds Barn' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.66791, 42.728718] + } + }, + { + 'type': 'Feature', + '_id': 'hbuild', + 'id': 'hbuild', + 'properties': { + 'name': 'H Building', + 'nick': 'H Building', + 'category': 'Operations & Administration', + 'description': 'What is in here?', + 'popupContent': 'H Building' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.679231, 42.732592] + } + }, + { + 'type': 'Feature', + '_id': 'jbuild', + 'id': 'jbuild', + 'properties': { + 'name': 'J Building', + 'nick': 'J Building', + 'category': 'Operations & Administration', + 'description': 'Storage??', + 'popupContent': 'J Building' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.679803, 42.733148] + } + }, + { + 'type': 'Feature', + '_id': 'patroon', + 'id': 'patroon', + 'properties': { + 'name': 'Patroon Manor', + 'nick': 'Patroon Manor', + 'category': 'Operations & Administration', + 'description': 'Private property?', + 'popupContent': 'Patroon Manor' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.663714, 42.736883] + } + }, + { + 'type': 'Feature', + '_id': 'pubsafe', + 'id': 'pubsafe', + 'properties': { + 'name': 'Public Safety', + 'nick': 'pubsafe', + 'category': 'Operations & Administration', + 'description': 'pubsafe Building', + 'popupContent': 'Public Safety' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.677031, 42.729261] + } + }, + { + 'type': 'Feature', + '_id': 'service', + 'id': 'service', + 'properties': { + 'name': 'Service Building', + 'nick': 'Service', + 'category': 'Operations & Administration', + 'description': 'Various servicing services', + 'popupContent': 'Service Building' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.681052, 42.732793] + } + }, + { + 'type': 'Feature', + '_id': 'troy', + 'id': 'troy', + 'properties': { + 'name': 'Troy Building', + 'nick': 'TROY', + 'category': 'Operations & Administration', + 'description': 'Location of President Jackson\'s office', + 'popupContent': 'Troy Building' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.680525, 42.731029] + } + }, + { + 'type': 'Feature', + '_id': 'vcc', + 'id': 'vcc', + 'properties': { + 'name': 'Voorhees Computing Center', + 'nick': 'VCC', + 'category': 'Operations & Administration', + 'description': 'An old converted chapel, it is now the central building for all issues computer related', + 'popupContent': 'Voorhees Computing Center (VCC)' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.681755, 42.729231] + } + }, + { + 'type': 'Feature', + '_id': 'garage', + 'id': 'garage', + 'properties': { + 'name': 'College Ave Parking Garage', + 'nick': 'Parking Garage', + 'category': 'Operations & Administration', + 'description': 'Multilevel parking garage, located off College Ave, close to EMPAC', + 'popupContent': 'College Ave Parking Garage' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.681549, 42.727745] + } + }, + { + 'type': 'Feature', + '_id': 'sigep', + 'id': 'sigep', + 'properties': { + 'name': 'Sigma Phi Epsilon (ΣΦΕ)', + 'nick': 'SigEp, SPE', + 'category': 'Fraternity/Sorrority', + 'description': '10/10 would recommend', + 'popupContent': 'Sigma Phi Epsilon (ΣΦΕ)' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.677091, 42.732331] + } + }, + { + 'type': 'Feature', + '_id': 'cary', + 'id': 'cary', + 'properties': { + 'name': 'Cary Hall', + 'nick': 'Cary, Freshman Five, Freshman Hill', + 'category': 'Student Housing', + 'description': 'One of five identical housing buildings in the \'Freshman Five\'', + 'popupContent': 'Cary Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.67459, 42.728845] + } + }, + { + 'type': 'Feature', + '_id': 'davison', + 'id': 'davison', + 'properties': { + 'name': 'Davison Hall', + 'nick': 'Davison', + 'category': 'Student Housing', + 'description': 'Residence Hall', + 'popupContent': 'Davison Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.674021, 42.727277] + } + }, + { + 'type': 'Feature', + '_id': 'crockett', + 'id': 'crockett', + 'properties': { + 'name': 'Crockett Hall', + 'nick': 'Crockett', + 'category': 'Student Housing', + 'description': 'Freshman Five Residence Hall', + 'popupContent': 'Crockett Hall' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.673421, 42.728285] + } + }, + { + 'type': 'Feature', + '_id': 'robinson', + 'id': 'robinson', + 'properties': { + 'name': 'Robinson Field', + 'nick': 'Baseball Field', + 'category': 'Student Life', + 'description': 'Used for baseball practice', + 'popupContent': 'Robinson Field' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.672997, 42.735666] + } + }, + { + 'type': 'Feature', + '_id': 'ecomplex', + 'id': 'ecomplex', + 'properties': { + 'name': 'E-Complex', + 'nick': 'E-Complex', + 'category': 'Student Housing', + 'description': 'Residence Hall', + 'popupContent': 'E-Complex' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.679182, 42.731394] + } + } + ] +}; + +/* +Locations: +ACADEMIC & RESEARCH +Amos Eaton Hall +Carnegie Building +Center for Biotechnology and Interdisciplinary Studies (CBIS) +Cogswell Laboratory +Darrin Communications Center +Empire State Hall +Experimental Media & Performing Arts Center (EMPAC) +Folsom Library +Greene Building +Jonsson Engineering Center (JEC) +Jonsson-Rowland Science Center +Lally Hall +LINAC Facility (Gaerttner Laboratory) +Low Center for Industrial Innovation (CII) +Materials Research Center (MRC) +Pittsburgh Building +Ricketts Building +Russell Sage Laboratory +Walker Laboratory +West Hall +Winslow Building + +STUDENT LIFE +87 Gymnasium +Academy Hall +Alumni Sports & Recreation Center +Chapel + Cultural Center +Commons Dining Hall +East Campus Athletic Village Arena (ECAV) +East Campus Athletic Village Stadium +Houston Field House +Mueller Center +Playhouse +Radio Club W2SZ +Rensselaer Union +Robinson Field +Robison Swimming Pool +Russell Sage Dining Hall + +STUDENT HOUSING +Barton Hall +Blitman Commons +Bray Hall +Bryckwyck +Burdett Avenue Residence Hall +Cary Hall +Colonie Apartments +Crockett Hall +Davison Hall +E-Complex +Hall Hall +Nason Hall +North Hall +Nugent Hall +Polytechnic Residence Commons +Quadrangle Complex +Rensselaer Apartment Housing Project A +Rensselaer Apartment Housing Project B +Rousseau Apartments +Sharp Hall +Stacwyck Apartments +Warren Hall +Williams Apartments + +OPERATIONS & ADMINISTRATION +2021 15th Street +2144 Burdett Avenue +41 Ninth Street +Admissions +Alumni House (Heffner) +Blaw-Knox 1 & 2 +Boiler House, 11th Street +Boiler House, Sage Avenue +Graduate Education +Greenhouses and Grounds Barn +H Building +J Building +Patroon Manor +Public Safety +Service Building +Troy Building +Voorhees Computing Center (VCC) + +PARKING +Parking Garage +*/ diff --git a/scripts/routes/imagePreview.js b/scripts/routes/imagePreview.js new file mode 100644 index 0000000..e0487b7 --- /dev/null +++ b/scripts/routes/imagePreview.js @@ -0,0 +1,11 @@ +//Function to update the preview image for the image submission form +function updatePreview(){ + //get the image link + var link = $('#imageFormLink').val(); + //save the image into variable for optimization + var image = $('#imageFormPreview'); + //change the image link + image.attr('src',link); + //set the css to display the image + image.css('display', 'block'); +} \ No newline at end of file diff --git a/scripts/routes/index.js b/scripts/routes/index.js new file mode 100644 index 0000000..383e6da --- /dev/null +++ b/scripts/routes/index.js @@ -0,0 +1,16 @@ +const express = require('express'); +const router = express.Router(); +var path = require("path"); +const {ensureAuthenticated} = require('../../config/auth'); + +router.get('/', (req, res) => res.render('welcome', {page_name: "Welcome", layout: "layout.ejs", extractStyles: true})); + +router.get('/admin', ensureAuthenticated, (req, res) => + res.render('admin', { + page_name: "Admin", + name: req.user.name, + layout: "layout2.ejs", + extractStyles: true + })); + +module.exports = router; diff --git a/public/infoPreview.php b/scripts/routes/infoPreview.php similarity index 100% rename from public/infoPreview.php rename to scripts/routes/infoPreview.php diff --git a/scripts/routes/machine_sites.js b/scripts/routes/machine_sites.js new file mode 100644 index 0000000..6df29bc --- /dev/null +++ b/scripts/routes/machine_sites.js @@ -0,0 +1,201 @@ +var locations_shops = { + 'type': 'FeatureCollection', + 'features': [ + { + 'type': 'Feature', + 'id': 'jec_shop', + 'properties': { + 'name': 'JEC Student Machines Shop', + 'nick': 'Processes Shop', + 'thumbnail':'https://www.rpiviews.com/images/rpi/card00188_fr.jpg', + 'description': 'Machine Shop located in JEC', + 'popupContent': 'JEC Student Machines Shop', + 'type': 'machine' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.680042, 42.729716] + }, + 'room': { + 'hours': { + 'mon':'9 a.m.-noon and 2-8 p.m.', + 'tues':'9 a.m.—noon and 1-7 p.m. ', + 'weds': '10 a.m.—1 p.m. and 2-8 p.m.', + 'thurs':'9 a.m.—noon and 2-8 p.m.', + 'fri':'8-11 a.m. and noon-3 p.m.', + 'sat':'11 a.m. -3 p.m.,', + 'sun':'2-6 p.m.' + }, + 'info': 'All students who intend to use the machines in this room\n\ + must pass the SOE Safety Test Rensselaer Manufacturing and Prototyping\n\ + Laboratories-Safety Orientation listed on RPI HR Skillport Site. \n\ + They must show proof of taking and passing the class to shop supervisors.\n\ + Afterwards, all students are welcome to use the machines in the JEC Student Machines Shop.\n\ + No prior knowledge of machining is required. However, it is recommended\n\ + that students take Engineering Processes (ENGR 1300).', + 'location': 'Jonsson Engineering Center (JEC) 1010' + }, + 'contents': { + 'machines': ['Haas TL 1 CNC Lathe', 'Acer 3-Axis CNC Milling Machine', + 'Laguna Swift 4’x4’ CNC Router', 'Thunder Mars90 100w laser Cutter', + 'Snap-on Sandblaster', 'General Machining and Fabrication Equipment', + 'Metal and Plastic Forming and Shearing Equipment', + 'Steel and Plastic Welding Equipment' ], + 'available_materials': '', + 'equipment': '' + } + }, + { + 'type': 'Feature', + 'id': 'ied_shop', + 'properties': { + 'name': 'Design Lab/IED Shop', + 'nick': 'IED Shop', + 'thumbnail': '', + 'description': 'Machine Shop located in JEC', + 'popupContent': 'Design Lab/IED Shop', + 'type': 'machine' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.68053,42.729704] + }, + 'room': { + 'hours': { + 'mon':'9 am - 4 pm and 5-9 pm', + 'tues':'9 am - 4 pm and 5-9 pm', + 'weds':'9 am - 4 pm and 5-9 pm', + 'thurs':'9 am - 4 pm and 5-9 pm', + 'fri':'9 am - 4 pm and 5-7 pm', + 'sat':'', + 'sun':'' + }, + 'info': 'All students who intend to use the machines in this room\n\ + must pass the SOE Safety Test Rensselaer Manufacturing and Prototyping\n\ + Laboratories-Safety Orientation listed on RPI HR Skillport Site. \n\ + They must show proof of taking and passing the class to shop supervisors.\n\ + Afterwards, usage of machines is determined on case-by-case basis.\n\ + Students are always welcome to see the shop supervisor to discuss their projects.', + 'location': 'Jonsson Engineering Center (JEC) Room 2332' + }, + 'contents': { + 'machines': ['Haas CNC Control Simulators', 'Haas Mini Mill', 'Haas SL 10', + 'Haas Super VF 2', 'Haas Tool Room Mill', 'Mitutoyo Crysta-Plus M574 CMM', + 'Paint Booth', 'General Machining and Fabrication Equipment', + 'Electronic Scopes and Meters'], + 'available_materials': '', + 'equipment': '' + } + }, + { + 'type': 'Feature', + 'id': 'forge_shop', + 'properties': { + 'name': 'Maker Space: The Forge', + 'nick': 'The Forge', + 'thumbnail': 'http://manufacturing.eng.rpi.edu/sites/default/files/facilities/Forge.jpg', + 'description': 'Maker Space located in', + 'popupContent': 'Design Lab/IED Shop', + 'type': 'machine' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.678974, 42.729574] + }, + 'room': { + 'hours': { + 'mon':'', + 'tues':'', + 'weds': '', + 'thurs':'', + 'fri':'', + 'sat':'', + 'sun':'' + }, + 'info': 'The Forge charges $10 per semester for students to gain access to\n\ + all of the machines. Afterwards, students are charged $0.05/gram of filament\n\ + for the 3D Printer and $0.50 per hour of light time for the laser cutter.', + 'location': 'George M. Low Center for Industrial Innovation (CII) Room 2037' + }, + 'contents': { + 'machines': ['3D Scanners','Form 1+ 3D Printer','gCreate 3D Printer', + 'Laser Cutter','Makerbot Mini','Makerbot Z18’s','Prusa i3’s', + 'Sewing Machine','Taz 5','Taz Mini','Taz MOAR-Struder','Taz Quadfusion', + 'Vinyl Cutter'], + 'available_materials': ['PLA', 'ABS', 'PETG'], + 'equipment': '' + } + }, + { + 'type': 'Feature', + 'id': 'mill_shop', + 'properties': { + 'name': 'Manufacturing Innovation Learning Laboratory', + 'nick': 'The MILL', + 'thumbnail':'', + 'description': 'Manufacturing/maching shop located in the CII.', + 'popupContent': 'Manufacturing Innovation Learning Laboratory', + 'type': 'machine' + }, + 'geometry': { + 'type': 'Point', + 'coordinates': [-73.679208, 42.72975] + }, + 'room': { + 'hours': { + 'mon':'', + 'tues':'', + 'weds': '', + 'thurs':'', + 'fri':'', + 'sat':'', + 'sun':'' + }, + 'info': 'All students who intend to use the machines in this room\n\ + must pass the SOE Safety Test Rensselaer Manufacturing and Prototyping\n\ + Laboratories-Safety Orientation listed on RPI HR Skillport Site. \n\ + They must show proof of taking and passing the class to shop supervisors.\n\ + Afterwards, usage of machines is determined on case-by-case basis.\n\ + Students are always welcome to see the shop supervisor to discuss their projects.', + 'location': 'George M. Low Center for Industrial Innovation (CII) Room 1027' + }, + 'contents': { + 'machines': ['Haas VF 1 – CNC Milling Machine', + 'Haas OM-2 CNC Milling Machine', + 'Moore Nanotechnology Systems 350 UPL Lathe', + 'Hurricane Laser Cutter Category 4 Charley 80W', + 'Adept Cobra 800 SCARA Robot', + 'SONY Conveyor System', + 'Staubli RX 90 Robot', + 'Fanuc LR Mate, with Vision, Robot Educational Training System', + 'Stratasys Dimension FDM Machine', + 'Stratasys UPrint FDM Machine', + 'Z-Corporation Z310 3D Printer', + 'B-9 Creator Stereolithography Printer', + 'Phenix Direct Metal Selective Laser Sintering 3D Printer', + 'Brown and Sharpe Gage 2000 CMM', + 'Faro Platinum Inspection Arm', + 'Arburg Allrounder 270c Injection Molder', + 'Arburg Allrounder 221k Injection Molder', + 'Battenfeld Injection Molder', + 'Formech 660 Vacuum Former', + 'Flow Mach2 Abrasive Water-Jet Cutter', + 'Sonitek S840 Ultrasonic Welder', + 'Sonitek TS500 Thermal Press', + 'Branson Ultrasonic Welder 2000 D', + 'Branson Ultrasonic Welder 2000 DT', + 'General Machining Equipment'], + 'available_materials': [], + 'equipment': '' + } + } + ] +}; + +/* +Locations: +JEC Student Machines Shop +Design Lab/IED Shop +Maker Space: The Forge +Manufacturing Innovation Learning Laboratory +*/ diff --git a/scripts/routes/main_page.js b/scripts/routes/main_page.js new file mode 100644 index 0000000..f0ffcbf --- /dev/null +++ b/scripts/routes/main_page.js @@ -0,0 +1,7 @@ +const express = require('express'); +const router = express.Router(); +var path = require("path"); + +router.get('/', (req, res) => res.sendFile(path.join(__dirname, '..', 'views/main_page.html'))); + +module.exports = router; diff --git a/scripts/routes/map.js b/scripts/routes/map.js new file mode 100644 index 0000000..6887ccb --- /dev/null +++ b/scripts/routes/map.js @@ -0,0 +1,234 @@ +/* +* This is the main file responsible for handling the map. +* +* In all locations below, "L" refers to the Leaflet API. + +Each point on the map is a "Feature" type object. These Features +specifically are "Points" that show on the map. +There are many methods that can be used on points, described here: +https://leafletjs.com/reference-1.3.4.html#point + +**IMPORTANT** +**Coordinates for Point objects are used backwards (long, lat) +for some reason according to the API** +*/ + + +/* +Display the map on the page at id 'mapContainer' + +setView() focuses the map around the given point. +In this case, it does so on creation of the map (pageload) +Usage: setView([latitude, longitude], zoomlevel) +*/ + +let mymap = L.map('mapContainer', { + center: [42.729453, -73.6802], + zoom: 16, + layers: [] +}); + + +////////////////////////////////// MAP STYLE //////////////////////////////// +/* Tile Layer is the display style (satellite, street, etc.) +Attribution refers to the creeator of the layer (accreditation)*/ +L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', { + maxZoom: 18, + attribution: 'Map data © OpenStreetMap contributors, ' + + 'CC-BY-SA, ' + + 'Imagery © Mapbox', + id: 'mapbox.streets' +}).addTo(mymap); + + +////////////////////////////////// CAMPUS HIGHLIGHT //////////////////////////////// +// TODO?: Change this to do a query to the database for the cordinates then add them to the list +// so that we don't have to hard code the points here +// Highlight campus on the map using points as an outline, connect-the-dots style +const westCampus = [ + [42.72817, -73.68481], + [42.73037, -73.68417], + [42.7306, -73.68649], + [42.73206, -73.68617], + [42.73309, -73.68596], + [42.73363, -73.68565], + [42.73342, -73.68449], + [42.73395, -73.6823], + [42.73298, -73.67665], + [42.73235, -73.67178], + [42.72603, -73.67356] +]; +L.polygon(westCampus, {color: 'gray', opacity: 0.1}).addTo(mymap); + +const eastCampus = [ + [42.73066, -73.67207], + [42.72994, -73.6687], + [42.73085, -73.66701], + [42.73197, -73.66607], + [42.73407, -73.66354], + [42.73534, -73.6632], + [42.73776, -73.66284], + [42.73753, -73.66389], + [42.73748, -73.66478], + [42.7375, -73.66515], + [42.73768, -73.66648], + [42.73816, -73.66997], + [42.73647, -73.6705], + [42.73362, -73.67128], + [42.73241, -73.67159] +]; +L.polygon(eastCampus, {color: 'gray', opacity: 0.1}).addTo(mymap); + +const polyTech = [ + [42.722626, -73.679767], + [42.72216, -73.67907], + [42.72166, -73.67969], + [42.72206, -73.68025], + [42.7223, -73.68022] +]; +L.polygon(polyTech, {color: 'gray', opacity: 0.1}).addTo(mymap); + +const robinsonField = [ + [42.73658, -73.67348], + [42.736351, -73.672031], + [42.734905, -73.672439], + [42.735126, -73.673909] +]; +L.polygon(robinsonField, {color: 'gray', opacity: 0.1}).addTo(mymap); + + + +////////////////////////////////// MAP POPUPS & ONCLICKS //////////////////////////////// +// Default popup object that would show on the map if a nonregistered point is clicked +const popup = L.popup(); + +/** + * Perform the following operations every time the map layer is clicked + * @param e an event, in this case a click + */ +const onMapClick = function(e) { + popup + .setLatLng(e.latlng) + .setContent('You clicked the map at ' + e.latlng.toString()) + .openOn(mymap); +}; + +mymap.on('click', onMapClick); + +/** + * Fetch the coordinates of a location in an array [longitude, latitude] + * @param id The id of the given location + */ +const getCoords = function(id) { + for (let i=0; i < locations['features'].length; i++) { + if (locations['features'][i]['id'] == id) { + point = locations['features'][i]['geometry']['coordinates']; + return point; + } + } + return 0; +}; + +/** + * Binds properties to each Feature in a Feature Collection + * @param feature the feature object that will be operated on + * @param layer the layer the feature will be added to + */ +const onEachFeature = function(feature, layer) { + // does this feature have a property named popupContent? + if (feature.properties && feature.properties.popupContent) { + layer.bindPopup(`
    ${feature.properties.popupContent}
    `); + + const building = feature.id; + const point = getCoords(building); + console.log(feature.properties); + let newPopupContent = ''; + if (feature.properties.type == "machine") { + newPopupContent += `` + } + else { + newPopupContent += ``; + } + newPopupContent += ` + \ + \ + `; + layer.bindPopup(newPopupContent); + } +}; + +//Array of circleMarkers +let locations_arr = []; +let locations_shops_arr = []; + +/** + * Style and add the campus points to the map +*/ +L.geoJSON(locations, { + style: function (feature) { + return feature.properties && feature.properties.style; + }, + // For each feature added to the map, it will perform the onEachFeature() function + onEachFeature: onEachFeature, + + // Adds a circleMarker at the point specified by the coords of the feature + pointToLayer: function (feature, latlng) { + const campus_circle_settings = { + radius: 8, + fillColor: '#ff7800', + color: '#000', + weight: 1, + opacity: 1, + fillOpacity: 0.8 + }; + locations_arr.push(L.circleMarker(latlng,campus_circle_settings)); + return locations_arr[locations_arr.length-1]; + }, +}); + +/** + * Style and add the machine site points to the map +*/ +L.geoJSON(locations_shops, { + style: function (feature) { + return feature.properties && feature.properties.style; + }, + // For each feature added to the map, it will perform the onEachFeature() function + onEachFeature: onEachFeature, + + // Adds a circleMarker at the point specified by the coords of the feature + pointToLayer: function (feature, latlng) { + const machine_circle_settings = { + // circleMarker shows at the Point's location + radius: 8, + fillColor: '#0000ff', + color: '#000', + weight: 1, + opacity: 1, + fillOpacity: 0.8 + }; + locations_shops_arr.push(L.circleMarker(latlng,machine_circle_settings)); + return locations_shops_arr[locations_shops_arr.length-1]; + }, +}); + + +/* Creating layer groups to hold arrays of locations +* These layer groups will be added to the map, and will be represented by +* the map keys. The maps keys filter which dots are shown on the map. +*/ +let campus_locations_layer = L.layerGroup(locations_arr); +let machine_locations_layer = L.layerGroup(locations_shops_arr); + +let overlayMaps = { + 'Campus Locations': campus_locations_layer, + 'Machine Shop Locations': machine_locations_layer + // add more layer groups here +}; + +// adding the layer groups in overlayMaps to the map (but it doesn't render yet) +L.control.layers(null, overlayMaps).addTo(mymap); diff --git a/scripts/routes/user.js b/scripts/routes/user.js new file mode 100644 index 0000000..3235b03 --- /dev/null +++ b/scripts/routes/user.js @@ -0,0 +1,167 @@ +const express = require('express'); +const router = express.Router(); +const bcrypt = require('bcryptjs'); +const passport = require('passport'); +const bodyParser = require('body-parser'); +const mongoose = require('mongoose'); +const jsonParser = bodyParser.json(); + +// UserModel +const User = require('../../models/User'); +const Location = require('../../models/Locations'); + +// login page +router.get('/login', (req, res) => res.render('login', { page_name: "Login", layout: "layout2.ejs", extractStyles: true })); + +// Login Handle +router.post('/login', (req, res, next) => { + console.log('authenticating\n'); + passport.authenticate('local', { + successRedirect: '/admin', + failureRedirect: '/user/login', + failureFlash: true + })(req, res, next); +}); + +router.get('/logout', (req, res) => { + console.log('logging out'); + req.logOut(); + req.flash('success_msg', 'You are logged out'); + res.redirect('/user/login'); +}); + +// registration page +router.get('/register', (req, res) => res.render('register', { page_name: "Register", layout: "layout2.ejs", extractStyles: true })); + +// Register Handle +router.post('/register', (req, res) => { + const { name, email, password, password2 } = req.body; + let errors = []; + + //check required fields + if (!name || !email || !password || !password2) { + errors.push({ msg: 'Please fill in all fields' }) + } + + //check passwords match + if (password != password2) { + errors.push({ msg: 'Passwords do not match' }) + } + + //check pass length + if (password.length < 6) { + errors.push({ msg: 'Password should be at least 6 characters' }) + } + + if (errors.length > 0) { + res.render('register', { + errors, + name, + email, + password, + password2 + }); + } else { + // Validation passed + User.findOne({ email: email }) + .then(user => { + if (user) { + // User exists + errors.push({ msg: 'Email is already registered' }) + res.render('register', {page_name: "Register", extractStyles: true },{ + errors, + name, + email, + password, + password2 + }); + } else { + const newUser = new User({ + name, + email, + password + }); + + // HASH password + bcrypt.genSalt(10, (error, salt) => + bcrypt.hash(newUser.password, salt, (err, hash) => { + if (err) throw (err); + + // set password + newUser.password = hash; + newUser.save() + .then(user => { + req.flash('success_msg', 'You are now registered and can login') + res.redirect('/user/login'); + }) + .catch(err => console.log(err)) + + })) + } + }); + } +}); + +// Search Handle +// TODO: make the search case insensitive and allow for regex matching instead of exact _id match +router.get('/search', jsonParser, (req, res) => { + const query = req.query; + console.log(query); + + + // Display all location results if search with no query + if(query["query"]== null || query["query"]== ''){ + Location.find() + .then(results => { + /*results.forEach(element => { + console.log(element['properties']['name']); + });*/ + res.render('searchResults', { page_name: "Search", layout: "layout2.ejs", extractStyles: true, results: results, results_count: results.length}); + }) + .catch(err => { + console.log(err) + }); + } + else{ + Location.find({ + // Find case insensitive query matches based on id, name, or nickname + $or: [ + { + _id: { + $regex: query["query"], + $options: "i" + } + }, + { + "properties.name": { + $regex: query["query"], + $options: "i" + } + }, + { + "properties.nick": { + $regex: query["query"], + $options: "i" + } + } + ] + }) + .then(results => { + res.render('searchResults', { page_name: "Search", layout: "layout2.ejs", extractStyles: true, results: results, results_count: results.length}); + }) + .catch(err => { + console.log(err) + }); + } + + +}); + +// main page --- the map +router.get('/main_page', (req, res) => res.render('map', { page_name: "Map", layout: "layout2.ejs", extractStyles: true })); + + +router.get('/info', (req, res) => res.render('info', { page_name: "Info", layout: "layout2.ejs", extractStyles: true })); + + +module.exports = router; \ No newline at end of file diff --git a/scripts/temp.txt b/scripts/temp.txt new file mode 100644 index 0000000..e69de29 diff --git a/server.js b/server.js index 38494ce..ee9181c 100644 --- a/server.js +++ b/server.js @@ -10,28 +10,28 @@ const locations = require('./machine_sites.json'); const app = express(); app.use(express.static(__dirname)) - .use(bodyParser.urlencoded({extended: true})) - .use(bodyParser.json()); + .use(bodyParser.urlencoded({ extended: true })) + .use(bodyParser.json()); -dotenv.config({path: './.env'}); +dotenv.config({ path: './.env' }); /* =========================== DATABASE CONNECTION INFO ============================== */ const user = process.env.DB_USER; const pass = process.env.DB_PASS; const uri = `mongodb+srv://${user}:${pass}@rpicampusmap-fwvzb.gcp.mongodb.net/test?retryWrites=true`; -const options = {useNewUrlParser: true}; +const options = { useNewUrlParser: true }; /* =================================================================================== */ /* ================================= SERVER START ==================================== */ const port = process.env.PORT; -MongoClient.connect(uri, options, function(err, db) { +MongoClient.connect(uri, options, function (err, db) { if (err) { throw err; } else { - console.log("Database connected in route '/'!"); - let dbo = db.db("forgemill"); + console.log('Database connected in route \'/\'!'); + let dbo = db.db('forgemill'); // Populate Database with locations if need be (ONLY FOR USERS WITH WRITE ACCESS). // console.log(locations); @@ -46,19 +46,19 @@ MongoClient.connect(uri, options, function(err, db) { // Download initial location data from database before starting server dbo.collection('locations').find().toArray() - .then(function(result) { - // console.log(result);(location + .then(function (result) { + // console.log(result);(location - var locationData = result; + var locationData = result; - // Start server after initial database connection - app.listen(port); - console.log('Listening on port ' + port); - db.close(); - }) - .catch(function(err) { - if (err) throw err; - }); + // Start server after initial database connection + app.listen(port); + console.log('Listening on port ' + port); + db.close(); + }) + .catch(function (err) { + if (err) throw err; + }); } @@ -66,27 +66,7 @@ MongoClient.connect(uri, options, function(err, db) { /* =================================================================================== */ /* =================================== HOMEPAGE ====================================== */ -app.get('/', function(req, res) { - /* - MongoClient.connect(uri, options, function(err, db) { - if (err) { - throw err; - } - else { - console.log("Database connected in route '/index'!"); - let dbo = db.db("locations"); - } - - db.close(); - }); - console.log("here") - */ - - res.sendFile(__dirname + '/public/views/index.html'); -}); - -app.route('/index') -.get(function(req, res) { +app.get('/', function (req, res) { /* MongoClient.connect(uri, options, function(err, db) { if (err) { @@ -103,197 +83,269 @@ app.route('/index') */ res.sendFile(__dirname + '/public/views/index.html'); - }) -.post(jsonParser, function(req, res) { - //get the location to highlight - const query = req.body.query; - const machine = req.body.machine; - console.log(req.body); - console.log("Query:", query); - console.log("Machine:", machine); - - MongoClient.connect(uri, options, function(err, db) { - if (err) - throw err; - else { - console.log("Database connected in route '/index'!") +}); - let dbo = db.db("rpicampusmap"); +app.route('/index') + .get(function (req, res) { + /* + MongoClient.connect(uri, options, function(err, db) { + if (err) { + throw err; + } + else { + console.log("Database connected in route '/index'!"); + let dbo = db.db("locations"); + } + + db.close(); + }); + console.log("here") + */ - // switch database if necessary - if (machine == "true") - dbo = db.db("forgemill"); + res.sendFile(__dirname + '/public/views/index.html'); + }) + .post(jsonParser, function (req, res) { + //get the location to highlight + const query = req.body.query; + const machine = req.body.machine; + console.log(req.body); + console.log('Query:', query); + console.log('Machine:', machine); + + MongoClient.connect(uri, options, function (err, db) { + if (err) + throw err; + else { + console.log('Database connected in route \'/index\'!'); + + let dbo = db.db('rpicampusmap'); + + // switch database if necessary + if (machine == 'true') + dbo = db.db('forgemill'); + + dbo.collection('locations').find({ 'id': query }).toArray() + .then(function (result) { + console.log('Results:\n', result); + res.send(result); + }) + .catch(function (err) { + if (err) + console.error('ERROR:', err); + }); + db.close(); + } + }); - dbo.collection("locations").find({'id': query}).toArray() - .then(function(result) { - console.log("Results:\n", result); - res.send(result); - }) - .catch(function(err) { - if (err) - console.error("ERROR:", err); - }); - db.close(); - } }); - -}); /* =================================================================================== */ /* ==================================== SEARCH ======================================= */ app.route('/search') -.get(function(req, res) { - console.log("Get search results!"); - res.sendFile(__dirname + '/public/views/searchResults.html'); -}) -.post(jsonParser, function(req, res) { - const query = req.body.query; - console.log("Query:", query); - - MongoClient.connect(uri, options, function(err, db) { - if (err) - throw err; - else { - console.log("Database connected in route '/search'!") - let db1 = db.db("rpicampusmap"); - let db2 = db.db("forgemill"); - let results = []; - - // Search the database for locations matching the given regular expression - // Search by name and by nickname for any match of the substring - db1.collection("locations").find({'$or': [ - {'properties.name': {'$regex': query, '$options': 'i'} }, - {'properties.nick': {'$regex': query, '$options': 'i'} } - // add here to look through machines - ]}).toArray() - .then(function(result1) { - console.log("Result1:\n", result1); - results = results.concat(result1); - }) - .catch(function(err) { - if (err) - console.error("ERROR:", err); - }); + .get(function (req, res) { + console.log('Get search results!'); + res.sendFile(__dirname + '/public/views/searchResults.html'); + }) + .post(jsonParser, function (req, res) { + const query = req.body.query; + console.log('Query:', query); - db2.collection("locations").find({'$or': [ - {'properties.name': {'$regex': query, '$options': 'i'} }, - {'properties.nick': {'$regex': query, '$options': 'i'} }, - {'contents.machines': {'$regex': query, '$options': 'i'} } - ]}).toArray() - .then(function(result2) { - console.log("Result2:\n", result2); - results = results.concat(result2); - console.log("Results:\n", results); - res.send(results); - }) - .catch(function(err) { - if (err) - console.error("ERROR:", err); - }); + MongoClient.connect(uri, options, function (err, db) { + if (err) + throw err; + else { + console.log('Database connected in route \'/search\'!'); + let db1 = db.db('rpicampusmap'); + let db2 = db.db('forgemill'); + let results = []; + + // Search the database for locations matching the given regular expression + // Search by name and by nickname for any match of the substring + db1.collection('locations').find({ + '$or': [ + { 'properties.name': { '$regex': query, '$options': 'i' } }, + { 'properties.nick': { '$regex': query, '$options': 'i' } } + // add here to look through machines + ] + }).toArray() + .then(function (result1) { + console.log('Result1:\n', result1); + results = results.concat(result1); + }) + .catch(function (err) { + if (err) + console.error('ERROR:', err); + }); + + db2.collection('locations').find({ + '$or': [ + { 'properties.name': { '$regex': query, '$options': 'i' } }, + { 'properties.nick': { '$regex': query, '$options': 'i' } }, + { 'contents.machines': { '$regex': query, '$options': 'i' } } + ] + }).toArray() + .then(function (result2) { + console.log('Result2:\n', result2); + results = results.concat(result2); + console.log('Results:\n', results); + res.send(results); + }) + .catch(function (err) { + if (err) + console.error('ERROR:', err); + }); + + db.close(); + } + }); - db.close(); - } }); - -}); +/* =================================================================================== */ /* ===================================== INFO ======================================== */ app.route('/info') -.get(function (req, res) { - res.sendFile(__dirname + '/public/views/machine_sites_info.html') -}) -.post(jsonParser, function(req, res) { - const comment = req.body.comment; - const query = req.body.query; - const machine = req.body.machine; - console.log(req.body); - console.log("Query:", query); - console.log("Machine:", machine); + .get(function (req, res) { + res.sendFile(__dirname + '/public/views/info.html'); + }) + .post(jsonParser, function (req, res) { + const comment = req.body.comment; + const query = req.body.query; + const machine = req.body.machine; + console.log(req.body); + console.log('Query:', query); + console.log('Machine:', machine); + + MongoClient.connect(uri, options, function (err, db) { + if (err) + throw err; + else { + console.log('Database connected in route \'/info\'!'); - MongoClient.connect(uri, options, function(err, db) { - if (err) - throw err; - else { - console.log("Database connected in route '/info'!") + let dbo = db.db('rpicampusmap'); - let dbo = db.db("rpicampusmap"); + // switch database if necessary - // switch database if necessary + if (machine == 'true') { + dbo = db.db('forgemill'); + } - if (machine == "true"){ - dbo = db.db("forgemill"); - } + dbo.collection('locations').find({ 'id': query }).toArray() + .then(function (result) { + console.log('Results:\n', result); + res.send(result); + }) + .catch(function (err) { + if (err) + console.error('ERROR:', err); + }); + db.close(); + } + }); - dbo.collection("locations").find({'id': query}).toArray() - .then(function(result) { - console.log("Results:\n", result); - res.send(result); - }) - .catch(function(err) { - if (err) - console.error("ERROR:", err); - }); - db.close(); + if (comment) { + console.log(comment); } + }); - if (comment) { - console.log(comment); - } +/* ================================================================================== */ -}); +/* =================================== COMMENT ====================================== */ +app.route('/comment') + .post(jsonParser, function (req, res) { + const loc = req.body.loc; + const author = req.body.author; + const text = req.body.text; + const date = req.body.date; + console.log(req.body); + console.log('author:', author); + console.log('text:', text); + console.log('date:', date); + + MongoClient.connect(uri, options, function (err, db) { + if (err) + throw err; + else { + console.log('Database connected in route \'/info\'!'); + + let dbo = db.db('rpicampusmap'); + + // switch database if necessary + + if (machine == 'true') { + dbo = db.db('forgemill'); + } + + dbo.collection('locations').findOne({ '_id': loq }) + .then(function (result) { + console.log('Results:\n', result); + res.send(result); + }) + .catch(function (err) { + if (err) + console.error('ERROR:', err); + }); + db.close(); + } + }); + + if (comment) { + console.log(comment); + } + + }); /* ================================================================================== */ /* ==================================== ADMIN ======================================= */ app.route('/admin/request') -.get(function (req, res) { - res.sendFile(__dirname + '/public/views/register.html'); -}) -.post(function (req, res, next) { - const username = req.body.rcsID; - const password = req.body.password; + .get(function (req, res) { + res.sendFile(__dirname + '/public/views/register.html'); + }) + .post(function (req, res, next) { + const username = req.body.rcsID; + const password = req.body.password; - console.log("Username:", username); - console.log("Password:", password); + console.log('Username:', username); + console.log('Password:', password); - MongoClient.connect(uri, options, function(err, db) { - if (err) - throw err; - else { - console.log("Database connected in route '/admin'!") - } + MongoClient.connect(uri, options, function (err, db) { + if (err) + throw err; + else { + console.log('Database connected in route \'/admin\'!'); + } + }); }); -}); app.route('/login') -.get(function (req, res) { - res.sendFile(__dirname + '/public/views/login.html'); -}) -.post(function (req, res) { - res.send("Logged in Successfully"); -}); + .get(function (req, res) { + res.sendFile(__dirname + '/public/views/login.html'); + }) + .post(function (req, res) { + res.send('Logged in Successfully'); + }); app.route('/admin') -.get(function (req, res) { - // if (req.body.admin) + .get(function (req, res) { + // if (req.body.admin) res.sendFile(__dirname + '/public/views/admin.html'); - // else - // res.sendFile(__dirname + '/public/views/login.html'); -}).post(function (req, res) { - console.log("Post request in /admin"); -}); + // else + // res.sendFile(__dirname + '/public/views/login.html'); + }).post(function (req, res) { + console.log('Post request in /admin'); + }); /* ================================================================================== */ // Handle 404 - app.use(function(req, res) { - res.status(404) - .sendFile(__dirname + '/public/views/notfound.html', {error: '404: Page not Found'}); - }); - - // Handle 500 - app.use(function(error, req, res, next) { - res.status(500).send('Error 500: Internal Server Error'); - }); +app.use(function (req, res) { + res.status(404) + .sendFile(__dirname + '/public/views/notfound.html', { error: '404: Page not Found' }); +}); + +// Handle 500 +app.use(function (error, req, res, next) { + res.status(500).send('Error 500: Internal Server Error'); +}); diff --git a/service-worker.js b/service-worker.js deleted file mode 100644 index c2eabaf..0000000 --- a/service-worker.js +++ /dev/null @@ -1,103 +0,0 @@ -/* - * @license - * Your First PWA Codelab (https://g.co/codelabs/pwa) - * Copyright 2019 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License - */ -'use strict'; - -const CACHE_NAME = 'static-cache'; - -const FILES_TO_CACHE = [ - '/public/views/offline.html', - ]; - // '/', - // '/public/controllers/app.js', - // '/public/controllers/infoController.js', - // '/public/controllers/mapController.js', - // '/public/controllers/searchController.js', - // '/public/images/campusmap_logo.png', - // '/public/images/favicon.ico', - // '/public/images/logo.png', - // '/public/images/pin-128x128.png', - // '/public/images/pin-144x144.png', - // '/public/images/pin-152x152.png', - // '/public/images/pin-192x192.png', - // '/public/images/pin-256x256.png', - // '/public/images/pin-512x512.png', - // '/public/images/pin.png', - // '/public/images/rensselaer_logo.png', - // '/public/images/seal.png', - // '/public/style/homepage.css', - // '/public/style/locationInfo.css', - // '/public/style/searchResults.html', - // '/public/style/style.css', - // '/public/views/index.html', - // '/public/views/info.html', - // '/public/views/machine_sites_info.html', - // '/public/views/searchResults.html', - // '/public/geolocations.js', - // '/public/imagePreview.js', - // '/public/infoPreview.php', - // '/public/machine_sites.js', - // '/public/manifest.json', - // '/public/map.js', - // '/campusmap.sql', - // '/geolocations.json', - // '/machine_sites.json', -// ]; - -self.addEventListener('install', (evt) => { - console.log('[ServiceWorker] Install'); - // CODELAB: Precache static resources here. - evt.waitUntil( - caches.open(CACHE_NAME).then((cache) => { - console.log('[ServiceWorker] Pre-caching offline page'); - return cache.addAll(FILES_TO_CACHE); - }) - ); - self.skipWaiting(); -}); - -self.addEventListener('activate', (evt) => { - console.log('[ServiceWorker] Activate'); - evt.waitUntil( - caches.keys().then((keyList) => { - return Promise.all(keyList.map((key) => { - if (key !== CACHE_NAME) { - console.log('[ServiceWorker] Removing old cache', key); - return caches.delete(key); - } - })); - }) - ); - self.clients.claim(); -}); - -self.addEventListener('fetch', (evt) => { - console.log('[ServiceWorker] Fetch', evt.request.url); - if (evt.request.mode !== 'navigate') { - // Not a page navigation, bail. - return; - } - evt.respondWith( - fetch(evt.request) - .catch(() => { - return caches.open(CACHE_NAME) - .then((cache) => { - return cache.match('/public/views/offline.html'); - }); - }) - ); -}); diff --git a/shrinkwrap.yaml b/shrinkwrap.yaml index e495591..2629a68 100644 --- a/shrinkwrap.yaml +++ b/shrinkwrap.yaml @@ -18,7 +18,7 @@ packages: node: '>= 0.6' resolution: integrity: sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - /ajv/6.10.0: + /ajv/6.10.2: dependencies: fast-deep-equal: 2.0.1 fast-json-stable-stringify: 2.0.0 @@ -26,7 +26,7 @@ packages: uri-js: 4.2.2 dev: false resolution: - integrity: sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== + integrity: sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== /ansi-align/2.0.0: dependencies: string-width: 2.1.1 @@ -134,7 +134,7 @@ packages: component-emitter: 1.3.0 define-property: 1.0.0 isobject: 3.0.1 - mixin-deep: 1.3.1 + mixin-deep: 1.3.2 pascalcase: 0.1.1 dev: false engines: @@ -227,9 +227,9 @@ packages: get-value: 2.0.6 has-value: 1.0.0 isobject: 3.0.1 - set-value: 2.0.0 + set-value: 2.0.1 to-object-path: 0.3.0 - union-value: 1.0.0 + union-value: 1.0.1 unset-value: 1.0.0 dev: false engines: @@ -268,7 +268,7 @@ packages: async-each: 1.0.3 braces: 2.3.2 glob-parent: 3.1.0 - inherits: 2.0.3 + inherits: 2.0.4 is-binary-path: 1.0.1 is-glob: 4.0.1 normalize-path: 3.0.0 @@ -339,7 +339,7 @@ packages: /configstore/3.1.2: dependencies: dot-prop: 4.2.0 - graceful-fs: 4.1.15 + graceful-fs: 4.2.0 make-dir: 1.3.0 unique-string: 1.0.0 write-file-atomic: 2.4.3 @@ -769,7 +769,7 @@ packages: is-retry-allowed: 1.1.0 is-stream: 1.1.0 lowercase-keys: 1.0.1 - safe-buffer: 5.1.2 + safe-buffer: 5.2.0 timed-out: 4.0.1 unzip-response: 2.0.1 url-parse-lax: 1.0.0 @@ -778,10 +778,10 @@ packages: node: '>=4' resolution: integrity: sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA= - /graceful-fs/4.1.15: + /graceful-fs/4.2.0: dev: false resolution: - integrity: sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== + integrity: sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg== /har-schema/2.0.0: dev: false engines: @@ -790,7 +790,7 @@ packages: integrity: sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= /har-validator/5.1.3: dependencies: - ajv: 6.10.0 + ajv: 6.10.2 har-schema: 2.0.0 dev: false engines: @@ -850,6 +850,18 @@ packages: node: '>= 0.6' resolution: integrity: sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + /http-errors/1.7.3: + dependencies: + depd: 1.1.2 + inherits: 2.0.4 + setprototypeof: 1.1.1 + statuses: 1.5.0 + toidentifier: 1.0.0 + dev: false + engines: + node: '>= 0.6' + resolution: + integrity: sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== /http-signature/1.2.0: dependencies: assert-plus: 1.0.0 @@ -889,6 +901,10 @@ packages: dev: false resolution: integrity: sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + /inherits/2.0.4: + dev: false + resolution: + integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== /ini/1.3.5: dev: false resolution: @@ -1281,7 +1297,7 @@ packages: dev: false resolution: integrity: sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - /mixin-deep/1.3.1: + /mixin-deep/1.3.2: dependencies: for-in: 1.0.2 is-extendable: 1.0.1 @@ -1289,12 +1305,12 @@ packages: engines: node: '>=0.10.0' resolution: - integrity: sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== + integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== /mongodb-core/3.2.7: dependencies: bson: 1.1.1 require_optional: 1.0.1 - safe-buffer: 5.1.2 + safe-buffer: 5.2.0 dev: false optionalDependencies: saslprep: 1.0.3 @@ -1303,7 +1319,7 @@ packages: /mongodb/3.2.7: dependencies: mongodb-core: 3.2.7 - safe-buffer: 5.1.2 + safe-buffer: 5.2.0 dev: false engines: node: '>=4' @@ -1511,10 +1527,10 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= - /process-nextick-args/2.0.0: + /process-nextick-args/2.0.1: dev: false resolution: - integrity: sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== + integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== /proxy-addr/2.0.5: dependencies: forwarded: 0.1.2 @@ -1528,10 +1544,10 @@ packages: dev: false resolution: integrity: sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - /psl/1.1.32: + /psl/1.2.0: dev: false resolution: - integrity: sha512-MHACAkHpihU/REGGPLj4sEfc/XKW2bheigvHO1dUqjaKigMp1C8+WLQYRGgeKFMsw5PMfegZcaN8IDXK/cD0+g== + integrity: sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA== /pstree.remy/1.1.7: dev: false resolution: @@ -1588,9 +1604,9 @@ packages: /readable-stream/2.3.6: dependencies: core-util-is: 1.0.2 - inherits: 2.0.3 + inherits: 2.0.4 isarray: 1.0.0 - process-nextick-args: 2.0.0 + process-nextick-args: 2.0.1 safe-buffer: 5.1.2 string_decoder: 1.1.1 util-deprecate: 1.0.2 @@ -1599,7 +1615,7 @@ packages: integrity: sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== /readdirp/2.2.1: dependencies: - graceful-fs: 4.1.15 + graceful-fs: 4.2.0 micromatch: 3.1.10 readable-stream: 2.3.6 dev: false @@ -1619,7 +1635,7 @@ packages: /registry-auth-token/3.4.0: dependencies: rc: 1.2.8 - safe-buffer: 5.1.2 + safe-buffer: 5.2.0 dev: false resolution: integrity: sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A== @@ -1665,7 +1681,7 @@ packages: oauth-sign: 0.9.0 performance-now: 2.1.0 qs: 6.5.2 - safe-buffer: 5.1.2 + safe-buffer: 5.2.0 tough-cookie: 2.4.3 tunnel-agent: 0.6.0 uuid: 3.3.2 @@ -1701,6 +1717,10 @@ packages: dev: false resolution: integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + /safe-buffer/5.2.0: + dev: false + resolution: + integrity: sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== /safe-regex/1.1.0: dependencies: ret: 0.1.15 @@ -1742,7 +1762,7 @@ packages: escape-html: 1.0.3 etag: 1.8.1 fresh: 0.5.2 - http-errors: 1.7.2 + http-errors: 1.7.3 mime: 1.6.0 ms: 2.1.1 on-finished: 2.3.0 @@ -1764,18 +1784,7 @@ packages: node: '>= 0.8.0' resolution: integrity: sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== - /set-value/0.4.3: - dependencies: - extend-shallow: 2.0.1 - is-extendable: 0.1.1 - is-plain-object: 2.0.4 - to-object-path: 0.3.0 - dev: false - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-fbCPnT0i3H945Trzw79GZuzfzPE= - /set-value/2.0.0: + /set-value/2.0.1: dependencies: extend-shallow: 2.0.1 is-extendable: 0.1.1 @@ -1785,7 +1794,7 @@ packages: engines: node: '>=0.10.0' resolution: - integrity: sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== + integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== /setprototypeof/1.1.1: dev: false resolution: @@ -2008,7 +2017,7 @@ packages: integrity: sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA== /tough-cookie/2.4.3: dependencies: - psl: 1.1.32 + psl: 1.2.0 punycode: 1.4.1 dev: false engines: @@ -2017,7 +2026,7 @@ packages: integrity: sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== /tunnel-agent/0.6.0: dependencies: - safe-buffer: 5.1.2 + safe-buffer: 5.2.0 dev: false resolution: integrity: sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= @@ -2040,17 +2049,17 @@ packages: dev: false resolution: integrity: sha1-Il9rngM3Zj4Njnz9aG/Cg2zKznY= - /union-value/1.0.0: + /union-value/1.0.1: dependencies: arr-union: 3.1.0 get-value: 2.0.6 is-extendable: 0.1.1 - set-value: 0.4.3 + set-value: 2.0.1 dev: false engines: node: '>=0.10.0' resolution: - integrity: sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= + integrity: sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== /unique-string/1.0.0: dependencies: crypto-random-string: 1.0.0 @@ -2175,7 +2184,7 @@ packages: integrity: sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA== /write-file-atomic/2.4.3: dependencies: - graceful-fs: 4.1.15 + graceful-fs: 4.2.0 imurmurhash: 0.1.4 signal-exit: 3.0.2 dev: false diff --git a/views/admin.ejs b/views/admin.ejs new file mode 100644 index 0000000..718af27 --- /dev/null +++ b/views/admin.ejs @@ -0,0 +1,8 @@ + + + +

    Hello <%= name %>

    +
    + +
    +
    \ No newline at end of file diff --git a/views/info.ejs b/views/info.ejs new file mode 100644 index 0000000..8640dc5 --- /dev/null +++ b/views/info.ejs @@ -0,0 +1,161 @@ + + +
    +
    +
    +
    +
    +

    {{name}}

    +
    +

    {{desc}}

    +

    {{nick}}

    + + Show On Map +
    + +
    + +
    +
    +
    +
    +
    + + +
    +
    +

    Comments:

    +
    +

    No comments found. Be the first to leave a comment!

    +
    +
    + + + +
    Post a Comment:
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    Add an Image:
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    + + + + +
    +
    +
    diff --git a/views/layout.ejs b/views/layout.ejs new file mode 100644 index 0000000..dcb815f --- /dev/null +++ b/views/layout.ejs @@ -0,0 +1,54 @@ + + + + + + + + + + + <%= page_name%> + + + + + + + + + + + + + + + + + <%- style %> + + + + + + +
    +
    + <%- body %> +
    + + + + + + + + + \ No newline at end of file diff --git a/views/layout2.ejs b/views/layout2.ejs new file mode 100644 index 0000000..dadd5c1 --- /dev/null +++ b/views/layout2.ejs @@ -0,0 +1,100 @@ + + + + + + + + + + + + <%= page_name%> + + + + + + + + + + + + + + + + + + + + + <%- style %> + + <%- defineContent('map_scripts') %> + + + + + + + +
    + <%- body %> +
    + + + + + <%- defineContent('bottom_map_scripts') %> + + + + + + + + + diff --git a/views/login.ejs b/views/login.ejs new file mode 100644 index 0000000..96562cc --- /dev/null +++ b/views/login.ejs @@ -0,0 +1,27 @@ + + + +
    +

    You must login with an administrator account to view this page.

    +
    + <% include ./partials/messages %> +
    +
    + + +
    +
    + + +
    + + +
    +
    +
    +

    Don't have an account?

    Request admin access. +
    +
    +
    diff --git a/views/map.ejs b/views/map.ejs new file mode 100644 index 0000000..083bae4 --- /dev/null +++ b/views/map.ejs @@ -0,0 +1,33 @@ + + + + +
    + +

    This is where the map goes... lol

    +
    +
    + + + + +<%- contentFor('map_scripts') %> + + + +<%- contentFor('bottom_map_scripts') %> + + + + + \ No newline at end of file diff --git a/views/notfound.ejs b/views/notfound.ejs new file mode 100644 index 0000000..8745551 --- /dev/null +++ b/views/notfound.ejs @@ -0,0 +1,107 @@ + + + + + + + + + + + Page Not Found + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    We couldn't find the page you were looking for 😢

    + +

    The URL may have been mistyped or the page may have moved:

    +
      +
    • Please try navigating back to the homepage to find what you are looking for.
    • +
    • Alternatively you can contact us here.
    • +
    +
    +
    + + + + + + + + + + + + + \ No newline at end of file diff --git a/views/offline.ejs b/views/offline.ejs new file mode 100644 index 0000000..ba8bd45 --- /dev/null +++ b/views/offline.ejs @@ -0,0 +1,103 @@ + + + + + + + + + + + Page Not Found + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    Sorry, this app doesn't work offline yet 😢

    + +

    Please try reconnecting to the internet before trying to access this app.

    +
    +
    + + + + + + + + + + + + + + \ No newline at end of file diff --git a/views/partials/messages.ejs b/views/partials/messages.ejs new file mode 100644 index 0000000..19df2f1 --- /dev/null +++ b/views/partials/messages.ejs @@ -0,0 +1,37 @@ +<% if(typeof errors != 'undefined') {%> + <% errors.forEach(function(error) { %> + + <% }); %> +<% } %> + +<% if(success_msg != '') { %> + +<% } %> + +<% if(error_msg != '') { %> + +<% } %> + +<% if(error != '') { %> + +<% } %> \ No newline at end of file diff --git a/views/register.ejs b/views/register.ejs new file mode 100644 index 0000000..c0660a6 --- /dev/null +++ b/views/register.ejs @@ -0,0 +1,36 @@ + + + +
    +

    Sign up to request access to an administrator account.

    +
    + <% include ./partials/messages %> +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + + +
    +
    +
    diff --git a/views/searchResults.ejs b/views/searchResults.ejs new file mode 100644 index 0000000..9e4ed5c --- /dev/null +++ b/views/searchResults.ejs @@ -0,0 +1,42 @@ + + + +
    +
    + +
    +
    + +
    + +
    + + + +
    Search Results - "<%= results_count %>"
    + + <% results.forEach(element => {%> + +
    +
    + ... +
    +
    + +
    +
    Name: <%= element['properties']['name'] %>
    +

    Description: <%= element['properties']['description'] %>

    +

    Nickname: <%= element['properties']['nick'] %>

    +
    + +
    +
    +
    + <% }); %> + +
    +
    + + \ No newline at end of file diff --git a/views/welcome.ejs b/views/welcome.ejs new file mode 100644 index 0000000..0d7cc80 --- /dev/null +++ b/views/welcome.ejs @@ -0,0 +1,18 @@ + + + +
    +
    + +
    +
    +
    +
    +

    Login, Register or Continue as Guest

    + Register + Login + Continue as guest +
    +
    +
    +
    \ No newline at end of file