I need the frontend completed. You don't need to worry about the backend coding not working. That's being completed by another person. We just need regular coding placeholders there so they'll know...

1 answer below ยป


I need the frontend completed. You don't need to worry about the backend coding not working. That's being completed by another person. We just need regular coding placeholders there so they'll know where to input backend code. * user.handlebars (employee profile) - In the user view, we will need the following features - Side nav or something href= "/api/posts/user (allows user to view all thier messages) href= "/api/newMessage (allows user to create a new message) href= "/api/adminMessage (allows user to see all admin messages) * admin.handlebars (admin profile) - In the admin view, we will need the following features: - Side nav or something href= "/api/posts (allows admin to view all posts) href= "/api/posts/category (allows admin to view all posts in a category) href= "/api/posts/employee (allows admin to view all posts from a certain user) href= "/api/newMessage (allows admin to create a new message that gets displayed to all users) href= "/api/newUser (allows admin to create a new employee and assign admin or normal access)



Drift/schema.sql DROP DATABASE IF EXISTS `drift_db`; CREATE DATABASE `drift_db`; Drift/server.js const express = require("express"); const path = require("path"); const logger = require("morgan"); const cookieParser = require("cookie-parser"); const session = require("express-session"); const dotenv = require("dotenv"); const passport = require("passport"); const Auth0Strategy = require("passport-auth0"); const flash = require("connect-flash"); const userInViews = require("./lib/middleware/userInViews"); const authRouter = require("./routes/auth"); const indexRouter = require("./routes/index"); const usersRouter = require("./routes/users"); const adminRouter = require("./routes/admin_routes"); const employeeRouter = require("./routes/user_routes"); const exphbs = require("express-handlebars"); const app = express(); const db = require("./models"); const PORT = process.env.PORT || 8080; dotenv.config(); app.use(express.urlencoded({ extended: true })); app.use(express.json()); const sqSync = { force: false, }; db.sequelize.sync(sqSync).then(function () { app.listen(PORT, function () { console.log("App listening on PORT " + PORT); }); }); // Configure Passport to use Auth0 const strategy = new Auth0Strategy( { domain: process.env.AUTH0_DOMAIN, clientID: process.env.AUTH0_CLIENT_ID, clientSecret: process.env.AUTH0_CLIENT_SECRET, callbackURL: process.env.AUTH0_CALLBACK_URL || "http://localhost:8080/callback", }, function (accessToken, refreshToken, extraParams, profile, done) { // accessToken is the token to call Auth0 API (not needed in the most cases) // extraParams.id_token has the JSON Web Token // profile has all the information from the user return done(null, profile); } ); passport.use(strategy); // You can use this section to keep a smaller payload passport.serializeUser(function (user, done) { done(null, user); }); passport.deserializeUser(function (user, done) { done(null, user); }); // View engine setup app.engine("handlebars", exphbs({ defaultLayout: "main" })); app.set("view engine", "handlebars"); app.use(logger("dev")); app.use(cookieParser()); // config express-session let sess = { secret: "CHANGE THIS SECRET", cookie: {}, resave: false, saveUninitialized: true, }; if (app.get("env") === "production") { // If you are using a hosting provider which uses a proxy (eg. Heroku), // comment in the following app.set configuration command // // Trust first proxy, to prevent "Unable to verify authorization request state." // errors with passport-auth0. // Ref: https://github.com/auth0/passport-auth0/issues/70#issuecomment-480771614 // Ref: https://www.npmjs.com/package/express-session#cookiesecure // app.set('trust proxy', 1); sess.cookie.secure = true; // serve secure cookies, requires https } app.use(session(sess)); app.use(passport.initialize()); app.use(passport.session()); app.use(express.static(path.join(__dirname, "public"))); app.use(flash()); // Handle auth failure error messages app.use(function (req, res, next) { if (req && req.query && req.query.error) { req.flash("error", req.query.error); } if (req && req.query && req.query.error_description) { req.flash("error_description", req.query.error_description); } next(); }); app.use(userInViews()); app.use("/", authRouter); app.use("/", indexRouter); app.use("/", usersRouter); app.use("/", adminRouter); app.use("/", employeeRouter); // Catch 404 and forward to error handler app.use(function (req, res, next) { const err = new Error("Not Found"); err.status = 404; next(err); }); // Error handlers // Development error handler // Will print stacktrace if (app.get("env") === "development") { app.use(function (err, req, res) { res.status(err.status || 500); res.render("error", { message: err.message, error: err, }); }); } // Production error handler // No stacktraces leaked to user app.use(function (err, req, res) { res.status(err.status || 500); res.render("error", { message: err.message, error: {}, }); }); Drift/seeddb.js require("dotenv").config(); const db = require("./models"); const sqSync = { force: true, }; console.log(process.env.DB_PASSWORD); db.sequelize.sync(sqSync).then(function () { require("./datafixtures/datafixture")(); }); Drift/projectPlan.md # AS A FOOD SERVICE OWNER I want an application where my employees can leave feedback # AS A FOOD SERVICE EMPLOYEE I would like the option to submit ideas or feedback with the option to remain anonymous. # I CAN ALSO view any of my previous posts. # WHEN AN EMPLOYEE creates an account, they are presented with a simple, polished UI that allows them to SUBMIT feedback under several categories. # WHEN MANAGEMENT logs into their account, they are presented with several methods of viewing and searching feedback data (i.e. by category, employee). # MANAGEMENT can also post a question to all employees, so that # AS AN EMPLOYEE I can login and submit my response to the specific question with the option to remain anonymous. ## Frontend -- (Walter, Tania) # Handlebar layouts * main.handlebars (layout) - We need all script and style tags - Navbar href= "/" anchor tag href= "/about" anchor tag href= "/newAccount" anchor tag if logged out href= "/login" anchor tag if logged in href= "/user" anchor tag href= "/logout" anchor tag - Body tag -- {{{body}}} - Do we want a footer? * index.handlebars (home page) - whatever we want our home screen to look on site load - I think that we will need to have a form on this page that allows users to create a new company account - User inputs company and owner name and hits a "create" button ( "/newCompany" this creates a row in Company table) - This user is automatically designated as the "owner" in the "user" table. - New User is then invited to link their google account with their Drift account by signing in with Auth0. - Once the account owner does this, they are redirected to the admin view - If the company already exists, the employee/owner is invited to log in by clicking the log in button at the top of the screen. - Once they submit their google credentials, the db is searched to see if there name is asscociated with a company. If not, the request to login fails. If it's a success the user gets redirected to the user view. * user.handlebars (employee profile) - In the user view, we will need the following features - Side nav or something href= "/api/posts/user (allows user to view all thier messages) href= "/api/newMessage (allows user to create a new message) href= "/api/adminMessage (allows user to see all admin messages) * admin.handlebars (admin profile) - In the admin view, we will need the following features: - Side nav or something href= "/api/posts (allows admin to view all posts) href= "/api/posts/category (allows admin to view all posts in a category) href= "/api/posts/employee (allows admin to view all posts from a certain user) href= "/api/newMessage (allows admin to create a new message that gets displayed to all users) href= "/api/newUser (allows admin to create a new employee and assign admin or normal access) # JQuery Pages We will need js files for all of our jquery -- these will go in the public/assets/js directory ## Backend -- (Sam, Brian) # Auth0 - Customize login screen - Ensure that we can access info from users google profile # Routes "/" (render home page) "/login" (launches Auth0) Done "/loggout" (logs user out and redirects to "/") Done "/user" (render user view) Done "/admin" (render admin view) "/error" (render error view) "/failure" (render failure view) "/newCompany" (creates new row for company and renders /login) -logic to check if the company exists already -if company can be created -new company created in company table. -owners name to the user table (owner = true) -redirect(/login) "/api/posts" (gets all posts from db and renders /admin) "/api/adminPosts/:user" (gets one employees posts from db and renders /admin) "/api/posts/:category" (gets all category post from db and renders /admin) "/api/newUser" (creates a new user and renders /admin) "/api/newQuestion" (creates a new question and renders /admin) "/api/getAnswers" (gets all answers from db and
Answered Same DayApr 06, 2021

Answer To: I need the frontend completed. You don't need to worry about the backend coding not working. That's...

Robert answered on Apr 06 2021
140 Votes
Drift/.eslintignore
models/index.js
node_modules
routes/auth.js
routes/users.js
Drift/.eslintrc.json
{
"env": {
"browser": true,
"commonjs": true,
"node": true,
"es6": true
},
"extends": "prettier",
"plugins": ["prettier"],
"rules": {
"no-duplicate-case": "error",
"no-empty": "error",
"no-extra-semi": "error",
"no-func-assign": "error",
"no-irregular-whitespace": "error",
"no-unreachable": "error",
"curly": "error",
"dot-notation": "error",
"eqeqeq": "error",
"no-empty-function": "error",
"no-multi-spaces": "error",
"no-unused-vars": "error",
"no-var": "error",
"camelcase": "error",
"indent": ["error", 2],
"quotes": ["error", "double"],
"semi": ["error", "always"],
"prettier/prettier": "error"
}
}
Drift/.git/config
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    ignorecase = true
    precomposeunicode = true
[remote "origin"]
    url = [email protected]:sldelay/Drift.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
Drift/.git/description
Unnamed repository; edit this file 'description' to name the repository.
Drift/.git/HEAD
ref: refs/heads/master
Drift/.git/hooks/applypatch-msg.sample
#!/bin/sh
#
# An example hook script to check the commit log message taken by
# applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit. The hook is
# allowed to edit the commit message file.
#
# To enable this hook, rename this file to "applypatch-msg".
. git-sh-setup
commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
:
Drift/.git/hooks/commit-msg.sample
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".
# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
# This example catches duplicate Signed-off-by lines.
test "" = "$(grep '^Signed-off-by: ' "$1" |
     sort | uniq -c | sed -e '/^[     ]*1[     ]/d')" || {
    echo >&2 Duplicate Signed-off-by lines.
    exit 1
}
Drift/.git/hooks/fsmonitor-watchman.sample
#!/usr/bin/perl
use strict;
use warnings;
use IPC::Open2;
# An example hook script to integrate Watchman
# (https://facebook.github.io/watchman/) with git to speed up detecting
# new and modified files.
#
# The hook is passed a version (currently 1) and a time in nanoseconds
# formatted as a string and outputs to stdout all files that have been
# modified since the given time. Paths must be relative to the root of
# the working tree and separated by a single NUL.
#
# To enable this hook, rename this file to "query-watchman" and set
# 'git config core.fsmonitor .git/hooks/query-watchman'
#
my ($version, $time) = @ARGV;
# Check the hook interface version
if ($version == 1) {
    # convert nanoseconds to seconds
    $time = int $time / 1000000000;
} else {
    die "Unsupported query-fsmonitor hook version '$version'.\n" .
     "Falling back to scanning...\n";
}
my $git_work_tree;
if ($^O =~ 'msys' || $^O =~ 'cygwin') {
    $git_work_tree = Win32::GetCwd();
    $git_work_tree =~ tr/\\/\//;
} else {
    require Cwd;
    $git_work_tree = Cwd::cwd();
}
my $retry = 1;
launch_watchman();
sub launch_watchman {
    my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
     or die "open2() failed: $!\n" .
     "Falling back to scanning...\n";
    # In the query expression below we're asking for names of files that
    # changed since $time but were not transient (ie created after
    # $time but no longer exist).
    #
    # To accomplish this, we're using the "since" generator to use the
    # recency index to select candidate nodes and "fields" to limit the
    # output to file names only. Then we're using the "expression" term to
    # further constrain the results.
    #
    # The category of transient files that we want to ignore will have a
    # creation clock (cclock) newer than $time_t value and will also not
    # currently exist.
    my $query = <<"    END";
        ["query", "$git_work_tree", {
            "since": $time,
            "fields": ["name"],
            "expression": ["not", ["allof", ["since", $time, "cclock"], ["not", "exists"]]]
        }]
    END
    print CHLD_IN $query;
    close CHLD_IN;
    my $response = do {local $/; };
    die "Watchman: command returned no output.\n" .
     "Falling back to scanning...\n" if $response eq "";
    die "Watchman: command returned invalid output: $response\n" .
     "Falling back to scannin
g...\n" unless $response =~ /^\{/;
    my $json_pkg;
    eval {
        require JSON::XS;
        $json_pkg = "JSON::XS";
        1;
    } or do {
        require JSON::PP;
        $json_pkg = "JSON::PP";
    };
    my $o = $json_pkg->new->utf8->decode($response);
    if ($retry > 0 and $o->{error} and $o->{error} =~ m/unable to resolve root .* directory (.*) is not watched/) {
        print STDERR "Adding '$git_work_tree' to watchman's watch list.\n";
        $retry--;
        qx/watchman watch "$git_work_tree"/;
        die "Failed to make watchman watch '$git_work_tree'.\n" .
         "Falling back to scanning...\n" if $? != 0;
        # Watchman will always return all files on the first query so
        # return the fast "everything is dirty" flag to git and do the
        # Watchman query just to get it over with now so we won't pay
        # the cost in git to look up each individual file.
        print "/\0";
        eval { launch_watchman() };
        exit 0;
    }
    die "Watchman: $o->{error}.\n" .
     "Falling back to scanning...\n" if $o->{error};
    binmode STDOUT, ":utf8";
    local $, = "\0";
    print @{$o->{files}};
}
Drift/.git/hooks/post-update.sample
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".
exec git update-server-info
Drift/.git/hooks/pre-applypatch.sample
#!/bin/sh
#
# An example hook script to verify what is about to be committed
# by applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-applypatch".
. git-sh-setup
precommit="$(git rev-parse --git-path hooks/pre-commit)"
test -x "$precommit" && exec "$precommit" ${1+"$@"}
:
Drift/.git/hooks/pre-commit.sample
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
    against=HEAD
else
    # Initial commit: diff against an empty tree object
    against=$(git hash-object -t tree /dev/null)
fi
# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --bool hooks.allownonascii)
# Redirect output to stderr.
exec 1>&2
# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
    # Note that the use of brackets around a tr range is ok here, (it's
    # even required, for portability to Solaris 10's /usr/bin/tr), since
    # the square bracket bytes happen to fall in the designated range.
    test $(git diff --cached --name-only --diff-filter=A -z $against |
     LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
    cat <<\EOF
Error: Attempt to add a non-ASCII file name.
This can cause problems if you want to work with people on other platforms.
To be portable it is advisable to rename the file.
If you know what you are doing you can disable this check using:
git config hooks.allownonascii true
EOF
    exit 1
fi
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --
Drift/.git/hooks/pre-push.sample
#!/bin/sh
# An example hook script to verify what is about to be pushed. Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed. If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
#
#
# This sample shows how to prevent push of commits where the log message starts
# with "WIP" (work in progress).
remote="$1"
url="$2"
z40=0000000000000000000000000000000000000000
while read local_ref local_sha remote_ref remote_sha
do
    if [ "$local_sha" = $z40 ]
    then
        # Handle delete
        :
    else
        if [ "$remote_sha" = $z40 ]
        then
            # New branch, examine all commits
            range="$local_sha"
        else
            # Update to existing branch, examine new commits
            range="$remote_sha..$local_sha"
        fi
        # Check for WIP commit
        commit=`git rev-list -n 1 --grep '^WIP' "$range"`
        if [ -n "$commit" ]
        then
            echo >&2 "Found WIP commit in $local_ref, not pushing"
            exit 1
        fi
    fi
done
exit 0
Drift/.git/hooks/pre-rebase.sample
#!/bin/sh
#
# Copyright (c) 2006, 2008 Junio C Hamano
#
# The "pre-rebase" hook is run just before "git rebase" starts doing
# its job, and can prevent the command from running by exiting with
# non-zero status.
#
# The hook is called with the following parameters:
#
# $1 -- the upstream the series was forked from.
# $2 -- the branch being rebased (or empty when rebasing the current branch).
#
# This sample shows how to prevent topic branches that are already
# merged to 'next' branch from getting rebased, because allowing it
# would result in rebasing already published history.
publish=next
basebranch="$1"
if test "$#" = 2
then
    topic="refs/heads/$2"
else
    topic=`git symbolic-ref HEAD` ||
    exit 0 ;# we do not interrupt rebasing detached HEAD
fi
case "$topic" in
refs/heads/??/*)
    ;;
*)
    exit 0 ;# we do not interrupt others.
    ;;
esac
# Now we are dealing with a topic branch being rebased
# on top of master. Is it OK to rebase it?
# Does the topic really exist?
git show-ref -q "$topic" || {
    echo >&2 "No such branch $topic"
    exit 1
}
# Is topic fully merged to master?
not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
if test -z "$not_in_master"
then
    echo >&2 "$topic is fully merged to master; better remove it."
    exit 1 ;# we could allow it, but there is no point.
fi
# Is topic ever merged to next? If so you should not be rebasing it.
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
only_next_2=`git rev-list ^master ${publish} | sort`
if test "$only_next_1" = "$only_next_2"
then
    not_in_topic=`git rev-list "^$topic" master`
    if test -z "$not_in_topic"
    then
        echo >&2 "$topic is already up to date with master"
        exit 1 ;# we could allow it, but there is no point.
    else
        exit 0
    fi
else
    not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
    /usr/bin/perl -e '
        my $topic = $ARGV[0];
        my $msg = "* $topic has commits already merged to public branch:\n";
        my (%not_in_next) = map {
            /^([0-9a-f]+) /;
            ($1 => 1);
        } split(/\n/, $ARGV[1]);
        for my $elem (map {
                /^([0-9a-f]+) (.*)$/;
                [$1 => $2];
            } split(/\n/, $ARGV[2])) {
            if (!exists $not_in_next{$elem->[0]}) {
                if ($msg) {
                    print STDERR $msg;
                    undef $msg;
                }
                print STDERR " $elem->[1]\n";
            }
        }
    ' "$topic" "$not_in_next" "$not_in_master"
    exit 1
fi
<<\DOC_END
This sample hook safeguards topic branches that have been
published from being rewound.
The workflow assumed here is:
* Once a topic branch forks from "master", "master" is never
merged into it again (either directly or indirectly).
* Once a topic branch is fully cooked and merged into "master",
it is deleted. If you need to build on top of it to correct
earlier mistakes, a new topic branch is created by forking at
the tip of the "master". This is not strictly necessary, but
it makes it easier to keep your history simple.
* Whenever you need to test or publish your changes to topic
branches, merge them into "next" branch.
The script, being an example, hardcodes the publish branch name
to be "next", but it is trivial to make it configurable via
$GIT_DIR/config mechanism.
With this workflow, you would want to know:
(1) ... if a topic branch has ever been merged to "next". Young
topic branches can have stupid mistakes you would rather
clean up before publishing, and things that have not been
merged into other branches can be easily rebased without
affecting other people. But once it is published, you would
not want to rewind it.
(2) ... if a topic branch has been fully merged to "master".
Then you can delete it. More importantly, you should not
build on top of it -- other people may already want to
change things related to the topic as patches against your
"master", so if you need further changes, it is better to
fork the topic (perhaps with the same name) afresh from the
tip of "master".
Let's look at this example:
         o---o---o---o---o---o---o---o---o---o "next"
         / / / /
         / a---a---b A / /
        / / / /
     / / c---c---c---c B /
     / / / \ /
     / / / b---b C \ /
     / / / / \ /
---o---o---o---o---o---o---o---o---o---o---o "master"
A, B and C are topic branches.
* A has one fix since it was merged up to "next".
* B has finished. It has been fully merged up to "master" and "next",
and is ready to be deleted.
* C has not merged to "next" at all.
We would want to allow C to be rebased, refuse A, and encourage
B to be deleted.
To compute (1):
    git rev-list ^master ^topic next
    git rev-list ^master next
    if these match, topic has not merged in next at all.
To compute (2):
    git rev-list master..topic
    if this is empty, it is fully merged to "master".
DOC_END
Drift/.git/hooks/pre-receive.sample
#!/bin/sh
#
# An example hook script to make use of push options.
# The example simply echoes all push options that start with 'echoback='
# and rejects all pushes when the "reject" push option is used.
#
# To enable this hook, rename this file to "pre-receive".
if test -n "$GIT_PUSH_OPTION_COUNT"
then
    i=0
    while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
    do
        eval "value=\$GIT_PUSH_OPTION_$i"
        case "$value" in
        echoback=*)
            echo "echo from the pre-receive-hook: ${value#*=}" >&2
            ;;
        reject)
            exit 1
        esac
        i=$((i + 1))
    done
fi
Drift/.git/hooks/prepare-commit-msg.sample
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg".
# This hook includes three examples. The first one removes the
# "# Please enter the commit message..." help message.
#
# The second includes the output of "git diff --name-status -r"
# into the message, just before the "git status" output. It is
# commented because it doesn't cope with --amend or with squashed
# commits.
#
# The third example adds a Signed-off-by line to the message, that can
# still be edited. This is rarely a good idea.
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3
/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
# case "$COMMIT_SOURCE,$SHA1" in
# ,|template,)
# /usr/bin/perl -i.bak -pe '
# print "\n" . `git diff --cached --name-status -r`
#      if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
# *) ;;
# esac
# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
# if test -z "$COMMIT_SOURCE"
# then
# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
# fi
Drift/.git/hooks/update.sample
#!/bin/sh
#
# An example hook script to block unannotated tags from entering.
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
#
# To enable this hook, rename this file to "update".
#
# Config
# ------
# hooks.allowunannotated
# This boolean sets whether unannotated tags will be allowed into the
# repository. By default they won't be.
# hooks.allowdeletetag
# This boolean sets whether deleting tags will be allowed in the
# repository. By default they won't be.
# hooks.allowmodifytag
# This boolean sets whether a tag may be modified after creation. By default
# it won't be.
# hooks.allowdeletebranch
# This boolean sets whether deleting branches will be allowed in the
# repository. By default they won't be.
# hooks.denycreatebranch
# This boolean sets whether remotely creating branches will be denied
# in the repository. By default this is allowed.
#
# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"
# --- Safety check
if [ -z "$GIT_DIR" ]; then
    echo "Don't run this script from the command line." >&2
    echo " (if you want, you could supply GIT_DIR then run" >&2
    echo " $0 )" >&2
    exit 1
fi
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
    echo "usage: $0 " >&2
    exit 1
fi
# --- Config
allowunannotated=$(git config --bool hooks.allowunannotated)
allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
denycreatebranch=$(git config --bool hooks.denycreatebranch)
allowdeletetag=$(git config --bool hooks.allowdeletetag)
allowmodifytag=$(git config --bool hooks.allowmodifytag)
# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
case "$projectdesc" in
"Unnamed repository"* | "")
    echo "*** Project description file hasn't been set" >&2
    exit 1
    ;;
esac
# --- Check types
# if $newrev is 0000...0000, it's a commit to delete a ref.
zero="0000000000000000000000000000000000000000"
if [ "$newrev" = "$zero" ]; then
    newrev_type=delete
else
    newrev_type=$(git cat-file -t $newrev)
fi
case "$refname","$newrev_type" in
    refs/tags/*,commit)
        # un-annotated tag
        short_refname=${refname##refs/tags/}
        if [ "$allowunannotated" != "true" ]; then
            echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
            echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
            exit 1
        fi
        ;;
    refs/tags/*,delete)
        # delete tag
        if [ "$allowdeletetag" != "true" ]; then
            echo "*** Deleting a tag is not allowed in this repository" >&2
            exit 1
        fi
        ;;
    refs/tags/*,tag)
        # annotated tag
        if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
        then
            echo "*** Tag '$refname' already exists." >&2
            echo "*** Modifying a tag is not allowed in this repository." >&2
            exit 1
        fi
        ;;
    refs/heads/*,commit)
        # branch
        if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
            echo "*** Creating a branch is not allowed in this repository" >&2
            exit 1
        fi
        ;;
    refs/heads/*,delete)
        # delete branch
        if [ "$allowdeletebranch" != "true" ]; then
            echo "*** Deleting a branch is not allowed in this repository" >&2
            exit 1
        fi
        ;;
    refs/remotes/*,commit)
        # tracking branch
        ;;
    refs/remotes/*,delete)
        # delete tracking branch
        if [ "$allowdeletebranch" != "true" ]; then
            echo "*** Deleting a tracking branch is not allowed in this repository" >&2
            exit 1
        fi
        ;;
    *)
        # Anything else (is there anything else?)
        echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
        exit 1
        ;;
esac
# --- Finished
exit 0
Drift/.git/index
Drift/.git/info/exclude
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
Drift/.git/logs/HEAD
0000000000000000000000000000000000000000 6695c0c3d04f90be5b83af10dc492873b1138ac2 Tania Moore 1586136011 -0400    clone: from [email protected]:sldelay/Drift.git
Drift/.git/logs/refs/heads/master
0000000000000000000000000000000000000000 6695c0c3d04f90be5b83af10dc492873b1138ac2 Tania Moore 1586136011 -0400    clone: from [email protected]:sldelay/Drift.git
Drift/.git/logs/refs/remotes/origin/HEAD
0000000000000000000000000000000000000000 6695c0c3d04f90be5b83af10dc492873b1138ac2 Tania Moore 1586136011 -0400    clone: from [email protected]:sldelay/Drift.git
Drift/.git/objects/pack/pack-71ec02e486a8e1660926ebe1d19fd8a90b43e5c6.idx
Drift/.git/objects/pack/pack-71ec02e486a8e1660926ebe1d19fd8a90b43e5c6.pack
Drift/.git/packed-refs
# pack-refs with: peeled fully-peeled sorted
b37f32826da2f18ed51a8fd9b71bd818566b50f5 refs/remotes/origin/brianFeatures
72455d8e7da44089c762f0910b5a8b3614fb01b2 refs/remotes/origin/devBrian
fee099c5549c7ff3b194e29b5688ddd240ab2ccf refs/remotes/origin/devSam
220e1167d91704fbb75399651074c722e0b9d92e refs/remotes/origin/devTania
0c1bfa6dcd5889e4f86e2afcbffe2b334577ac0f refs/remotes/origin/devWalter
6695c0c3d04f90be5b83af10dc492873b1138ac2 refs/remotes/origin/master
Drift/.git/refs/heads/master
6695c0c3d04f90be5b83af10dc492873b1138ac2
Drift/.git/refs/remotes/origin/HEAD
ref: refs/remotes/origin/master
Drift/.gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# Next.js build output
.next
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Project Plan
projectPlan.md
Drift/config/config.js
require("dotenv").config();
module.exports = {
development: {
username: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
host: process.env.DB_HOST,
port: 3306,
dialect: "mysql",
},
test: {
username: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
host: process.env.DB_HOST,
port: 3306,
dialect: "mysql",
},
production: {
username: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
host: process.env.DB_HOST,
port: 3306,
dialect: "mysql",
},
};
Drift/controller/controller.js
let db = require("../models");
module.exports = {
createQuestion: (data) => {
return db.Question.create({
category: data.category,
question: data.question,
});
},
createUser: (data) => {
return db.User.create({
name: data.name,
email: data.email,
admin: data.admin,
});
},
createCompany: (data) => {
return db.Company.create({
name: data.name,
});
},
createPost: (data) => {
return db.Post.create({
subject: data.subject,
category: data.category,
content: data.content,
UserId: data.userId,
});
},
createAnswer: (data) => {
return db.Answer.create({
value: data.value,
QuestionId: data.questId,
UserId: data.userId,
});
},
};
Drift/datafixtures/datafixture.js
const questControl = require("../controller/controller.js");
let questArr = [
{ category: "asdfasdgasgd", question: "sdagasdgsad" },
{ category: "asdgfasdg", question: "asfasdgasdg" },
];
let postArr = [
{
subject: "Hey there",
category: "managment",
content: "Management sucks",
userId: 4,
},
{
subject: "Hey there",
category: "hours",
content: "Hours sucks",
userId: 3,
},
{
subject: "Hey there",
category: "coworker",
content: "Coworker is great",
userId: 2,
},
{
subject: "Hey there",
category: "coworker",
content: "Coworker sucks",
userId: 3,
},
{
subject: "Hey there",
category: "managment",
content: "Management is great",
userId: 4,
},
{
subject: "Hey there",
category: "hours",
content: "Hours are great",
userId: 2,
},
];
let userArr = [
{ name: "Bob Williams", email: "[email protected]", admin: true },
{ name: "Sam Delay", email: "[email protected]", admin: false },
{ name: "Alyssa Williams", email: "[email protected]", admin: false },
{ name: "Mike", email: "[email protected]", admin: false },
{ name: "Bobby", email: "[email protected]", admin: true },
];
const seedQuestions = function () {
return new Promise((res, rej) => {
let promArr = [];
for (const ele of questArr) {
promArr.push(questControl.createQuestion(ele));
}
Promise.all(promArr).then(res).catch(rej);
});
};
const seedPosts = function () {
return new Promise((res, rej) => {
let promArr = [];
for (const ele of postArr) {
promArr.push(questControl.createPost(ele));
}
Promise.all(promArr).then(res).catch(rej);
});
};
const seedUser = function () {
return new Promise((res, rej) => {
let promArr = [];
for (const ele of userArr) {
promArr.push(questControl.createUser(ele));
}
Promise.all(promArr).then(res).catch(rej);
});
};
module.exports = function () {
seedQuestions()
.then(() => {
return seedUser();
})
.then(() => {
return seedPosts();
});
};
Drift/lib/middleware/secured.js
/**
* This is an example middleware that checks if the user is logged in.
*
* If the user is not logged in, it stores the requested url in `returnTo` attribute
* and then redirects to `/login`.
*
*/
module.exports = function () {
return function secured(req, res, next) {
if (req.user) {
return next();
}
req.session.returnTo = req.originalUrl;
res.redirect("/login");
};
};
Drift/lib/middleware/userInViews.js
/**
* The purpose of this middleware is to have the `user`
* object available for all views.
*
* This is important because the user is used in layout.pug.
*/
module.exports = function () {
return function (req, res, next) {
res.locals.user = req.user;
next();
};
};
Drift/models/answers.js
module.exports = function (sequelize, DataTypes) {
let Answer = sequelize.define("Answer", {
value: {
type: DataTypes.STRING,
allowNull: false,
validate: {
len: [1],
},
},
});
Answer.associate = function (models) {
Answer.belongsTo(models.User, {
foreignKey: {
allowNull: false,
},
});
};
Answer.associate = function (models) {
Answer.belongsTo(models.Question, {
foreignKey: {
allowNull: false,
},
});
};
return Answer;
};
Drift/models/company.js
module.exports = function (sequelize, DataTypes) {
let Company = sequelize.define("Company", {
name: {
type: DataTypes.STRING,
allowNull: false,
validate: {
len: [1],
},
},
});
Company.associate = function (models) {
Company.hasMany(models.User, {
onDelete: "RESTRICT",
});
};
return Company;
};
Drift/models/index.js
'use strict';
const fs = require('fs');
const path = require('path');
const Sequelize = require('sequelize');
const basename = path.basename(__filename);
const env = process.env.NODE_ENV || 'development';
const config = require(__dirname + '/../config/config.js')[env];
const db = {};
let sequelize;
if (config.use_env_variable) {
sequelize = new Sequelize(process.env[config.use_env_variable], config);
} else {
sequelize = new Sequelize(config.database, config.username, config.password, config);
}
fs
.readdirSync(__dirname)
.filter(file => {
return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js');
})
.forEach(file => {
const model = sequelize['import'](path.join(__dirname, file));
db[model.name] = model;
});
Object.keys(db).forEach(modelName => {
if (db[modelName].associate) {
db[modelName].associate(db);
}
});
db.sequelize = sequelize;
db.Sequelize = Sequelize;
module.exports = db;
Drift/models/posts.js
module.exports = function (sequelize, DataTypes) {
let Post = sequelize.define("Post", {
subject: {
type: DataTypes.STRING,
allowNull: false,
validate: {
len: [1],
},
},
category: {
type: DataTypes.STRING,
allowNull: false,
validate: {
len: [1],
},
},
content: {
type: DataTypes.STRING,
allowNull: false,
validate: {
len: [1],
},
},
private: {
type: DataTypes.BOOLEAN,
defaultValue: false,
},
});
Post.associate = function (models) {
Post.belongsTo(models.User, {
foreignKey: {
allowNull: false,
},
});
};
return Post;
};
Drift/models/questions.js
module.exports = function (sequelize, DataTypes) {
let Question = sequelize.define("Question", {
category: {
type: DataTypes.STRING,
allowNull: false,
validate: {
len: [1],
},
},
question: {
type: DataTypes.STRING,
allowNull: false,
validate: {
len: [1],
},
},
isActive: {
type: DataTypes.BOOLEAN,
defaultValue: true,
},
});
Question.associate = function (models) {
Question.hasMany(models.Answer, {
onDelete: "RESTRICT",
});
};
return Question;
};
Drift/models/user.js
module.exports = function (sequelize, DataTypes) {
let User = sequelize.define("User", {
name: {
type: DataTypes.STRING,
allowNull: false,
validate: {
len: [1],
},
},
email: {
type: DataTypes.STRING,
allowNull: false,
validate: {
len: [1],
},
},
owner: {
type: DataTypes.BOOLEAN,
defaultValue: false,
},
admin: {
type: DataTypes.BOOLEAN,
defaultValue: false,
},
});
User.associate = function (models) {
User.belongsTo(models.Company, {
foreignKey: {
allowNull: false,
},
});
};
User.associate = function (models) {
User.hasMany(models.Post, {
onDelete: "RESTRICT",
});
};
User.associate = function (models) {
User.hasMany(models.Answer, {
onDelete: "RESTRICT",
});
};
return User;
};
Drift/package-lock.json
{
"name": "drift",
"version": "1.0.0",
"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==",
"dev": true,
"requires": {
"@babel/highlight": "^7.8.3"
}
},
"@babel/helper-validator-identifier": {
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz",
"integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==",
"dev": true
},
"@babel/highlight": {
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz",
"integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==",
"dev": true,
"requires": {
"@babel/helper-validator-identifier": "^7.9.0",
"chalk": "^2.0.0",
"js-tokens": "^4.0.0"
}
},
"@types/color-name": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
"dev": true
},
"@types/node": {
"version": "13.9.8",
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.8.tgz",
"integrity": "sha512-1WgO8hsyHynlx7nhP1kr0OFzsgKz5XDQL+Lfc3b1Q3qIln/n8cKD4m09NJ0+P1Rq7Zgnc7N0+SsMnoD1rEb0kA=="
},
"accepts": {
"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.24",
"negotiator": "0.6.2"
}
},
"acorn": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
"integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
"dev": true
},
"acorn-jsx": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz",
"integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==",
"dev": true
},
"ajv": {
"version": "6.12.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz",
"integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==",
"requires": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
}
},
"ansi-escapes": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",
"integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==",
"dev": true,
"requires": {
"type-fest": "^0.11.0"
},
"dependencies": {
"type-fest": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz",
"integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==",
"dev": true
}
}
},
"ansi-regex": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"dev": true
},
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"ansicolors": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz",
"integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk="
},
"any-promise": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
"integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8="
},
"argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"dev": true,
"requires": {
"sprintf-js": "~1.0.2"
}
},
"array-flatten": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
},
"asap": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
"integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
},
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
"requires": {
"safer-buffer": "~2.1.0"
}
},
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
},
"astral-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
"integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
"dev": true
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
},
"aws4": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz",
"integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug=="
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"base64url": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz",
"integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A=="
},
"basic-auth": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
"integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
"requires": {
"safe-buffer": "5.1.2"
}
},
"bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
"requires": {
"tweetnacl": "^0.14.3"
}
},
"bluebird": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
},
"body-parser": {
"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.1.0",
"content-type": "~1.0.4",
"debug": "2.6.9",
"depd": "~1.1.2",
"http-errors": "1.7.2",
"iconv-lite": "0.4.24",
"on-finished": "~2.3.0",
"qs": "6.7.0",
"raw-body": "2.4.0",
"type-is": "~1.6.17"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"http-errors": {
"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.1",
"statuses": ">= 1.5.0 < 2",
"toidentifier": "1.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"buffer-from": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
"dev": true
},
"bytes": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
"integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
},
"callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
"dev": true
},
"camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
},
"cardinal": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz",
"integrity": "sha1-fMEFXYItISlU0HsIXeolHMe8VQU=",
"requires": {
"ansicolors": "~0.3.2",
"redeyed": "~2.1.0"
}
},
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"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==",
"dev": true
},
"cli-cursor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
"integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
"dev": true,
"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=",
"dev": true
},
"cliui": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
"integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
"requires": {
"string-width": "^3.1.0",
"strip-ansi": "^5.2.0",
"wrap-ansi": "^5.1.0"
},
"dependencies": {
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"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"
}
}
}
},
"cls-bluebird": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cls-bluebird/-/cls-bluebird-2.1.0.tgz",
"integrity": "sha1-N+8eCAqP+1XC9BZPU28ZGeeWiu4=",
"requires": {
"is-bluebird": "^1.0.2",
"shimmer": "^1.1.0"
}
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"commander": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"optional": true
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"concat-stream": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
"dev": true,
"requires": {
"buffer-from": "^1.0.0",
"inherits": "^2.0.3",
"readable-stream": "^2.2.2",
"typedarray": "^0.0.6"
}
},
"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.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",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
},
"cookie": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
"integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="
},
"cookie-parser": {
"version": "1.4.5",
"resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.5.tgz",
"integrity": "sha512-f13bPUj/gG/5mDr+xLmSxxDsB9DQiTIfhJS/sqjrmfAWiAN+x2O4i/XguTL9yDZ+/IFDanJ+5x7hC4CXT9Tdzw==",
"requires": {
"cookie": "0.4.0",
"cookie-signature": "1.0.6"
}
},
"cookie-signature": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cross-env": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.2.tgz",
"integrity": "sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw==",
"dev":...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here