diff --git a/common/models/User-Identity.js b/common/models/User-Identity.js index ff4508d0add40b..720e98b44a202f 100644 --- a/common/models/User-Identity.js +++ b/common/models/User-Identity.js @@ -3,32 +3,46 @@ var debug = require('debug')('freecc:models:userIdent'); var defaultProfileImage = require('../utils/constantStrings.json').defaultProfileImage; +function getFirstImageFromProfile(profile) { + return profile && profile.photos && profile.photos[0] ? + profile.photos[0].value : + null; +} module.exports = function(UserIdent) { - UserIdent.observe('before save', function(ctx, next) { - var userIdent = ctx.currentInstance; - // treat userIdent as immutable + var userIdent = ctx.currentInstance || ctx.instance; + if (!userIdent) { + debug('no user identity instance found'); + return next(); + } userIdent.user(function(err, user) { if (err) { return next(err); } - debug('got user', user.username); + if (!user) { + debug('no user attached to identity!'); + return next(); + } - var picture = userIdent.profile && userIdent.profile[0] ? - userIdent.profile[0].value : - null; + var picture = getFirstImageFromProfile(userIdent.profile); - // check if user has picture - // set user.picture from twitter - if (picture && !user.picture || user.picture === defaultProfileImage) { - debug('use has no pic'); + debug('picture', picture, user.picture); + // check if picture was found + // check if user has no picture + // check if user has default picture + // set user.picture from oauth provider + if ( + picture && + (!user.picture || user.picture === defaultProfileImage) + ) { + debug('setting user picture'); user.picture = userIdent.profile.photos[0].value; - user.save(function(err) { + return user.save(function(err) { if (err) { return next(err); } next(); }); - } else { - debug('exiting after user ident'); - next(); } + + debug('exiting after user ident'); + next(); }); }); }; diff --git a/common/models/user.js b/common/models/user.js new file mode 100644 index 00000000000000..0806d97e0b1491 --- /dev/null +++ b/common/models/user.js @@ -0,0 +1,171 @@ +var debug = require('debug')('freecc:user:remote'); +var blacklistedUsernames = + require('../../server/utils/constants').blacklistedUsernames; + +module.exports = function(User) { + // NOTE(berks): user email validation currently not needed but build in. This + // work around should let us sneak by + // see: + // https://github.com/strongloop/loopback/issues/1137#issuecomment-109200135 + delete User.validations.email; + // set salt factor for passwords + User.settings.saltWorkFactor = 5; + debug('setting up user hooks'); + // send verification email to new camper + User.afterRemote('create', function(ctx, user, next) { + debug('user created, sending email'); + if (!user.email) { return next(); } + + var mailOptions = { + type: 'email', + to: user.email, + from: 'Team@freecodecamp.com', + subject: 'Welcome to Free Code Camp!', + redirect: '/', + text: [ + 'Greetings from San Francisco!\n\n', + 'Thank you for joining our community.\n', + 'Feel free to email us at this address if you have ', + 'any questions about Free Code Camp.\n', + 'And if you have a moment, check out our blog: ', + 'blog.freecodecamp.com.\n', + 'Good luck with the challenges!\n\n', + '- the Free Code Camp Volunteer Team' + ].join('') + }; + user.verify(mailOptions, function(err) { + if (err) { return next(err); } + debug('verification email sent'); + ctx.req.flash('success', { + msg: [ + 'Please check your email and click on the verification link ' + + 'before logging in.' + ] + }); + ctx.res.redirect('/'); + }); + }); + + User.afterRemote('confirm', function(ctx) { + ctx.req.flash('success', { + msg: [ + 'You\'re email has been confirmed!' + ] + }); + ctx.res.redirect('/email-signin'); + }); + + User.afterRemote('login', function(ctx, instance, next) { + var res = ctx.res; + var req = ctx.req; + + User.findOne({where: {email: ctx.args.credentials.email}}, + function(err, response) { + if (err) { + return next(err); + } + if (response.emailVerified !== true) { + return res.redirect('/'); + } + User.login({ + email: ctx.args.credentials.email, + password: ctx.args.credentials.password, + ttl: Infinity + }, function(err, accessToken) { + if (err) { + req.flash('errors', { + msg: [ + 'Invalid username or password.' + ] + }); + return res.redirect('/'); + } + var config = { + signed: !!req.signedCookies, + maxAge: accessToken.ttl + }; + if (accessToken && accessToken.id) { + res.cookie('access_token', accessToken.id, config); + res.cookie('userId', accessToken.userId, config); + } + req.logIn(response, function(err) { + if (err) { + return next(err); + } + req.flash('success', { msg: 'Success! You are logged in.' }); + return res.redirect('/'); + }); + }); + }); + return res.redirect('/'); + }); + + User.afterRemote('logout', function(ctx, result, next) { + var res = ctx.result; + res.clearCookie('access_token'); + res.clearCookie('userId'); + next(); + }); + + User.doesExist = function doesExist(username, email, cb) { + if (!username && !email) { + return process.nextTick(function() { + cb(null, false); + }); + } + debug('checking existence'); + + // check to see if username is on blacklist + if (username && blacklistedUsernames.indexOf(username) !== -1) { + return cb(null, true); + } + + var where = {}; + if (username) { + where.username = username.toLowerCase(); + } else { + where.email = email ? email.toLowerCase() : email; + } + debug('where', where); + User.count( + where, + function (err, count) { + if (err) { + debug('err checking existance: ', err); + return cb(err); + } + if (count > 0) { + return cb(null, true); + } + return cb(null, false); + } + ); + }; + + User.remoteMethod( + 'doesExist', + { + description: 'checks whether a user exists using email or username', + accepts: [ + { + arg: 'username', + type: 'string' + }, + { + arg: 'email', + type: 'string' + } + ], + returns: [ + { + arg: 'exists', + type: 'boolean' + } + ], + http: { + path: '/exists', + verb: 'get' + } + } + ); +}; diff --git a/common/models/user.json b/common/models/user.json index 2811cfce2dac5f..8e15a241dc8466 100644 --- a/common/models/user.json +++ b/common/models/user.json @@ -126,9 +126,8 @@ "type": "string" }, "sentSlackInvite": { - "type": { - "type": false - } + "type": "boolean", + "default": false }, "resetPasswordExpires": { "type": "string" @@ -145,10 +144,12 @@ "completedDate": "string", "solution": "string" } - ] + ], + "default": [] }, "uncompletedCoursewares": { - "type": "array" + "type": "array", + "default": [] }, "completedCoursewares": { "type": [ @@ -164,13 +165,16 @@ "githubLink": "string", "verified": "boolean" } - ] + ], + "default": [] }, "completedFieldGuides": { - "type": [] + "type": "array", + "default": [] }, "uncompletedFieldGuides": { - "type": [] + "type": "array", + "default": [] }, "currentStreak": { "type": "number", @@ -217,7 +221,8 @@ "default": [] }, "uncompletedChallenges": { - "type": "array" + "type": "array", + "default": [] } }, "validations": [], diff --git a/coverage/coverage.json b/coverage/coverage.json new file mode 100644 index 00000000000000..e8730a7576ada8 --- /dev/null +++ b/coverage/coverage.json @@ -0,0 +1 @@ +{"/Users/nathanleniz/Developer/freecodecamp/server/server.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/server.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":0,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":0,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":0,"33":0,"34":0,"35":1,"36":1,"37":1,"38":1,"39":0,"40":0,"41":1,"42":1,"43":1,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":1,"52":1,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":1,"63":9,"64":9,"65":9,"66":1,"67":0,"68":1,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":1,"85":0,"86":0,"87":1,"88":0,"89":1},"b":{"1":[1,1],"2":[0,1],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,1],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,1]},"f":{"1":1,"2":0,"3":0,"4":0,"5":0,"6":0,"7":9,"8":0,"9":0,"10":0},"fnMap":{"1":{"name":"(anonymous_1)","line":3,"loc":{"start":{"line":3,"column":32},"end":{"line":3,"column":47}}},"2":{"name":"(anonymous_2)","line":65,"loc":{"start":{"line":65,"column":16},"end":{"line":65,"column":40}}},"3":{"name":"(anonymous_3)","line":88,"loc":{"start":{"line":88,"column":8},"end":{"line":88,"column":33}}},"4":{"name":"(anonymous_4)","line":172,"loc":{"start":{"line":172,"column":8},"end":{"line":172,"column":34}}},"5":{"name":"(anonymous_5)","line":187,"loc":{"start":{"line":187,"column":8},"end":{"line":187,"column":34}}},"6":{"name":"(anonymous_6)","line":207,"loc":{"start":{"line":207,"column":17},"end":{"line":207,"column":45}}},"7":{"name":"(anonymous_7)","line":230,"loc":{"start":{"line":230,"column":30},"end":{"line":230,"column":49}}},"8":{"name":"(anonymous_8)","line":251,"loc":{"start":{"line":251,"column":10},"end":{"line":251,"column":40}}},"9":{"name":"(anonymous_9)","line":287,"loc":{"start":{"line":287,"column":12},"end":{"line":287,"column":23}}},"10":{"name":"(anonymous_10)","line":288,"loc":{"start":{"line":288,"column":30},"end":{"line":288,"column":42}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":25}},"2":{"start":{"line":3,"column":0},"end":{"line":10,"column":3}},"3":{"start":{"line":4,"column":2},"end":{"line":7,"column":4}},"4":{"start":{"line":8,"column":2},"end":{"line":8,"column":27}},"5":{"start":{"line":9,"column":2},"end":{"line":9,"column":18}},"6":{"start":{"line":12,"column":0},"end":{"line":36,"column":45}},"7":{"start":{"line":38,"column":0},"end":{"line":39,"column":70}},"8":{"start":{"line":43,"column":0},"end":{"line":43,"column":21}},"9":{"start":{"line":44,"column":0},"end":{"line":45,"column":62}},"10":{"start":{"line":46,"column":0},"end":{"line":46,"column":57}},"11":{"start":{"line":48,"column":0},"end":{"line":48,"column":42}},"12":{"start":{"line":49,"column":0},"end":{"line":49,"column":48}},"13":{"start":{"line":50,"column":0},"end":{"line":50,"column":31}},"14":{"start":{"line":52,"column":0},"end":{"line":56,"column":1}},"15":{"start":{"line":53,"column":2},"end":{"line":55,"column":6}},"16":{"start":{"line":58,"column":0},"end":{"line":58,"column":20}},"17":{"start":{"line":59,"column":0},"end":{"line":59,"column":57}},"18":{"start":{"line":60,"column":0},"end":{"line":60,"column":23}},"19":{"start":{"line":61,"column":0},"end":{"line":61,"column":27}},"20":{"start":{"line":62,"column":0},"end":{"line":62,"column":51}},"21":{"start":{"line":63,"column":0},"end":{"line":69,"column":4}},"22":{"start":{"line":66,"column":6},"end":{"line":66,"column":31}},"23":{"start":{"line":70,"column":0},"end":{"line":70,"column":26}},"24":{"start":{"line":71,"column":0},"end":{"line":71,"column":44}},"25":{"start":{"line":72,"column":0},"end":{"line":80,"column":4}},"26":{"start":{"line":82,"column":0},"end":{"line":82,"column":17}},"27":{"start":{"line":83,"column":0},"end":{"line":83,"column":28}},"28":{"start":{"line":85,"column":0},"end":{"line":85,"column":28}},"29":{"start":{"line":86,"column":0},"end":{"line":86,"column":26}},"30":{"start":{"line":87,"column":0},"end":{"line":87,"column":29}},"31":{"start":{"line":88,"column":0},"end":{"line":94,"column":3}},"32":{"start":{"line":89,"column":2},"end":{"line":89,"column":49}},"33":{"start":{"line":90,"column":2},"end":{"line":92,"column":4}},"34":{"start":{"line":93,"column":2},"end":{"line":93,"column":9}},"35":{"start":{"line":96,"column":0},"end":{"line":133,"column":2}},"36":{"start":{"line":135,"column":0},"end":{"line":168,"column":4}},"37":{"start":{"line":170,"column":0},"end":{"line":170,"column":28}},"38":{"start":{"line":172,"column":0},"end":{"line":176,"column":3}},"39":{"start":{"line":174,"column":2},"end":{"line":174,"column":29}},"40":{"start":{"line":175,"column":2},"end":{"line":175,"column":9}},"41":{"start":{"line":178,"column":0},"end":{"line":180,"column":2}},"42":{"start":{"line":182,"column":0},"end":{"line":185,"column":3}},"43":{"start":{"line":187,"column":0},"end":{"line":197,"column":3}},"44":{"start":{"line":189,"column":2},"end":{"line":189,"column":36}},"45":{"start":{"line":190,"column":2},"end":{"line":194,"column":3}},"46":{"start":{"line":191,"column":4},"end":{"line":191,"column":18}},"47":{"start":{"line":192,"column":9},"end":{"line":194,"column":3}},"48":{"start":{"line":193,"column":4},"end":{"line":193,"column":18}},"49":{"start":{"line":195,"column":2},"end":{"line":195,"column":34}},"50":{"start":{"line":196,"column":2},"end":{"line":196,"column":9}},"51":{"start":{"line":199,"column":0},"end":{"line":203,"column":3}},"52":{"start":{"line":205,"column":0},"end":{"line":228,"column":2}},"53":{"start":{"line":208,"column":4},"end":{"line":208,"column":32}},"54":{"start":{"line":211,"column":4},"end":{"line":213,"column":13}},"55":{"start":{"line":215,"column":4},"end":{"line":215,"column":52}},"56":{"start":{"line":216,"column":4},"end":{"line":216,"column":80}},"57":{"start":{"line":217,"column":4},"end":{"line":217,"column":43}},"58":{"start":{"line":218,"column":4},"end":{"line":221,"column":6}},"59":{"start":{"line":223,"column":4},"end":{"line":225,"column":5}},"60":{"start":{"line":224,"column":6},"end":{"line":224,"column":28}},"61":{"start":{"line":226,"column":4},"end":{"line":226,"column":19}},"62":{"start":{"line":230,"column":0},"end":{"line":237,"column":3}},"63":{"start":{"line":231,"column":2},"end":{"line":231,"column":43}},"64":{"start":{"line":232,"column":2},"end":{"line":232,"column":44}},"65":{"start":{"line":233,"column":2},"end":{"line":236,"column":4}},"66":{"start":{"line":246,"column":0},"end":{"line":281,"column":1}},"67":{"start":{"line":247,"column":2},"end":{"line":247,"column":39}},"68":{"start":{"line":251,"column":2},"end":{"line":280,"column":5}},"69":{"start":{"line":254,"column":4},"end":{"line":256,"column":5}},"70":{"start":{"line":255,"column":6},"end":{"line":255,"column":34}},"71":{"start":{"line":259,"column":4},"end":{"line":261,"column":5}},"72":{"start":{"line":260,"column":6},"end":{"line":260,"column":27}},"73":{"start":{"line":264,"column":4},"end":{"line":264,"column":30}},"74":{"start":{"line":265,"column":4},"end":{"line":265,"column":51}},"75":{"start":{"line":267,"column":4},"end":{"line":267,"column":71}},"76":{"start":{"line":268,"column":4},"end":{"line":279,"column":5}},"77":{"start":{"line":269,"column":6},"end":{"line":269,"column":44}},"78":{"start":{"line":270,"column":6},"end":{"line":270,"column":31}},"79":{"start":{"line":272,"column":11},"end":{"line":279,"column":5}},"80":{"start":{"line":273,"column":6},"end":{"line":273,"column":56}},"81":{"start":{"line":274,"column":6},"end":{"line":274,"column":44}},"82":{"start":{"line":277,"column":6},"end":{"line":277,"column":50}},"83":{"start":{"line":278,"column":6},"end":{"line":278,"column":31}},"84":{"start":{"line":287,"column":0},"end":{"line":295,"column":2}},"85":{"start":{"line":288,"column":2},"end":{"line":294,"column":5}},"86":{"start":{"line":289,"column":4},"end":{"line":293,"column":6}},"87":{"start":{"line":298,"column":0},"end":{"line":300,"column":1}},"88":{"start":{"line":299,"column":2},"end":{"line":299,"column":14}},"89":{"start":{"line":302,"column":0},"end":{"line":302,"column":21}}},"branchMap":{"1":{"line":48,"type":"binary-expr","locations":[{"start":{"line":48,"column":16},"end":{"line":48,"column":32}},{"start":{"line":48,"column":36},"end":{"line":48,"column":40}}]},"2":{"line":52,"type":"if","locations":[{"start":{"line":52,"column":0},"end":{"line":52,"column":0}},{"start":{"line":52,"column":0},"end":{"line":52,"column":0}}]},"3":{"line":190,"type":"if","locations":[{"start":{"line":190,"column":2},"end":{"line":190,"column":2}},{"start":{"line":190,"column":2},"end":{"line":190,"column":2}}]},"4":{"line":192,"type":"if","locations":[{"start":{"line":192,"column":9},"end":{"line":192,"column":9}},{"start":{"line":192,"column":9},"end":{"line":192,"column":9}}]},"5":{"line":211,"type":"cond-expr","locations":[{"start":{"line":212,"column":8},"end":{"line":212,"column":23}},{"start":{"line":213,"column":8},"end":{"line":213,"column":12}}]},"6":{"line":211,"type":"binary-expr","locations":[{"start":{"line":211,"column":16},"end":{"line":211,"column":22}},{"start":{"line":211,"column":26},"end":{"line":211,"column":35}},{"start":{"line":211,"column":39},"end":{"line":211,"column":54}}]},"7":{"line":215,"type":"binary-expr","locations":[{"start":{"line":215,"column":20},"end":{"line":215,"column":36}},{"start":{"line":215,"column":40},"end":{"line":215,"column":50}}]},"8":{"line":216,"type":"cond-expr","locations":[{"start":{"line":216,"column":46},"end":{"line":216,"column":68}},{"start":{"line":216,"column":71},"end":{"line":216,"column":79}}]},"9":{"line":223,"type":"if","locations":[{"start":{"line":223,"column":4},"end":{"line":223,"column":4}},{"start":{"line":223,"column":4},"end":{"line":223,"column":4}}]},"10":{"line":246,"type":"if","locations":[{"start":{"line":246,"column":0},"end":{"line":246,"column":0}},{"start":{"line":246,"column":0},"end":{"line":246,"column":0}}]},"11":{"line":254,"type":"if","locations":[{"start":{"line":254,"column":4},"end":{"line":254,"column":4}},{"start":{"line":254,"column":4},"end":{"line":254,"column":4}}]},"12":{"line":259,"type":"if","locations":[{"start":{"line":259,"column":4},"end":{"line":259,"column":4}},{"start":{"line":259,"column":4},"end":{"line":259,"column":4}}]},"13":{"line":268,"type":"if","locations":[{"start":{"line":268,"column":4},"end":{"line":268,"column":4}},{"start":{"line":268,"column":4},"end":{"line":268,"column":4}}]},"14":{"line":272,"type":"if","locations":[{"start":{"line":272,"column":11},"end":{"line":272,"column":11}},{"start":{"line":272,"column":11},"end":{"line":272,"column":11}}]},"15":{"line":298,"type":"if","locations":[{"start":{"line":298,"column":0},"end":{"line":298,"column":0}},{"start":{"line":298,"column":0},"end":{"line":298,"column":0}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/passport-providers.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/passport-providers.js","s":{"1":1,"2":1,"3":1},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":31}},"3":{"start":{"line":3,"column":0},"end":{"line":123,"column":2}}},"branchMap":{}},"/Users/nathanleniz/Developer/freecodecamp/config/secrets.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/config/secrets.js","s":{"1":1},"b":{"1":[1,1]},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":65,"column":2}}},"branchMap":{"1":{"line":3,"type":"binary-expr","locations":[{"start":{"line":3,"column":6},"end":{"line":3,"column":25}},{"start":{"line":3,"column":29},"end":{"line":3,"column":52}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/config.local.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/config.local.js","s":{"1":1,"2":1},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":54}},"2":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"branchMap":{}},"/Users/nathanleniz/Developer/freecodecamp/common/config.global.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/common/config.global.js","s":{"1":1,"2":1},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":29}},"2":{"start":{"line":7,"column":0},"end":{"line":7,"column":41}}},"branchMap":{}},"/Users/nathanleniz/Developer/freecodecamp/server/config.development.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/config.development.js","s":{"1":1},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":18,"column":2}}},"branchMap":{}},"/Users/nathanleniz/Developer/freecodecamp/server/datasources.local.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/datasources.local.js","s":{"1":1,"2":1},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":43}},"2":{"start":{"line":3,"column":0},"end":{"line":19,"column":2}}},"branchMap":{}},"/Users/nathanleniz/Developer/freecodecamp/common/models/user.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/common/models/user.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":1,"18":0,"19":0,"20":1,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":1,"43":0,"44":0,"45":0,"46":0,"47":1,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":1},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0]},"f":{"1":1,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},"fnMap":{"1":{"name":"(anonymous_1)","line":5,"loc":{"start":{"line":5,"column":17},"end":{"line":5,"column":32}}},"2":{"name":"(anonymous_2)","line":13,"loc":{"start":{"line":13,"column":29},"end":{"line":13,"column":55}}},"3":{"name":"(anonymous_3)","line":34,"loc":{"start":{"line":34,"column":29},"end":{"line":34,"column":43}}},"4":{"name":"(anonymous_4)","line":47,"loc":{"start":{"line":47,"column":30},"end":{"line":47,"column":44}}},"5":{"name":"(anonymous_5)","line":56,"loc":{"start":{"line":56,"column":28},"end":{"line":56,"column":58}}},"6":{"name":"(anonymous_6)","line":61,"loc":{"start":{"line":61,"column":6},"end":{"line":61,"column":30}}},"7":{"name":"(anonymous_7)","line":72,"loc":{"start":{"line":72,"column":11},"end":{"line":72,"column":38}}},"8":{"name":"(anonymous_8)","line":89,"loc":{"start":{"line":89,"column":30},"end":{"line":89,"column":44}}},"9":{"name":"(anonymous_9)","line":101,"loc":{"start":{"line":101,"column":29},"end":{"line":101,"column":57}}},"10":{"name":"doesExist","line":108,"loc":{"start":{"line":108,"column":19},"end":{"line":108,"column":59}}},"11":{"name":"(anonymous_11)","line":110,"loc":{"start":{"line":110,"column":30},"end":{"line":110,"column":41}}},"12":{"name":"(anonymous_12)","line":130,"loc":{"start":{"line":130,"column":6},"end":{"line":130,"column":28}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":51}},"2":{"start":{"line":2,"column":0},"end":{"line":3,"column":63}},"3":{"start":{"line":5,"column":0},"end":{"line":169,"column":2}},"4":{"start":{"line":10,"column":2},"end":{"line":10,"column":32}},"5":{"start":{"line":11,"column":2},"end":{"line":11,"column":33}},"6":{"start":{"line":13,"column":2},"end":{"line":45,"column":5}},"7":{"start":{"line":14,"column":4},"end":{"line":14,"column":41}},"8":{"start":{"line":15,"column":4},"end":{"line":15,"column":39}},"9":{"start":{"line":15,"column":23},"end":{"line":15,"column":37}},"10":{"start":{"line":17,"column":4},"end":{"line":33,"column":6}},"11":{"start":{"line":34,"column":4},"end":{"line":44,"column":7}},"12":{"start":{"line":35,"column":6},"end":{"line":35,"column":36}},"13":{"start":{"line":35,"column":17},"end":{"line":35,"column":34}},"14":{"start":{"line":36,"column":6},"end":{"line":36,"column":39}},"15":{"start":{"line":37,"column":6},"end":{"line":42,"column":9}},"16":{"start":{"line":43,"column":6},"end":{"line":43,"column":28}},"17":{"start":{"line":47,"column":2},"end":{"line":54,"column":5}},"18":{"start":{"line":48,"column":4},"end":{"line":52,"column":7}},"19":{"start":{"line":53,"column":4},"end":{"line":53,"column":38}},"20":{"start":{"line":56,"column":2},"end":{"line":99,"column":5}},"21":{"start":{"line":57,"column":4},"end":{"line":57,"column":22}},"22":{"start":{"line":58,"column":4},"end":{"line":58,"column":22}},"23":{"start":{"line":60,"column":4},"end":{"line":97,"column":9}},"24":{"start":{"line":62,"column":8},"end":{"line":64,"column":9}},"25":{"start":{"line":63,"column":10},"end":{"line":63,"column":27}},"26":{"start":{"line":65,"column":8},"end":{"line":67,"column":9}},"27":{"start":{"line":66,"column":10},"end":{"line":66,"column":35}},"28":{"start":{"line":68,"column":8},"end":{"line":96,"column":11}},"29":{"start":{"line":73,"column":10},"end":{"line":80,"column":11}},"30":{"start":{"line":74,"column":12},"end":{"line":78,"column":15}},"31":{"start":{"line":79,"column":12},"end":{"line":79,"column":37}},"32":{"start":{"line":81,"column":10},"end":{"line":84,"column":12}},"33":{"start":{"line":85,"column":10},"end":{"line":88,"column":11}},"34":{"start":{"line":86,"column":12},"end":{"line":86,"column":63}},"35":{"start":{"line":87,"column":12},"end":{"line":87,"column":61}},"36":{"start":{"line":89,"column":10},"end":{"line":95,"column":13}},"37":{"start":{"line":90,"column":12},"end":{"line":92,"column":13}},"38":{"start":{"line":91,"column":14},"end":{"line":91,"column":31}},"39":{"start":{"line":93,"column":12},"end":{"line":93,"column":73}},"40":{"start":{"line":94,"column":12},"end":{"line":94,"column":37}},"41":{"start":{"line":98,"column":4},"end":{"line":98,"column":29}},"42":{"start":{"line":101,"column":2},"end":{"line":106,"column":5}},"43":{"start":{"line":102,"column":4},"end":{"line":102,"column":25}},"44":{"start":{"line":103,"column":4},"end":{"line":103,"column":36}},"45":{"start":{"line":104,"column":4},"end":{"line":104,"column":30}},"46":{"start":{"line":105,"column":4},"end":{"line":105,"column":11}},"47":{"start":{"line":108,"column":2},"end":{"line":141,"column":4}},"48":{"start":{"line":109,"column":4},"end":{"line":113,"column":5}},"49":{"start":{"line":110,"column":6},"end":{"line":112,"column":9}},"50":{"start":{"line":111,"column":8},"end":{"line":111,"column":24}},"51":{"start":{"line":114,"column":4},"end":{"line":114,"column":32}},"52":{"start":{"line":117,"column":4},"end":{"line":119,"column":5}},"53":{"start":{"line":118,"column":6},"end":{"line":118,"column":28}},"54":{"start":{"line":121,"column":4},"end":{"line":121,"column":19}},"55":{"start":{"line":122,"column":4},"end":{"line":126,"column":5}},"56":{"start":{"line":123,"column":6},"end":{"line":123,"column":46}},"57":{"start":{"line":125,"column":6},"end":{"line":125,"column":56}},"58":{"start":{"line":127,"column":4},"end":{"line":127,"column":26}},"59":{"start":{"line":128,"column":4},"end":{"line":140,"column":6}},"60":{"start":{"line":131,"column":8},"end":{"line":134,"column":9}},"61":{"start":{"line":132,"column":10},"end":{"line":132,"column":49}},"62":{"start":{"line":133,"column":10},"end":{"line":133,"column":25}},"63":{"start":{"line":135,"column":8},"end":{"line":137,"column":9}},"64":{"start":{"line":136,"column":10},"end":{"line":136,"column":32}},"65":{"start":{"line":138,"column":8},"end":{"line":138,"column":31}},"66":{"start":{"line":143,"column":2},"end":{"line":168,"column":4}}},"branchMap":{"1":{"line":15,"type":"if","locations":[{"start":{"line":15,"column":4},"end":{"line":15,"column":4}},{"start":{"line":15,"column":4},"end":{"line":15,"column":4}}]},"2":{"line":35,"type":"if","locations":[{"start":{"line":35,"column":6},"end":{"line":35,"column":6}},{"start":{"line":35,"column":6},"end":{"line":35,"column":6}}]},"3":{"line":62,"type":"if","locations":[{"start":{"line":62,"column":8},"end":{"line":62,"column":8}},{"start":{"line":62,"column":8},"end":{"line":62,"column":8}}]},"4":{"line":65,"type":"if","locations":[{"start":{"line":65,"column":8},"end":{"line":65,"column":8}},{"start":{"line":65,"column":8},"end":{"line":65,"column":8}}]},"5":{"line":73,"type":"if","locations":[{"start":{"line":73,"column":10},"end":{"line":73,"column":10}},{"start":{"line":73,"column":10},"end":{"line":73,"column":10}}]},"6":{"line":85,"type":"if","locations":[{"start":{"line":85,"column":10},"end":{"line":85,"column":10}},{"start":{"line":85,"column":10},"end":{"line":85,"column":10}}]},"7":{"line":85,"type":"binary-expr","locations":[{"start":{"line":85,"column":14},"end":{"line":85,"column":25}},{"start":{"line":85,"column":29},"end":{"line":85,"column":43}}]},"8":{"line":90,"type":"if","locations":[{"start":{"line":90,"column":12},"end":{"line":90,"column":12}},{"start":{"line":90,"column":12},"end":{"line":90,"column":12}}]},"9":{"line":109,"type":"if","locations":[{"start":{"line":109,"column":4},"end":{"line":109,"column":4}},{"start":{"line":109,"column":4},"end":{"line":109,"column":4}}]},"10":{"line":109,"type":"binary-expr","locations":[{"start":{"line":109,"column":8},"end":{"line":109,"column":17}},{"start":{"line":109,"column":21},"end":{"line":109,"column":27}}]},"11":{"line":117,"type":"if","locations":[{"start":{"line":117,"column":4},"end":{"line":117,"column":4}},{"start":{"line":117,"column":4},"end":{"line":117,"column":4}}]},"12":{"line":117,"type":"binary-expr","locations":[{"start":{"line":117,"column":8},"end":{"line":117,"column":16}},{"start":{"line":117,"column":20},"end":{"line":117,"column":65}}]},"13":{"line":122,"type":"if","locations":[{"start":{"line":122,"column":4},"end":{"line":122,"column":4}},{"start":{"line":122,"column":4},"end":{"line":122,"column":4}}]},"14":{"line":125,"type":"cond-expr","locations":[{"start":{"line":125,"column":28},"end":{"line":125,"column":47}},{"start":{"line":125,"column":50},"end":{"line":125,"column":55}}]},"15":{"line":131,"type":"if","locations":[{"start":{"line":131,"column":8},"end":{"line":131,"column":8}},{"start":{"line":131,"column":8},"end":{"line":131,"column":8}}]},"16":{"line":135,"type":"if","locations":[{"start":{"line":135,"column":8},"end":{"line":135,"column":8}},{"start":{"line":135,"column":8},"end":{"line":135,"column":8}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/utils/constants.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/utils/constants.js","s":{"1":1},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":39,"column":2}}},"branchMap":{}},"/Users/nathanleniz/Developer/freecodecamp/common/models/User-Identity.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/common/models/User-Identity.js","s":{"1":1,"2":1,"3":1,"4":1,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0,0],"9":[0,0]},"f":{"1":1,"2":0,"3":0,"4":0},"fnMap":{"1":{"name":"(anonymous_1)","line":6,"loc":{"start":{"line":6,"column":17},"end":{"line":6,"column":37}}},"2":{"name":"(anonymous_2)","line":7,"loc":{"start":{"line":7,"column":34},"end":{"line":7,"column":54}}},"3":{"name":"(anonymous_3)","line":13,"loc":{"start":{"line":13,"column":17},"end":{"line":13,"column":37}}},"4":{"name":"(anonymous_4)","line":29,"loc":{"start":{"line":29,"column":16},"end":{"line":29,"column":30}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":56}},"2":{"start":{"line":3,"column":0},"end":{"line":4,"column":63}},"3":{"start":{"line":6,"column":0},"end":{"line":39,"column":2}},"4":{"start":{"line":7,"column":1},"end":{"line":38,"column":4}},"5":{"start":{"line":8,"column":2},"end":{"line":8,"column":54}},"6":{"start":{"line":9,"column":2},"end":{"line":12,"column":3}},"7":{"start":{"line":10,"column":4},"end":{"line":10,"column":45}},"8":{"start":{"line":11,"column":4},"end":{"line":11,"column":18}},"9":{"start":{"line":13,"column":2},"end":{"line":37,"column":5}},"10":{"start":{"line":14,"column":4},"end":{"line":14,"column":34}},"11":{"start":{"line":14,"column":15},"end":{"line":14,"column":32}},"12":{"start":{"line":15,"column":4},"end":{"line":18,"column":5}},"13":{"start":{"line":16,"column":6},"end":{"line":16,"column":45}},"14":{"start":{"line":17,"column":6},"end":{"line":17,"column":20}},"15":{"start":{"line":20,"column":4},"end":{"line":22,"column":11}},"16":{"start":{"line":26,"column":4},"end":{"line":36,"column":5}},"17":{"start":{"line":27,"column":6},"end":{"line":27,"column":30}},"18":{"start":{"line":28,"column":6},"end":{"line":28,"column":55}},"19":{"start":{"line":29,"column":6},"end":{"line":32,"column":9}},"20":{"start":{"line":30,"column":8},"end":{"line":30,"column":38}},"21":{"start":{"line":30,"column":19},"end":{"line":30,"column":36}},"22":{"start":{"line":31,"column":8},"end":{"line":31,"column":15}},"23":{"start":{"line":34,"column":6},"end":{"line":34,"column":40}},"24":{"start":{"line":35,"column":6},"end":{"line":35,"column":13}}},"branchMap":{"1":{"line":8,"type":"binary-expr","locations":[{"start":{"line":8,"column":18},"end":{"line":8,"column":37}},{"start":{"line":8,"column":41},"end":{"line":8,"column":53}}]},"2":{"line":9,"type":"if","locations":[{"start":{"line":9,"column":2},"end":{"line":9,"column":2}},{"start":{"line":9,"column":2},"end":{"line":9,"column":2}}]},"3":{"line":14,"type":"if","locations":[{"start":{"line":14,"column":4},"end":{"line":14,"column":4}},{"start":{"line":14,"column":4},"end":{"line":14,"column":4}}]},"4":{"line":15,"type":"if","locations":[{"start":{"line":15,"column":4},"end":{"line":15,"column":4}},{"start":{"line":15,"column":4},"end":{"line":15,"column":4}}]},"5":{"line":20,"type":"cond-expr","locations":[{"start":{"line":21,"column":6},"end":{"line":21,"column":32}},{"start":{"line":22,"column":6},"end":{"line":22,"column":10}}]},"6":{"line":20,"type":"binary-expr","locations":[{"start":{"line":20,"column":18},"end":{"line":20,"column":35}},{"start":{"line":20,"column":39},"end":{"line":20,"column":59}}]},"7":{"line":26,"type":"if","locations":[{"start":{"line":26,"column":4},"end":{"line":26,"column":4}},{"start":{"line":26,"column":4},"end":{"line":26,"column":4}}]},"8":{"line":26,"type":"binary-expr","locations":[{"start":{"line":26,"column":8},"end":{"line":26,"column":15}},{"start":{"line":26,"column":19},"end":{"line":26,"column":32}},{"start":{"line":26,"column":36},"end":{"line":26,"column":72}}]},"9":{"line":30,"type":"if","locations":[{"start":{"line":30,"column":8},"end":{"line":30,"column":8}},{"start":{"line":30,"column":8},"end":{"line":30,"column":8}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/a-extendUser.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/a-extendUser.js","s":{"1":1,"2":1,"3":1,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":1,"11":1,"12":1,"13":1,"14":1,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0]},"f":{"1":0,"2":0,"3":0,"4":1,"5":0,"6":0,"7":0},"fnMap":{"1":{"name":"destroyById","line":4,"loc":{"start":{"line":4,"column":0},"end":{"line":4,"column":32}}},"2":{"name":"(anonymous_2)","line":5,"loc":{"start":{"line":5,"column":30},"end":{"line":5,"column":49}}},"3":{"name":"(anonymous_3)","line":6,"loc":{"start":{"line":6,"column":26},"end":{"line":6,"column":40}}},"4":{"name":"(anonymous_4)","line":14,"loc":{"start":{"line":14,"column":17},"end":{"line":14,"column":31}}},"5":{"name":"(anonymous_5)","line":18,"loc":{"start":{"line":18,"column":31},"end":{"line":18,"column":51}}},"6":{"name":"(anonymous_6)","line":30,"loc":{"start":{"line":30,"column":6},"end":{"line":30,"column":20}}},"7":{"name":"(anonymous_7)","line":34,"loc":{"start":{"line":34,"column":6},"end":{"line":34,"column":17}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":51}},"3":{"start":{"line":4,"column":0},"end":{"line":12,"column":1}},"4":{"start":{"line":5,"column":2},"end":{"line":11,"column":5}},"5":{"start":{"line":6,"column":4},"end":{"line":9,"column":7}},"6":{"start":{"line":7,"column":6},"end":{"line":7,"column":48}},"7":{"start":{"line":7,"column":17},"end":{"line":7,"column":46}},"8":{"start":{"line":8,"column":6},"end":{"line":8,"column":29}},"9":{"start":{"line":10,"column":4},"end":{"line":10,"column":42}},"10":{"start":{"line":14,"column":0},"end":{"line":40,"column":2}},"11":{"start":{"line":15,"column":2},"end":{"line":15,"column":29}},"12":{"start":{"line":16,"column":2},"end":{"line":16,"column":45}},"13":{"start":{"line":17,"column":2},"end":{"line":17,"column":49}},"14":{"start":{"line":18,"column":2},"end":{"line":39,"column":5}},"15":{"start":{"line":19,"column":4},"end":{"line":19,"column":38}},"16":{"start":{"line":20,"column":4},"end":{"line":20,"column":61}},"17":{"start":{"line":21,"column":4},"end":{"line":23,"column":5}},"18":{"start":{"line":22,"column":6},"end":{"line":22,"column":20}},"19":{"start":{"line":24,"column":4},"end":{"line":38,"column":6}},"20":{"start":{"line":31,"column":8},"end":{"line":31,"column":55}},"21":{"start":{"line":32,"column":8},"end":{"line":32,"column":18}},"22":{"start":{"line":35,"column":8},"end":{"line":35,"column":52}},"23":{"start":{"line":36,"column":8},"end":{"line":36,"column":15}}},"branchMap":{"1":{"line":7,"type":"if","locations":[{"start":{"line":7,"column":6},"end":{"line":7,"column":6}},{"start":{"line":7,"column":6},"end":{"line":7,"column":6}}]},"2":{"line":20,"type":"cond-expr","locations":[{"start":{"line":20,"column":41},"end":{"line":20,"column":53}},{"start":{"line":20,"column":56},"end":{"line":20,"column":60}}]},"3":{"line":20,"type":"binary-expr","locations":[{"start":{"line":20,"column":13},"end":{"line":20,"column":22}},{"start":{"line":20,"column":26},"end":{"line":20,"column":38}}]},"4":{"line":21,"type":"if","locations":[{"start":{"line":21,"column":4},"end":{"line":21,"column":4}},{"start":{"line":21,"column":4},"end":{"line":21,"column":4}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/authentication.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/authentication.js","s":{"1":1,"2":1},"b":{},"f":{"1":1},"fnMap":{"1":{"name":"enableAuthentication","line":1,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":52}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":4,"column":2}},"2":{"start":{"line":3,"column":2},"end":{"line":3,"column":19}}},"branchMap":{}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/challenge.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/challenge.js","s":{"1":1,"2":1,"3":1,"4":1,"5":0,"6":0,"7":0,"8":0,"9":0,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":1,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":1,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":1,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":1,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":1,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0,"162":0,"163":0,"164":0,"165":0,"166":0,"167":0,"168":0,"169":0,"170":0,"171":0,"172":0,"173":0,"174":0,"175":0,"176":0,"177":0,"178":0,"179":0,"180":0,"181":0,"182":0,"183":0,"184":0,"185":0,"186":0,"187":0,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":0,"195":0,"196":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0],"52":[0,0],"53":[0,0],"54":[0,0],"55":[0,0],"56":[0,0],"57":[0,0],"58":[0,0],"59":[0,0]},"f":{"1":0,"2":0,"3":1,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0},"fnMap":{"1":{"name":"getMDNlinks","line":42,"loc":{"start":{"line":42,"column":0},"end":{"line":42,"column":28}}},"2":{"name":"(anonymous_2)","line":49,"loc":{"start":{"line":49,"column":18},"end":{"line":49,"column":35}}},"3":{"name":"(anonymous_3)","line":56,"loc":{"start":{"line":56,"column":17},"end":{"line":56,"column":31}}},"4":{"name":"returnNextChallenge","line":80,"loc":{"start":{"line":80,"column":2},"end":{"line":80,"column":47}}},"5":{"name":"(anonymous_5)","line":84,"loc":{"start":{"line":84,"column":53},"end":{"line":84,"column":69}}},"6":{"name":"(anonymous_6)","line":89,"loc":{"start":{"line":89,"column":14},"end":{"line":89,"column":30}}},"7":{"name":"(anonymous_7)","line":126,"loc":{"start":{"line":126,"column":18},"end":{"line":126,"column":32}}},"8":{"name":"returnCurrentChallenge","line":134,"loc":{"start":{"line":134,"column":2},"end":{"line":134,"column":50}}},"9":{"name":"(anonymous_9)","line":138,"loc":{"start":{"line":138,"column":53},"end":{"line":138,"column":69}}},"10":{"name":"(anonymous_10)","line":143,"loc":{"start":{"line":143,"column":14},"end":{"line":143,"column":30}}},"11":{"name":"(anonymous_11)","line":153,"loc":{"start":{"line":153,"column":20},"end":{"line":153,"column":34}}},"12":{"name":"(anonymous_12)","line":163,"loc":{"start":{"line":163,"column":18},"end":{"line":163,"column":32}}},"13":{"name":"returnIndividualChallenge","line":171,"loc":{"start":{"line":171,"column":2},"end":{"line":171,"column":53}}},"14":{"name":"(anonymous_14)","line":185,"loc":{"start":{"line":185,"column":6},"end":{"line":185,"column":40}}},"15":{"name":"(anonymous_15)","line":209,"loc":{"start":{"line":209,"column":20},"end":{"line":209,"column":35}}},"16":{"name":"(anonymous_16)","line":211,"loc":{"start":{"line":211,"column":28},"end":{"line":211,"column":44}}},"17":{"name":"(anonymous_17)","line":213,"loc":{"start":{"line":213,"column":27},"end":{"line":213,"column":39}}},"18":{"name":"(anonymous_18)","line":222,"loc":{"start":{"line":222,"column":13},"end":{"line":222,"column":24}}},"19":{"name":"(anonymous_19)","line":240,"loc":{"start":{"line":240,"column":13},"end":{"line":240,"column":24}}},"20":{"name":"(anonymous_20)","line":257,"loc":{"start":{"line":257,"column":13},"end":{"line":257,"column":24}}},"21":{"name":"(anonymous_21)","line":273,"loc":{"start":{"line":273,"column":13},"end":{"line":273,"column":24}}},"22":{"name":"(anonymous_22)","line":288,"loc":{"start":{"line":288,"column":13},"end":{"line":288,"column":24}}},"23":{"name":"(anonymous_23)","line":303,"loc":{"start":{"line":303,"column":13},"end":{"line":303,"column":24}}},"24":{"name":"(anonymous_24)","line":326,"loc":{"start":{"line":326,"column":24},"end":{"line":326,"column":39}}},"25":{"name":"completedBonfire","line":338,"loc":{"start":{"line":338,"column":2},"end":{"line":338,"column":44}}},"26":{"name":"(anonymous_26)","line":349,"loc":{"start":{"line":349,"column":9},"end":{"line":349,"column":36}}},"27":{"name":"(anonymous_27)","line":395,"loc":{"start":{"line":395,"column":22},"end":{"line":395,"column":43}}},"28":{"name":"(anonymous_28)","line":399,"loc":{"start":{"line":399,"column":28},"end":{"line":399,"column":51}}},"29":{"name":"(anonymous_29)","line":429,"loc":{"start":{"line":429,"column":20},"end":{"line":429,"column":35}}},"30":{"name":"completedChallenge","line":436,"loc":{"start":{"line":436,"column":2},"end":{"line":436,"column":46}}},"31":{"name":"(anonymous_31)","line":456,"loc":{"start":{"line":456,"column":18},"end":{"line":456,"column":39}}},"32":{"name":"completedZiplineOrBasejump","line":466,"loc":{"start":{"line":466,"column":2},"end":{"line":466,"column":54}}},"33":{"name":"(anonymous_33)","line":488,"loc":{"start":{"line":488,"column":9},"end":{"line":488,"column":45}}},"34":{"name":"(anonymous_34)","line":508,"loc":{"start":{"line":508,"column":22},"end":{"line":508,"column":43}}},"35":{"name":"(anonymous_35)","line":531,"loc":{"start":{"line":531,"column":26},"end":{"line":531,"column":49}}},"36":{"name":"(anonymous_36)","line":560,"loc":{"start":{"line":560,"column":20},"end":{"line":560,"column":41}}}},"statementMap":{"1":{"start":{"line":33,"column":0},"end":{"line":36,"column":53}},"2":{"start":{"line":38,"column":0},"end":{"line":38,"column":61}},"3":{"start":{"line":39,"column":0},"end":{"line":39,"column":57}},"4":{"start":{"line":42,"column":0},"end":{"line":54,"column":1}},"5":{"start":{"line":44,"column":2},"end":{"line":44,"column":26}},"6":{"start":{"line":48,"column":2},"end":{"line":52,"column":3}},"7":{"start":{"line":49,"column":4},"end":{"line":51,"column":7}},"8":{"start":{"line":50,"column":6},"end":{"line":50,"column":43}},"9":{"start":{"line":53,"column":2},"end":{"line":53,"column":24}},"10":{"start":{"line":56,"column":0},"end":{"line":572,"column":2}},"11":{"start":{"line":57,"column":2},"end":{"line":57,"column":37}},"12":{"start":{"line":58,"column":2},"end":{"line":58,"column":39}},"13":{"start":{"line":59,"column":2},"end":{"line":59,"column":29}},"14":{"start":{"line":61,"column":2},"end":{"line":65,"column":4}},"15":{"start":{"line":67,"column":2},"end":{"line":71,"column":4}},"16":{"start":{"line":73,"column":2},"end":{"line":73,"column":68}},"17":{"start":{"line":74,"column":2},"end":{"line":74,"column":59}},"18":{"start":{"line":75,"column":2},"end":{"line":75,"column":76}},"19":{"start":{"line":76,"column":2},"end":{"line":76,"column":54}},"20":{"start":{"line":78,"column":2},"end":{"line":78,"column":18}},"21":{"start":{"line":80,"column":2},"end":{"line":132,"column":3}},"22":{"start":{"line":81,"column":4},"end":{"line":83,"column":5}},"23":{"start":{"line":82,"column":4},"end":{"line":82,"column":72}},"24":{"start":{"line":84,"column":4},"end":{"line":86,"column":7}},"25":{"start":{"line":85,"column":6},"end":{"line":85,"column":21}},"26":{"start":{"line":88,"column":4},"end":{"line":93,"column":9}},"27":{"start":{"line":90,"column":8},"end":{"line":92,"column":9}},"28":{"start":{"line":91,"column":10},"end":{"line":91,"column":22}},"29":{"start":{"line":101,"column":4},"end":{"line":101,"column":26}},"30":{"start":{"line":103,"column":4},"end":{"line":103,"column":68}},"31":{"start":{"line":104,"column":4},"end":{"line":104,"column":66}},"32":{"start":{"line":105,"column":4},"end":{"line":106,"column":28}},"33":{"start":{"line":108,"column":4},"end":{"line":120,"column":5}},"34":{"start":{"line":110,"column":6},"end":{"line":111,"column":66}},"35":{"start":{"line":112,"column":11},"end":{"line":120,"column":5}},"36":{"start":{"line":113,"column":6},"end":{"line":113,"column":72}},"37":{"start":{"line":115,"column":6},"end":{"line":118,"column":9}},"38":{"start":{"line":119,"column":6},"end":{"line":119,"column":70}},"39":{"start":{"line":122,"column":4},"end":{"line":124,"column":27}},"40":{"start":{"line":126,"column":4},"end":{"line":131,"column":7}},"41":{"start":{"line":127,"column":6},"end":{"line":129,"column":7}},"42":{"start":{"line":128,"column":8},"end":{"line":128,"column":25}},"43":{"start":{"line":130,"column":6},"end":{"line":130,"column":57}},"44":{"start":{"line":134,"column":2},"end":{"line":169,"column":3}},"45":{"start":{"line":135,"column":4},"end":{"line":137,"column":5}},"46":{"start":{"line":136,"column":4},"end":{"line":136,"column":72}},"47":{"start":{"line":138,"column":4},"end":{"line":140,"column":7}},"48":{"start":{"line":139,"column":6},"end":{"line":139,"column":21}},"49":{"start":{"line":142,"column":4},"end":{"line":147,"column":9}},"50":{"start":{"line":144,"column":8},"end":{"line":146,"column":9}},"51":{"start":{"line":145,"column":10},"end":{"line":145,"column":22}},"52":{"start":{"line":148,"column":4},"end":{"line":158,"column":5}},"53":{"start":{"line":149,"column":6},"end":{"line":149,"column":37}},"54":{"start":{"line":150,"column":6},"end":{"line":150,"column":74}},"55":{"start":{"line":151,"column":6},"end":{"line":151,"column":78}},"56":{"start":{"line":152,"column":6},"end":{"line":152,"column":53}},"57":{"start":{"line":153,"column":6},"end":{"line":157,"column":9}},"58":{"start":{"line":154,"column":8},"end":{"line":156,"column":9}},"59":{"start":{"line":155,"column":10},"end":{"line":155,"column":27}},"60":{"start":{"line":159,"column":4},"end":{"line":162,"column":39}},"61":{"start":{"line":163,"column":4},"end":{"line":168,"column":7}},"62":{"start":{"line":164,"column":6},"end":{"line":166,"column":7}},"63":{"start":{"line":165,"column":8},"end":{"line":165,"column":25}},"64":{"start":{"line":167,"column":6},"end":{"line":167,"column":57}},"65":{"start":{"line":171,"column":2},"end":{"line":336,"column":3}},"66":{"start":{"line":172,"column":4},"end":{"line":172,"column":46}},"67":{"start":{"line":174,"column":4},"end":{"line":181,"column":39}},"68":{"start":{"line":183,"column":4},"end":{"line":335,"column":9}},"69":{"start":{"line":186,"column":8},"end":{"line":186,"column":38}},"70":{"start":{"line":186,"column":19},"end":{"line":186,"column":36}},"71":{"start":{"line":189,"column":8},"end":{"line":195,"column":9}},"72":{"start":{"line":190,"column":10},"end":{"line":193,"column":13}},"73":{"start":{"line":194,"column":10},"end":{"line":194,"column":45}},"74":{"start":{"line":196,"column":8},"end":{"line":196,"column":49}},"75":{"start":{"line":198,"column":8},"end":{"line":201,"column":42}},"76":{"start":{"line":202,"column":8},"end":{"line":219,"column":9}},"77":{"start":{"line":203,"column":10},"end":{"line":203,"column":65}},"78":{"start":{"line":204,"column":15},"end":{"line":219,"column":9}},"79":{"start":{"line":205,"column":10},"end":{"line":218,"column":12}},"80":{"start":{"line":210,"column":18},"end":{"line":215,"column":23}},"81":{"start":{"line":212,"column":22},"end":{"line":212,"column":67}},"82":{"start":{"line":214,"column":22},"end":{"line":214,"column":33}},"83":{"start":{"line":221,"column":8},"end":{"line":324,"column":10}},"84":{"start":{"line":223,"column":12},"end":{"line":237,"column":15}},"85":{"start":{"line":241,"column":12},"end":{"line":254,"column":15}},"86":{"start":{"line":258,"column":12},"end":{"line":270,"column":15}},"87":{"start":{"line":274,"column":12},"end":{"line":285,"column":15}},"88":{"start":{"line":289,"column":12},"end":{"line":300,"column":15}},"89":{"start":{"line":304,"column":12},"end":{"line":322,"column":15}},"90":{"start":{"line":325,"column":8},"end":{"line":334,"column":9}},"91":{"start":{"line":326,"column":10},"end":{"line":331,"column":13}},"92":{"start":{"line":327,"column":12},"end":{"line":329,"column":13}},"93":{"start":{"line":328,"column":14},"end":{"line":328,"column":31}},"94":{"start":{"line":330,"column":12},"end":{"line":330,"column":60}},"95":{"start":{"line":333,"column":10},"end":{"line":333,"column":58}},"96":{"start":{"line":338,"column":2},"end":{"line":434,"column":3}},"97":{"start":{"line":339,"column":4},"end":{"line":339,"column":69}},"98":{"start":{"line":340,"column":4},"end":{"line":340,"column":50}},"99":{"start":{"line":341,"column":4},"end":{"line":341,"column":57}},"100":{"start":{"line":342,"column":4},"end":{"line":342,"column":53}},"101":{"start":{"line":343,"column":4},"end":{"line":343,"column":61}},"102":{"start":{"line":345,"column":4},"end":{"line":433,"column":5}},"103":{"start":{"line":346,"column":6},"end":{"line":411,"column":9}},"104":{"start":{"line":350,"column":8},"end":{"line":350,"column":38}},"105":{"start":{"line":350,"column":19},"end":{"line":350,"column":36}},"106":{"start":{"line":352,"column":8},"end":{"line":352,"column":72}},"107":{"start":{"line":353,"column":8},"end":{"line":356,"column":9}},"108":{"start":{"line":354,"column":10},"end":{"line":354,"column":60}},"109":{"start":{"line":355,"column":10},"end":{"line":355,"column":58}},"110":{"start":{"line":357,"column":8},"end":{"line":357,"column":38}},"111":{"start":{"line":358,"column":8},"end":{"line":384,"column":9}},"112":{"start":{"line":360,"column":10},"end":{"line":360,"column":72}},"113":{"start":{"line":361,"column":10},"end":{"line":365,"column":11}},"114":{"start":{"line":362,"column":12},"end":{"line":362,"column":64}},"115":{"start":{"line":363,"column":12},"end":{"line":363,"column":62}},"116":{"start":{"line":367,"column":10},"end":{"line":374,"column":13}},"117":{"start":{"line":376,"column":10},"end":{"line":383,"column":13}},"118":{"start":{"line":386,"column":8},"end":{"line":393,"column":11}},"119":{"start":{"line":395,"column":8},"end":{"line":410,"column":11}},"120":{"start":{"line":396,"column":10},"end":{"line":396,"column":40}},"121":{"start":{"line":396,"column":21},"end":{"line":396,"column":38}},"122":{"start":{"line":398,"column":10},"end":{"line":409,"column":11}},"123":{"start":{"line":399,"column":12},"end":{"line":406,"column":15}},"124":{"start":{"line":400,"column":14},"end":{"line":402,"column":15}},"125":{"start":{"line":401,"column":16},"end":{"line":401,"column":33}},"126":{"start":{"line":403,"column":14},"end":{"line":405,"column":15}},"127":{"start":{"line":404,"column":16},"end":{"line":404,"column":38}},"128":{"start":{"line":407,"column":17},"end":{"line":409,"column":11}},"129":{"start":{"line":408,"column":12},"end":{"line":408,"column":27}},"130":{"start":{"line":413,"column":6},"end":{"line":420,"column":9}},"131":{"start":{"line":422,"column":6},"end":{"line":422,"column":70}},"132":{"start":{"line":423,"column":6},"end":{"line":427,"column":7}},"133":{"start":{"line":425,"column":8},"end":{"line":425,"column":58}},"134":{"start":{"line":426,"column":8},"end":{"line":426,"column":56}},"135":{"start":{"line":429,"column":6},"end":{"line":432,"column":9}},"136":{"start":{"line":430,"column":8},"end":{"line":430,"column":38}},"137":{"start":{"line":430,"column":19},"end":{"line":430,"column":36}},"138":{"start":{"line":431,"column":8},"end":{"line":431,"column":23}},"139":{"start":{"line":436,"column":2},"end":{"line":464,"column":3}},"140":{"start":{"line":438,"column":4},"end":{"line":438,"column":50}},"141":{"start":{"line":439,"column":4},"end":{"line":439,"column":57}},"142":{"start":{"line":441,"column":4},"end":{"line":448,"column":7}},"143":{"start":{"line":449,"column":4},"end":{"line":449,"column":68}},"144":{"start":{"line":451,"column":4},"end":{"line":454,"column":5}},"145":{"start":{"line":452,"column":6},"end":{"line":452,"column":56}},"146":{"start":{"line":453,"column":6},"end":{"line":453,"column":54}},"147":{"start":{"line":456,"column":4},"end":{"line":463,"column":7}},"148":{"start":{"line":457,"column":6},"end":{"line":459,"column":7}},"149":{"start":{"line":458,"column":8},"end":{"line":458,"column":25}},"150":{"start":{"line":460,"column":6},"end":{"line":462,"column":7}},"151":{"start":{"line":461,"column":8},"end":{"line":461,"column":28}},"152":{"start":{"line":466,"column":2},"end":{"line":571,"column":3}},"153":{"start":{"line":468,"column":4},"end":{"line":468,"column":72}},"154":{"start":{"line":469,"column":4},"end":{"line":469,"column":50}},"155":{"start":{"line":470,"column":4},"end":{"line":470,"column":57}},"156":{"start":{"line":471,"column":4},"end":{"line":471,"column":56}},"157":{"start":{"line":472,"column":4},"end":{"line":473,"column":48}},"158":{"start":{"line":474,"column":4},"end":{"line":475,"column":12}},"159":{"start":{"line":476,"column":4},"end":{"line":482,"column":5}},"160":{"start":{"line":477,"column":6},"end":{"line":480,"column":9}},"161":{"start":{"line":481,"column":6},"end":{"line":481,"column":33}},"162":{"start":{"line":484,"column":4},"end":{"line":570,"column":5}},"163":{"start":{"line":485,"column":6},"end":{"line":540,"column":9}},"164":{"start":{"line":489,"column":8},"end":{"line":489,"column":38}},"165":{"start":{"line":489,"column":19},"end":{"line":489,"column":36}},"166":{"start":{"line":490,"column":8},"end":{"line":490,"column":72}},"167":{"start":{"line":491,"column":8},"end":{"line":494,"column":9}},"168":{"start":{"line":492,"column":10},"end":{"line":492,"column":60}},"169":{"start":{"line":493,"column":10},"end":{"line":493,"column":58}},"170":{"start":{"line":495,"column":8},"end":{"line":495,"column":51}},"171":{"start":{"line":497,"column":8},"end":{"line":506,"column":11}},"172":{"start":{"line":508,"column":8},"end":{"line":539,"column":11}},"173":{"start":{"line":509,"column":10},"end":{"line":509,"column":40}},"174":{"start":{"line":509,"column":21},"end":{"line":509,"column":38}},"175":{"start":{"line":511,"column":10},"end":{"line":513,"column":11}},"176":{"start":{"line":512,"column":12},"end":{"line":512,"column":39}},"177":{"start":{"line":514,"column":10},"end":{"line":514,"column":72}},"178":{"start":{"line":515,"column":10},"end":{"line":519,"column":11}},"179":{"start":{"line":516,"column":12},"end":{"line":516,"column":64}},"180":{"start":{"line":517,"column":12},"end":{"line":517,"column":62}},"181":{"start":{"line":521,"column":10},"end":{"line":530,"column":13}},"182":{"start":{"line":531,"column":10},"end":{"line":538,"column":13}},"183":{"start":{"line":532,"column":12},"end":{"line":534,"column":13}},"184":{"start":{"line":533,"column":14},"end":{"line":533,"column":31}},"185":{"start":{"line":535,"column":12},"end":{"line":537,"column":13}},"186":{"start":{"line":536,"column":14},"end":{"line":536,"column":41}},"187":{"start":{"line":543,"column":6},"end":{"line":552,"column":9}},"188":{"start":{"line":554,"column":6},"end":{"line":554,"column":70}},"189":{"start":{"line":555,"column":6},"end":{"line":558,"column":7}},"190":{"start":{"line":556,"column":8},"end":{"line":556,"column":58}},"191":{"start":{"line":557,"column":8},"end":{"line":557,"column":56}},"192":{"start":{"line":560,"column":6},"end":{"line":569,"column":9}},"193":{"start":{"line":561,"column":8},"end":{"line":563,"column":9}},"194":{"start":{"line":562,"column":10},"end":{"line":562,"column":27}},"195":{"start":{"line":566,"column":8},"end":{"line":568,"column":9}},"196":{"start":{"line":567,"column":10},"end":{"line":567,"column":37}}},"branchMap":{"1":{"line":48,"type":"if","locations":[{"start":{"line":48,"column":2},"end":{"line":48,"column":2}},{"start":{"line":48,"column":2},"end":{"line":48,"column":2}}]},"2":{"line":81,"type":"if","locations":[{"start":{"line":81,"column":4},"end":{"line":81,"column":4}},{"start":{"line":81,"column":4},"end":{"line":81,"column":4}}]},"3":{"line":90,"type":"if","locations":[{"start":{"line":90,"column":8},"end":{"line":90,"column":8}},{"start":{"line":90,"column":8},"end":{"line":90,"column":8}}]},"4":{"line":108,"type":"if","locations":[{"start":{"line":108,"column":4},"end":{"line":108,"column":4}},{"start":{"line":108,"column":4},"end":{"line":108,"column":4}}]},"5":{"line":112,"type":"if","locations":[{"start":{"line":112,"column":11},"end":{"line":112,"column":11}},{"start":{"line":112,"column":11},"end":{"line":112,"column":11}}]},"6":{"line":127,"type":"if","locations":[{"start":{"line":127,"column":6},"end":{"line":127,"column":6}},{"start":{"line":127,"column":6},"end":{"line":127,"column":6}}]},"7":{"line":135,"type":"if","locations":[{"start":{"line":135,"column":4},"end":{"line":135,"column":4}},{"start":{"line":135,"column":4},"end":{"line":135,"column":4}}]},"8":{"line":144,"type":"if","locations":[{"start":{"line":144,"column":8},"end":{"line":144,"column":8}},{"start":{"line":144,"column":8},"end":{"line":144,"column":8}}]},"9":{"line":148,"type":"if","locations":[{"start":{"line":148,"column":4},"end":{"line":148,"column":4}},{"start":{"line":148,"column":4},"end":{"line":148,"column":4}}]},"10":{"line":154,"type":"if","locations":[{"start":{"line":154,"column":8},"end":{"line":154,"column":8}},{"start":{"line":154,"column":8},"end":{"line":154,"column":8}}]},"11":{"line":164,"type":"if","locations":[{"start":{"line":164,"column":6},"end":{"line":164,"column":6}},{"start":{"line":164,"column":6},"end":{"line":164,"column":6}}]},"12":{"line":175,"type":"cond-expr","locations":[{"start":{"line":176,"column":8},"end":{"line":180,"column":20}},{"start":{"line":181,"column":8},"end":{"line":181,"column":38}}]},"13":{"line":186,"type":"if","locations":[{"start":{"line":186,"column":8},"end":{"line":186,"column":8}},{"start":{"line":186,"column":8},"end":{"line":186,"column":8}}]},"14":{"line":189,"type":"if","locations":[{"start":{"line":189,"column":8},"end":{"line":189,"column":8}},{"start":{"line":189,"column":8},"end":{"line":189,"column":8}}]},"15":{"line":202,"type":"if","locations":[{"start":{"line":202,"column":8},"end":{"line":202,"column":8}},{"start":{"line":202,"column":8},"end":{"line":202,"column":8}}]},"16":{"line":204,"type":"if","locations":[{"start":{"line":204,"column":15},"end":{"line":204,"column":15}},{"start":{"line":204,"column":15},"end":{"line":204,"column":15}}]},"17":{"line":325,"type":"if","locations":[{"start":{"line":325,"column":8},"end":{"line":325,"column":8}},{"start":{"line":325,"column":8},"end":{"line":325,"column":8}}]},"18":{"line":327,"type":"if","locations":[{"start":{"line":327,"column":12},"end":{"line":327,"column":12}},{"start":{"line":327,"column":12},"end":{"line":327,"column":12}}]},"19":{"line":339,"type":"binary-expr","locations":[{"start":{"line":339,"column":26},"end":{"line":339,"column":62}},{"start":{"line":339,"column":66},"end":{"line":339,"column":68}}]},"20":{"line":345,"type":"if","locations":[{"start":{"line":345,"column":4},"end":{"line":345,"column":4}},{"start":{"line":345,"column":4},"end":{"line":345,"column":4}}]},"21":{"line":350,"type":"if","locations":[{"start":{"line":350,"column":8},"end":{"line":350,"column":8}},{"start":{"line":350,"column":8},"end":{"line":350,"column":8}}]},"22":{"line":353,"type":"if","locations":[{"start":{"line":353,"column":8},"end":{"line":353,"column":8}},{"start":{"line":353,"column":8},"end":{"line":353,"column":8}}]},"23":{"line":354,"type":"binary-expr","locations":[{"start":{"line":354,"column":43},"end":{"line":354,"column":53}},{"start":{"line":354,"column":57},"end":{"line":354,"column":58}}]},"24":{"line":358,"type":"if","locations":[{"start":{"line":358,"column":8},"end":{"line":358,"column":8}},{"start":{"line":358,"column":8},"end":{"line":358,"column":8}}]},"25":{"line":361,"type":"if","locations":[{"start":{"line":361,"column":10},"end":{"line":361,"column":10}},{"start":{"line":361,"column":10},"end":{"line":361,"column":10}}]},"26":{"line":362,"type":"binary-expr","locations":[{"start":{"line":362,"column":47},"end":{"line":362,"column":57}},{"start":{"line":362,"column":61},"end":{"line":362,"column":62}}]},"27":{"line":396,"type":"if","locations":[{"start":{"line":396,"column":10},"end":{"line":396,"column":10}},{"start":{"line":396,"column":10},"end":{"line":396,"column":10}}]},"28":{"line":398,"type":"if","locations":[{"start":{"line":398,"column":10},"end":{"line":398,"column":10}},{"start":{"line":398,"column":10},"end":{"line":398,"column":10}}]},"29":{"line":400,"type":"if","locations":[{"start":{"line":400,"column":14},"end":{"line":400,"column":14}},{"start":{"line":400,"column":14},"end":{"line":400,"column":14}}]},"30":{"line":403,"type":"if","locations":[{"start":{"line":403,"column":14},"end":{"line":403,"column":14}},{"start":{"line":403,"column":14},"end":{"line":403,"column":14}}]},"31":{"line":403,"type":"binary-expr","locations":[{"start":{"line":403,"column":18},"end":{"line":403,"column":22}},{"start":{"line":403,"column":26},"end":{"line":403,"column":32}}]},"32":{"line":407,"type":"if","locations":[{"start":{"line":407,"column":17},"end":{"line":407,"column":17}},{"start":{"line":407,"column":17},"end":{"line":407,"column":17}}]},"33":{"line":423,"type":"if","locations":[{"start":{"line":423,"column":6},"end":{"line":423,"column":6}},{"start":{"line":423,"column":6},"end":{"line":423,"column":6}}]},"34":{"line":425,"type":"binary-expr","locations":[{"start":{"line":425,"column":41},"end":{"line":425,"column":51}},{"start":{"line":425,"column":55},"end":{"line":425,"column":56}}]},"35":{"line":430,"type":"if","locations":[{"start":{"line":430,"column":8},"end":{"line":430,"column":8}},{"start":{"line":430,"column":8},"end":{"line":430,"column":8}}]},"36":{"line":451,"type":"if","locations":[{"start":{"line":451,"column":4},"end":{"line":451,"column":4}},{"start":{"line":451,"column":4},"end":{"line":451,"column":4}}]},"37":{"line":452,"type":"binary-expr","locations":[{"start":{"line":452,"column":39},"end":{"line":452,"column":49}},{"start":{"line":452,"column":53},"end":{"line":452,"column":54}}]},"38":{"line":457,"type":"if","locations":[{"start":{"line":457,"column":6},"end":{"line":457,"column":6}},{"start":{"line":457,"column":6},"end":{"line":457,"column":6}}]},"39":{"line":460,"type":"if","locations":[{"start":{"line":460,"column":6},"end":{"line":460,"column":6}},{"start":{"line":460,"column":6},"end":{"line":460,"column":6}}]},"40":{"line":468,"type":"binary-expr","locations":[{"start":{"line":468,"column":26},"end":{"line":468,"column":62}},{"start":{"line":468,"column":66},"end":{"line":468,"column":71}}]},"41":{"line":472,"type":"cond-expr","locations":[{"start":{"line":473,"column":8},"end":{"line":473,"column":40}},{"start":{"line":473,"column":43},"end":{"line":473,"column":47}}]},"42":{"line":474,"type":"cond-expr","locations":[{"start":{"line":475,"column":6},"end":{"line":475,"column":7}},{"start":{"line":475,"column":10},"end":{"line":475,"column":11}}]},"43":{"line":476,"type":"if","locations":[{"start":{"line":476,"column":4},"end":{"line":476,"column":4}},{"start":{"line":476,"column":4},"end":{"line":476,"column":4}}]},"44":{"line":476,"type":"binary-expr","locations":[{"start":{"line":476,"column":8},"end":{"line":476,"column":21}},{"start":{"line":476,"column":25},"end":{"line":476,"column":36}}]},"45":{"line":484,"type":"if","locations":[{"start":{"line":484,"column":4},"end":{"line":484,"column":4}},{"start":{"line":484,"column":4},"end":{"line":484,"column":4}}]},"46":{"line":489,"type":"if","locations":[{"start":{"line":489,"column":8},"end":{"line":489,"column":8}},{"start":{"line":489,"column":8},"end":{"line":489,"column":8}}]},"47":{"line":491,"type":"if","locations":[{"start":{"line":491,"column":8},"end":{"line":491,"column":8}},{"start":{"line":491,"column":8},"end":{"line":491,"column":8}}]},"48":{"line":492,"type":"binary-expr","locations":[{"start":{"line":492,"column":43},"end":{"line":492,"column":53}},{"start":{"line":492,"column":57},"end":{"line":492,"column":58}}]},"49":{"line":509,"type":"if","locations":[{"start":{"line":509,"column":10},"end":{"line":509,"column":10}},{"start":{"line":509,"column":10},"end":{"line":509,"column":10}}]},"50":{"line":511,"type":"if","locations":[{"start":{"line":511,"column":10},"end":{"line":511,"column":10}},{"start":{"line":511,"column":10},"end":{"line":511,"column":10}}]},"51":{"line":515,"type":"if","locations":[{"start":{"line":515,"column":10},"end":{"line":515,"column":10}},{"start":{"line":515,"column":10},"end":{"line":515,"column":10}}]},"52":{"line":516,"type":"binary-expr","locations":[{"start":{"line":516,"column":47},"end":{"line":516,"column":57}},{"start":{"line":516,"column":61},"end":{"line":516,"column":62}}]},"53":{"line":532,"type":"if","locations":[{"start":{"line":532,"column":12},"end":{"line":532,"column":12}},{"start":{"line":532,"column":12},"end":{"line":532,"column":12}}]},"54":{"line":535,"type":"if","locations":[{"start":{"line":535,"column":12},"end":{"line":535,"column":12}},{"start":{"line":535,"column":12},"end":{"line":535,"column":12}}]},"55":{"line":535,"type":"binary-expr","locations":[{"start":{"line":535,"column":16},"end":{"line":535,"column":20}},{"start":{"line":535,"column":24},"end":{"line":535,"column":30}}]},"56":{"line":555,"type":"if","locations":[{"start":{"line":555,"column":6},"end":{"line":555,"column":6}},{"start":{"line":555,"column":6},"end":{"line":555,"column":6}}]},"57":{"line":556,"type":"binary-expr","locations":[{"start":{"line":556,"column":41},"end":{"line":556,"column":51}},{"start":{"line":556,"column":55},"end":{"line":556,"column":56}}]},"58":{"line":561,"type":"if","locations":[{"start":{"line":561,"column":8},"end":{"line":561,"column":8}},{"start":{"line":561,"column":8},"end":{"line":561,"column":8}}]},"59":{"line":566,"type":"if","locations":[{"start":{"line":566,"column":8},"end":{"line":566,"column":8}},{"start":{"line":566,"column":8},"end":{"line":566,"column":8}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/utils/index.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/utils/index.js","s":{"1":1,"2":1,"3":1,"4":0,"5":0,"6":0,"7":0,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":14,"15":1,"16":39,"17":1,"18":14,"19":1,"20":1,"21":0,"22":0,"23":0,"24":0,"25":0,"26":1,"27":1,"28":1,"29":14,"30":175,"31":14,"32":1,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":1,"46":1,"47":1,"48":14,"49":175,"50":14,"51":1,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0},"b":{"1":[1,0],"2":[0,0],"3":[1,0],"4":[0,0],"5":[0,0],"6":[1,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0]},"f":{"1":0,"2":1,"3":14,"4":39,"5":14,"6":0,"7":0,"8":1,"9":14,"10":175,"11":0,"12":0,"13":0,"14":0,"15":1,"16":14,"17":175,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0},"fnMap":{"1":{"name":"(anonymous_1)","line":26,"loc":{"start":{"line":26,"column":12},"end":{"line":26,"column":52}}},"2":{"name":"(anonymous_2)","line":37,"loc":{"start":{"line":37,"column":1},"end":{"line":37,"column":12}}},"3":{"name":"(anonymous_3)","line":44,"loc":{"start":{"line":44,"column":22},"end":{"line":44,"column":38}}},"4":{"name":"(anonymous_4)","line":49,"loc":{"start":{"line":49,"column":23},"end":{"line":49,"column":39}}},"5":{"name":"(anonymous_5)","line":52,"loc":{"start":{"line":52,"column":18},"end":{"line":52,"column":34}}},"6":{"name":"(anonymous_6)","line":61,"loc":{"start":{"line":61,"column":29},"end":{"line":61,"column":41}}},"7":{"name":"(anonymous_7)","line":64,"loc":{"start":{"line":64,"column":40},"end":{"line":64,"column":55}}},"8":{"name":"(anonymous_8)","line":76,"loc":{"start":{"line":76,"column":26},"end":{"line":76,"column":38}}},"9":{"name":"(anonymous_9)","line":79,"loc":{"start":{"line":79,"column":40},"end":{"line":79,"column":55}}},"10":{"name":"(anonymous_10)","line":80,"loc":{"start":{"line":80,"column":55},"end":{"line":80,"column":71}}},"11":{"name":"(anonymous_11)","line":89,"loc":{"start":{"line":89,"column":19},"end":{"line":89,"column":31}}},"12":{"name":"(anonymous_12)","line":93,"loc":{"start":{"line":93,"column":57},"end":{"line":93,"column":72}}},"13":{"name":"(anonymous_13)","line":101,"loc":{"start":{"line":101,"column":17},"end":{"line":101,"column":29}}},"14":{"name":"(anonymous_14)","line":104,"loc":{"start":{"line":104,"column":59},"end":{"line":104,"column":74}}},"15":{"name":"(anonymous_15)","line":112,"loc":{"start":{"line":112,"column":28},"end":{"line":112,"column":40}}},"16":{"name":"(anonymous_16)","line":116,"loc":{"start":{"line":116,"column":16},"end":{"line":116,"column":31}}},"17":{"name":"(anonymous_17)","line":117,"loc":{"start":{"line":117,"column":59},"end":{"line":117,"column":75}}},"18":{"name":"(anonymous_18)","line":127,"loc":{"start":{"line":127,"column":16},"end":{"line":127,"column":28}}},"19":{"name":"(anonymous_19)","line":133,"loc":{"start":{"line":133,"column":14},"end":{"line":133,"column":26}}},"20":{"name":"(anonymous_20)","line":139,"loc":{"start":{"line":139,"column":20},"end":{"line":139,"column":32}}},"21":{"name":"(anonymous_21)","line":145,"loc":{"start":{"line":145,"column":20},"end":{"line":145,"column":32}}},"22":{"name":"(anonymous_22)","line":149,"loc":{"start":{"line":149,"column":41},"end":{"line":149,"column":57}}},"23":{"name":"(anonymous_23)","line":156,"loc":{"start":{"line":156,"column":28},"end":{"line":156,"column":40}}},"24":{"name":"(anonymous_24)","line":160,"loc":{"start":{"line":160,"column":43},"end":{"line":160,"column":59}}},"25":{"name":"(anonymous_25)","line":171,"loc":{"start":{"line":171,"column":21},"end":{"line":171,"column":33}}},"26":{"name":"(anonymous_26)","line":175,"loc":{"start":{"line":175,"column":41},"end":{"line":175,"column":57}}},"27":{"name":"(anonymous_27)","line":182,"loc":{"start":{"line":182,"column":20},"end":{"line":182,"column":32}}},"28":{"name":"(anonymous_28)","line":186,"loc":{"start":{"line":186,"column":15},"end":{"line":186,"column":40}}},"29":{"name":"(anonymous_29)","line":187,"loc":{"start":{"line":187,"column":5},"end":{"line":187,"column":17}}},"30":{"name":"(anonymous_30)","line":189,"loc":{"start":{"line":189,"column":19},"end":{"line":189,"column":52}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":12,"column":58}},"2":{"start":{"line":17,"column":0},"end":{"line":19,"column":56}},"3":{"start":{"line":26,"column":0},"end":{"line":35,"column":2}},"4":{"start":{"line":27,"column":2},"end":{"line":28,"column":17}},"5":{"start":{"line":30,"column":2},"end":{"line":32,"column":3}},"6":{"start":{"line":31,"column":4},"end":{"line":31,"column":66}},"7":{"start":{"line":34,"column":2},"end":{"line":34,"column":17}},"8":{"start":{"line":37,"column":0},"end":{"line":57,"column":5}},"9":{"start":{"line":38,"column":2},"end":{"line":56,"column":3}},"10":{"start":{"line":39,"column":4},"end":{"line":39,"column":31}},"11":{"start":{"line":40,"column":4},"end":{"line":42,"column":6}},"12":{"start":{"line":43,"column":4},"end":{"line":43,"column":23}},"13":{"start":{"line":44,"column":4},"end":{"line":48,"column":7}},"14":{"start":{"line":45,"column":6},"end":{"line":47,"column":8}},"15":{"start":{"line":49,"column":4},"end":{"line":51,"column":7}},"16":{"start":{"line":50,"column":6},"end":{"line":50,"column":31}},"17":{"start":{"line":52,"column":4},"end":{"line":54,"column":7}},"18":{"start":{"line":53,"column":6},"end":{"line":53,"column":45}},"19":{"start":{"line":55,"column":4},"end":{"line":55,"column":50}},"20":{"start":{"line":60,"column":0},"end":{"line":216,"column":2}},"21":{"start":{"line":62,"column":4},"end":{"line":72,"column":5}},"22":{"start":{"line":63,"column":6},"end":{"line":63,"column":34}},"23":{"start":{"line":64,"column":6},"end":{"line":71,"column":9}},"24":{"start":{"line":65,"column":8},"end":{"line":70,"column":10}},"25":{"start":{"line":73,"column":4},"end":{"line":73,"column":34}},"26":{"start":{"line":77,"column":4},"end":{"line":85,"column":5}},"27":{"start":{"line":78,"column":6},"end":{"line":78,"column":31}},"28":{"start":{"line":79,"column":6},"end":{"line":84,"column":9}},"29":{"start":{"line":80,"column":8},"end":{"line":82,"column":11}},"30":{"start":{"line":81,"column":10},"end":{"line":81,"column":25}},"31":{"start":{"line":83,"column":8},"end":{"line":83,"column":43}},"32":{"start":{"line":86,"column":4},"end":{"line":86,"column":31}},"33":{"start":{"line":91,"column":4},"end":{"line":97,"column":5}},"34":{"start":{"line":92,"column":6},"end":{"line":92,"column":27}},"35":{"start":{"line":93,"column":6},"end":{"line":95,"column":9}},"36":{"start":{"line":94,"column":8},"end":{"line":94,"column":55}},"37":{"start":{"line":96,"column":6},"end":{"line":96,"column":51}},"38":{"start":{"line":98,"column":4},"end":{"line":98,"column":27}},"39":{"start":{"line":102,"column":4},"end":{"line":108,"column":5}},"40":{"start":{"line":103,"column":6},"end":{"line":103,"column":25}},"41":{"start":{"line":104,"column":6},"end":{"line":106,"column":9}},"42":{"start":{"line":105,"column":8},"end":{"line":105,"column":57}},"43":{"start":{"line":107,"column":6},"end":{"line":107,"column":47}},"44":{"start":{"line":109,"column":4},"end":{"line":109,"column":25}},"45":{"start":{"line":113,"column":4},"end":{"line":122,"column":5}},"46":{"start":{"line":114,"column":6},"end":{"line":114,"column":33}},"47":{"start":{"line":115,"column":6},"end":{"line":121,"column":11}},"48":{"start":{"line":117,"column":10},"end":{"line":119,"column":13}},"49":{"start":{"line":118,"column":12},"end":{"line":118,"column":29}},"50":{"start":{"line":120,"column":10},"end":{"line":120,"column":49}},"51":{"start":{"line":123,"column":4},"end":{"line":123,"column":33}},"52":{"start":{"line":128,"column":4},"end":{"line":130,"column":8}},"53":{"start":{"line":134,"column":4},"end":{"line":136,"column":8}},"54":{"start":{"line":140,"column":4},"end":{"line":142,"column":8}},"55":{"start":{"line":146,"column":4},"end":{"line":153,"column":5}},"56":{"start":{"line":147,"column":6},"end":{"line":147,"column":30}},"57":{"start":{"line":149,"column":6},"end":{"line":151,"column":9}},"58":{"start":{"line":150,"column":8},"end":{"line":150,"column":23}},"59":{"start":{"line":152,"column":6},"end":{"line":152,"column":30}},"60":{"start":{"line":157,"column":4},"end":{"line":168,"column":5}},"61":{"start":{"line":158,"column":6},"end":{"line":158,"column":32}},"62":{"start":{"line":160,"column":6},"end":{"line":166,"column":9}},"63":{"start":{"line":161,"column":8},"end":{"line":165,"column":10}},"64":{"start":{"line":167,"column":6},"end":{"line":167,"column":32}},"65":{"start":{"line":172,"column":4},"end":{"line":179,"column":5}},"66":{"start":{"line":173,"column":6},"end":{"line":173,"column":31}},"67":{"start":{"line":175,"column":6},"end":{"line":177,"column":9}},"68":{"start":{"line":176,"column":8},"end":{"line":176,"column":33}},"69":{"start":{"line":178,"column":6},"end":{"line":178,"column":31}},"70":{"start":{"line":183,"column":4},"end":{"line":183,"column":32}},"71":{"start":{"line":187,"column":4},"end":{"line":214,"column":9}},"72":{"start":{"line":188,"column":6},"end":{"line":188,"column":68}},"73":{"start":{"line":189,"column":6},"end":{"line":213,"column":9}},"74":{"start":{"line":190,"column":8},"end":{"line":212,"column":9}},"75":{"start":{"line":191,"column":10},"end":{"line":191,"column":37}},"76":{"start":{"line":192,"column":10},"end":{"line":192,"column":62}},"77":{"start":{"line":193,"column":10},"end":{"line":193,"column":57}},"78":{"start":{"line":194,"column":10},"end":{"line":196,"column":15}},"79":{"start":{"line":198,"column":10},"end":{"line":198,"column":37}},"80":{"start":{"line":199,"column":10},"end":{"line":201,"column":15}},"81":{"start":{"line":203,"column":10},"end":{"line":205,"column":48}},"82":{"start":{"line":207,"column":10},"end":{"line":207,"column":34}},"83":{"start":{"line":208,"column":10},"end":{"line":208,"column":43}},"84":{"start":{"line":209,"column":10},"end":{"line":209,"column":33}},"85":{"start":{"line":211,"column":10},"end":{"line":211,"column":40}}},"branchMap":{"1":{"line":38,"type":"if","locations":[{"start":{"line":38,"column":2},"end":{"line":38,"column":2}},{"start":{"line":38,"column":2},"end":{"line":38,"column":2}}]},"2":{"line":62,"type":"if","locations":[{"start":{"line":62,"column":4},"end":{"line":62,"column":4}},{"start":{"line":62,"column":4},"end":{"line":62,"column":4}}]},"3":{"line":77,"type":"if","locations":[{"start":{"line":77,"column":4},"end":{"line":77,"column":4}},{"start":{"line":77,"column":4},"end":{"line":77,"column":4}}]},"4":{"line":91,"type":"if","locations":[{"start":{"line":91,"column":4},"end":{"line":91,"column":4}},{"start":{"line":91,"column":4},"end":{"line":91,"column":4}}]},"5":{"line":102,"type":"if","locations":[{"start":{"line":102,"column":4},"end":{"line":102,"column":4}},{"start":{"line":102,"column":4},"end":{"line":102,"column":4}}]},"6":{"line":113,"type":"if","locations":[{"start":{"line":113,"column":4},"end":{"line":113,"column":4}},{"start":{"line":113,"column":4},"end":{"line":113,"column":4}}]},"7":{"line":146,"type":"if","locations":[{"start":{"line":146,"column":4},"end":{"line":146,"column":4}},{"start":{"line":146,"column":4},"end":{"line":146,"column":4}}]},"8":{"line":157,"type":"if","locations":[{"start":{"line":157,"column":4},"end":{"line":157,"column":4}},{"start":{"line":157,"column":4},"end":{"line":157,"column":4}}]},"9":{"line":172,"type":"if","locations":[{"start":{"line":172,"column":4},"end":{"line":172,"column":4}},{"start":{"line":172,"column":4},"end":{"line":172,"column":4}}]},"10":{"line":190,"type":"if","locations":[{"start":{"line":190,"column":8},"end":{"line":190,"column":8}},{"start":{"line":190,"column":8},"end":{"line":190,"column":8}}]},"11":{"line":190,"type":"binary-expr","locations":[{"start":{"line":190,"column":12},"end":{"line":190,"column":18}},{"start":{"line":190,"column":22},"end":{"line":190,"column":49}}]},"12":{"line":194,"type":"cond-expr","locations":[{"start":{"line":195,"column":12},"end":{"line":195,"column":37}},{"start":{"line":196,"column":12},"end":{"line":196,"column":14}}]},"13":{"line":199,"type":"cond-expr","locations":[{"start":{"line":200,"column":12},"end":{"line":200,"column":43}},{"start":{"line":201,"column":12},"end":{"line":201,"column":14}}]},"14":{"line":203,"type":"cond-expr","locations":[{"start":{"line":204,"column":12},"end":{"line":204,"column":28}},{"start":{"line":205,"column":10},"end":{"line":205,"column":47}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/utils/middleware.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/utils/middleware.js","s":{"1":1,"2":1,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0},"b":{"1":[0,0],"2":[0,0]},"f":{"1":0,"2":0,"3":0},"fnMap":{"1":{"name":"userMigration","line":11,"loc":{"start":{"line":11,"column":24},"end":{"line":11,"column":63}}},"2":{"name":"(anonymous_2)","line":15,"loc":{"start":{"line":15,"column":42},"end":{"line":15,"column":58}}},"3":{"name":"(anonymous_3)","line":20,"loc":{"start":{"line":20,"column":37},"end":{"line":20,"column":56}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":25}},"2":{"start":{"line":11,"column":0},"end":{"line":35,"column":2}},"3":{"start":{"line":12,"column":2},"end":{"line":14,"column":3}},"4":{"start":{"line":13,"column":4},"end":{"line":13,"column":18}},"5":{"start":{"line":15,"column":2},"end":{"line":33,"column":4}},"6":{"start":{"line":17,"column":4},"end":{"line":17,"column":16}},"7":{"start":{"line":21,"column":8},"end":{"line":30,"column":11}},"8":{"start":{"line":34,"column":2},"end":{"line":34,"column":16}}},"branchMap":{"1":{"line":12,"type":"if","locations":[{"start":{"line":12,"column":2},"end":{"line":12,"column":2}},{"start":{"line":12,"column":2},"end":{"line":12,"column":2}}]},"2":{"line":12,"type":"binary-expr","locations":[{"start":{"line":12,"column":6},"end":{"line":12,"column":15}},{"start":{"line":12,"column":19},"end":{"line":12,"column":60}}]}}},"/Users/nathanleniz/Developer/freecodecamp/seed/bonfireMDNlinks.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/seed/bonfireMDNlinks.js","s":{"1":1,"2":1},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":9,"column":0},"end":{"line":89,"column":3}},"2":{"start":{"line":91,"column":0},"end":{"line":91,"column":23}}},"branchMap":{}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/challengeMap.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/challengeMap.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":0,"8":1,"9":0,"10":1,"11":1,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":1,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0},"b":{"1":[0,0],"2":[0,0]},"f":{"1":1,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0},"fnMap":{"1":{"name":"(anonymous_1)","line":7,"loc":{"start":{"line":7,"column":17},"end":{"line":7,"column":31}}},"2":{"name":"(anonymous_2)","line":12,"loc":{"start":{"line":12,"column":31},"end":{"line":12,"column":50}}},"3":{"name":"(anonymous_3)","line":15,"loc":{"start":{"line":15,"column":23},"end":{"line":15,"column":42}}},"4":{"name":"challengeMap","line":21,"loc":{"start":{"line":21,"column":2},"end":{"line":21,"column":40}}},"5":{"name":"(anonymous_5)","line":31,"loc":{"start":{"line":31,"column":11},"end":{"line":31,"column":31}}},"6":{"name":"(anonymous_6)","line":37,"loc":{"start":{"line":37,"column":39},"end":{"line":37,"column":53}}},"7":{"name":"(anonymous_7)","line":39,"loc":{"start":{"line":39,"column":27},"end":{"line":39,"column":42}}},"8":{"name":"numberWithCommas","line":44,"loc":{"start":{"line":44,"column":4},"end":{"line":44,"column":33}}},"9":{"name":"(anonymous_9)","line":53,"loc":{"start":{"line":53,"column":15},"end":{"line":53,"column":42}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":4,"column":46}},"2":{"start":{"line":7,"column":0},"end":{"line":65,"column":2}},"3":{"start":{"line":8,"column":2},"end":{"line":8,"column":29}},"4":{"start":{"line":9,"column":2},"end":{"line":9,"column":37}},"5":{"start":{"line":11,"column":2},"end":{"line":11,"column":61}},"6":{"start":{"line":12,"column":2},"end":{"line":14,"column":5}},"7":{"start":{"line":13,"column":4},"end":{"line":13,"column":30}},"8":{"start":{"line":15,"column":2},"end":{"line":17,"column":5}},"9":{"start":{"line":16,"column":4},"end":{"line":16,"column":30}},"10":{"start":{"line":19,"column":2},"end":{"line":19,"column":18}},"11":{"start":{"line":21,"column":2},"end":{"line":64,"column":3}},"12":{"start":{"line":22,"column":4},"end":{"line":22,"column":27}},"13":{"start":{"line":24,"column":4},"end":{"line":26,"column":5}},"14":{"start":{"line":25,"column":6},"end":{"line":25,"column":51}},"15":{"start":{"line":28,"column":4},"end":{"line":28,"column":55}},"16":{"start":{"line":30,"column":4},"end":{"line":33,"column":9}},"17":{"start":{"line":32,"column":8},"end":{"line":32,"column":28}},"18":{"start":{"line":34,"column":4},"end":{"line":35,"column":56}},"19":{"start":{"line":37,"column":4},"end":{"line":42,"column":7}},"20":{"start":{"line":38,"column":6},"end":{"line":41,"column":9}},"21":{"start":{"line":40,"column":8},"end":{"line":40,"column":60}},"22":{"start":{"line":44,"column":4},"end":{"line":46,"column":5}},"23":{"start":{"line":45,"column":6},"end":{"line":45,"column":64}},"24":{"start":{"line":48,"column":4},"end":{"line":48,"column":39}},"25":{"start":{"line":49,"column":4},"end":{"line":49,"column":27}},"26":{"start":{"line":50,"column":4},"end":{"line":50,"column":63}},"27":{"start":{"line":51,"column":4},"end":{"line":51,"column":63}},"28":{"start":{"line":53,"column":4},"end":{"line":63,"column":7}},"29":{"start":{"line":54,"column":6},"end":{"line":54,"column":36}},"30":{"start":{"line":54,"column":17},"end":{"line":54,"column":34}},"31":{"start":{"line":56,"column":6},"end":{"line":62,"column":9}}},"branchMap":{"1":{"line":24,"type":"if","locations":[{"start":{"line":24,"column":4},"end":{"line":24,"column":4}},{"start":{"line":24,"column":4},"end":{"line":24,"column":4}}]},"2":{"line":54,"type":"if","locations":[{"start":{"line":54,"column":6},"end":{"line":54,"column":6}},{"start":{"line":54,"column":6},"end":{"line":54,"column":6}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/explorer.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/explorer.js","s":{"1":1,"2":1,"3":0,"4":1,"5":1,"6":1,"7":0,"8":0,"9":0,"10":1,"11":1,"12":1,"13":1,"14":0,"15":0,"16":0},"b":{"1":[0,1],"2":[0,0]},"f":{"1":1,"2":0,"3":0},"fnMap":{"1":{"name":"mountLoopBackExplorer","line":1,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":53}}},"2":{"name":"(anonymous_2)","line":11,"loc":{"start":{"line":11,"column":24},"end":{"line":11,"column":35}}},"3":{"name":"(anonymous_3)","line":23,"loc":{"start":{"line":23,"column":22},"end":{"line":23,"column":33}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":30,"column":2}},"2":{"start":{"line":2,"column":2},"end":{"line":4,"column":3}},"3":{"start":{"line":3,"column":4},"end":{"line":3,"column":11}},"4":{"start":{"line":5,"column":2},"end":{"line":5,"column":15}},"5":{"start":{"line":6,"column":2},"end":{"line":17,"column":3}},"6":{"start":{"line":7,"column":4},"end":{"line":7,"column":44}},"7":{"start":{"line":11,"column":4},"end":{"line":15,"column":7}},"8":{"start":{"line":12,"column":6},"end":{"line":14,"column":8}},"9":{"start":{"line":16,"column":4},"end":{"line":16,"column":11}},"10":{"start":{"line":19,"column":2},"end":{"line":19,"column":43}},"11":{"start":{"line":21,"column":2},"end":{"line":21,"column":61}},"12":{"start":{"line":22,"column":2},"end":{"line":22,"column":36}},"13":{"start":{"line":23,"column":2},"end":{"line":29,"column":5}},"14":{"start":{"line":24,"column":4},"end":{"line":24,"column":52}},"15":{"start":{"line":27,"column":4},"end":{"line":27,"column":66}},"16":{"start":{"line":28,"column":4},"end":{"line":28,"column":71}}},"branchMap":{"1":{"line":2,"type":"if","locations":[{"start":{"line":2,"column":2},"end":{"line":2,"column":2}},{"start":{"line":2,"column":2},"end":{"line":2,"column":2}}]},"2":{"line":27,"type":"binary-expr","locations":[{"start":{"line":27,"column":23},"end":{"line":27,"column":44}},{"start":{"line":27,"column":48},"end":{"line":27,"column":65}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/fieldGuide.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/fieldGuide.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":1,"31":0,"32":0,"33":0,"34":0,"35":0,"36":1,"37":0,"38":0,"39":1,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":1,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0]},"f":{"1":1,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0},"fnMap":{"1":{"name":"(anonymous_1)","line":6,"loc":{"start":{"line":6,"column":17},"end":{"line":6,"column":31}}},"2":{"name":"returnIndividualFieldGuide","line":17,"loc":{"start":{"line":17,"column":2},"end":{"line":17,"column":54}}},"3":{"name":"(anonymous_3)","line":23,"loc":{"start":{"line":23,"column":16},"end":{"line":23,"column":32}}},"4":{"name":"(anonymous_4)","line":30,"loc":{"start":{"line":30,"column":20},"end":{"line":30,"column":34}}},"5":{"name":"(anonymous_5)","line":36,"loc":{"start":{"line":36,"column":6},"end":{"line":36,"column":41}}},"6":{"name":"showAllFieldGuides","line":65,"loc":{"start":{"line":65,"column":2},"end":{"line":65,"column":40}}},"7":{"name":"showCompletedFieldGuideFunction","line":78,"loc":{"start":{"line":78,"column":2},"end":{"line":78,"column":53}}},"8":{"name":"returnNextFieldGuide","line":92,"loc":{"start":{"line":92,"column":2},"end":{"line":92,"column":48}}},"9":{"name":"(anonymous_9)","line":102,"loc":{"start":{"line":102,"column":6},"end":{"line":102,"column":32}}},"10":{"name":"completedFieldGuide","line":110,"loc":{"start":{"line":110,"column":0},"end":{"line":110,"column":45}}},"11":{"name":"(anonymous_11)","line":121,"loc":{"start":{"line":121,"column":16},"end":{"line":121,"column":31}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":4,"column":30}},"2":{"start":{"line":6,"column":0},"end":{"line":108,"column":2}},"3":{"start":{"line":7,"column":2},"end":{"line":7,"column":37}},"4":{"start":{"line":8,"column":2},"end":{"line":8,"column":41}},"5":{"start":{"line":10,"column":2},"end":{"line":10,"column":62}},"6":{"start":{"line":11,"column":2},"end":{"line":11,"column":73}},"7":{"start":{"line":12,"column":2},"end":{"line":12,"column":52}},"8":{"start":{"line":13,"column":2},"end":{"line":13,"column":62}},"9":{"start":{"line":15,"column":2},"end":{"line":15,"column":18}},"10":{"start":{"line":17,"column":2},"end":{"line":63,"column":3}},"11":{"start":{"line":18,"column":4},"end":{"line":18,"column":56}},"12":{"start":{"line":19,"column":4},"end":{"line":33,"column":5}},"13":{"start":{"line":20,"column":6},"end":{"line":20,"column":52}},"14":{"start":{"line":22,"column":6},"end":{"line":27,"column":11}},"15":{"start":{"line":24,"column":10},"end":{"line":26,"column":11}},"16":{"start":{"line":25,"column":12},"end":{"line":25,"column":24}},"17":{"start":{"line":28,"column":6},"end":{"line":28,"column":63}},"18":{"start":{"line":30,"column":6},"end":{"line":32,"column":9}},"19":{"start":{"line":31,"column":8},"end":{"line":31,"column":38}},"20":{"start":{"line":31,"column":19},"end":{"line":31,"column":36}},"21":{"start":{"line":35,"column":4},"end":{"line":62,"column":6}},"22":{"start":{"line":37,"column":8},"end":{"line":39,"column":9}},"23":{"start":{"line":38,"column":10},"end":{"line":38,"column":27}},"24":{"start":{"line":41,"column":8},"end":{"line":48,"column":9}},"25":{"start":{"line":42,"column":10},"end":{"line":45,"column":13}},"26":{"start":{"line":47,"column":10},"end":{"line":47,"column":35}},"27":{"start":{"line":50,"column":8},"end":{"line":50,"column":53}},"28":{"start":{"line":51,"column":8},"end":{"line":51,"column":77}},"29":{"start":{"line":56,"column":8},"end":{"line":60,"column":11}},"30":{"start":{"line":65,"column":2},"end":{"line":76,"column":3}},"31":{"start":{"line":66,"column":4},"end":{"line":66,"column":68}},"32":{"start":{"line":68,"column":4},"end":{"line":68,"column":34}},"33":{"start":{"line":69,"column":4},"end":{"line":71,"column":5}},"34":{"start":{"line":70,"column":6},"end":{"line":70,"column":59}},"35":{"start":{"line":72,"column":4},"end":{"line":75,"column":7}},"36":{"start":{"line":78,"column":2},"end":{"line":90,"column":3}},"37":{"start":{"line":79,"column":4},"end":{"line":88,"column":15}},"38":{"start":{"line":89,"column":4},"end":{"line":89,"column":66}},"39":{"start":{"line":92,"column":2},"end":{"line":107,"column":3}},"40":{"start":{"line":93,"column":4},"end":{"line":95,"column":5}},"41":{"start":{"line":94,"column":6},"end":{"line":94,"column":66}},"42":{"start":{"line":97,"column":4},"end":{"line":99,"column":5}},"43":{"start":{"line":98,"column":6},"end":{"line":98,"column":61}},"44":{"start":{"line":101,"column":4},"end":{"line":106,"column":9}},"45":{"start":{"line":104,"column":8},"end":{"line":104,"column":38}},"46":{"start":{"line":104,"column":19},"end":{"line":104,"column":36}},"47":{"start":{"line":105,"column":8},"end":{"line":105,"column":71}},"48":{"start":{"line":110,"column":0},"end":{"line":127,"column":1}},"49":{"start":{"line":111,"column":2},"end":{"line":111,"column":58}},"50":{"start":{"line":113,"column":2},"end":{"line":113,"column":51}},"51":{"start":{"line":115,"column":2},"end":{"line":115,"column":68}},"52":{"start":{"line":116,"column":2},"end":{"line":119,"column":3}},"53":{"start":{"line":117,"column":4},"end":{"line":117,"column":49}},"54":{"start":{"line":118,"column":4},"end":{"line":118,"column":53}},"55":{"start":{"line":121,"column":2},"end":{"line":126,"column":5}},"56":{"start":{"line":122,"column":4},"end":{"line":124,"column":5}},"57":{"start":{"line":123,"column":6},"end":{"line":123,"column":23}},"58":{"start":{"line":125,"column":4},"end":{"line":125,"column":19}}},"branchMap":{"1":{"line":19,"type":"if","locations":[{"start":{"line":19,"column":4},"end":{"line":19,"column":4}},{"start":{"line":19,"column":4},"end":{"line":19,"column":4}}]},"2":{"line":24,"type":"if","locations":[{"start":{"line":24,"column":10},"end":{"line":24,"column":10}},{"start":{"line":24,"column":10},"end":{"line":24,"column":10}}]},"3":{"line":31,"type":"if","locations":[{"start":{"line":31,"column":8},"end":{"line":31,"column":8}},{"start":{"line":31,"column":8},"end":{"line":31,"column":8}}]},"4":{"line":37,"type":"if","locations":[{"start":{"line":37,"column":8},"end":{"line":37,"column":8}},{"start":{"line":37,"column":8},"end":{"line":37,"column":8}}]},"5":{"line":41,"type":"if","locations":[{"start":{"line":41,"column":8},"end":{"line":41,"column":8}},{"start":{"line":41,"column":8},"end":{"line":41,"column":8}}]},"6":{"line":69,"type":"if","locations":[{"start":{"line":69,"column":4},"end":{"line":69,"column":4}},{"start":{"line":69,"column":4},"end":{"line":69,"column":4}}]},"7":{"line":69,"type":"binary-expr","locations":[{"start":{"line":69,"column":8},"end":{"line":69,"column":16}},{"start":{"line":69,"column":20},"end":{"line":69,"column":49}}]},"8":{"line":93,"type":"if","locations":[{"start":{"line":93,"column":4},"end":{"line":93,"column":4}},{"start":{"line":93,"column":4},"end":{"line":93,"column":4}}]},"9":{"line":97,"type":"if","locations":[{"start":{"line":97,"column":4},"end":{"line":97,"column":4}},{"start":{"line":97,"column":4},"end":{"line":97,"column":4}}]},"10":{"line":104,"type":"if","locations":[{"start":{"line":104,"column":8},"end":{"line":104,"column":8}},{"start":{"line":104,"column":8},"end":{"line":104,"column":8}}]},"11":{"line":116,"type":"if","locations":[{"start":{"line":116,"column":2},"end":{"line":116,"column":2}},{"start":{"line":116,"column":2},"end":{"line":116,"column":2}}]},"12":{"line":122,"type":"if","locations":[{"start":{"line":122,"column":4},"end":{"line":122,"column":4}},{"start":{"line":122,"column":4},"end":{"line":122,"column":4}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/home.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/home.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0]},"f":{"1":1,"2":0,"3":0},"fnMap":{"1":{"name":"(anonymous_1)","line":6,"loc":{"start":{"line":6,"column":17},"end":{"line":6,"column":31}}},"2":{"name":"index","line":12,"loc":{"start":{"line":12,"column":2},"end":{"line":12,"column":33}}},"3":{"name":"(anonymous_3)","line":16,"loc":{"start":{"line":16,"column":20},"end":{"line":16,"column":34}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":2,"column":73}},"2":{"start":{"line":3,"column":0},"end":{"line":4,"column":72}},"3":{"start":{"line":6,"column":0},"end":{"line":24,"column":2}},"4":{"start":{"line":7,"column":2},"end":{"line":7,"column":37}},"5":{"start":{"line":8,"column":2},"end":{"line":8,"column":25}},"6":{"start":{"line":10,"column":2},"end":{"line":10,"column":18}},"7":{"start":{"line":12,"column":2},"end":{"line":23,"column":3}},"8":{"start":{"line":13,"column":4},"end":{"line":22,"column":5}},"9":{"start":{"line":14,"column":6},"end":{"line":14,"column":45}},"10":{"start":{"line":16,"column":6},"end":{"line":19,"column":9}},"11":{"start":{"line":17,"column":8},"end":{"line":17,"column":38}},"12":{"start":{"line":17,"column":19},"end":{"line":17,"column":36}},"13":{"start":{"line":18,"column":8},"end":{"line":18,"column":47}},"14":{"start":{"line":21,"column":6},"end":{"line":21,"column":45}}},"branchMap":{"1":{"line":13,"type":"if","locations":[{"start":{"line":13,"column":4},"end":{"line":13,"column":4}},{"start":{"line":13,"column":4},"end":{"line":13,"column":4}}]},"2":{"line":13,"type":"binary-expr","locations":[{"start":{"line":13,"column":8},"end":{"line":13,"column":16}},{"start":{"line":13,"column":20},"end":{"line":13,"column":37}}]},"3":{"line":17,"type":"if","locations":[{"start":{"line":17,"column":8},"end":{"line":17,"column":8}},{"start":{"line":17,"column":8},"end":{"line":17,"column":8}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/jobs.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/jobs.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":0,"8":0,"9":0,"10":0},"b":{"1":[0,0]},"f":{"1":1,"2":0,"3":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":31}}},"2":{"name":"jobsDirectory","line":8,"loc":{"start":{"line":8,"column":2},"end":{"line":8,"column":41}}},"3":{"name":"(anonymous_3)","line":9,"loc":{"start":{"line":9,"column":17},"end":{"line":9,"column":37}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":18,"column":2}},"2":{"start":{"line":2,"column":2},"end":{"line":2,"column":27}},"3":{"start":{"line":3,"column":2},"end":{"line":3,"column":37}},"4":{"start":{"line":5,"column":2},"end":{"line":5,"column":37}},"5":{"start":{"line":6,"column":2},"end":{"line":6,"column":18}},"6":{"start":{"line":8,"column":2},"end":{"line":17,"column":3}},"7":{"start":{"line":9,"column":4},"end":{"line":16,"column":7}},"8":{"start":{"line":10,"column":6},"end":{"line":10,"column":36}},"9":{"start":{"line":10,"column":17},"end":{"line":10,"column":34}},"10":{"start":{"line":12,"column":6},"end":{"line":15,"column":9}}},"branchMap":{"1":{"line":10,"type":"if","locations":[{"start":{"line":10,"column":6},"end":{"line":10,"column":6}},{"start":{"line":10,"column":6},"end":{"line":10,"column":6}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/middlewares.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/middlewares.js","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/nonprofits.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/nonprofits.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":0,"9":0,"10":0,"11":0,"12":1,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0]},"f":{"1":1,"2":0,"3":0,"4":0,"5":0,"6":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":31}}},"2":{"name":"nonprofitsDirectory","line":10,"loc":{"start":{"line":10,"column":2},"end":{"line":10,"column":47}}},"3":{"name":"(anonymous_3)","line":13,"loc":{"start":{"line":13,"column":6},"end":{"line":13,"column":32}}},"4":{"name":"returnIndividualNonprofit","line":24,"loc":{"start":{"line":24,"column":2},"end":{"line":24,"column":53}}},"5":{"name":"(anonymous_5)","line":30,"loc":{"start":{"line":30,"column":6},"end":{"line":30,"column":31}}},"6":{"name":"(anonymous_6)","line":54,"loc":{"start":{"line":54,"column":51},"end":{"line":54,"column":68}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":129,"column":2}},"2":{"start":{"line":2,"column":2},"end":{"line":2,"column":37}},"3":{"start":{"line":3,"column":2},"end":{"line":3,"column":39}},"4":{"start":{"line":5,"column":2},"end":{"line":5,"column":59}},"5":{"start":{"line":6,"column":2},"end":{"line":6,"column":70}},"6":{"start":{"line":8,"column":2},"end":{"line":8,"column":18}},"7":{"start":{"line":10,"column":2},"end":{"line":22,"column":3}},"8":{"start":{"line":11,"column":4},"end":{"line":21,"column":6}},"9":{"start":{"line":14,"column":8},"end":{"line":14,"column":38}},"10":{"start":{"line":14,"column":19},"end":{"line":14,"column":36}},"11":{"start":{"line":16,"column":8},"end":{"line":19,"column":11}},"12":{"start":{"line":24,"column":2},"end":{"line":102,"column":3}},"13":{"start":{"line":25,"column":4},"end":{"line":25,"column":46}},"14":{"start":{"line":26,"column":4},"end":{"line":26,"column":55}},"15":{"start":{"line":28,"column":4},"end":{"line":101,"column":6}},"16":{"start":{"line":31,"column":8},"end":{"line":33,"column":9}},"17":{"start":{"line":32,"column":10},"end":{"line":32,"column":27}},"18":{"start":{"line":35,"column":8},"end":{"line":42,"column":9}},"19":{"start":{"line":36,"column":10},"end":{"line":39,"column":13}},"20":{"start":{"line":41,"column":10},"end":{"line":41,"column":45}},"21":{"start":{"line":44,"column":8},"end":{"line":44,"column":36}},"22":{"start":{"line":45,"column":8},"end":{"line":45,"column":78}},"23":{"start":{"line":46,"column":8},"end":{"line":48,"column":9}},"24":{"start":{"line":47,"column":10},"end":{"line":47,"column":64}},"25":{"start":{"line":49,"column":8},"end":{"line":49,"column":33}},"26":{"start":{"line":50,"column":8},"end":{"line":63,"column":9}},"27":{"start":{"line":51,"column":10},"end":{"line":62,"column":11}},"28":{"start":{"line":52,"column":12},"end":{"line":61,"column":13}},"29":{"start":{"line":53,"column":14},"end":{"line":56,"column":19}},"30":{"start":{"line":55,"column":18},"end":{"line":55,"column":60}},"31":{"start":{"line":58,"column":14},"end":{"line":60,"column":15}},"32":{"start":{"line":59,"column":16},"end":{"line":59,"column":36}},"33":{"start":{"line":65,"column":8},"end":{"line":99,"column":11}}},"branchMap":{"1":{"line":14,"type":"if","locations":[{"start":{"line":14,"column":8},"end":{"line":14,"column":8}},{"start":{"line":14,"column":8},"end":{"line":14,"column":8}}]},"2":{"line":31,"type":"if","locations":[{"start":{"line":31,"column":8},"end":{"line":31,"column":8}},{"start":{"line":31,"column":8},"end":{"line":31,"column":8}}]},"3":{"line":35,"type":"if","locations":[{"start":{"line":35,"column":8},"end":{"line":35,"column":8}},{"start":{"line":35,"column":8},"end":{"line":35,"column":8}}]},"4":{"line":46,"type":"if","locations":[{"start":{"line":46,"column":8},"end":{"line":46,"column":8}},{"start":{"line":46,"column":8},"end":{"line":46,"column":8}}]},"5":{"line":50,"type":"if","locations":[{"start":{"line":50,"column":8},"end":{"line":50,"column":8}},{"start":{"line":50,"column":8},"end":{"line":50,"column":8}}]},"6":{"line":51,"type":"if","locations":[{"start":{"line":51,"column":10},"end":{"line":51,"column":10}},{"start":{"line":51,"column":10},"end":{"line":51,"column":10}}]},"7":{"line":52,"type":"if","locations":[{"start":{"line":52,"column":12},"end":{"line":52,"column":12}},{"start":{"line":52,"column":12},"end":{"line":52,"column":12}}]},"8":{"line":58,"type":"if","locations":[{"start":{"line":58,"column":14},"end":{"line":58,"column":14}},{"start":{"line":58,"column":14},"end":{"line":58,"column":14}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/randomAPIs.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/randomAPIs.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":1,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":1,"61":0,"62":0,"63":0,"64":0,"65":0,"66":1,"67":0,"68":0,"69":0,"70":0,"71":1,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":1,"112":0,"113":0,"114":0,"115":1,"116":0,"117":1,"118":0,"119":1,"120":0,"121":1,"122":0,"123":1,"124":0,"125":1,"126":0,"127":1,"128":0,"129":1,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":1,"141":0,"142":1,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":1,"154":0,"155":0,"156":0,"157":0,"158":0,"159":1,"160":0,"161":0,"162":0,"163":0,"164":0,"165":1,"166":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0]},"f":{"1":1,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0},"fnMap":{"1":{"name":"(anonymous_1)","line":13,"loc":{"start":{"line":13,"column":17},"end":{"line":13,"column":31}}},"2":{"name":"slackInvite","line":44,"loc":{"start":{"line":44,"column":2},"end":{"line":44,"column":39}}},"3":{"name":"(anonymous_3)","line":65,"loc":{"start":{"line":65,"column":25},"end":{"line":65,"column":52}}},"4":{"name":"(anonymous_4)","line":73,"loc":{"start":{"line":73,"column":26},"end":{"line":73,"column":40}}},"5":{"name":"twitter","line":106,"loc":{"start":{"line":106,"column":2},"end":{"line":106,"column":35}}},"6":{"name":"(anonymous_6)","line":128,"loc":{"start":{"line":128,"column":6},"end":{"line":128,"column":26}}},"7":{"name":"getHelp","line":136,"loc":{"start":{"line":136,"column":2},"end":{"line":136,"column":29}}},"8":{"name":"getPair","line":156,"loc":{"start":{"line":156,"column":2},"end":{"line":156,"column":29}}},"9":{"name":"sitemap","line":185,"loc":{"start":{"line":185,"column":2},"end":{"line":185,"column":35}}},"10":{"name":"(anonymous_10)","line":191,"loc":{"start":{"line":191,"column":15},"end":{"line":191,"column":34}}},"11":{"name":"(anonymous_11)","line":197,"loc":{"start":{"line":197,"column":12},"end":{"line":197,"column":33}}},"12":{"name":"(anonymous_12)","line":203,"loc":{"start":{"line":203,"column":23},"end":{"line":203,"column":38}}},"13":{"name":"(anonymous_13)","line":208,"loc":{"start":{"line":208,"column":20},"end":{"line":208,"column":40}}},"14":{"name":"(anonymous_14)","line":217,"loc":{"start":{"line":217,"column":20},"end":{"line":217,"column":40}}},"15":{"name":"(anonymous_15)","line":220,"loc":{"start":{"line":220,"column":12},"end":{"line":220,"column":39}}},"16":{"name":"(anonymous_16)","line":226,"loc":{"start":{"line":226,"column":23},"end":{"line":226,"column":43}}},"17":{"name":"(anonymous_17)","line":237,"loc":{"start":{"line":237,"column":17},"end":{"line":237,"column":37}}},"18":{"name":"(anonymous_18)","line":240,"loc":{"start":{"line":240,"column":12},"end":{"line":240,"column":36}}},"19":{"name":"(anonymous_19)","line":246,"loc":{"start":{"line":246,"column":23},"end":{"line":246,"column":39}}},"20":{"name":"(anonymous_20)","line":258,"loc":{"start":{"line":258,"column":20},"end":{"line":258,"column":40}}},"21":{"name":"(anonymous_21)","line":261,"loc":{"start":{"line":261,"column":12},"end":{"line":261,"column":38}}},"22":{"name":"(anonymous_22)","line":267,"loc":{"start":{"line":267,"column":23},"end":{"line":267,"column":43}}},"23":{"name":"(anonymous_23)","line":278,"loc":{"start":{"line":278,"column":21},"end":{"line":278,"column":40}}},"24":{"name":"(anonymous_24)","line":281,"loc":{"start":{"line":281,"column":12},"end":{"line":281,"column":39}}},"25":{"name":"(anonymous_25)","line":287,"loc":{"start":{"line":287,"column":23},"end":{"line":287,"column":44}}},"26":{"name":"(anonymous_26)","line":298,"loc":{"start":{"line":298,"column":9},"end":{"line":298,"column":32}}},"27":{"name":"(anonymous_27)","line":302,"loc":{"start":{"line":302,"column":19},"end":{"line":302,"column":30}}},"28":{"name":"chat","line":318,"loc":{"start":{"line":318,"column":2},"end":{"line":318,"column":26}}},"29":{"name":"jobsForm","line":328,"loc":{"start":{"line":328,"column":2},"end":{"line":328,"column":30}}},"30":{"name":"catPhotoSubmit","line":335,"loc":{"start":{"line":335,"column":2},"end":{"line":335,"column":36}}},"31":{"name":"nonprofits","line":342,"loc":{"start":{"line":342,"column":2},"end":{"line":342,"column":32}}},"32":{"name":"nonprofitsForm","line":348,"loc":{"start":{"line":348,"column":2},"end":{"line":348,"column":36}}},"33":{"name":"agileProjectManagers","line":354,"loc":{"start":{"line":354,"column":2},"end":{"line":354,"column":42}}},"34":{"name":"agileProjectManagersForm","line":360,"loc":{"start":{"line":360,"column":2},"end":{"line":360,"column":46}}},"35":{"name":"twitch","line":366,"loc":{"start":{"line":366,"column":2},"end":{"line":366,"column":28}}},"36":{"name":"unsubscribe","line":372,"loc":{"start":{"line":372,"column":2},"end":{"line":372,"column":39}}},"37":{"name":"(anonymous_37)","line":373,"loc":{"start":{"line":373,"column":46},"end":{"line":373,"column":66}}},"38":{"name":"(anonymous_38)","line":379,"loc":{"start":{"line":379,"column":18},"end":{"line":379,"column":30}}},"39":{"name":"unsubscribed","line":391,"loc":{"start":{"line":391,"column":2},"end":{"line":391,"column":34}}},"40":{"name":"githubCalls","line":397,"loc":{"start":{"line":397,"column":2},"end":{"line":397,"column":39}}},"41":{"name":"(anonymous_41)","line":413,"loc":{"start":{"line":413,"column":6},"end":{"line":413,"column":36}}},"42":{"name":"(anonymous_42)","line":428,"loc":{"start":{"line":428,"column":10},"end":{"line":428,"column":42}}},"43":{"name":"trelloCalls","line":443,"loc":{"start":{"line":443,"column":2},"end":{"line":443,"column":39}}},"44":{"name":"(anonymous_44)","line":447,"loc":{"start":{"line":447,"column":6},"end":{"line":447,"column":36}}},"45":{"name":"bloggerCalls","line":457,"loc":{"start":{"line":457,"column":2},"end":{"line":457,"column":40}}},"46":{"name":"(anonymous_46)","line":462,"loc":{"start":{"line":462,"column":6},"end":{"line":462,"column":35}}},"47":{"name":"getCats","line":473,"loc":{"start":{"line":473,"column":2},"end":{"line":473,"column":29}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":10,"column":46}},"2":{"start":{"line":12,"column":0},"end":{"line":12,"column":41}},"3":{"start":{"line":13,"column":0},"end":{"line":494,"column":2}},"4":{"start":{"line":14,"column":2},"end":{"line":14,"column":37}},"5":{"start":{"line":15,"column":2},"end":{"line":15,"column":29}},"6":{"start":{"line":16,"column":2},"end":{"line":16,"column":39}},"7":{"start":{"line":17,"column":2},"end":{"line":17,"column":31}},"8":{"start":{"line":18,"column":2},"end":{"line":18,"column":41}},"9":{"start":{"line":19,"column":2},"end":{"line":19,"column":39}},"10":{"start":{"line":21,"column":2},"end":{"line":21,"column":41}},"11":{"start":{"line":22,"column":2},"end":{"line":22,"column":43}},"12":{"start":{"line":23,"column":2},"end":{"line":23,"column":41}},"13":{"start":{"line":24,"column":2},"end":{"line":24,"column":58}},"14":{"start":{"line":25,"column":2},"end":{"line":25,"column":38}},"15":{"start":{"line":26,"column":2},"end":{"line":26,"column":36}},"16":{"start":{"line":27,"column":2},"end":{"line":27,"column":36}},"17":{"start":{"line":28,"column":2},"end":{"line":28,"column":28}},"18":{"start":{"line":29,"column":2},"end":{"line":29,"column":32}},"19":{"start":{"line":30,"column":2},"end":{"line":30,"column":70}},"20":{"start":{"line":31,"column":2},"end":{"line":31,"column":79}},"21":{"start":{"line":32,"column":2},"end":{"line":32,"column":40}},"22":{"start":{"line":33,"column":2},"end":{"line":33,"column":49}},"23":{"start":{"line":34,"column":2},"end":{"line":34,"column":37}},"24":{"start":{"line":35,"column":2},"end":{"line":35,"column":50}},"25":{"start":{"line":36,"column":2},"end":{"line":36,"column":49}},"26":{"start":{"line":37,"column":2},"end":{"line":37,"column":44}},"27":{"start":{"line":38,"column":2},"end":{"line":38,"column":36}},"28":{"start":{"line":40,"column":2},"end":{"line":40,"column":40}},"29":{"start":{"line":42,"column":2},"end":{"line":42,"column":18}},"30":{"start":{"line":44,"column":2},"end":{"line":104,"column":3}},"31":{"start":{"line":45,"column":4},"end":{"line":103,"column":5}},"32":{"start":{"line":46,"column":6},"end":{"line":96,"column":7}},"33":{"start":{"line":47,"column":8},"end":{"line":51,"column":10}},"34":{"start":{"line":53,"column":8},"end":{"line":56,"column":10}},"35":{"start":{"line":58,"column":8},"end":{"line":63,"column":10}},"36":{"start":{"line":65,"column":8},"end":{"line":89,"column":11}},"37":{"start":{"line":66,"column":10},"end":{"line":88,"column":11}},"38":{"start":{"line":67,"column":12},"end":{"line":71,"column":15}},"39":{"start":{"line":72,"column":12},"end":{"line":72,"column":44}},"40":{"start":{"line":73,"column":12},"end":{"line":78,"column":15}},"41":{"start":{"line":74,"column":14},"end":{"line":76,"column":15}},"42":{"start":{"line":75,"column":16},"end":{"line":75,"column":33}},"43":{"start":{"line":77,"column":14},"end":{"line":77,"column":42}},"44":{"start":{"line":80,"column":12},"end":{"line":86,"column":15}},"45":{"start":{"line":87,"column":12},"end":{"line":87,"column":40}},"46":{"start":{"line":91,"column":8},"end":{"line":94,"column":11}},"47":{"start":{"line":95,"column":8},"end":{"line":95,"column":40}},"48":{"start":{"line":98,"column":6},"end":{"line":101,"column":9}},"49":{"start":{"line":102,"column":6},"end":{"line":102,"column":38}},"50":{"start":{"line":106,"column":2},"end":{"line":133,"column":3}},"51":{"start":{"line":108,"column":4},"end":{"line":113,"column":7}},"52":{"start":{"line":115,"column":4},"end":{"line":115,"column":19}},"53":{"start":{"line":116,"column":4},"end":{"line":120,"column":5}},"54":{"start":{"line":117,"column":6},"end":{"line":117,"column":41}},"55":{"start":{"line":119,"column":6},"end":{"line":119,"column":34}},"56":{"start":{"line":122,"column":4},"end":{"line":132,"column":6}},"57":{"start":{"line":129,"column":8},"end":{"line":129,"column":38}},"58":{"start":{"line":129,"column":19},"end":{"line":129,"column":36}},"59":{"start":{"line":130,"column":8},"end":{"line":130,"column":30}},"60":{"start":{"line":136,"column":2},"end":{"line":154,"column":3}},"61":{"start":{"line":137,"column":4},"end":{"line":137,"column":37}},"62":{"start":{"line":138,"column":4},"end":{"line":140,"column":11}},"63":{"start":{"line":141,"column":4},"end":{"line":141,"column":47}},"64":{"start":{"line":143,"column":4},"end":{"line":152,"column":7}},"65":{"start":{"line":153,"column":4},"end":{"line":153,"column":31}},"66":{"start":{"line":156,"column":2},"end":{"line":183,"column":3}},"67":{"start":{"line":157,"column":4},"end":{"line":157,"column":37}},"68":{"start":{"line":158,"column":4},"end":{"line":158,"column":47}},"69":{"start":{"line":159,"column":4},"end":{"line":181,"column":7}},"70":{"start":{"line":182,"column":4},"end":{"line":182,"column":31}},"71":{"start":{"line":185,"column":2},"end":{"line":316,"column":3}},"72":{"start":{"line":186,"column":4},"end":{"line":186,"column":47}},"73":{"start":{"line":187,"column":4},"end":{"line":187,"column":54}},"74":{"start":{"line":190,"column":4},"end":{"line":315,"column":6}},"75":{"start":{"line":192,"column":10},"end":{"line":214,"column":15}},"76":{"start":{"line":198,"column":14},"end":{"line":213,"column":15}},"77":{"start":{"line":199,"column":16},"end":{"line":199,"column":41}},"78":{"start":{"line":200,"column":16},"end":{"line":200,"column":30}},"79":{"start":{"line":202,"column":16},"end":{"line":212,"column":20}},"80":{"start":{"line":204,"column":20},"end":{"line":204,"column":41}},"81":{"start":{"line":209,"column":22},"end":{"line":209,"column":48}},"82":{"start":{"line":218,"column":10},"end":{"line":235,"column":15}},"83":{"start":{"line":221,"column":14},"end":{"line":234,"column":15}},"84":{"start":{"line":222,"column":16},"end":{"line":222,"column":46}},"85":{"start":{"line":223,"column":16},"end":{"line":223,"column":30}},"86":{"start":{"line":225,"column":16},"end":{"line":233,"column":20}},"87":{"start":{"line":227,"column":20},"end":{"line":227,"column":42}},"88":{"start":{"line":238,"column":10},"end":{"line":256,"column":12}},"89":{"start":{"line":241,"column":14},"end":{"line":254,"column":15}},"90":{"start":{"line":242,"column":16},"end":{"line":242,"column":42}},"91":{"start":{"line":243,"column":16},"end":{"line":243,"column":30}},"92":{"start":{"line":245,"column":16},"end":{"line":253,"column":20}},"93":{"start":{"line":247,"column":20},"end":{"line":247,"column":38}},"94":{"start":{"line":259,"column":10},"end":{"line":276,"column":15}},"95":{"start":{"line":262,"column":14},"end":{"line":275,"column":15}},"96":{"start":{"line":263,"column":16},"end":{"line":263,"column":41}},"97":{"start":{"line":264,"column":16},"end":{"line":264,"column":30}},"98":{"start":{"line":266,"column":16},"end":{"line":274,"column":20}},"99":{"start":{"line":268,"column":20},"end":{"line":268,"column":42}},"100":{"start":{"line":279,"column":10},"end":{"line":296,"column":15}},"101":{"start":{"line":282,"column":14},"end":{"line":295,"column":15}},"102":{"start":{"line":283,"column":16},"end":{"line":283,"column":41}},"103":{"start":{"line":284,"column":16},"end":{"line":284,"column":30}},"104":{"start":{"line":286,"column":16},"end":{"line":294,"column":20}},"105":{"start":{"line":288,"column":20},"end":{"line":288,"column":43}},"106":{"start":{"line":299,"column":8},"end":{"line":301,"column":9}},"107":{"start":{"line":300,"column":10},"end":{"line":300,"column":27}},"108":{"start":{"line":302,"column":8},"end":{"line":313,"column":14}},"109":{"start":{"line":303,"column":10},"end":{"line":303,"column":56}},"110":{"start":{"line":304,"column":10},"end":{"line":312,"column":13}},"111":{"start":{"line":318,"column":2},"end":{"line":326,"column":3}},"112":{"start":{"line":319,"column":4},"end":{"line":325,"column":5}},"113":{"start":{"line":320,"column":6},"end":{"line":320,"column":52}},"114":{"start":{"line":322,"column":6},"end":{"line":324,"column":9}},"115":{"start":{"line":328,"column":2},"end":{"line":333,"column":3}},"116":{"start":{"line":329,"column":4},"end":{"line":332,"column":7}},"117":{"start":{"line":335,"column":2},"end":{"line":340,"column":3}},"118":{"start":{"line":336,"column":4},"end":{"line":339,"column":6}},"119":{"start":{"line":342,"column":2},"end":{"line":346,"column":3}},"120":{"start":{"line":343,"column":4},"end":{"line":345,"column":7}},"121":{"start":{"line":348,"column":2},"end":{"line":352,"column":3}},"122":{"start":{"line":349,"column":4},"end":{"line":351,"column":7}},"123":{"start":{"line":354,"column":2},"end":{"line":358,"column":3}},"124":{"start":{"line":355,"column":4},"end":{"line":357,"column":7}},"125":{"start":{"line":360,"column":2},"end":{"line":364,"column":3}},"126":{"start":{"line":361,"column":4},"end":{"line":363,"column":7}},"127":{"start":{"line":366,"column":2},"end":{"line":370,"column":3}},"128":{"start":{"line":367,"column":4},"end":{"line":369,"column":7}},"129":{"start":{"line":372,"column":2},"end":{"line":389,"column":3}},"130":{"start":{"line":373,"column":4},"end":{"line":388,"column":7}},"131":{"start":{"line":374,"column":6},"end":{"line":387,"column":7}},"132":{"start":{"line":375,"column":8},"end":{"line":377,"column":9}},"133":{"start":{"line":376,"column":10},"end":{"line":376,"column":27}},"134":{"start":{"line":378,"column":8},"end":{"line":378,"column":38}},"135":{"start":{"line":379,"column":8},"end":{"line":384,"column":11}},"136":{"start":{"line":380,"column":10},"end":{"line":382,"column":11}},"137":{"start":{"line":381,"column":12},"end":{"line":381,"column":29}},"138":{"start":{"line":383,"column":10},"end":{"line":383,"column":40}},"139":{"start":{"line":386,"column":8},"end":{"line":386,"column":38}},"140":{"start":{"line":391,"column":2},"end":{"line":395,"column":3}},"141":{"start":{"line":392,"column":4},"end":{"line":394,"column":7}},"142":{"start":{"line":397,"column":2},"end":{"line":441,"column":3}},"143":{"start":{"line":398,"column":4},"end":{"line":403,"column":6}},"144":{"start":{"line":404,"column":4},"end":{"line":440,"column":6}},"145":{"start":{"line":414,"column":8},"end":{"line":414,"column":38}},"146":{"start":{"line":414,"column":19},"end":{"line":414,"column":36}},"147":{"start":{"line":415,"column":8},"end":{"line":417,"column":37}},"148":{"start":{"line":419,"column":8},"end":{"line":438,"column":10}},"149":{"start":{"line":429,"column":12},"end":{"line":429,"column":42}},"150":{"start":{"line":429,"column":23},"end":{"line":429,"column":40}},"151":{"start":{"line":430,"column":12},"end":{"line":432,"column":40}},"152":{"start":{"line":433,"column":12},"end":{"line":436,"column":15}},"153":{"start":{"line":443,"column":2},"end":{"line":455,"column":3}},"154":{"start":{"line":444,"column":4},"end":{"line":454,"column":9}},"155":{"start":{"line":448,"column":8},"end":{"line":448,"column":38}},"156":{"start":{"line":448,"column":19},"end":{"line":448,"column":36}},"157":{"start":{"line":449,"column":8},"end":{"line":451,"column":40}},"158":{"start":{"line":453,"column":8},"end":{"line":453,"column":40}},"159":{"start":{"line":457,"column":2},"end":{"line":471,"column":3}},"160":{"start":{"line":458,"column":4},"end":{"line":470,"column":6}},"161":{"start":{"line":463,"column":8},"end":{"line":463,"column":38}},"162":{"start":{"line":463,"column":19},"end":{"line":463,"column":36}},"163":{"start":{"line":465,"column":8},"end":{"line":467,"column":38}},"164":{"start":{"line":468,"column":8},"end":{"line":468,"column":38}},"165":{"start":{"line":473,"column":2},"end":{"line":493,"column":3}},"166":{"start":{"line":474,"column":4},"end":{"line":492,"column":6}}},"branchMap":{"1":{"line":45,"type":"if","locations":[{"start":{"line":45,"column":4},"end":{"line":45,"column":4}},{"start":{"line":45,"column":4},"end":{"line":45,"column":4}}]},"2":{"line":46,"type":"if","locations":[{"start":{"line":46,"column":6},"end":{"line":46,"column":6}},{"start":{"line":46,"column":6},"end":{"line":46,"column":6}}]},"3":{"line":66,"type":"if","locations":[{"start":{"line":66,"column":10},"end":{"line":66,"column":10}},{"start":{"line":66,"column":10},"end":{"line":66,"column":10}}]},"4":{"line":66,"type":"binary-expr","locations":[{"start":{"line":66,"column":14},"end":{"line":66,"column":20}},{"start":{"line":66,"column":24},"end":{"line":66,"column":51}}]},"5":{"line":74,"type":"if","locations":[{"start":{"line":74,"column":14},"end":{"line":74,"column":14}},{"start":{"line":74,"column":14},"end":{"line":74,"column":14}}]},"6":{"line":116,"type":"if","locations":[{"start":{"line":116,"column":4},"end":{"line":116,"column":4}},{"start":{"line":116,"column":4},"end":{"line":116,"column":4}}]},"7":{"line":129,"type":"if","locations":[{"start":{"line":129,"column":8},"end":{"line":129,"column":8}},{"start":{"line":129,"column":8},"end":{"line":129,"column":8}}]},"8":{"line":138,"type":"cond-expr","locations":[{"start":{"line":138,"column":39},"end":{"line":139,"column":37}},{"start":{"line":140,"column":8},"end":{"line":140,"column":10}}]},"9":{"line":198,"type":"if","locations":[{"start":{"line":198,"column":14},"end":{"line":198,"column":14}},{"start":{"line":198,"column":14},"end":{"line":198,"column":14}}]},"10":{"line":221,"type":"if","locations":[{"start":{"line":221,"column":14},"end":{"line":221,"column":14}},{"start":{"line":221,"column":14},"end":{"line":221,"column":14}}]},"11":{"line":241,"type":"if","locations":[{"start":{"line":241,"column":14},"end":{"line":241,"column":14}},{"start":{"line":241,"column":14},"end":{"line":241,"column":14}}]},"12":{"line":262,"type":"if","locations":[{"start":{"line":262,"column":14},"end":{"line":262,"column":14}},{"start":{"line":262,"column":14},"end":{"line":262,"column":14}}]},"13":{"line":282,"type":"if","locations":[{"start":{"line":282,"column":14},"end":{"line":282,"column":14}},{"start":{"line":282,"column":14},"end":{"line":282,"column":14}}]},"14":{"line":299,"type":"if","locations":[{"start":{"line":299,"column":8},"end":{"line":299,"column":8}},{"start":{"line":299,"column":8},"end":{"line":299,"column":8}}]},"15":{"line":319,"type":"if","locations":[{"start":{"line":319,"column":4},"end":{"line":319,"column":4}},{"start":{"line":319,"column":4},"end":{"line":319,"column":4}}]},"16":{"line":319,"type":"binary-expr","locations":[{"start":{"line":319,"column":8},"end":{"line":319,"column":16}},{"start":{"line":319,"column":20},"end":{"line":319,"column":58}}]},"17":{"line":374,"type":"if","locations":[{"start":{"line":374,"column":6},"end":{"line":374,"column":6}},{"start":{"line":374,"column":6},"end":{"line":374,"column":6}}]},"18":{"line":375,"type":"if","locations":[{"start":{"line":375,"column":8},"end":{"line":375,"column":8}},{"start":{"line":375,"column":8},"end":{"line":375,"column":8}}]},"19":{"line":380,"type":"if","locations":[{"start":{"line":380,"column":10},"end":{"line":380,"column":10}},{"start":{"line":380,"column":10},"end":{"line":380,"column":10}}]},"20":{"line":414,"type":"if","locations":[{"start":{"line":414,"column":8},"end":{"line":414,"column":8}},{"start":{"line":414,"column":8},"end":{"line":414,"column":8}}]},"21":{"line":415,"type":"cond-expr","locations":[{"start":{"line":416,"column":10},"end":{"line":416,"column":47}},{"start":{"line":417,"column":10},"end":{"line":417,"column":36}}]},"22":{"line":429,"type":"if","locations":[{"start":{"line":429,"column":12},"end":{"line":429,"column":12}},{"start":{"line":429,"column":12},"end":{"line":429,"column":12}}]},"23":{"line":430,"type":"cond-expr","locations":[{"start":{"line":431,"column":12},"end":{"line":431,"column":58}},{"start":{"line":432,"column":14},"end":{"line":432,"column":39}}]},"24":{"line":430,"type":"binary-expr","locations":[{"start":{"line":430,"column":23},"end":{"line":430,"column":52}},{"start":{"line":430,"column":57},"end":{"line":430,"column":63}}]},"25":{"line":448,"type":"if","locations":[{"start":{"line":448,"column":8},"end":{"line":448,"column":8}},{"start":{"line":448,"column":8},"end":{"line":448,"column":8}}]},"26":{"line":449,"type":"cond-expr","locations":[{"start":{"line":450,"column":11},"end":{"line":450,"column":29}},{"start":{"line":451,"column":10},"end":{"line":451,"column":39}}]},"27":{"line":449,"type":"binary-expr","locations":[{"start":{"line":449,"column":18},"end":{"line":449,"column":24}},{"start":{"line":449,"column":28},"end":{"line":449,"column":53}}]},"28":{"line":463,"type":"if","locations":[{"start":{"line":463,"column":8},"end":{"line":463,"column":8}},{"start":{"line":463,"column":8},"end":{"line":463,"column":8}}]},"29":{"line":465,"type":"cond-expr","locations":[{"start":{"line":466,"column":10},"end":{"line":466,"column":26}},{"start":{"line":467,"column":10},"end":{"line":467,"column":37}}]},"30":{"line":465,"type":"binary-expr","locations":[{"start":{"line":465,"column":16},"end":{"line":465,"column":22}},{"start":{"line":465,"column":26},"end":{"line":465,"column":51}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/redirects.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/redirects.js","s":{"1":1,"2":1,"3":1,"4":0,"5":1,"6":0,"7":1,"8":0,"9":1},"b":{},"f":{"1":1,"2":0,"3":0,"4":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":31}}},"2":{"name":"(anonymous_2)","line":4,"loc":{"start":{"line":4,"column":48},"end":{"line":4,"column":67}}},"3":{"name":"(anonymous_3)","line":11,"loc":{"start":{"line":11,"column":23},"end":{"line":11,"column":42}}},"4":{"name":"(anonymous_4)","line":15,"loc":{"start":{"line":15,"column":25},"end":{"line":15,"column":44}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":22,"column":2}},"2":{"start":{"line":2,"column":2},"end":{"line":2,"column":37}},"3":{"start":{"line":4,"column":2},"end":{"line":9,"column":5}},"4":{"start":{"line":5,"column":4},"end":{"line":8,"column":6}},"5":{"start":{"line":11,"column":2},"end":{"line":13,"column":5}},"6":{"start":{"line":12,"column":4},"end":{"line":12,"column":57}},"7":{"start":{"line":15,"column":2},"end":{"line":19,"column":5}},"8":{"start":{"line":16,"column":4},"end":{"line":18,"column":6}},"9":{"start":{"line":21,"column":2},"end":{"line":21,"column":18}}},"branchMap":{}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/restApi.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/restApi.js","s":{"1":1,"2":1,"3":1},"b":{},"f":{"1":1},"fnMap":{"1":{"name":"mountRestApi","line":1,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":44}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":4,"column":2}},"2":{"start":{"line":2,"column":2},"end":{"line":2,"column":43}},"3":{"start":{"line":3,"column":2},"end":{"line":3,"column":44}}},"branchMap":{}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/story.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/story.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":0,"22":0,"23":0,"24":0,"25":0,"26":1,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":1,"36":0,"37":1,"38":0,"39":1,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":1,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":1,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":1,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":1,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":1,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":1,"127":0,"128":0,"129":0,"130":1,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":1,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0,"162":0,"163":0,"164":1,"165":0,"166":0,"167":0,"168":0,"169":0,"170":0,"171":0,"172":0,"173":0,"174":1,"175":0,"176":0,"177":0,"178":0,"179":0,"180":0,"181":0,"182":0,"183":0,"184":0,"185":0,"186":0,"187":0,"188":0,"189":0,"190":0,"191":1,"192":0,"193":0,"194":0,"195":0,"196":0,"197":0,"198":0,"199":0,"200":0,"201":0,"202":0,"203":0,"204":0,"205":0,"206":0,"207":0,"208":0,"209":0,"210":0,"211":0,"212":0,"213":0,"214":0,"215":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0],"52":[0,0],"53":[0,0,0,0,0],"54":[0,0]},"f":{"1":1,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0},"fnMap":{"1":{"name":"(anonymous_1)","line":10,"loc":{"start":{"line":10,"column":17},"end":{"line":10,"column":31}}},"2":{"name":"hotRank","line":31,"loc":{"start":{"line":31,"column":2},"end":{"line":31,"column":36}}},"3":{"name":"hotJSON","line":45,"loc":{"start":{"line":45,"column":2},"end":{"line":45,"column":35}}},"4":{"name":"(anonymous_4)","line":46,"loc":{"start":{"line":46,"column":56},"end":{"line":46,"column":79}}},"5":{"name":"(anonymous_5)","line":53,"loc":{"start":{"line":53,"column":34},"end":{"line":53,"column":49}}},"6":{"name":"(anonymous_6)","line":55,"loc":{"start":{"line":55,"column":14},"end":{"line":55,"column":29}}},"7":{"name":"hot","line":63,"loc":{"start":{"line":63,"column":2},"end":{"line":63,"column":25}}},"8":{"name":"submitNew","line":70,"loc":{"start":{"line":70,"column":2},"end":{"line":70,"column":31}}},"9":{"name":"preSubmit","line":94,"loc":{"start":{"line":94,"column":2},"end":{"line":94,"column":31}}},"10":{"name":"returnIndividualStory","line":125,"loc":{"start":{"line":125,"column":2},"end":{"line":125,"column":49}}},"11":{"name":"(anonymous_11)","line":130,"loc":{"start":{"line":130,"column":50},"end":{"line":130,"column":71}}},"12":{"name":"(anonymous_12)","line":155,"loc":{"start":{"line":155,"column":44},"end":{"line":155,"column":56}}},"13":{"name":"getStories","line":184,"loc":{"start":{"line":184,"column":2},"end":{"line":184,"column":38}}},"14":{"name":"(anonymous_14)","line":185,"loc":{"start":{"line":185,"column":36},"end":{"line":185,"column":60}}},"15":{"name":"(anonymous_15)","line":214,"loc":{"start":{"line":214,"column":17},"end":{"line":214,"column":38}}},"16":{"name":"upvote","line":226,"loc":{"start":{"line":226,"column":2},"end":{"line":226,"column":34}}},"17":{"name":"(anonymous_17)","line":228,"loc":{"start":{"line":228,"column":32},"end":{"line":228,"column":53}}},"18":{"name":"(anonymous_18)","line":248,"loc":{"start":{"line":248,"column":8},"end":{"line":248,"column":28}}},"19":{"name":"(anonymous_19)","line":252,"loc":{"start":{"line":252,"column":20},"end":{"line":252,"column":35}}},"20":{"name":"(anonymous_20)","line":253,"loc":{"start":{"line":253,"column":26},"end":{"line":253,"column":41}}},"21":{"name":"comments","line":267,"loc":{"start":{"line":267,"column":2},"end":{"line":267,"column":36}}},"22":{"name":"(anonymous_22)","line":271,"loc":{"start":{"line":271,"column":6},"end":{"line":271,"column":29}}},"23":{"name":"newStory","line":280,"loc":{"start":{"line":280,"column":2},"end":{"line":280,"column":36}}},"24":{"name":"(anonymous_24)","line":304,"loc":{"start":{"line":304,"column":6},"end":{"line":304,"column":27}}},"25":{"name":"processResponse","line":321,"loc":{"start":{"line":321,"column":4},"end":{"line":321,"column":41}}},"26":{"name":"storySubmission","line":342,"loc":{"start":{"line":342,"column":2},"end":{"line":342,"column":43}}},"27":{"name":"(anonymous_27)","line":361,"loc":{"start":{"line":361,"column":7},"end":{"line":361,"column":34}}},"28":{"name":"(anonymous_28)","line":401,"loc":{"start":{"line":401,"column":17},"end":{"line":401,"column":32}}},"29":{"name":"(anonymous_29)","line":406,"loc":{"start":{"line":406,"column":22},"end":{"line":406,"column":37}}},"30":{"name":"commentSubmit","line":418,"loc":{"start":{"line":418,"column":2},"end":{"line":418,"column":41}}},"31":{"name":"commentOnCommentSubmit","line":455,"loc":{"start":{"line":455,"column":2},"end":{"line":455,"column":50}}},"32":{"name":"commentEdit","line":496,"loc":{"start":{"line":496,"column":2},"end":{"line":496,"column":39}}},"33":{"name":"(anonymous_33)","line":498,"loc":{"start":{"line":498,"column":40},"end":{"line":498,"column":59}}},"34":{"name":"(anonymous_34)","line":521,"loc":{"start":{"line":521,"column":15},"end":{"line":521,"column":29}}},"35":{"name":"commentSave","line":532,"loc":{"start":{"line":532,"column":2},"end":{"line":532,"column":52}}},"36":{"name":"(anonymous_36)","line":533,"loc":{"start":{"line":533,"column":17},"end":{"line":533,"column":37}}},"37":{"name":"(anonymous_37)","line":542,"loc":{"start":{"line":542,"column":11},"end":{"line":542,"column":45}}},"38":{"name":"(anonymous_38)","line":549,"loc":{"start":{"line":549,"column":35},"end":{"line":549,"column":50}}},"39":{"name":"(anonymous_39)","line":559,"loc":{"start":{"line":559,"column":13},"end":{"line":559,"column":38}}},"40":{"name":"(anonymous_40)","line":595,"loc":{"start":{"line":595,"column":48},"end":{"line":595,"column":63}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":8,"column":46}},"2":{"start":{"line":10,"column":0},"end":{"line":608,"column":2}},"3":{"start":{"line":11,"column":2},"end":{"line":11,"column":37}},"4":{"start":{"line":12,"column":2},"end":{"line":12,"column":29}},"5":{"start":{"line":13,"column":2},"end":{"line":13,"column":31}},"6":{"start":{"line":15,"column":2},"end":{"line":15,"column":45}},"7":{"start":{"line":16,"column":2},"end":{"line":16,"column":48}},"8":{"start":{"line":17,"column":2},"end":{"line":17,"column":50}},"9":{"start":{"line":18,"column":2},"end":{"line":18,"column":70}},"10":{"start":{"line":19,"column":2},"end":{"line":19,"column":55}},"11":{"start":{"line":20,"column":2},"end":{"line":20,"column":43}},"12":{"start":{"line":21,"column":2},"end":{"line":21,"column":53}},"13":{"start":{"line":22,"column":2},"end":{"line":22,"column":48}},"14":{"start":{"line":23,"column":2},"end":{"line":23,"column":44}},"15":{"start":{"line":24,"column":2},"end":{"line":24,"column":31}},"16":{"start":{"line":25,"column":2},"end":{"line":25,"column":45}},"17":{"start":{"line":26,"column":2},"end":{"line":26,"column":59}},"18":{"start":{"line":27,"column":2},"end":{"line":27,"column":42}},"19":{"start":{"line":29,"column":2},"end":{"line":29,"column":18}},"20":{"start":{"line":31,"column":2},"end":{"line":43,"column":3}},"21":{"start":{"line":38,"column":4},"end":{"line":38,"column":32}},"22":{"start":{"line":39,"column":4},"end":{"line":39,"column":16}},"23":{"start":{"line":40,"column":4},"end":{"line":40,"column":42}},"24":{"start":{"line":41,"column":4},"end":{"line":41,"column":44}},"25":{"start":{"line":42,"column":4},"end":{"line":42,"column":19}},"26":{"start":{"line":45,"column":2},"end":{"line":61,"column":3}},"27":{"start":{"line":46,"column":4},"end":{"line":60,"column":7}},"28":{"start":{"line":47,"column":6},"end":{"line":49,"column":7}},"29":{"start":{"line":48,"column":8},"end":{"line":48,"column":25}},"30":{"start":{"line":50,"column":6},"end":{"line":50,"column":41}},"31":{"start":{"line":52,"column":6},"end":{"line":52,"column":66}},"32":{"start":{"line":53,"column":6},"end":{"line":58,"column":29}},"33":{"start":{"line":54,"column":8},"end":{"line":54,"column":20}},"34":{"start":{"line":56,"column":8},"end":{"line":57,"column":71}},"35":{"start":{"line":63,"column":2},"end":{"line":68,"column":3}},"36":{"start":{"line":64,"column":4},"end":{"line":67,"column":7}},"37":{"start":{"line":70,"column":2},"end":{"line":75,"column":3}},"38":{"start":{"line":71,"column":4},"end":{"line":74,"column":7}},"39":{"start":{"line":94,"column":2},"end":{"line":122,"column":3}},"40":{"start":{"line":96,"column":4},"end":{"line":96,"column":25}},"41":{"start":{"line":97,"column":4},"end":{"line":100,"column":32}},"42":{"start":{"line":101,"column":4},"end":{"line":109,"column":5}},"43":{"start":{"line":103,"column":6},"end":{"line":105,"column":9}},"44":{"start":{"line":106,"column":6},"end":{"line":108,"column":9}},"45":{"start":{"line":111,"column":4},"end":{"line":111,"column":33}},"46":{"start":{"line":112,"column":4},"end":{"line":112,"column":33}},"47":{"start":{"line":113,"column":4},"end":{"line":113,"column":45}},"48":{"start":{"line":114,"column":4},"end":{"line":121,"column":7}},"49":{"start":{"line":125,"column":2},"end":{"line":182,"column":3}},"50":{"start":{"line":126,"column":4},"end":{"line":126,"column":42}},"51":{"start":{"line":128,"column":4},"end":{"line":128,"column":58}},"52":{"start":{"line":130,"column":4},"end":{"line":181,"column":7}},"53":{"start":{"line":131,"column":6},"end":{"line":133,"column":7}},"54":{"start":{"line":132,"column":8},"end":{"line":132,"column":25}},"55":{"start":{"line":136,"column":6},"end":{"line":143,"column":7}},"56":{"start":{"line":137,"column":8},"end":{"line":140,"column":11}},"57":{"start":{"line":142,"column":8},"end":{"line":142,"column":41}},"58":{"start":{"line":145,"column":6},"end":{"line":145,"column":26}},"59":{"start":{"line":146,"column":6},"end":{"line":148,"column":29}},"60":{"start":{"line":149,"column":6},"end":{"line":151,"column":7}},"61":{"start":{"line":150,"column":8},"end":{"line":150,"column":60}},"62":{"start":{"line":153,"column":6},"end":{"line":153,"column":28}},"63":{"start":{"line":154,"column":6},"end":{"line":163,"column":7}},"64":{"start":{"line":155,"column":8},"end":{"line":157,"column":11}},"65":{"start":{"line":156,"column":10},"end":{"line":156,"column":76}},"66":{"start":{"line":158,"column":8},"end":{"line":160,"column":9}},"67":{"start":{"line":159,"column":10},"end":{"line":159,"column":27}},"68":{"start":{"line":162,"column":8},"end":{"line":162,"column":26}},"69":{"start":{"line":164,"column":6},"end":{"line":180,"column":9}},"70":{"start":{"line":184,"column":2},"end":{"line":224,"column":3}},"71":{"start":{"line":185,"column":4},"end":{"line":223,"column":7}},"72":{"start":{"line":186,"column":6},"end":{"line":188,"column":7}},"73":{"start":{"line":187,"column":8},"end":{"line":187,"column":25}},"74":{"start":{"line":189,"column":6},"end":{"line":222,"column":9}},"75":{"start":{"line":215,"column":8},"end":{"line":217,"column":9}},"76":{"start":{"line":216,"column":10},"end":{"line":216,"column":27}},"77":{"start":{"line":218,"column":8},"end":{"line":220,"column":9}},"78":{"start":{"line":219,"column":10},"end":{"line":219,"column":33}},"79":{"start":{"line":221,"column":8},"end":{"line":221,"column":35}},"80":{"start":{"line":226,"column":2},"end":{"line":265,"column":3}},"81":{"start":{"line":227,"column":4},"end":{"line":227,"column":29}},"82":{"start":{"line":228,"column":4},"end":{"line":264,"column":7}},"83":{"start":{"line":229,"column":6},"end":{"line":231,"column":7}},"84":{"start":{"line":230,"column":8},"end":{"line":230,"column":25}},"85":{"start":{"line":232,"column":6},"end":{"line":232,"column":26}},"86":{"start":{"line":233,"column":6},"end":{"line":233,"column":19}},"87":{"start":{"line":234,"column":6},"end":{"line":239,"column":8}},"88":{"start":{"line":240,"column":6},"end":{"line":240,"column":33}},"89":{"start":{"line":241,"column":6},"end":{"line":241,"column":19}},"90":{"start":{"line":246,"column":6},"end":{"line":262,"column":8}},"91":{"start":{"line":249,"column":10},"end":{"line":249,"column":40}},"92":{"start":{"line":249,"column":21},"end":{"line":249,"column":38}},"93":{"start":{"line":251,"column":10},"end":{"line":251,"column":56}},"94":{"start":{"line":252,"column":10},"end":{"line":260,"column":13}},"95":{"start":{"line":253,"column":12},"end":{"line":255,"column":15}},"96":{"start":{"line":254,"column":14},"end":{"line":254,"column":44}},"97":{"start":{"line":254,"column":25},"end":{"line":254,"column":42}},"98":{"start":{"line":256,"column":12},"end":{"line":256,"column":62}},"99":{"start":{"line":257,"column":12},"end":{"line":259,"column":13}},"100":{"start":{"line":258,"column":14},"end":{"line":258,"column":31}},"101":{"start":{"line":263,"column":6},"end":{"line":263,"column":29}},"102":{"start":{"line":267,"column":2},"end":{"line":278,"column":3}},"103":{"start":{"line":268,"column":4},"end":{"line":268,"column":29}},"104":{"start":{"line":269,"column":4},"end":{"line":277,"column":9}},"105":{"start":{"line":272,"column":8},"end":{"line":274,"column":9}},"106":{"start":{"line":273,"column":10},"end":{"line":273,"column":27}},"107":{"start":{"line":275,"column":8},"end":{"line":275,"column":32}},"108":{"start":{"line":276,"column":8},"end":{"line":276,"column":33}},"109":{"start":{"line":280,"column":2},"end":{"line":340,"column":3}},"110":{"start":{"line":281,"column":4},"end":{"line":283,"column":5}},"111":{"start":{"line":282,"column":6},"end":{"line":282,"column":50}},"112":{"start":{"line":284,"column":4},"end":{"line":284,"column":32}},"113":{"start":{"line":285,"column":4},"end":{"line":288,"column":31}},"114":{"start":{"line":289,"column":4},"end":{"line":298,"column":5}},"115":{"start":{"line":290,"column":6},"end":{"line":292,"column":9}},"116":{"start":{"line":293,"column":6},"end":{"line":296,"column":9}},"117":{"start":{"line":299,"column":4},"end":{"line":301,"column":5}},"118":{"start":{"line":300,"column":6},"end":{"line":300,"column":28}},"119":{"start":{"line":302,"column":4},"end":{"line":319,"column":6}},"120":{"start":{"line":305,"column":8},"end":{"line":307,"column":9}},"121":{"start":{"line":306,"column":10},"end":{"line":306,"column":27}},"122":{"start":{"line":308,"column":8},"end":{"line":316,"column":9}},"123":{"start":{"line":309,"column":10},"end":{"line":311,"column":13}},"124":{"start":{"line":312,"column":10},"end":{"line":315,"column":13}},"125":{"start":{"line":317,"column":8},"end":{"line":317,"column":48}},"126":{"start":{"line":321,"column":4},"end":{"line":339,"column":5}},"127":{"start":{"line":322,"column":6},"end":{"line":338,"column":7}},"128":{"start":{"line":323,"column":8},"end":{"line":329,"column":11}},"129":{"start":{"line":331,"column":8},"end":{"line":337,"column":11}},"130":{"start":{"line":342,"column":2},"end":{"line":416,"column":3}},"131":{"start":{"line":343,"column":4},"end":{"line":343,"column":29}},"132":{"start":{"line":344,"column":4},"end":{"line":346,"column":5}},"133":{"start":{"line":345,"column":6},"end":{"line":345,"column":47}},"134":{"start":{"line":347,"column":4},"end":{"line":351,"column":14}},"135":{"start":{"line":353,"column":4},"end":{"line":353,"column":25}},"136":{"start":{"line":355,"column":4},"end":{"line":357,"column":5}},"137":{"start":{"line":356,"column":6},"end":{"line":356,"column":30}},"138":{"start":{"line":359,"column":4},"end":{"line":415,"column":7}},"139":{"start":{"line":362,"column":6},"end":{"line":364,"column":7}},"140":{"start":{"line":363,"column":8},"end":{"line":363,"column":25}},"141":{"start":{"line":367,"column":6},"end":{"line":367,"column":80}},"142":{"start":{"line":369,"column":6},"end":{"line":369,"column":27}},"143":{"start":{"line":370,"column":6},"end":{"line":372,"column":7}},"144":{"start":{"line":371,"column":8},"end":{"line":371,"column":32}},"145":{"start":{"line":373,"column":6},"end":{"line":400,"column":9}},"146":{"start":{"line":401,"column":6},"end":{"line":414,"column":9}},"147":{"start":{"line":402,"column":8},"end":{"line":404,"column":9}},"148":{"start":{"line":403,"column":10},"end":{"line":403,"column":27}},"149":{"start":{"line":405,"column":8},"end":{"line":405,"column":58}},"150":{"start":{"line":406,"column":8},"end":{"line":413,"column":11}},"151":{"start":{"line":407,"column":10},"end":{"line":409,"column":11}},"152":{"start":{"line":408,"column":12},"end":{"line":408,"column":29}},"153":{"start":{"line":410,"column":10},"end":{"line":412,"column":14}},"154":{"start":{"line":418,"column":2},"end":{"line":453,"column":3}},"155":{"start":{"line":419,"column":4},"end":{"line":419,"column":29}},"156":{"start":{"line":420,"column":4},"end":{"line":422,"column":5}},"157":{"start":{"line":421,"column":6},"end":{"line":421,"column":47}},"158":{"start":{"line":423,"column":4},"end":{"line":427,"column":33}},"159":{"start":{"line":428,"column":4},"end":{"line":433,"column":5}},"160":{"start":{"line":429,"column":6},"end":{"line":431,"column":9}},"161":{"start":{"line":432,"column":6},"end":{"line":432,"column":28}},"162":{"start":{"line":434,"column":4},"end":{"line":450,"column":7}},"163":{"start":{"line":452,"column":4},"end":{"line":452,"column":43}},"164":{"start":{"line":455,"column":2},"end":{"line":494,"column":3}},"165":{"start":{"line":456,"column":4},"end":{"line":456,"column":29}},"166":{"start":{"line":457,"column":4},"end":{"line":459,"column":5}},"167":{"start":{"line":458,"column":6},"end":{"line":458,"column":47}},"168":{"start":{"line":461,"column":4},"end":{"line":467,"column":30}},"169":{"start":{"line":469,"column":4},"end":{"line":474,"column":5}},"170":{"start":{"line":470,"column":6},"end":{"line":472,"column":9}},"171":{"start":{"line":473,"column":6},"end":{"line":473,"column":28}},"172":{"start":{"line":476,"column":4},"end":{"line":492,"column":7}},"173":{"start":{"line":493,"column":4},"end":{"line":493,"column":45}},"174":{"start":{"line":496,"column":2},"end":{"line":530,"column":3}},"175":{"start":{"line":498,"column":4},"end":{"line":528,"column":7}},"176":{"start":{"line":499,"column":6},"end":{"line":501,"column":7}},"177":{"start":{"line":500,"column":8},"end":{"line":500,"column":25}},"178":{"start":{"line":502,"column":6},"end":{"line":502,"column":22}},"179":{"start":{"line":504,"column":6},"end":{"line":506,"column":7}},"180":{"start":{"line":505,"column":8},"end":{"line":505,"column":49}},"181":{"start":{"line":508,"column":6},"end":{"line":511,"column":33}},"182":{"start":{"line":512,"column":6},"end":{"line":517,"column":7}},"183":{"start":{"line":513,"column":8},"end":{"line":515,"column":11}},"184":{"start":{"line":516,"column":8},"end":{"line":516,"column":30}},"185":{"start":{"line":519,"column":6},"end":{"line":519,"column":31}},"186":{"start":{"line":520,"column":6},"end":{"line":520,"column":33}},"187":{"start":{"line":521,"column":6},"end":{"line":526,"column":9}},"188":{"start":{"line":522,"column":8},"end":{"line":524,"column":9}},"189":{"start":{"line":523,"column":10},"end":{"line":523,"column":27}},"190":{"start":{"line":525,"column":8},"end":{"line":525,"column":23}},"191":{"start":{"line":532,"column":2},"end":{"line":607,"column":3}},"192":{"start":{"line":533,"column":4},"end":{"line":606,"column":7}},"193":{"start":{"line":534,"column":6},"end":{"line":536,"column":7}},"194":{"start":{"line":535,"column":8},"end":{"line":535,"column":25}},"195":{"start":{"line":537,"column":6},"end":{"line":605,"column":7}},"196":{"start":{"line":540,"column":8},"end":{"line":602,"column":11}},"197":{"start":{"line":543,"column":10},"end":{"line":545,"column":11}},"198":{"start":{"line":544,"column":12},"end":{"line":544,"column":29}},"199":{"start":{"line":546,"column":10},"end":{"line":546,"column":54}},"200":{"start":{"line":547,"column":10},"end":{"line":555,"column":11}},"201":{"start":{"line":548,"column":12},"end":{"line":548,"column":53}},"202":{"start":{"line":549,"column":12},"end":{"line":554,"column":15}},"203":{"start":{"line":550,"column":14},"end":{"line":552,"column":15}},"204":{"start":{"line":551,"column":16},"end":{"line":551,"column":33}},"205":{"start":{"line":553,"column":14},"end":{"line":553,"column":29}},"206":{"start":{"line":557,"column":10},"end":{"line":601,"column":13}},"207":{"start":{"line":560,"column":12},"end":{"line":562,"column":13}},"208":{"start":{"line":561,"column":14},"end":{"line":561,"column":31}},"209":{"start":{"line":565,"column":12},"end":{"line":600,"column":13}},"210":{"start":{"line":572,"column":14},"end":{"line":578,"column":17}},"211":{"start":{"line":580,"column":14},"end":{"line":593,"column":16}},"212":{"start":{"line":595,"column":14},"end":{"line":599,"column":17}},"213":{"start":{"line":596,"column":16},"end":{"line":598,"column":17}},"214":{"start":{"line":597,"column":18},"end":{"line":597,"column":29}},"215":{"start":{"line":604,"column":8},"end":{"line":604,"column":25}}},"branchMap":{"1":{"line":47,"type":"if","locations":[{"start":{"line":47,"column":6},"end":{"line":47,"column":6}},{"start":{"line":47,"column":6},"end":{"line":47,"column":6}}]},"2":{"line":52,"type":"cond-expr","locations":[{"start":{"line":52,"column":45},"end":{"line":52,"column":48}},{"start":{"line":52,"column":51},"end":{"line":52,"column":65}}]},"3":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":4},"end":{"line":101,"column":4}},{"start":{"line":101,"column":4},"end":{"line":101,"column":4}}]},"4":{"line":111,"type":"binary-expr","locations":[{"start":{"line":111,"column":16},"end":{"line":111,"column":26}},{"start":{"line":111,"column":30},"end":{"line":111,"column":32}}]},"5":{"line":112,"type":"binary-expr","locations":[{"start":{"line":112,"column":16},"end":{"line":112,"column":26}},{"start":{"line":112,"column":30},"end":{"line":112,"column":32}}]},"6":{"line":113,"type":"binary-expr","locations":[{"start":{"line":113,"column":22},"end":{"line":113,"column":38}},{"start":{"line":113,"column":42},"end":{"line":113,"column":44}}]},"7":{"line":131,"type":"if","locations":[{"start":{"line":131,"column":6},"end":{"line":131,"column":6}},{"start":{"line":131,"column":6},"end":{"line":131,"column":6}}]},"8":{"line":136,"type":"if","locations":[{"start":{"line":136,"column":6},"end":{"line":136,"column":6}},{"start":{"line":136,"column":6},"end":{"line":136,"column":6}}]},"9":{"line":149,"type":"if","locations":[{"start":{"line":149,"column":6},"end":{"line":149,"column":6}},{"start":{"line":149,"column":6},"end":{"line":149,"column":6}}]},"10":{"line":158,"type":"if","locations":[{"start":{"line":158,"column":8},"end":{"line":158,"column":8}},{"start":{"line":158,"column":8},"end":{"line":158,"column":8}}]},"11":{"line":168,"type":"binary-expr","locations":[{"start":{"line":168,"column":34},"end":{"line":168,"column":52}},{"start":{"line":168,"column":56},"end":{"line":168,"column":58}}]},"12":{"line":186,"type":"if","locations":[{"start":{"line":186,"column":6},"end":{"line":186,"column":6}},{"start":{"line":186,"column":6},"end":{"line":186,"column":6}}]},"13":{"line":191,"type":"cond-expr","locations":[{"start":{"line":191,"column":37},"end":{"line":191,"column":62}},{"start":{"line":191,"column":65},"end":{"line":191,"column":67}}]},"14":{"line":215,"type":"if","locations":[{"start":{"line":215,"column":8},"end":{"line":215,"column":8}},{"start":{"line":215,"column":8},"end":{"line":215,"column":8}}]},"15":{"line":218,"type":"if","locations":[{"start":{"line":218,"column":8},"end":{"line":218,"column":8}},{"start":{"line":218,"column":8},"end":{"line":218,"column":8}}]},"16":{"line":218,"type":"binary-expr","locations":[{"start":{"line":218,"column":12},"end":{"line":218,"column":26}},{"start":{"line":218,"column":30},"end":{"line":218,"column":48}}]},"17":{"line":229,"type":"if","locations":[{"start":{"line":229,"column":6},"end":{"line":229,"column":6}},{"start":{"line":229,"column":6},"end":{"line":229,"column":6}}]},"18":{"line":249,"type":"if","locations":[{"start":{"line":249,"column":10},"end":{"line":249,"column":10}},{"start":{"line":249,"column":10},"end":{"line":249,"column":10}}]},"19":{"line":251,"type":"binary-expr","locations":[{"start":{"line":251,"column":39},"end":{"line":251,"column":49}},{"start":{"line":251,"column":53},"end":{"line":251,"column":54}}]},"20":{"line":254,"type":"if","locations":[{"start":{"line":254,"column":14},"end":{"line":254,"column":14}},{"start":{"line":254,"column":14},"end":{"line":254,"column":14}}]},"21":{"line":256,"type":"binary-expr","locations":[{"start":{"line":256,"column":45},"end":{"line":256,"column":55}},{"start":{"line":256,"column":59},"end":{"line":256,"column":60}}]},"22":{"line":257,"type":"if","locations":[{"start":{"line":257,"column":12},"end":{"line":257,"column":12}},{"start":{"line":257,"column":12},"end":{"line":257,"column":12}}]},"23":{"line":272,"type":"if","locations":[{"start":{"line":272,"column":8},"end":{"line":272,"column":8}},{"start":{"line":272,"column":8},"end":{"line":272,"column":8}}]},"24":{"line":281,"type":"if","locations":[{"start":{"line":281,"column":4},"end":{"line":281,"column":4}},{"start":{"line":281,"column":4},"end":{"line":281,"column":4}}]},"25":{"line":289,"type":"if","locations":[{"start":{"line":289,"column":4},"end":{"line":289,"column":4}},{"start":{"line":289,"column":4},"end":{"line":289,"column":4}}]},"26":{"line":299,"type":"if","locations":[{"start":{"line":299,"column":4},"end":{"line":299,"column":4}},{"start":{"line":299,"column":4},"end":{"line":299,"column":4}}]},"27":{"line":305,"type":"if","locations":[{"start":{"line":305,"column":8},"end":{"line":305,"column":8}},{"start":{"line":305,"column":8},"end":{"line":305,"column":8}}]},"28":{"line":308,"type":"if","locations":[{"start":{"line":308,"column":8},"end":{"line":308,"column":8}},{"start":{"line":308,"column":8},"end":{"line":308,"column":8}}]},"29":{"line":322,"type":"if","locations":[{"start":{"line":322,"column":6},"end":{"line":322,"column":6}},{"start":{"line":322,"column":6},"end":{"line":322,"column":6}}]},"30":{"line":344,"type":"if","locations":[{"start":{"line":344,"column":4},"end":{"line":344,"column":4}},{"start":{"line":344,"column":4},"end":{"line":344,"column":4}}]},"31":{"line":355,"type":"if","locations":[{"start":{"line":355,"column":4},"end":{"line":355,"column":4}},{"start":{"line":355,"column":4},"end":{"line":355,"column":4}}]},"32":{"line":362,"type":"if","locations":[{"start":{"line":362,"column":6},"end":{"line":362,"column":6}},{"start":{"line":362,"column":6},"end":{"line":362,"column":6}}]},"33":{"line":367,"type":"cond-expr","locations":[{"start":{"line":367,"column":39},"end":{"line":367,"column":48}},{"start":{"line":367,"column":51},"end":{"line":367,"column":79}}]},"34":{"line":370,"type":"if","locations":[{"start":{"line":370,"column":6},"end":{"line":370,"column":6}},{"start":{"line":370,"column":6},"end":{"line":370,"column":6}}]},"35":{"line":402,"type":"if","locations":[{"start":{"line":402,"column":8},"end":{"line":402,"column":8}},{"start":{"line":402,"column":8},"end":{"line":402,"column":8}}]},"36":{"line":405,"type":"binary-expr","locations":[{"start":{"line":405,"column":41},"end":{"line":405,"column":51}},{"start":{"line":405,"column":55},"end":{"line":405,"column":56}}]},"37":{"line":407,"type":"if","locations":[{"start":{"line":407,"column":10},"end":{"line":407,"column":10}},{"start":{"line":407,"column":10},"end":{"line":407,"column":10}}]},"38":{"line":420,"type":"if","locations":[{"start":{"line":420,"column":4},"end":{"line":420,"column":4}},{"start":{"line":420,"column":4},"end":{"line":420,"column":4}}]},"39":{"line":428,"type":"if","locations":[{"start":{"line":428,"column":4},"end":{"line":428,"column":4}},{"start":{"line":428,"column":4},"end":{"line":428,"column":4}}]},"40":{"line":457,"type":"if","locations":[{"start":{"line":457,"column":4},"end":{"line":457,"column":4}},{"start":{"line":457,"column":4},"end":{"line":457,"column":4}}]},"41":{"line":469,"type":"if","locations":[{"start":{"line":469,"column":4},"end":{"line":469,"column":4}},{"start":{"line":469,"column":4},"end":{"line":469,"column":4}}]},"42":{"line":499,"type":"if","locations":[{"start":{"line":499,"column":6},"end":{"line":499,"column":6}},{"start":{"line":499,"column":6},"end":{"line":499,"column":6}}]},"43":{"line":504,"type":"if","locations":[{"start":{"line":504,"column":6},"end":{"line":504,"column":6}},{"start":{"line":504,"column":6},"end":{"line":504,"column":6}}]},"44":{"line":504,"type":"binary-expr","locations":[{"start":{"line":504,"column":10},"end":{"line":504,"column":19}},{"start":{"line":504,"column":23},"end":{"line":504,"column":56}}]},"45":{"line":512,"type":"if","locations":[{"start":{"line":512,"column":6},"end":{"line":512,"column":6}},{"start":{"line":512,"column":6},"end":{"line":512,"column":6}}]},"46":{"line":522,"type":"if","locations":[{"start":{"line":522,"column":8},"end":{"line":522,"column":8}},{"start":{"line":522,"column":8},"end":{"line":522,"column":8}}]},"47":{"line":534,"type":"if","locations":[{"start":{"line":534,"column":6},"end":{"line":534,"column":6}},{"start":{"line":534,"column":6},"end":{"line":534,"column":6}}]},"48":{"line":543,"type":"if","locations":[{"start":{"line":543,"column":10},"end":{"line":543,"column":10}},{"start":{"line":543,"column":10},"end":{"line":543,"column":10}}]},"49":{"line":547,"type":"if","locations":[{"start":{"line":547,"column":10},"end":{"line":547,"column":10}},{"start":{"line":547,"column":10},"end":{"line":547,"column":10}}]},"50":{"line":550,"type":"if","locations":[{"start":{"line":550,"column":14},"end":{"line":550,"column":14}},{"start":{"line":550,"column":14},"end":{"line":550,"column":14}}]},"51":{"line":560,"type":"if","locations":[{"start":{"line":560,"column":12},"end":{"line":560,"column":12}},{"start":{"line":560,"column":12},"end":{"line":560,"column":12}}]},"52":{"line":565,"type":"if","locations":[{"start":{"line":565,"column":12},"end":{"line":565,"column":12}},{"start":{"line":565,"column":12},"end":{"line":565,"column":12}}]},"53":{"line":566,"type":"binary-expr","locations":[{"start":{"line":566,"column":14},"end":{"line":566,"column":48}},{"start":{"line":567,"column":14},"end":{"line":567,"column":31}},{"start":{"line":568,"column":14},"end":{"line":568,"column":46}},{"start":{"line":569,"column":14},"end":{"line":569,"column":29}},{"start":{"line":570,"column":15},"end":{"line":570,"column":52}}]},"54":{"line":596,"type":"if","locations":[{"start":{"line":596,"column":16},"end":{"line":596,"column":16}},{"start":{"line":596,"column":16},"end":{"line":596,"column":16}}]}}},"/Users/nathanleniz/Developer/freecodecamp/server/boot/user.js":{"path":"/Users/nathanleniz/Developer/freecodecamp/server/boot/user.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":0,"9":1,"10":0,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":0,"29":0,"30":0,"31":1,"32":0,"33":0,"34":1,"35":0,"36":0,"37":0,"38":1,"39":0,"40":0,"41":0,"42":1,"43":0,"44":1,"45":0,"46":1,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":1,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":1,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":1,"161":0,"162":0,"163":0,"164":0,"165":0,"166":0,"167":1,"168":0,"169":0,"170":0,"171":0,"172":0,"173":0,"174":0,"175":0,"176":0,"177":0,"178":0,"179":0,"180":1,"181":0,"182":0,"183":0,"184":0,"185":0,"186":0,"187":0,"188":0,"189":0,"190":1,"191":0,"192":0,"193":0,"194":0,"195":0,"196":0,"197":0,"198":0,"199":0,"200":0,"201":0,"202":0,"203":0,"204":0,"205":0,"206":0,"207":0,"208":0,"209":0,"210":0,"211":0,"212":0,"213":0,"214":0,"215":0,"216":0,"217":0,"218":0,"219":0,"220":1,"221":0,"222":0,"223":0,"224":1,"225":0,"226":0,"227":0,"228":0,"229":0,"230":0,"231":0,"232":0,"233":0,"234":0,"235":0,"236":0,"237":0,"238":0,"239":0,"240":0,"241":0,"242":0,"243":0,"244":0,"245":0,"246":0,"247":0,"248":0,"249":0,"250":0,"251":0,"252":0,"253":0,"254":0,"255":0,"256":0,"257":1,"258":0,"259":0,"260":0,"261":0,"262":0,"263":0,"264":0,"265":0,"266":0,"267":0,"268":0,"269":0,"270":0,"271":1,"272":0,"273":0,"274":0,"275":0,"276":0,"277":0,"278":0,"279":0,"280":0,"281":0,"282":0,"283":0,"284":0,"285":0,"286":0,"287":0,"288":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0],"52":[0,0],"53":[0,0],"54":[0,0],"55":[0,0],"56":[0,0],"57":[0,0],"58":[0,0],"59":[0,0],"60":[0,0],"61":[0,0],"62":[0,0],"63":[0,0],"64":[0,0],"65":[0,0],"66":[0,0],"67":[0,0],"68":[0,0],"69":[0,0],"70":[0,0],"71":[0,0],"72":[0,0],"73":[0,0],"74":[0,0],"75":[0,0]},"f":{"1":1,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0},"fnMap":{"1":{"name":"(anonymous_1)","line":11,"loc":{"start":{"line":11,"column":17},"end":{"line":11,"column":31}}},"2":{"name":"(anonymous_2)","line":17,"loc":{"start":{"line":17,"column":23},"end":{"line":17,"column":42}}},"3":{"name":"(anonymous_3)","line":20,"loc":{"start":{"line":20,"column":24},"end":{"line":20,"column":43}}},"4":{"name":"getSignin","line":47,"loc":{"start":{"line":47,"column":2},"end":{"line":47,"column":32}}},"5":{"name":"signout","line":61,"loc":{"start":{"line":61,"column":2},"end":{"line":61,"column":30}}},"6":{"name":"getEmailSignin","line":71,"loc":{"start":{"line":71,"column":2},"end":{"line":71,"column":37}}},"7":{"name":"getEmailSignup","line":85,"loc":{"start":{"line":85,"column":2},"end":{"line":85,"column":37}}},"8":{"name":"getAccount","line":99,"loc":{"start":{"line":99,"column":2},"end":{"line":99,"column":33}}},"9":{"name":"getAccountAngular","line":109,"loc":{"start":{"line":109,"column":2},"end":{"line":109,"column":40}}},"10":{"name":"returnUser","line":121,"loc":{"start":{"line":121,"column":2},"end":{"line":121,"column":39}}},"11":{"name":"(anonymous_11)","line":124,"loc":{"start":{"line":124,"column":6},"end":{"line":124,"column":26}}},"12":{"name":"(anonymous_12)","line":131,"loc":{"start":{"line":131,"column":41},"end":{"line":131,"column":56}}},"13":{"name":"(anonymous_13)","line":136,"loc":{"start":{"line":136,"column":20},"end":{"line":136,"column":35}}},"14":{"name":"(anonymous_14)","line":187,"loc":{"start":{"line":187,"column":20},"end":{"line":187,"column":34}}},"15":{"name":"(anonymous_15)","line":194,"loc":{"start":{"line":194,"column":39},"end":{"line":194,"column":59}}},"16":{"name":"(anonymous_16)","line":200,"loc":{"start":{"line":200,"column":61},"end":{"line":200,"column":78}}},"17":{"name":"(anonymous_17)","line":227,"loc":{"start":{"line":227,"column":56},"end":{"line":227,"column":76}}},"18":{"name":"postUpdateProfile","line":254,"loc":{"start":{"line":254,"column":2},"end":{"line":254,"column":46}}},"19":{"name":"(anonymous_19)","line":256,"loc":{"start":{"line":256,"column":31},"end":{"line":256,"column":45}}},"20":{"name":"(anonymous_20)","line":266,"loc":{"start":{"line":266,"column":9},"end":{"line":266,"column":38}}},"21":{"name":"(anonymous_21)","line":279,"loc":{"start":{"line":279,"column":10},"end":{"line":279,"column":42}}},"22":{"name":"(anonymous_22)","line":323,"loc":{"start":{"line":323,"column":22},"end":{"line":323,"column":37}}},"23":{"name":"(anonymous_23)","line":331,"loc":{"start":{"line":331,"column":16},"end":{"line":331,"column":30}}},"24":{"name":"postUpdatePassword","line":351,"loc":{"start":{"line":351,"column":2},"end":{"line":351,"column":47}}},"25":{"name":"(anonymous_25)","line":365,"loc":{"start":{"line":365,"column":31},"end":{"line":365,"column":51}}},"26":{"name":"(anonymous_26)","line":370,"loc":{"start":{"line":370,"column":16},"end":{"line":370,"column":30}}},"27":{"name":"postDeleteAccount","line":384,"loc":{"start":{"line":384,"column":2},"end":{"line":384,"column":46}}},"28":{"name":"(anonymous_28)","line":385,"loc":{"start":{"line":385,"column":34},"end":{"line":385,"column":48}}},"29":{"name":"getOauthUnlink","line":398,"loc":{"start":{"line":398,"column":2},"end":{"line":398,"column":43}}},"30":{"name":"(anonymous_30)","line":400,"loc":{"start":{"line":400,"column":31},"end":{"line":400,"column":51}}},"31":{"name":"(anonymous_31)","line":405,"loc":{"start":{"line":405,"column":30},"end":{"line":405,"column":46}}},"32":{"name":"(anonymous_32)","line":409,"loc":{"start":{"line":409,"column":16},"end":{"line":409,"column":30}}},"33":{"name":"getReset","line":422,"loc":{"start":{"line":422,"column":2},"end":{"line":422,"column":37}}},"34":{"name":"(anonymous_34)","line":433,"loc":{"start":{"line":433,"column":6},"end":{"line":433,"column":26}}},"35":{"name":"postReset","line":453,"loc":{"start":{"line":453,"column":2},"end":{"line":453,"column":38}}},"36":{"name":"(anonymous_36)","line":462,"loc":{"start":{"line":462,"column":6},"end":{"line":462,"column":21}}},"37":{"name":"(anonymous_37)","line":470,"loc":{"start":{"line":470,"column":10},"end":{"line":470,"column":30}}},"38":{"name":"(anonymous_38)","line":483,"loc":{"start":{"line":483,"column":22},"end":{"line":483,"column":36}}},"39":{"name":"(anonymous_39)","line":485,"loc":{"start":{"line":485,"column":30},"end":{"line":485,"column":44}}},"40":{"name":"(anonymous_40)","line":491,"loc":{"start":{"line":491,"column":6},"end":{"line":491,"column":27}}},"41":{"name":"(anonymous_41)","line":512,"loc":{"start":{"line":512,"column":42},"end":{"line":512,"column":56}}},"42":{"name":"(anonymous_42)","line":520,"loc":{"start":{"line":520,"column":7},"end":{"line":520,"column":21}}},"43":{"name":"getForgot","line":531,"loc":{"start":{"line":531,"column":2},"end":{"line":531,"column":32}}},"44":{"name":"postForgot","line":545,"loc":{"start":{"line":545,"column":2},"end":{"line":545,"column":39}}},"45":{"name":"(anonymous_45)","line":554,"loc":{"start":{"line":554,"column":6},"end":{"line":554,"column":21}}},"46":{"name":"(anonymous_46)","line":555,"loc":{"start":{"line":555,"column":31},"end":{"line":555,"column":50}}},"47":{"name":"(anonymous_47)","line":561,"loc":{"start":{"line":561,"column":6},"end":{"line":561,"column":28}}},"48":{"name":"(anonymous_48)","line":564,"loc":{"start":{"line":564,"column":11},"end":{"line":564,"column":31}}},"49":{"name":"(anonymous_49)","line":577,"loc":{"start":{"line":577,"column":20},"end":{"line":577,"column":34}}},"50":{"name":"(anonymous_50)","line":583,"loc":{"start":{"line":583,"column":6},"end":{"line":583,"column":34}}},"51":{"name":"(anonymous_51)","line":609,"loc":{"start":{"line":609,"column":42},"end":{"line":609,"column":56}}},"52":{"name":"(anonymous_52)","line":619,"loc":{"start":{"line":619,"column":7},"end":{"line":619,"column":21}}},"53":{"name":"updateUserStoryPictures","line":625,"loc":{"start":{"line":625,"column":2},"end":{"line":625,"column":66}}},"54":{"name":"(anonymous_54)","line":631,"loc":{"start":{"line":631,"column":44},"end":{"line":631,"column":68}}},"55":{"name":"(anonymous_55)","line":640,"loc":{"start":{"line":640,"column":46},"end":{"line":640,"column":71}}},"56":{"name":"saveStoriesAndComments","line":649,"loc":{"start":{"line":649,"column":4},"end":{"line":649,"column":38}}},"57":{"name":"(anonymous_57)","line":654,"loc":{"start":{"line":654,"column":16},"end":{"line":654,"column":35}}},"58":{"name":"(anonymous_58)","line":657,"loc":{"start":{"line":657,"column":19},"end":{"line":657,"column":33}}},"59":{"name":"(anonymous_59)","line":662,"loc":{"start":{"line":662,"column":16},"end":{"line":662,"column":33}}},"60":{"name":"(anonymous_60)","line":665,"loc":{"start":{"line":665,"column":19},"end":{"line":665,"column":33}}},"61":{"name":"(anonymous_61)","line":669,"loc":{"start":{"line":669,"column":28},"end":{"line":669,"column":43}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":9,"column":44}},"2":{"start":{"line":11,"column":0},"end":{"line":677,"column":2}},"3":{"start":{"line":12,"column":2},"end":{"line":12,"column":37}},"4":{"start":{"line":13,"column":2},"end":{"line":13,"column":29}},"5":{"start":{"line":14,"column":2},"end":{"line":14,"column":31}},"6":{"start":{"line":15,"column":2},"end":{"line":15,"column":35}},"7":{"start":{"line":17,"column":2},"end":{"line":19,"column":5}},"8":{"start":{"line":18,"column":4},"end":{"line":18,"column":33}},"9":{"start":{"line":20,"column":2},"end":{"line":22,"column":5}},"10":{"start":{"line":21,"column":4},"end":{"line":21,"column":34}},"11":{"start":{"line":23,"column":2},"end":{"line":23,"column":35}},"12":{"start":{"line":24,"column":2},"end":{"line":24,"column":34}},"13":{"start":{"line":25,"column":2},"end":{"line":25,"column":35}},"14":{"start":{"line":26,"column":2},"end":{"line":26,"column":37}},"15":{"start":{"line":27,"column":2},"end":{"line":27,"column":40}},"16":{"start":{"line":28,"column":2},"end":{"line":28,"column":42}},"17":{"start":{"line":29,"column":2},"end":{"line":29,"column":46}},"18":{"start":{"line":30,"column":2},"end":{"line":30,"column":46}},"19":{"start":{"line":31,"column":2},"end":{"line":31,"column":48}},"20":{"start":{"line":32,"column":2},"end":{"line":32,"column":53}},"21":{"start":{"line":33,"column":2},"end":{"line":33,"column":55}},"22":{"start":{"line":34,"column":2},"end":{"line":34,"column":52}},"23":{"start":{"line":35,"column":2},"end":{"line":35,"column":58}},"24":{"start":{"line":36,"column":2},"end":{"line":36,"column":37}},"25":{"start":{"line":38,"column":2},"end":{"line":38,"column":39}},"26":{"start":{"line":40,"column":2},"end":{"line":40,"column":18}},"27":{"start":{"line":47,"column":2},"end":{"line":54,"column":3}},"28":{"start":{"line":48,"column":4},"end":{"line":50,"column":5}},"29":{"start":{"line":49,"column":6},"end":{"line":49,"column":31}},"30":{"start":{"line":51,"column":4},"end":{"line":53,"column":7}},"31":{"start":{"line":61,"column":2},"end":{"line":64,"column":3}},"32":{"start":{"line":62,"column":4},"end":{"line":62,"column":17}},"33":{"start":{"line":63,"column":4},"end":{"line":63,"column":22}},"34":{"start":{"line":71,"column":2},"end":{"line":78,"column":3}},"35":{"start":{"line":72,"column":4},"end":{"line":74,"column":5}},"36":{"start":{"line":73,"column":6},"end":{"line":73,"column":31}},"37":{"start":{"line":75,"column":4},"end":{"line":77,"column":7}},"38":{"start":{"line":85,"column":2},"end":{"line":92,"column":3}},"39":{"start":{"line":86,"column":4},"end":{"line":88,"column":5}},"40":{"start":{"line":87,"column":6},"end":{"line":87,"column":31}},"41":{"start":{"line":89,"column":4},"end":{"line":91,"column":7}},"42":{"start":{"line":99,"column":2},"end":{"line":103,"column":3}},"43":{"start":{"line":100,"column":4},"end":{"line":102,"column":7}},"44":{"start":{"line":109,"column":2},"end":{"line":113,"column":3}},"45":{"start":{"line":110,"column":4},"end":{"line":112,"column":7}},"46":{"start":{"line":121,"column":2},"end":{"line":247,"column":3}},"47":{"start":{"line":122,"column":4},"end":{"line":246,"column":6}},"48":{"start":{"line":125,"column":8},"end":{"line":128,"column":9}},"49":{"start":{"line":126,"column":10},"end":{"line":126,"column":39}},"50":{"start":{"line":127,"column":10},"end":{"line":127,"column":27}},"51":{"start":{"line":129,"column":8},"end":{"line":244,"column":9}},"52":{"start":{"line":130,"column":10},"end":{"line":133,"column":15}},"53":{"start":{"line":132,"column":14},"end":{"line":132,"column":27}},"54":{"start":{"line":135,"column":10},"end":{"line":135,"column":47}},"55":{"start":{"line":136,"column":10},"end":{"line":138,"column":38}},"56":{"start":{"line":137,"column":12},"end":{"line":137,"column":65}},"57":{"start":{"line":140,"column":10},"end":{"line":140,"column":29}},"58":{"start":{"line":141,"column":10},"end":{"line":141,"column":44}},"59":{"start":{"line":143,"column":10},"end":{"line":143,"column":33}},"60":{"start":{"line":144,"column":10},"end":{"line":154,"column":11}},"61":{"start":{"line":145,"column":12},"end":{"line":153,"column":13}},"62":{"start":{"line":147,"column":14},"end":{"line":147,"column":27}},"63":{"start":{"line":148,"column":14},"end":{"line":150,"column":15}},"64":{"start":{"line":149,"column":16},"end":{"line":149,"column":48}},"65":{"start":{"line":152,"column":14},"end":{"line":152,"column":29}},"66":{"start":{"line":156,"column":10},"end":{"line":156,"column":40}},"67":{"start":{"line":157,"column":10},"end":{"line":157,"column":25}},"68":{"start":{"line":159,"column":10},"end":{"line":159,"column":33}},"69":{"start":{"line":160,"column":10},"end":{"line":160,"column":62}},"70":{"start":{"line":162,"column":10},"end":{"line":185,"column":11}},"71":{"start":{"line":167,"column":12},"end":{"line":182,"column":13}},"72":{"start":{"line":169,"column":14},"end":{"line":181,"column":15}},"73":{"start":{"line":174,"column":16},"end":{"line":174,"column":29}},"74":{"start":{"line":176,"column":16},"end":{"line":178,"column":17}},"75":{"start":{"line":177,"column":18},"end":{"line":177,"column":50}},"76":{"start":{"line":180,"column":16},"end":{"line":180,"column":22}},"77":{"start":{"line":184,"column":12},"end":{"line":184,"column":35}},"78":{"start":{"line":187,"column":10},"end":{"line":237,"column":13}},"79":{"start":{"line":188,"column":12},"end":{"line":190,"column":13}},"80":{"start":{"line":189,"column":14},"end":{"line":189,"column":31}},"81":{"start":{"line":192,"column":12},"end":{"line":192,"column":26}},"82":{"start":{"line":193,"column":12},"end":{"line":193,"column":61}},"83":{"start":{"line":194,"column":12},"end":{"line":196,"column":15}},"84":{"start":{"line":195,"column":14},"end":{"line":195,"column":43}},"85":{"start":{"line":198,"column":12},"end":{"line":198,"column":57}},"86":{"start":{"line":199,"column":12},"end":{"line":199,"column":57}},"87":{"start":{"line":200,"column":12},"end":{"line":202,"column":15}},"88":{"start":{"line":201,"column":14},"end":{"line":201,"column":72}},"89":{"start":{"line":204,"column":12},"end":{"line":236,"column":15}},"90":{"start":{"line":228,"column":16},"end":{"line":228,"column":53}},"91":{"start":{"line":239,"column":10},"end":{"line":242,"column":13}},"92":{"start":{"line":243,"column":10},"end":{"line":243,"column":35}},"93":{"start":{"line":254,"column":2},"end":{"line":344,"column":3}},"94":{"start":{"line":256,"column":4},"end":{"line":343,"column":7}},"95":{"start":{"line":257,"column":6},"end":{"line":257,"column":36}},"96":{"start":{"line":257,"column":17},"end":{"line":257,"column":34}},"97":{"start":{"line":258,"column":6},"end":{"line":258,"column":42}},"98":{"start":{"line":259,"column":6},"end":{"line":262,"column":7}},"99":{"start":{"line":260,"column":8},"end":{"line":260,"column":36}},"100":{"start":{"line":261,"column":8},"end":{"line":261,"column":40}},"101":{"start":{"line":264,"column":6},"end":{"line":342,"column":9}},"102":{"start":{"line":267,"column":8},"end":{"line":269,"column":9}},"103":{"start":{"line":268,"column":10},"end":{"line":268,"column":27}},"104":{"start":{"line":270,"column":8},"end":{"line":270,"column":28}},"105":{"start":{"line":271,"column":8},"end":{"line":276,"column":9}},"106":{"start":{"line":272,"column":10},"end":{"line":274,"column":13}},"107":{"start":{"line":275,"column":10},"end":{"line":275,"column":42}},"108":{"start":{"line":277,"column":8},"end":{"line":341,"column":10}},"109":{"start":{"line":280,"column":12},"end":{"line":282,"column":13}},"110":{"start":{"line":281,"column":14},"end":{"line":281,"column":31}},"111":{"start":{"line":283,"column":12},"end":{"line":283,"column":32}},"112":{"start":{"line":284,"column":12},"end":{"line":292,"column":13}},"113":{"start":{"line":288,"column":14},"end":{"line":290,"column":17}},"114":{"start":{"line":291,"column":14},"end":{"line":291,"column":46}},"115":{"start":{"line":293,"column":12},"end":{"line":293,"column":38}},"116":{"start":{"line":294,"column":12},"end":{"line":294,"column":49}},"117":{"start":{"line":295,"column":12},"end":{"line":295,"column":47}},"118":{"start":{"line":296,"column":12},"end":{"line":296,"column":55}},"119":{"start":{"line":297,"column":12},"end":{"line":297,"column":55}},"120":{"start":{"line":299,"column":12},"end":{"line":299,"column":65}},"121":{"start":{"line":300,"column":12},"end":{"line":300,"column":69}},"122":{"start":{"line":301,"column":12},"end":{"line":301,"column":69}},"123":{"start":{"line":303,"column":12},"end":{"line":303,"column":67}},"124":{"start":{"line":304,"column":12},"end":{"line":304,"column":65}},"125":{"start":{"line":305,"column":12},"end":{"line":305,"column":45}},"126":{"start":{"line":307,"column":12},"end":{"line":309,"column":45}},"127":{"start":{"line":310,"column":12},"end":{"line":310,"column":65}},"128":{"start":{"line":311,"column":12},"end":{"line":311,"column":63}},"129":{"start":{"line":312,"column":12},"end":{"line":312,"column":65}},"130":{"start":{"line":314,"column":12},"end":{"line":314,"column":65}},"131":{"start":{"line":315,"column":12},"end":{"line":315,"column":63}},"132":{"start":{"line":316,"column":12},"end":{"line":316,"column":65}},"133":{"start":{"line":318,"column":12},"end":{"line":318,"column":65}},"134":{"start":{"line":319,"column":12},"end":{"line":319,"column":63}},"135":{"start":{"line":320,"column":12},"end":{"line":320,"column":65}},"136":{"start":{"line":323,"column":12},"end":{"line":339,"column":15}},"137":{"start":{"line":324,"column":14},"end":{"line":326,"column":15}},"138":{"start":{"line":325,"column":16},"end":{"line":325,"column":33}},"139":{"start":{"line":327,"column":14},"end":{"line":338,"column":16}},"140":{"start":{"line":332,"column":18},"end":{"line":332,"column":48}},"141":{"start":{"line":332,"column":29},"end":{"line":332,"column":46}},"142":{"start":{"line":333,"column":18},"end":{"line":335,"column":21}},"143":{"start":{"line":336,"column":18},"end":{"line":336,"column":43}},"144":{"start":{"line":351,"column":2},"end":{"line":377,"column":3}},"145":{"start":{"line":352,"column":4},"end":{"line":353,"column":14}},"146":{"start":{"line":355,"column":4},"end":{"line":356,"column":33}},"147":{"start":{"line":358,"column":4},"end":{"line":358,"column":40}},"148":{"start":{"line":360,"column":4},"end":{"line":363,"column":5}},"149":{"start":{"line":361,"column":6},"end":{"line":361,"column":34}},"150":{"start":{"line":362,"column":6},"end":{"line":362,"column":38}},"151":{"start":{"line":365,"column":4},"end":{"line":376,"column":7}},"152":{"start":{"line":366,"column":6},"end":{"line":366,"column":36}},"153":{"start":{"line":366,"column":17},"end":{"line":366,"column":34}},"154":{"start":{"line":368,"column":6},"end":{"line":368,"column":40}},"155":{"start":{"line":370,"column":6},"end":{"line":375,"column":9}},"156":{"start":{"line":371,"column":8},"end":{"line":371,"column":38}},"157":{"start":{"line":371,"column":19},"end":{"line":371,"column":36}},"158":{"start":{"line":373,"column":8},"end":{"line":373,"column":68}},"159":{"start":{"line":374,"column":8},"end":{"line":374,"column":33}},"160":{"start":{"line":384,"column":2},"end":{"line":391,"column":3}},"161":{"start":{"line":385,"column":4},"end":{"line":390,"column":7}},"162":{"start":{"line":386,"column":6},"end":{"line":386,"column":36}},"163":{"start":{"line":386,"column":17},"end":{"line":386,"column":34}},"164":{"start":{"line":387,"column":6},"end":{"line":387,"column":19}},"165":{"start":{"line":388,"column":6},"end":{"line":388,"column":67}},"166":{"start":{"line":389,"column":6},"end":{"line":389,"column":24}},"167":{"start":{"line":398,"column":2},"end":{"line":415,"column":3}},"168":{"start":{"line":399,"column":4},"end":{"line":399,"column":39}},"169":{"start":{"line":400,"column":4},"end":{"line":414,"column":7}},"170":{"start":{"line":401,"column":6},"end":{"line":401,"column":36}},"171":{"start":{"line":401,"column":17},"end":{"line":401,"column":34}},"172":{"start":{"line":403,"column":6},"end":{"line":403,"column":28}},"173":{"start":{"line":404,"column":6},"end":{"line":407,"column":11}},"174":{"start":{"line":406,"column":10},"end":{"line":406,"column":41}},"175":{"start":{"line":409,"column":6},"end":{"line":413,"column":9}},"176":{"start":{"line":410,"column":8},"end":{"line":410,"column":38}},"177":{"start":{"line":410,"column":19},"end":{"line":410,"column":36}},"178":{"start":{"line":411,"column":8},"end":{"line":411,"column":77}},"179":{"start":{"line":412,"column":8},"end":{"line":412,"column":33}},"180":{"start":{"line":422,"column":2},"end":{"line":446,"column":3}},"181":{"start":{"line":423,"column":4},"end":{"line":425,"column":5}},"182":{"start":{"line":424,"column":6},"end":{"line":424,"column":31}},"183":{"start":{"line":426,"column":4},"end":{"line":445,"column":9}},"184":{"start":{"line":434,"column":8},"end":{"line":434,"column":38}},"185":{"start":{"line":434,"column":19},"end":{"line":434,"column":36}},"186":{"start":{"line":435,"column":8},"end":{"line":440,"column":9}},"187":{"start":{"line":436,"column":10},"end":{"line":438,"column":13}},"188":{"start":{"line":439,"column":10},"end":{"line":439,"column":41}},"189":{"start":{"line":441,"column":8},"end":{"line":444,"column":11}},"190":{"start":{"line":453,"column":2},"end":{"line":524,"column":3}},"191":{"start":{"line":454,"column":4},"end":{"line":454,"column":40}},"192":{"start":{"line":456,"column":4},"end":{"line":459,"column":5}},"193":{"start":{"line":457,"column":6},"end":{"line":457,"column":34}},"194":{"start":{"line":458,"column":6},"end":{"line":458,"column":34}},"195":{"start":{"line":461,"column":4},"end":{"line":523,"column":7}},"196":{"start":{"line":463,"column":8},"end":{"line":489,"column":13}},"197":{"start":{"line":471,"column":12},"end":{"line":471,"column":42}},"198":{"start":{"line":471,"column":23},"end":{"line":471,"column":40}},"199":{"start":{"line":472,"column":12},"end":{"line":477,"column":13}},"200":{"start":{"line":473,"column":14},"end":{"line":475,"column":17}},"201":{"start":{"line":476,"column":14},"end":{"line":476,"column":42}},"202":{"start":{"line":479,"column":12},"end":{"line":479,"column":46}},"203":{"start":{"line":480,"column":12},"end":{"line":480,"column":43}},"204":{"start":{"line":481,"column":12},"end":{"line":481,"column":45}},"205":{"start":{"line":483,"column":12},"end":{"line":488,"column":15}},"206":{"start":{"line":484,"column":14},"end":{"line":484,"column":44}},"207":{"start":{"line":484,"column":25},"end":{"line":484,"column":42}},"208":{"start":{"line":485,"column":14},"end":{"line":487,"column":17}},"209":{"start":{"line":486,"column":16},"end":{"line":486,"column":32}},"210":{"start":{"line":492,"column":8},"end":{"line":498,"column":11}},"211":{"start":{"line":499,"column":8},"end":{"line":511,"column":10}},"212":{"start":{"line":512,"column":8},"end":{"line":518,"column":11}},"213":{"start":{"line":513,"column":10},"end":{"line":513,"column":40}},"214":{"start":{"line":513,"column":21},"end":{"line":513,"column":38}},"215":{"start":{"line":514,"column":10},"end":{"line":516,"column":13}},"216":{"start":{"line":517,"column":10},"end":{"line":517,"column":17}},"217":{"start":{"line":521,"column":6},"end":{"line":521,"column":36}},"218":{"start":{"line":521,"column":17},"end":{"line":521,"column":34}},"219":{"start":{"line":522,"column":6},"end":{"line":522,"column":24}},"220":{"start":{"line":531,"column":2},"end":{"line":538,"column":3}},"221":{"start":{"line":532,"column":4},"end":{"line":534,"column":5}},"222":{"start":{"line":533,"column":6},"end":{"line":533,"column":31}},"223":{"start":{"line":535,"column":4},"end":{"line":537,"column":7}},"224":{"start":{"line":545,"column":2},"end":{"line":623,"column":3}},"225":{"start":{"line":546,"column":4},"end":{"line":546,"column":40}},"226":{"start":{"line":548,"column":4},"end":{"line":551,"column":5}},"227":{"start":{"line":549,"column":6},"end":{"line":549,"column":34}},"228":{"start":{"line":550,"column":6},"end":{"line":550,"column":37}},"229":{"start":{"line":553,"column":4},"end":{"line":622,"column":7}},"230":{"start":{"line":555,"column":8},"end":{"line":559,"column":11}},"231":{"start":{"line":556,"column":10},"end":{"line":556,"column":40}},"232":{"start":{"line":556,"column":21},"end":{"line":556,"column":38}},"233":{"start":{"line":557,"column":10},"end":{"line":557,"column":42}},"234":{"start":{"line":558,"column":10},"end":{"line":558,"column":28}},"235":{"start":{"line":562,"column":8},"end":{"line":581,"column":11}},"236":{"start":{"line":565,"column":10},"end":{"line":565,"column":40}},"237":{"start":{"line":565,"column":21},"end":{"line":565,"column":38}},"238":{"start":{"line":566,"column":10},"end":{"line":571,"column":11}},"239":{"start":{"line":567,"column":12},"end":{"line":569,"column":15}},"240":{"start":{"line":570,"column":12},"end":{"line":570,"column":43}},"241":{"start":{"line":573,"column":10},"end":{"line":573,"column":42}},"242":{"start":{"line":575,"column":10},"end":{"line":575,"column":59}},"243":{"start":{"line":577,"column":10},"end":{"line":580,"column":13}},"244":{"start":{"line":578,"column":12},"end":{"line":578,"column":42}},"245":{"start":{"line":578,"column":23},"end":{"line":578,"column":40}},"246":{"start":{"line":579,"column":12},"end":{"line":579,"column":36}},"247":{"start":{"line":584,"column":8},"end":{"line":590,"column":11}},"248":{"start":{"line":591,"column":8},"end":{"line":608,"column":10}},"249":{"start":{"line":609,"column":8},"end":{"line":617,"column":11}},"250":{"start":{"line":610,"column":10},"end":{"line":610,"column":40}},"251":{"start":{"line":610,"column":21},"end":{"line":610,"column":38}},"252":{"start":{"line":611,"column":10},"end":{"line":615,"column":13}},"253":{"start":{"line":616,"column":10},"end":{"line":616,"column":29}},"254":{"start":{"line":620,"column":6},"end":{"line":620,"column":36}},"255":{"start":{"line":620,"column":17},"end":{"line":620,"column":34}},"256":{"start":{"line":621,"column":6},"end":{"line":621,"column":30}},"257":{"start":{"line":625,"column":2},"end":{"line":676,"column":3}},"258":{"start":{"line":627,"column":4},"end":{"line":629,"column":20}},"259":{"start":{"line":631,"column":4},"end":{"line":638,"column":7}},"260":{"start":{"line":632,"column":6},"end":{"line":634,"column":7}},"261":{"start":{"line":633,"column":8},"end":{"line":633,"column":23}},"262":{"start":{"line":635,"column":6},"end":{"line":635,"column":29}},"263":{"start":{"line":636,"column":6},"end":{"line":636,"column":16}},"264":{"start":{"line":637,"column":6},"end":{"line":637,"column":31}},"265":{"start":{"line":640,"column":4},"end":{"line":647,"column":7}},"266":{"start":{"line":641,"column":6},"end":{"line":643,"column":7}},"267":{"start":{"line":642,"column":8},"end":{"line":642,"column":23}},"268":{"start":{"line":644,"column":6},"end":{"line":644,"column":31}},"269":{"start":{"line":645,"column":6},"end":{"line":645,"column":16}},"270":{"start":{"line":646,"column":6},"end":{"line":646,"column":31}},"271":{"start":{"line":649,"column":4},"end":{"line":675,"column":5}},"272":{"start":{"line":650,"column":6},"end":{"line":652,"column":7}},"273":{"start":{"line":651,"column":8},"end":{"line":651,"column":15}},"274":{"start":{"line":653,"column":6},"end":{"line":653,"column":21}},"275":{"start":{"line":654,"column":6},"end":{"line":660,"column":24}},"276":{"start":{"line":655,"column":8},"end":{"line":655,"column":41}},"277":{"start":{"line":656,"column":8},"end":{"line":656,"column":43}},"278":{"start":{"line":657,"column":8},"end":{"line":659,"column":11}},"279":{"start":{"line":658,"column":10},"end":{"line":658,"column":27}},"280":{"start":{"line":662,"column":6},"end":{"line":668,"column":23}},"281":{"start":{"line":663,"column":8},"end":{"line":663,"column":39}},"282":{"start":{"line":664,"column":8},"end":{"line":664,"column":41}},"283":{"start":{"line":665,"column":8},"end":{"line":667,"column":11}},"284":{"start":{"line":666,"column":10},"end":{"line":666,"column":25}},"285":{"start":{"line":669,"column":6},"end":{"line":674,"column":9}},"286":{"start":{"line":670,"column":8},"end":{"line":672,"column":9}},"287":{"start":{"line":671,"column":10},"end":{"line":671,"column":25}},"288":{"start":{"line":673,"column":8},"end":{"line":673,"column":13}}},"branchMap":{"1":{"line":48,"type":"if","locations":[{"start":{"line":48,"column":4},"end":{"line":48,"column":4}},{"start":{"line":48,"column":4},"end":{"line":48,"column":4}}]},"2":{"line":72,"type":"if","locations":[{"start":{"line":72,"column":4},"end":{"line":72,"column":4}},{"start":{"line":72,"column":4},"end":{"line":72,"column":4}}]},"3":{"line":86,"type":"if","locations":[{"start":{"line":86,"column":4},"end":{"line":86,"column":4}},{"start":{"line":86,"column":4},"end":{"line":86,"column":4}}]},"4":{"line":125,"type":"if","locations":[{"start":{"line":125,"column":8},"end":{"line":125,"column":8}},{"start":{"line":125,"column":8},"end":{"line":125,"column":8}}]},"5":{"line":129,"type":"if","locations":[{"start":{"line":129,"column":8},"end":{"line":129,"column":8}},{"start":{"line":129,"column":8},"end":{"line":129,"column":8}}]},"6":{"line":145,"type":"if","locations":[{"start":{"line":145,"column":12},"end":{"line":145,"column":12}},{"start":{"line":145,"column":12},"end":{"line":145,"column":12}}]},"7":{"line":148,"type":"if","locations":[{"start":{"line":148,"column":14},"end":{"line":148,"column":14}},{"start":{"line":148,"column":14},"end":{"line":148,"column":14}}]},"8":{"line":162,"type":"if","locations":[{"start":{"line":162,"column":10},"end":{"line":162,"column":10}},{"start":{"line":162,"column":10},"end":{"line":162,"column":10}}]},"9":{"line":163,"type":"binary-expr","locations":[{"start":{"line":163,"column":12},"end":{"line":163,"column":71}},{"start":{"line":164,"column":12},"end":{"line":165,"column":44}}]},"10":{"line":169,"type":"if","locations":[{"start":{"line":169,"column":14},"end":{"line":169,"column":14}},{"start":{"line":169,"column":14},"end":{"line":169,"column":14}}]},"11":{"line":176,"type":"if","locations":[{"start":{"line":176,"column":16},"end":{"line":176,"column":16}},{"start":{"line":176,"column":16},"end":{"line":176,"column":16}}]},"12":{"line":188,"type":"if","locations":[{"start":{"line":188,"column":12},"end":{"line":188,"column":12}},{"start":{"line":188,"column":12},"end":{"line":188,"column":12}}]},"13":{"line":198,"type":"binary-expr","locations":[{"start":{"line":198,"column":33},"end":{"line":198,"column":51}},{"start":{"line":198,"column":55},"end":{"line":198,"column":56}}]},"14":{"line":199,"type":"binary-expr","locations":[{"start":{"line":199,"column":33},"end":{"line":199,"column":51}},{"start":{"line":199,"column":55},"end":{"line":199,"column":56}}]},"15":{"line":201,"type":"binary-expr","locations":[{"start":{"line":201,"column":21},"end":{"line":201,"column":44}},{"start":{"line":201,"column":48},"end":{"line":201,"column":71}}]},"16":{"line":233,"type":"cond-expr","locations":[{"start":{"line":233,"column":44},"end":{"line":233,"column":50}},{"start":{"line":233,"column":53},"end":{"line":233,"column":60}}]},"17":{"line":235,"type":"cond-expr","locations":[{"start":{"line":235,"column":44},"end":{"line":235,"column":50}},{"start":{"line":235,"column":53},"end":{"line":235,"column":60}}]},"18":{"line":257,"type":"if","locations":[{"start":{"line":257,"column":6},"end":{"line":257,"column":6}},{"start":{"line":257,"column":6},"end":{"line":257,"column":6}}]},"19":{"line":259,"type":"if","locations":[{"start":{"line":259,"column":6},"end":{"line":259,"column":6}},{"start":{"line":259,"column":6},"end":{"line":259,"column":6}}]},"20":{"line":267,"type":"if","locations":[{"start":{"line":267,"column":8},"end":{"line":267,"column":8}},{"start":{"line":267,"column":8},"end":{"line":267,"column":8}}]},"21":{"line":271,"type":"if","locations":[{"start":{"line":271,"column":8},"end":{"line":271,"column":8}},{"start":{"line":271,"column":8},"end":{"line":271,"column":8}}]},"22":{"line":271,"type":"binary-expr","locations":[{"start":{"line":271,"column":12},"end":{"line":271,"column":25}},{"start":{"line":271,"column":29},"end":{"line":271,"column":63}}]},"23":{"line":280,"type":"if","locations":[{"start":{"line":280,"column":12},"end":{"line":280,"column":12}},{"start":{"line":280,"column":12},"end":{"line":280,"column":12}}]},"24":{"line":284,"type":"if","locations":[{"start":{"line":284,"column":12},"end":{"line":284,"column":12}},{"start":{"line":284,"column":12},"end":{"line":284,"column":12}}]},"25":{"line":285,"type":"binary-expr","locations":[{"start":{"line":285,"column":14},"end":{"line":285,"column":30}},{"start":{"line":286,"column":14},"end":{"line":286,"column":57}}]},"26":{"line":293,"type":"binary-expr","locations":[{"start":{"line":293,"column":23},"end":{"line":293,"column":31}},{"start":{"line":293,"column":35},"end":{"line":293,"column":37}}]},"27":{"line":294,"type":"binary-expr","locations":[{"start":{"line":294,"column":25},"end":{"line":294,"column":42}},{"start":{"line":294,"column":46},"end":{"line":294,"column":48}}]},"28":{"line":295,"type":"binary-expr","locations":[{"start":{"line":295,"column":24},"end":{"line":295,"column":40}},{"start":{"line":295,"column":44},"end":{"line":295,"column":46}}]},"29":{"line":296,"type":"binary-expr","locations":[{"start":{"line":296,"column":28},"end":{"line":296,"column":48}},{"start":{"line":296,"column":52},"end":{"line":296,"column":54}}]},"30":{"line":297,"type":"binary-expr","locations":[{"start":{"line":297,"column":28},"end":{"line":297,"column":48}},{"start":{"line":297,"column":52},"end":{"line":297,"column":54}}]},"31":{"line":299,"type":"binary-expr","locations":[{"start":{"line":299,"column":33},"end":{"line":299,"column":58}},{"start":{"line":299,"column":62},"end":{"line":299,"column":64}}]},"32":{"line":300,"type":"binary-expr","locations":[{"start":{"line":300,"column":35},"end":{"line":300,"column":62}},{"start":{"line":300,"column":66},"end":{"line":300,"column":68}}]},"33":{"line":301,"type":"binary-expr","locations":[{"start":{"line":301,"column":35},"end":{"line":301,"column":62}},{"start":{"line":301,"column":66},"end":{"line":301,"column":68}}]},"34":{"line":303,"type":"binary-expr","locations":[{"start":{"line":303,"column":34},"end":{"line":303,"column":60}},{"start":{"line":303,"column":64},"end":{"line":303,"column":66}}]},"35":{"line":304,"type":"binary-expr","locations":[{"start":{"line":304,"column":33},"end":{"line":304,"column":58}},{"start":{"line":304,"column":62},"end":{"line":304,"column":64}}]},"36":{"line":305,"type":"binary-expr","locations":[{"start":{"line":305,"column":23},"end":{"line":305,"column":38}},{"start":{"line":305,"column":42},"end":{"line":305,"column":44}}]},"37":{"line":307,"type":"binary-expr","locations":[{"start":{"line":307,"column":27},"end":{"line":307,"column":46}},{"start":{"line":308,"column":14},"end":{"line":309,"column":44}}]},"38":{"line":310,"type":"binary-expr","locations":[{"start":{"line":310,"column":33},"end":{"line":310,"column":58}},{"start":{"line":310,"column":62},"end":{"line":310,"column":64}}]},"39":{"line":311,"type":"binary-expr","locations":[{"start":{"line":311,"column":32},"end":{"line":311,"column":56}},{"start":{"line":311,"column":60},"end":{"line":311,"column":62}}]},"40":{"line":312,"type":"binary-expr","locations":[{"start":{"line":312,"column":33},"end":{"line":312,"column":58}},{"start":{"line":312,"column":62},"end":{"line":312,"column":64}}]},"41":{"line":314,"type":"binary-expr","locations":[{"start":{"line":314,"column":33},"end":{"line":314,"column":58}},{"start":{"line":314,"column":62},"end":{"line":314,"column":64}}]},"42":{"line":315,"type":"binary-expr","locations":[{"start":{"line":315,"column":32},"end":{"line":315,"column":56}},{"start":{"line":315,"column":60},"end":{"line":315,"column":62}}]},"43":{"line":316,"type":"binary-expr","locations":[{"start":{"line":316,"column":33},"end":{"line":316,"column":58}},{"start":{"line":316,"column":62},"end":{"line":316,"column":64}}]},"44":{"line":318,"type":"binary-expr","locations":[{"start":{"line":318,"column":33},"end":{"line":318,"column":58}},{"start":{"line":318,"column":62},"end":{"line":318,"column":64}}]},"45":{"line":319,"type":"binary-expr","locations":[{"start":{"line":319,"column":32},"end":{"line":319,"column":56}},{"start":{"line":319,"column":60},"end":{"line":319,"column":62}}]},"46":{"line":320,"type":"binary-expr","locations":[{"start":{"line":320,"column":33},"end":{"line":320,"column":58}},{"start":{"line":320,"column":62},"end":{"line":320,"column":64}}]},"47":{"line":324,"type":"if","locations":[{"start":{"line":324,"column":14},"end":{"line":324,"column":14}},{"start":{"line":324,"column":14},"end":{"line":324,"column":14}}]},"48":{"line":332,"type":"if","locations":[{"start":{"line":332,"column":18},"end":{"line":332,"column":18}},{"start":{"line":332,"column":18},"end":{"line":332,"column":18}}]},"49":{"line":360,"type":"if","locations":[{"start":{"line":360,"column":4},"end":{"line":360,"column":4}},{"start":{"line":360,"column":4},"end":{"line":360,"column":4}}]},"50":{"line":366,"type":"if","locations":[{"start":{"line":366,"column":6},"end":{"line":366,"column":6}},{"start":{"line":366,"column":6},"end":{"line":366,"column":6}}]},"51":{"line":371,"type":"if","locations":[{"start":{"line":371,"column":8},"end":{"line":371,"column":8}},{"start":{"line":371,"column":8},"end":{"line":371,"column":8}}]},"52":{"line":386,"type":"if","locations":[{"start":{"line":386,"column":6},"end":{"line":386,"column":6}},{"start":{"line":386,"column":6},"end":{"line":386,"column":6}}]},"53":{"line":401,"type":"if","locations":[{"start":{"line":401,"column":6},"end":{"line":401,"column":6}},{"start":{"line":401,"column":6},"end":{"line":401,"column":6}}]},"54":{"line":410,"type":"if","locations":[{"start":{"line":410,"column":8},"end":{"line":410,"column":8}},{"start":{"line":410,"column":8},"end":{"line":410,"column":8}}]},"55":{"line":423,"type":"if","locations":[{"start":{"line":423,"column":4},"end":{"line":423,"column":4}},{"start":{"line":423,"column":4},"end":{"line":423,"column":4}}]},"56":{"line":434,"type":"if","locations":[{"start":{"line":434,"column":8},"end":{"line":434,"column":8}},{"start":{"line":434,"column":8},"end":{"line":434,"column":8}}]},"57":{"line":435,"type":"if","locations":[{"start":{"line":435,"column":8},"end":{"line":435,"column":8}},{"start":{"line":435,"column":8},"end":{"line":435,"column":8}}]},"58":{"line":456,"type":"if","locations":[{"start":{"line":456,"column":4},"end":{"line":456,"column":4}},{"start":{"line":456,"column":4},"end":{"line":456,"column":4}}]},"59":{"line":471,"type":"if","locations":[{"start":{"line":471,"column":12},"end":{"line":471,"column":12}},{"start":{"line":471,"column":12},"end":{"line":471,"column":12}}]},"60":{"line":472,"type":"if","locations":[{"start":{"line":472,"column":12},"end":{"line":472,"column":12}},{"start":{"line":472,"column":12},"end":{"line":472,"column":12}}]},"61":{"line":484,"type":"if","locations":[{"start":{"line":484,"column":14},"end":{"line":484,"column":14}},{"start":{"line":484,"column":14},"end":{"line":484,"column":14}}]},"62":{"line":513,"type":"if","locations":[{"start":{"line":513,"column":10},"end":{"line":513,"column":10}},{"start":{"line":513,"column":10},"end":{"line":513,"column":10}}]},"63":{"line":521,"type":"if","locations":[{"start":{"line":521,"column":6},"end":{"line":521,"column":6}},{"start":{"line":521,"column":6},"end":{"line":521,"column":6}}]},"64":{"line":532,"type":"if","locations":[{"start":{"line":532,"column":4},"end":{"line":532,"column":4}},{"start":{"line":532,"column":4},"end":{"line":532,"column":4}}]},"65":{"line":548,"type":"if","locations":[{"start":{"line":548,"column":4},"end":{"line":548,"column":4}},{"start":{"line":548,"column":4},"end":{"line":548,"column":4}}]},"66":{"line":556,"type":"if","locations":[{"start":{"line":556,"column":10},"end":{"line":556,"column":10}},{"start":{"line":556,"column":10},"end":{"line":556,"column":10}}]},"67":{"line":565,"type":"if","locations":[{"start":{"line":565,"column":10},"end":{"line":565,"column":10}},{"start":{"line":565,"column":10},"end":{"line":565,"column":10}}]},"68":{"line":566,"type":"if","locations":[{"start":{"line":566,"column":10},"end":{"line":566,"column":10}},{"start":{"line":566,"column":10},"end":{"line":566,"column":10}}]},"69":{"line":578,"type":"if","locations":[{"start":{"line":578,"column":12},"end":{"line":578,"column":12}},{"start":{"line":578,"column":12},"end":{"line":578,"column":12}}]},"70":{"line":610,"type":"if","locations":[{"start":{"line":610,"column":10},"end":{"line":610,"column":10}},{"start":{"line":610,"column":10},"end":{"line":610,"column":10}}]},"71":{"line":620,"type":"if","locations":[{"start":{"line":620,"column":6},"end":{"line":620,"column":6}},{"start":{"line":620,"column":6},"end":{"line":620,"column":6}}]},"72":{"line":632,"type":"if","locations":[{"start":{"line":632,"column":6},"end":{"line":632,"column":6}},{"start":{"line":632,"column":6},"end":{"line":632,"column":6}}]},"73":{"line":641,"type":"if","locations":[{"start":{"line":641,"column":6},"end":{"line":641,"column":6}},{"start":{"line":641,"column":6},"end":{"line":641,"column":6}}]},"74":{"line":650,"type":"if","locations":[{"start":{"line":650,"column":6},"end":{"line":650,"column":6}},{"start":{"line":650,"column":6},"end":{"line":650,"column":6}}]},"75":{"line":670,"type":"if","locations":[{"start":{"line":670,"column":8},"end":{"line":670,"column":8}},{"start":{"line":670,"column":8},"end":{"line":670,"column":8}}]}}}} \ No newline at end of file diff --git a/coverage/lcov-report/base.css b/coverage/lcov-report/base.css new file mode 100644 index 00000000000000..a9d483746fd6b8 --- /dev/null +++ b/coverage/lcov-report/base.css @@ -0,0 +1,182 @@ +body, html { + margin:0; padding: 0; +} +body { + font-family: Helvetica Neue, Helvetica,Arial; + font-size: 10pt; +} +div.header, div.footer { + background: #eee; + padding: 1em; +} +div.header { + z-index: 100; + position: fixed; + top: 0; + border-bottom: 1px solid #666; + width: 100%; +} +div.footer { + border-top: 1px solid #666; +} +div.body { + margin-top: 10em; +} +div.meta { + font-size: 90%; + text-align: center; +} +h1, h2, h3 { + font-weight: normal; +} +h1 { + font-size: 12pt; +} +h2 { + font-size: 10pt; +} +pre { + font-family: Consolas, Menlo, Monaco, monospace; + margin: 0; + padding: 0; + line-height: 14px; + font-size: 14px; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} + +div.path { font-size: 110%; } +div.path a:link, div.path a:visited { color: #000; } +table.coverage { border-collapse: collapse; margin:0; padding: 0 } + +table.coverage td { + margin: 0; + padding: 0; + color: #111; + vertical-align: top; +} +table.coverage td.line-count { + width: 50px; + text-align: right; + padding-right: 5px; +} +table.coverage td.line-coverage { + color: #777 !important; + text-align: right; + border-left: 1px solid #666; + border-right: 1px solid #666; +} + +table.coverage td.text { +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 40px; +} +table.coverage td span.cline-neutral { + background: #eee; +} +table.coverage td span.cline-yes { + background: #b5d592; + color: #999; +} +table.coverage td span.cline-no { + background: #fc8c84; +} + +.cstat-yes { color: #111; } +.cstat-no { background: #fc8c84; color: #111; } +.fstat-no { background: #ffc520; color: #111 !important; } +.cbranch-no { background: yellow !important; color: #111; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + +.missing-if-branch { + display: inline-block; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: black; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} + +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} + +.entity, .metric { font-weight: bold; } +.metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; } +.metric small { font-size: 80%; font-weight: normal; color: #666; } + +div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; } +div.coverage-summary td, div.coverage-summary table th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; } +div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; } +div.coverage-summary th.file { border-right: none !important; } +div.coverage-summary th.pic { border-left: none !important; text-align: right; } +div.coverage-summary th.pct { border-right: none !important; } +div.coverage-summary th.abs { border-left: none !important; text-align: right; } +div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; } +div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; } +div.coverage-summary td.file { border-left: 1px solid #666; white-space: nowrap; } +div.coverage-summary td.pic { min-width: 120px !important; } +div.coverage-summary a:link { text-decoration: none; color: #000; } +div.coverage-summary a:visited { text-decoration: none; color: #777; } +div.coverage-summary a:hover { text-decoration: underline; } +div.coverage-summary tfoot td { border-top: 1px solid #666; } + +div.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +div.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +div.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} + +.high { background: #b5d592 !important; } +.medium { background: #ffe87c !important; } +.low { background: #fc8c84 !important; } + +span.cover-fill, span.cover-empty { + display:inline-block; + border:1px solid #444; + background: white; + height: 12px; +} +span.cover-fill { + background: #ccc; + border-right: 1px solid #444; +} +span.cover-empty { + background: white; + border-left: none; +} +span.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } diff --git a/coverage/lcov-report/common/config.global.js.html b/coverage/lcov-report/common/config.global.js.html new file mode 100644 index 00000000000000..039520a962600c --- /dev/null +++ b/coverage/lcov-report/common/config.global.js.html @@ -0,0 +1,66 @@ + + + + Code coverage report for common/config.global.js + + + + + + +
+

Code coverage report for common/config.global.js

+

+ Statements: 100% (2 / 2)      + Branches: 100% (0 / 0)      + Functions: 100% (0 / 0)      + Lines: 100% (2 / 2)      + Ignored: none      +

+
All files » common/ » config.global.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8  +1 +  +  +  +  +1 + 
// The path where to mount the REST API app
+exports.restApiRoot = '/api';
+//
+// The URL where the browser client can access the REST API is available
+// Replace with a full url (including hostname) if your client is being
+// served from a different server than your REST API.
+exports.restApiUrl = exports.restApiRoot;
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/common/index.html b/coverage/lcov-report/common/index.html new file mode 100644 index 00000000000000..29410fa7255d00 --- /dev/null +++ b/coverage/lcov-report/common/index.html @@ -0,0 +1,73 @@ + + + + Code coverage report for common/ + + + + + + +
+

Code coverage report for common/

+

+ Statements: 100% (2 / 2)      + Branches: 100% (0 / 0)      + Functions: 100% (0 / 0)      + Lines: 100% (2 / 2)      + Ignored: none      +

+
All files » common/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
config.global.js100%(2 / 2)100%(0 / 0)100%(0 / 0)100%(2 / 2)
+
+
+ + + + + + diff --git a/coverage/lcov-report/common/models/User-Identity.js.html b/coverage/lcov-report/common/models/User-Identity.js.html new file mode 100644 index 00000000000000..91163c36d7f6d0 --- /dev/null +++ b/coverage/lcov-report/common/models/User-Identity.js.html @@ -0,0 +1,162 @@ + + + + Code coverage report for common/models/User-Identity.js + + + + + + +
+

Code coverage report for common/models/User-Identity.js

+

+ Statements: 16.67% (4 / 24)      + Branches: 0% (0 / 19)      + Functions: 25% (1 / 4)      + Lines: 18.18% (4 / 22)      + Ignored: none      +

+
All files » common/models/ » User-Identity.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +401 +  +1 +  +  +1 +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
var debug = require('debug')('freecc:models:userIdent');
+ 
+var defaultProfileImage =
+  require('../utils/constantStrings.json').defaultProfileImage;
+ 
+module.exports = function(UserIdent) {
+ UserIdent.observe('before save', function(ctx, next) {
+  var userIdent = ctx.currentInstance || ctx.instance;
+  if (!userIdent) {
+    debug('no user identity instance found');
+    return next();
+  }
+  userIdent.user(function(err, user) {
+    if (err) { return next(err); }
+    if (!user) {
+      debug('no user attached to identity!');
+      return next();
+    }
+ 
+    var picture = userIdent.profile && userIdent.profile[0] ?
+      userIdent.profile[0].value :
+      null;
+ 
+    // check if user has picture
+    //  set user.picture from twitter
+    if (picture && !user.picture || user.picture === defaultProfileImage) {
+      debug('use has no pic');
+      user.picture = userIdent.profile.photos[0].value;
+      user.save(function(err) {
+        if (err) { return next(err); }
+        next();
+      });
+    } else {
+      debug('exiting after user ident');
+      next();
+    }
+  });
+ });
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/common/models/index.html b/coverage/lcov-report/common/models/index.html new file mode 100644 index 00000000000000..6c31414a6592b4 --- /dev/null +++ b/coverage/lcov-report/common/models/index.html @@ -0,0 +1,86 @@ + + + + Code coverage report for common/models/ + + + + + + +
+

Code coverage report for common/models/

+

+ Statements: 16.67% (15 / 90)      + Branches: 0% (0 / 51)      + Functions: 12.5% (2 / 16)      + Lines: 17.44% (15 / 86)      + Ignored: none      +

+
All files » common/models/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
User-Identity.js16.67%(4 / 24)0%(0 / 19)25%(1 / 4)18.18%(4 / 22)
user.js16.67%(11 / 66)0%(0 / 32)8.33%(1 / 12)17.19%(11 / 64)
+
+
+ + + + + + diff --git a/coverage/lcov-report/common/models/user.js.html b/coverage/lcov-report/common/models/user.js.html new file mode 100644 index 00000000000000..d6d7715e60bd6c --- /dev/null +++ b/coverage/lcov-report/common/models/user.js.html @@ -0,0 +1,552 @@ + + + + Code coverage report for common/models/user.js + + + + + + +
+

Code coverage report for common/models/user.js

+

+ Statements: 16.67% (11 / 66)      + Branches: 0% (0 / 32)      + Functions: 8.33% (1 / 12)      + Lines: 17.19% (11 / 64)      + Ignored: none      +

+
All files » common/models/ » user.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +1701 +1 +  +  +1 +  +  +  +  +1 +1 +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
var debug = require('debug')('freecc:user:remote');
+var blacklistedUsernames =
+  require('../../server/utils/constants').blacklistedUsernames;
+ 
+module.exports = function(User) {
+  // NOTE(berks): user email validation currently not needed but build in. This
+  // work around should let us sneak by
+  // see:
+  // https://github.com/strongloop/loopback/issues/1137#issuecomment-109200135
+  delete User.validations.email;
+  debug('setting up user hooks');
+  // send verification email to new camper
+  User.afterRemote('create', function(ctx, user, next) {
+    debug('user created, sending email');
+    if (!user.email) { return next(); }
+ 
+    var mailOptions = {
+      type: 'email',
+      to: user.email,
+      from: 'Team@freecodecamp.com',
+      subject: 'Welcome to Free Code Camp!',
+      redirect: '/',
+      text: [
+        'Greetings from San Francisco!\n\n',
+        'Thank you for joining our community.\n',
+        'Feel free to email us at this address if you have ',
+        'any questions about Free Code Camp.\n',
+        'And if you have a moment, check out our blog: ',
+        'blog.freecodecamp.com.\n',
+        'Good luck with the challenges!\n\n',
+        '- the Free Code Camp Volunteer Team'
+      ].join('')
+    };
+    user.verify(mailOptions, function(err) {
+      if (err) { return next(err); }
+      debug('verification email sent');
+      ctx.req.flash('success', {
+        msg: [
+          'Please check your email and click on the verification link '
+          + 'before logging in.'
+        ]
+      });
+      ctx.res.redirect('/');
+    });
+  });
+ 
+  User.afterRemote('confirm', function(ctx) {
+    ctx.req.flash('success', {
+      msg: [
+        'You\'re email has been confirmed!'
+      ]
+    });
+    ctx.res.redirect('/email-signin');
+  });
+ 
+  User.afterRemote('login', function(ctx, instance, next) {
+    var res = ctx.res;
+    var req = ctx.req;
+ 
+    User.findOne({where: {email: ctx.args.credentials.email}},
+      function(err, response) {
+        if (err) {
+          return next(err);
+        }
+        if (response.emailVerified !== true) {
+          return res.redirect('/');
+        }
+        User.login({
+          email: ctx.args.credentials.email,
+          password: ctx.args.credentials.password,
+          ttl: Infinity
+        }, function(err, accessToken) {
+          if (err) {
+            req.flash('errors', {
+              msg: [
+                'Invalid username or password.'
+              ]
+            });
+            return res.redirect('/');
+          }
+          var config = {
+            signed: !!req.signedCookies,
+            maxAge: accessToken.ttl
+          };
+          if (accessToken && accessToken.id) {
+            res.cookie('access_token', accessToken.id, config);
+            res.cookie('userId', accessToken.userId, config);
+          }
+          req.logIn(response, function(err) {
+            if (err) {
+              return next(err);
+            }
+            req.flash('success', { msg: 'Success! You are logged in.' });
+            return res.redirect('/');
+          });
+        });
+      });
+    return res.redirect('/');
+  });
+ 
+  User.afterRemote('logout', function(ctx, result, next) {
+    var res = ctx.result;
+    res.clearCookie('access_token');
+    res.clearCookie('userId');
+    next();
+  });
+ 
+  User.doesExist = function doesExist(username, email, cb) {
+    if (!username && !email) {
+      return process.nextTick(function() {
+        cb(null, false);
+      });
+    }
+    debug('checking existence');
+ 
+    // check to see if username is on blacklist
+    if (username && blacklistedUsernames.indexOf(username) !== -1) {
+      return cb(null, true);
+    }
+ 
+    var where = {};
+    if (username) {
+      where.username = username.toLowerCase();
+    } else {
+      where.email = email ? email.toLowerCase() : email;
+    }
+    debug('where', where);
+    User.count(
+      where,
+      function (err, count) {
+        if (err) {
+          debug('err checking existance: ', err);
+          return cb(err);
+        }
+        if (count > 0) {
+          return cb(null, true);
+        }
+        return cb(null, false);
+      }
+    );
+  };
+ 
+  User.remoteMethod(
+    'doesExist',
+    {
+      description: 'checks whether a user exists using email or username',
+      accepts: [
+        {
+          arg: 'username',
+          type: 'string'
+        },
+        {
+          arg: 'email',
+          type: 'string'
+        }
+      ],
+      returns: [
+        {
+          arg: 'exists',
+          type: 'boolean'
+        }
+      ],
+      http: {
+        path: '/exists',
+        verb: 'get'
+      }
+    }
+  );
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/config/index.html b/coverage/lcov-report/config/index.html new file mode 100644 index 00000000000000..c663612d56b12d --- /dev/null +++ b/coverage/lcov-report/config/index.html @@ -0,0 +1,73 @@ + + + + Code coverage report for config/ + + + + + + +
+

Code coverage report for config/

+

+ Statements: 100% (1 / 1)      + Branches: 100% (2 / 2)      + Functions: 100% (0 / 0)      + Lines: 100% (1 / 1)      + Ignored: none      +

+
All files » config/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
secrets.js100%(1 / 1)100%(2 / 2)100%(0 / 0)100%(1 / 1)
+
+
+ + + + + + diff --git a/coverage/lcov-report/config/secrets.js.html b/coverage/lcov-report/config/secrets.js.html new file mode 100644 index 00000000000000..ed89fa4275846d --- /dev/null +++ b/coverage/lcov-report/config/secrets.js.html @@ -0,0 +1,240 @@ + + + + Code coverage report for config/secrets.js + + + + + + +
+

Code coverage report for config/secrets.js

+

+ Statements: 100% (1 / 1)      + Branches: 100% (2 / 2)      + Functions: 100% (0 / 0)      + Lines: 100% (1 / 1)      + Ignored: none      +

+
All files » config/ » secrets.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +661 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
module.exports = {
+ 
+  db: process.env.MONGODB || process.env.MONGOHQ_URL,
+ 
+  sessionSecret: process.env.SESSION_SECRET,
+ 
+  trello: {
+    key: process.env.TRELLO_KEY,
+    secret: process.env.TRELLO_SECRET
+  },
+ 
+  blogger: {
+    key: process.env.BLOGGER_KEY
+  },
+ 
+  slack: {
+    key: process.env.SLACK_KEY
+  },
+ 
+  mandrill: {
+    user: process.env.MANDRILL_USER,
+    password: process.env.MANDRILL_PASSWORD
+  },
+ 
+  facebook: {
+    clientID: process.env.FACEBOOK_ID,
+    clientSecret: process.env.FACEBOOK_SECRET,
+    callbackURL: '/auth/facebook/callback',
+    passReqToCallback: true
+  },
+ 
+  github: {
+    clientID: process.env.GITHUB_ID,
+    clientSecret: process.env.GITHUB_SECRET,
+    callbackURL: '/auth/github/callback',
+    passReqToCallback: true
+  },
+ 
+  twitter: {
+    consumerKey: process.env.TWITTER_KEY,
+    consumerSecret: process.env.TWITTER_SECRET,
+    token: process.env.TWITTER_TOKEN,
+    tokenSecret: process.env.TWITTER_TOKEN_SECRET,
+    callbackURL: '/auth/twitter/callback',
+    passReqToCallback: true
+  },
+ 
+  google: {
+    clientID: process.env.GOOGLE_ID,
+    clientSecret: process.env.GOOGLE_SECRET,
+    callbackURL: '/auth/google/callback',
+    passReqToCallback: true
+  },
+ 
+  linkedin: {
+    clientID: process.env.LINKEDIN_ID,
+    clientSecret: process.env.LINKEDIN_SECRET,
+    callbackURL: '/auth/linkedin/callback',
+    scope: ['r_basicprofile', 'r_emailaddress'],
+    passReqToCallback: true
+  },
+  slackHook: process.env.SLACK_WEBHOOK,
+ 
+  cookieSecret: process.env.COOKIE_SECRET
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/index.html b/coverage/lcov-report/index.html new file mode 100644 index 00000000000000..c00db20fb105ae --- /dev/null +++ b/coverage/lcov-report/index.html @@ -0,0 +1,151 @@ + + + + Code coverage report for All files + + + + + + +
+

Code coverage report for All files

+

+ Statements: 24.15% (326 / 1350)      + Branches: 1.78% (11 / 619)      + Functions: 9.62% (28 / 291)      + Lines: 24.9% (326 / 1309)      + Ignored: none      +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
common/100%(2 / 2)100%(0 / 0)100%(0 / 0)100%(2 / 2)
common/models/16.67%(15 / 90)0%(0 / 51)12.5%(2 / 16)17.44%(15 / 86)
config/100%(1 / 1)100%(2 / 2)100%(0 / 0)100%(1 / 1)
seed/100%(2 / 2)100%(0 / 0)100%(0 / 0)100%(2 / 2)
server/56.7%(55 / 97)16.13%(5 / 31)20%(2 / 10)56.7%(55 / 97)
server/boot/20.49%(218 / 1064)0.2%(1 / 503)6.03%(14 / 232)21.23%(218 / 1027)
server/utils/35.11%(33 / 94)9.38%(3 / 32)30.3%(10 / 33)35.11%(33 / 94)
+
+
+ + + + + + diff --git a/coverage/lcov-report/prettify.css b/coverage/lcov-report/prettify.css new file mode 100644 index 00000000000000..b317a7cda31a44 --- /dev/null +++ b/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/coverage/lcov-report/prettify.js b/coverage/lcov-report/prettify.js new file mode 100644 index 00000000000000..ef51e03866898f --- /dev/null +++ b/coverage/lcov-report/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/coverage/lcov-report/seed/bonfireMDNlinks.js.html b/coverage/lcov-report/seed/bonfireMDNlinks.js.html new file mode 100644 index 00000000000000..2eca2053b43892 --- /dev/null +++ b/coverage/lcov-report/seed/bonfireMDNlinks.js.html @@ -0,0 +1,318 @@ + + + + Code coverage report for seed/bonfireMDNlinks.js + + + + + + +
+

Code coverage report for seed/bonfireMDNlinks.js

+

+ Statements: 100% (2 / 2)      + Branches: 100% (0 / 0)      + Functions: 100% (0 / 0)      + Lines: 100% (2 / 2)      + Ignored: none      +

+
All files » seed/ » bonfireMDNlinks.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 + 
// MDN Links
+ 
+/* These links are for Bonfires. Each key/value pair is used to render a Bonfire with appropriate links.
+ 
+ 
+	The text of the key is what the link text will be, e.g. <a href="https://developer ...">Global Array Object</a>
+	General convention is to use the page title of the MDN reference page.
+*/
+var links =
+	{
+  // ========= NON MDN REFS
+  "Currying": "https://leanpub.com/javascript-allonge/read#pabc",
+  "Smallest Common Multiple": "https://www.mathsisfun.com/least-common-multiple.html",
+  "Permutations": "https://www.mathsisfun.com/combinatorics/combinations-permutations.html",
+ 
+	// ========= GLOBAL OBJECTS
+	"Global Array Object" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
+	"Global Object" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
+	"Global String Object" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
+	"Boolean Objects" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
+	"RegExp" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp",
+	"Global Function Object": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
+	"Arguments object" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments",
+  "Closures": "https://developer.mozilla.org/en-US/docs/" +
+  "Web/JavaScript/Closures",
+ 
+	// ========= GLOBAL OBJECT METHODS
+	"parseInt()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt",
+ 
+ 
+	// =========  PROPERTIES/MISC
+	"String.length" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length",
+ 
+ 
+	// ========== OBJECT METHODS
+	"Object.getOwnPropertyNames()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames",
+	"Object.keys()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys",
+	"Object.hasOwnProperty()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty",
+ 
+ 
+	// ======== STRING METHODS
+	"String.charAt()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt",
+	"String.charCodeAt()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt",
+	"String.concat()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat",
+	"String.indexOf()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf",
+	"String.fromCharCode()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode",
+	"String.lastIndexOf()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf",
+	"String.match()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match",
+	"String.replace()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace",
+	"String.slice()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice",
+	"String.split()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split",
+	"String.substring()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring",
+	"String.substr()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr",
+	"String.toLowerCase()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase",
+	"String.toString()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toString",
+	"String.toUpperCase()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase",
+	// ======== ARRAY METHODS
+	"Array.concat()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat",
+	"Array.every()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every",
+	"Array.filter()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter",
+	"Array.forEach()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach",
+	"Array.indexOf()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf",
+	"Array.isArray()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray",
+	"Array.join()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join",
+	"Array.lastIndexOf()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf",
+	"Array.map()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map",
+	"Array.pop()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop",
+	"Array.push()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push",
+	"Array.reduce()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce",
+	"Array.reverse()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse",
+	"Array.shift()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift",
+	"Array.slice()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice",
+	"Array.some()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some",
+	"Array.sort()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort",
+	"Array.splice()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice",
+	"Array.toString()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString",
+ 
+	// ======== MATH METHODS
+	"Math.max()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max",
+	"Math.min()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min",
+	"Math.pow()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow",
+	"Remainder" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Remainder_(.25)",
+ 
+	// ======== GENERAL JAVASCRIPT REFERENCES
+	"Arithmetic Operators" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators",
+	"Comparison Operators" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators",
+	"Details of the Object Model" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model",
+  "For Loops": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for"
+	};
+ 
+module.exports = links;
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/seed/index.html b/coverage/lcov-report/seed/index.html new file mode 100644 index 00000000000000..d787ab8525bc57 --- /dev/null +++ b/coverage/lcov-report/seed/index.html @@ -0,0 +1,73 @@ + + + + Code coverage report for seed/ + + + + + + +
+

Code coverage report for seed/

+

+ Statements: 100% (2 / 2)      + Branches: 100% (0 / 0)      + Functions: 100% (0 / 0)      + Lines: 100% (2 / 2)      + Ignored: none      +

+
All files » seed/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
bonfireMDNlinks.js100%(2 / 2)100%(0 / 0)100%(0 / 0)100%(2 / 2)
+
+
+ + + + + + diff --git a/coverage/lcov-report/server/boot/a-extendUser.js.html b/coverage/lcov-report/server/boot/a-extendUser.js.html new file mode 100644 index 00000000000000..2cae1c60aae8ce --- /dev/null +++ b/coverage/lcov-report/server/boot/a-extendUser.js.html @@ -0,0 +1,165 @@ + + + + Code coverage report for server/boot/a-extendUser.js + + + + + + +
+

Code coverage report for server/boot/a-extendUser.js

+

+ Statements: 34.78% (8 / 23)      + Branches: 0% (0 / 8)      + Functions: 14.29% (1 / 7)      + Lines: 36.36% (8 / 22)      + Ignored: none      +

+
All files » server/boot/ » a-extendUser.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +411 +1 +  +1 +  +  +  +  +  +  +  +  +  +1 +1 +1 +1 +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
var Rx = require('rx');
+var debug = require('debug')('freecc:user:remote');
+ 
+function destroyById(id, Model) {
+  return Rx.Observable.create(function(observer) {
+    Model.destroyById(id, function(err) {
+      if (err) { return observer.onError(err); }
+      observer.onCompleted();
+    });
+    return Rx.Disposable(Rx.helpers.noop);
+  });
+}
+ 
+module.exports = function(app) {
+  var User = app.models.User;
+  var UserIdentity = app.models.UserIdentity;
+  var UserCredential = app.models.UserCredential;
+  User.observe('after delete', function(ctx, next) {
+    debug('removing user', ctx.where);
+    var id = ctx.where && ctx.where.id ? ctx.where.id : null;
+    if (!id) {
+      return next();
+    }
+    Rx.Observable.combineLatest(
+      destroyById(id, UserIdentity),
+      destroyById(id, UserCredential),
+      Rx.helpers.noop
+    ).subscribe(
+      Rx.helpers.noop,
+      function(err) {
+        debug('error deleting user %s stuff', id, err);
+        next(err);
+      },
+      function() {
+        debug('user stuff deleted for user %s', id);
+        next();
+      }
+    );
+  });
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/boot/authentication.js.html b/coverage/lcov-report/server/boot/authentication.js.html new file mode 100644 index 00000000000000..388c5e7634cf77 --- /dev/null +++ b/coverage/lcov-report/server/boot/authentication.js.html @@ -0,0 +1,57 @@ + + + + Code coverage report for server/boot/authentication.js + + + + + + +
+

Code coverage report for server/boot/authentication.js

+

+ Statements: 100% (2 / 2)      + Branches: 100% (0 / 0)      + Functions: 100% (1 / 1)      + Lines: 100% (2 / 2)      + Ignored: none      +

+
All files » server/boot/ » authentication.js
+
+
+

+
+
1 +2 +3 +4 +51 +  +1 +  + 
module.exports = function enableAuthentication(app) {
+  // enable authentication
+  app.enableAuth();
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/boot/challenge.js.html b/coverage/lcov-report/server/boot/challenge.js.html new file mode 100644 index 00000000000000..cf453e0c67667d --- /dev/null +++ b/coverage/lcov-report/server/boot/challenge.js.html @@ -0,0 +1,1761 @@ + + + + Code coverage report for server/boot/challenge.js + + + + + + +
+

Code coverage report for server/boot/challenge.js

+

+ Statements: 10.71% (21 / 196)      + Branches: 0% (0 / 118)      + Functions: 2.78% (1 / 36)      + Lines: 11.05% (21 / 190)      + Ignored: none      +

+
All files » server/boot/ » challenge.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +1 +1 +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +1 +1 +1 +  +1 +  +  +  +  +  +1 +  +  +  +  +  +1 +1 +1 +1 +  +1 +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
/**
+ * Created by nathanleniz on 5/15/15.
+ * Copyright (c) 2015, Free Code Camp
+ All rights reserved.
+ 
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ 
+ 1. Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+ 
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+ 
+ 3. Neither the name of the copyright holder nor the names of its contributors
+  may be used to endorse or promote products derived from this software
+  without specific prior written permission.
+ 
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ 
+var R = require('ramda'),
+    utils = require('../utils'),
+    userMigration = require('../utils/middleware').userMigration,
+    MDNlinks = require('../../seed/bonfireMDNlinks');
+ 
+var challengeMapWithNames = utils.getChallengeMapWithNames();
+var challengeMapWithIds = utils.getChallengeMapWithIds();
+ 
+ 
+function getMDNlinks(links) {
+  // takes in an array of links, which are strings
+  var populatedLinks = [];
+ 
+  // for each key value, push the corresponding link
+  // from the MDNlinks object into a new array
+  if (links) {
+    links.forEach(function (value) {
+      populatedLinks.push(MDNlinks[value]);
+    });
+  }
+  return populatedLinks;
+}
+ 
+module.exports = function(app) {
+  var router = app.loopback.Router();
+  var Challenge = app.models.Challenge;
+  var User = app.models.User;
+ 
+  router.get(
+    '/challenges/next-challenge',
+    userMigration,
+    returnNextChallenge
+  );
+ 
+  router.get(
+    '/challenges/:challengeName',
+    userMigration,
+    returnIndividualChallenge
+  );
+ 
+  router.get('/challenges/', userMigration, returnCurrentChallenge);
+  router.post('/completed-challenge/', completedChallenge);
+  router.post('/completed-zipline-or-basejump', completedZiplineOrBasejump);
+  router.post('/completed-bonfire', completedBonfire);
+ 
+  app.use(router);
+ 
+  function returnNextChallenge(req, res, next) {
+    if (!req.user) {
+    return res.redirect('../challenges/learn-how-free-code-camp-works');
+    }
+    var completed = req.user.completedChallenges.map(function (elem) {
+      return elem.id;
+    });
+ 
+    req.user.uncompletedChallenges = utils.allChallengeIds()
+      .filter(function (elem) {
+        if (completed.indexOf(elem) === -1) {
+          return elem;
+        }
+      });
+ 
+    // find the user's current challenge and block
+    // look in that block and find the index of their current challenge
+    // if index + 1 < block.challenges.length
+    // serve index + 1 challenge
+    // otherwise increment block key and serve the first challenge in that block
+    // unless the next block is undefined, which means no next block
+    var nextChallengeName;
+ 
+    var challengeId = String(req.user.currentChallenge.challengeId);
+    var challengeBlock = req.user.currentChallenge.challengeBlock;
+    var indexOfChallenge = challengeMapWithIds[challengeBlock]
+      .indexOf(challengeId);
+ 
+    if (indexOfChallenge + 1
+      < challengeMapWithIds[challengeBlock].length) {
+      nextChallengeName =
+        challengeMapWithNames[challengeBlock][++indexOfChallenge];
+    } else if (typeof challengeMapWithIds[++challengeBlock] !== 'undefined') {
+      nextChallengeName = R.head(challengeMapWithNames[challengeBlock]);
+    } else {
+      req.flash('errors', {
+        msg: 'It looks like you have finished all of our challenges.' +
+        ' Great job! Now on to helping nonprofits!'
+      });
+      nextChallengeName = R.head(challengeMapWithNames[0].challenges);
+    }
+ 
+    var nameString = nextChallengeName.trim()
+      .toLowerCase()
+      .replace(/\s/g, '-');
+ 
+    req.user.save(function(err) {
+      if (err) {
+        return next(err);
+      }
+      return res.redirect('../challenges/' + nameString);
+    });
+  }
+ 
+  function returnCurrentChallenge(req, res, next) {
+    if (!req.user) {
+    return res.redirect('../challenges/learn-how-free-code-camp-works');
+    }
+    var completed = req.user.completedChallenges.map(function (elem) {
+      return elem.id;
+    });
+ 
+    req.user.uncompletedChallenges = utils.allChallengeIds()
+      .filter(function (elem) {
+        if (completed.indexOf(elem) === -1) {
+          return elem;
+        }
+      });
+    if (!req.user.currentChallenge) {
+      req.user.currentChallenge = {};
+      req.user.currentChallenge.challengeId = challengeMapWithIds['0'][0];
+      req.user.currentChallenge.challengeName = challengeMapWithNames['0'][0];
+      req.user.currentChallenge.challengeBlock = '0';
+      req.user.save(function(err) {
+        if (err) {
+          return next(err);
+        }
+      });
+    }
+    var nameString = req.user.currentChallenge.challengeName.trim()
+      .toLowerCase()
+      .replace(/\s/g, '-')
+      .replace(/[^a-z0-9\-\/.]/gi, '');
+    req.user.save(function(err) {
+      if (err) {
+        return next(err);
+      }
+      return res.redirect('../challenges/' + nameString);
+    });
+  }
+ 
+  function returnIndividualChallenge(req, res, next) {
+    var dashedName = req.params.challengeName;
+ 
+    var challengeName =
+      (/^(bonfire|waypoint|zipline|basejump)/i).test(dashedName) ?
+        dashedName
+          .replace(/\-/g, ' ')
+          .split(' ')
+          .slice(1)
+          .join(' ') :
+        dashedName.replace(/\-/g, ' ');
+ 
+    Challenge.find(
+      { where: { name: new RegExp(challengeName, 'i') } },
+      function(err, challengeFromMongo) {
+        if (err) { return next(err); }
+ 
+        // Handle not found
+        if (challengeFromMongo.length < 1) {
+          req.flash('errors', {
+            msg: '404: We couldn\'t find a challenge with that name. ' +
+            'Please double check the name.'
+          });
+          return res.redirect('/challenges');
+        }
+        var challenge = challengeFromMongo.pop();
+        // Redirect to full name if the user only entered a partial
+        var dashedNameFull = challenge.name
+          .toLowerCase()
+          .replace(/\s/g, '-')
+          .replace(/[^a-z0-9\-\.]/gi, '');
+        if (dashedNameFull !== dashedName) {
+          return res.redirect('../challenges/' + dashedNameFull);
+        } else if (req.user) {
+          req.user.currentChallenge = {
+            challengeId: challenge.id,
+            challengeName: challenge.name,
+            challengeBlock: R.head(R.flatten(Object.keys(challengeMapWithIds).
+                map(function (key) {
+                  return challengeMapWithIds[key]
+                    .filter(function (elem) {
+                      return String(elem) === String(challenge.id);
+                    }).map(function () {
+                      return key;
+                    });
+                })
+            ))
+          };
+        }
+ 
+        var challengeType = {
+          0: function() {
+            res.render('coursewares/showHTML', {
+              title: challenge.name,
+              dashedName: dashedName,
+              name: challenge.name,
+              brief: challenge.description[0],
+              details: challenge.description.slice(1),
+              tests: challenge.tests,
+              challengeSeed: challenge.challengeSeed,
+              verb: utils.randomVerb(),
+              phrase: utils.randomPhrase(),
+              compliment: utils.randomCompliment(),
+              challengeId: challenge.id,
+              environment: utils.whichEnvironment(),
+              challengeType: challenge.challengeType
+            });
+          },
+ 
+          1: function() {
+            res.render('coursewares/showJS', {
+              title: challenge.name,
+              dashedName: dashedName,
+              name: challenge.name,
+              brief: challenge.description[0],
+              details: challenge.description.slice(1),
+              tests: challenge.tests,
+              challengeSeed: challenge.challengeSeed,
+              verb: utils.randomVerb(),
+              phrase: utils.randomPhrase(),
+              compliment: utils.randomCompliment(),
+              challengeId: challenge.id,
+              challengeType: challenge.challengeType
+            });
+          },
+ 
+          2: function() {
+            res.render('coursewares/showVideo', {
+              title: challenge.name,
+              dashedName: dashedName,
+              name: challenge.name,
+              details: challenge.description,
+              tests: challenge.tests,
+              video: challenge.challengeSeed[0],
+              verb: utils.randomVerb(),
+              phrase: utils.randomPhrase(),
+              compliment: utils.randomCompliment(),
+              challengeId: challenge.id,
+              challengeType: challenge.challengeType
+            });
+          },
+ 
+          3: function() {
+            res.render('coursewares/showZiplineOrBasejump', {
+              title: challenge.name,
+              dashedName: dashedName,
+              name: challenge.name,
+              details: challenge.description,
+              video: challenge.challengeSeed[0],
+              verb: utils.randomVerb(),
+              phrase: utils.randomPhrase(),
+              compliment: utils.randomCompliment(),
+              challengeId: challenge.id,
+              challengeType: challenge.challengeType
+            });
+          },
+ 
+          4: function() {
+            res.render('coursewares/showZiplineOrBasejump', {
+              title: challenge.name,
+              dashedName: dashedName,
+              name: challenge.name,
+              details: challenge.description,
+              video: challenge.challengeSeed[0],
+              verb: utils.randomVerb(),
+              phrase: utils.randomPhrase(),
+              compliment: utils.randomCompliment(),
+              challengeId: challenge.id,
+              challengeType: challenge.challengeType
+            });
+          },
+ 
+          5: function() {
+            res.render('coursewares/showBonfire', {
+              completedWith: null,
+              title: challenge.name,
+              dashedName: dashedName,
+              name: challenge.name,
+              difficulty: Math.floor(+challenge.difficulty),
+              brief: challenge.description.shift(),
+              details: challenge.description,
+              tests: challenge.tests,
+              challengeSeed: challenge.challengeSeed,
+              verb: utils.randomVerb(),
+              phrase: utils.randomPhrase(),
+              compliment: utils.randomCompliment(),
+              bonfires: challenge,
+              challengeId: challenge.id,
+              MDNkeys: challenge.MDNlinks,
+              MDNlinks: getMDNlinks(challenge.MDNlinks),
+              challengeType: challenge.challengeType
+            });
+          }
+        };
+        if (req.user) {
+          req.user.save(function (err) {
+            if (err) {
+              return next(err);
+            }
+            return challengeType[challenge.challengeType]();
+          });
+        } else {
+          return challengeType[challenge.challengeType]();
+        }
+      });
+  }
+ 
+  function completedBonfire(req, res, next) {
+    var isCompletedWith = req.body.challengeInfo.completedWith || '';
+    var isCompletedDate = Math.round(+new Date());
+    var challengeId = req.body.challengeInfo.challengeId;
+    var isSolution = req.body.challengeInfo.solution;
+    var challengeName = req.body.challengeInfo.challengeName;
+ 
+    if (isCompletedWith) {
+      User.find({
+        where: { 'profile.username': isCompletedWith.toLowerCase() },
+        limit: 1
+      }, function (err, pairedWith) {
+        if (err) { return next(err); }
+ 
+        var index = req.user.uncompletedChallenges.indexOf(challengeId);
+        if (index > -1) {
+          req.user.progressTimestamps.push(Date.now() || 0);
+          req.user.uncompletedChallenges.splice(index, 1);
+        }
+        pairedWith = pairedWith.pop();
+        if (pairedWith) {
+ 
+          index = pairedWith.uncompletedChallenges.indexOf(challengeId);
+          if (index > -1) {
+            pairedWith.progressTimestamps.push(Date.now() || 0);
+            pairedWith.uncompletedChallenges.splice(index, 1);
+ 
+          }
+ 
+          pairedWith.completedChallenges.push({
+            id: challengeId,
+            name: challengeName,
+            completedWith: req.user.id,
+            completedDate: isCompletedDate,
+            solution: isSolution,
+            challengeType: 5
+          });
+ 
+          req.user.completedChallenges.push({
+            id: challengeId,
+            name: challengeName,
+            completedWith: pairedWith.id,
+            completedDate: isCompletedDate,
+            solution: isSolution,
+            challengeType: 5
+          });
+        }
+        // User said they paired, but pair wasn't found
+        req.user.completedChallenges.push({
+          id: challengeId,
+          name: challengeName,
+          completedWith: null,
+          completedDate: isCompletedDate,
+          solution: isSolution,
+          challengeType: 5
+        });
+ 
+        req.user.save(function (err, user) {
+          if (err) { return next(err); }
+ 
+          if (pairedWith) {
+            pairedWith.save(function (err, paired) {
+              if (err) {
+                return next(err);
+              }
+              if (user && paired) {
+                return res.send(true);
+              }
+            });
+          } else if (user) {
+            res.send(true);
+          }
+        });
+      });
+    } else {
+      req.user.completedChallenges.push({
+        id: challengeId,
+        name: challengeName,
+        completedWith: null,
+        completedDate: isCompletedDate,
+        solution: isSolution,
+        challengeType: 5
+      });
+ 
+      var index = req.user.uncompletedChallenges.indexOf(challengeId);
+      if (index > -1) {
+ 
+        req.user.progressTimestamps.push(Date.now() || 0);
+        req.user.uncompletedChallenges.splice(index, 1);
+      }
+ 
+      req.user.save(function (err) {
+        if (err) { return next(err); }
+        res.send(true);
+      });
+    }
+  }
+ 
+  function completedChallenge(req, res, next) {
+ 
+    var isCompletedDate = Math.round(+new Date());
+    var challengeId = req.body.challengeInfo.challengeId;
+ 
+    req.user.completedChallenges.push({
+      id: challengeId,
+      completedDate: isCompletedDate,
+      name: req.body.challengeInfo.challengeName,
+      solution: null,
+      githubLink: null,
+      verified: true
+    });
+    var index = req.user.uncompletedChallenges.indexOf(challengeId);
+ 
+    if (index > -1) {
+      req.user.progressTimestamps.push(Date.now() || 0);
+      req.user.uncompletedChallenges.splice(index, 1);
+    }
+ 
+    req.user.save(function (err, user) {
+      if (err) {
+        return next(err);
+      }
+      if (user) {
+        res.sendStatus(200);
+      }
+    });
+  }
+ 
+  function completedZiplineOrBasejump(req, res, next) {
+ 
+    var isCompletedWith = req.body.challengeInfo.completedWith || false;
+    var isCompletedDate = Math.round(+new Date());
+    var challengeId = req.body.challengeInfo.challengeId;
+    var solutionLink = req.body.challengeInfo.publicURL;
+    var githubLink = req.body.challengeInfo.challengeType === '4'
+      ? req.body.challengeInfo.githubURL : true;
+    var challengeType = req.body.challengeInfo.challengeType === '4' ?
+      4 : 3;
+    if (!solutionLink || !githubLink) {
+      req.flash('errors', {
+        msg: 'You haven\'t supplied the necessary URLs for us to inspect ' +
+        'your work.'
+      });
+      return res.sendStatus(403);
+    }
+ 
+    if (isCompletedWith) {
+      User.find({
+        where: { 'profile.username': isCompletedWith.toLowerCase() },
+        limit: 1
+      }, function (err, pairedWithFromMongo) {
+        if (err) { return next(err); }
+        var index = req.user.uncompletedChallenges.indexOf(challengeId);
+        if (index > -1) {
+          req.user.progressTimestamps.push(Date.now() || 0);
+          req.user.uncompletedChallenges.splice(index, 1);
+        }
+        var pairedWith = pairedWithFromMongo.pop();
+ 
+        req.user.completedChallenges.push({
+          id: challengeId,
+          name: req.body.challengeInfo.challengeName,
+          completedWith: pairedWith.id,
+          completedDate: isCompletedDate,
+          solution: solutionLink,
+          githubLink: githubLink,
+          challengeType: challengeType,
+          verified: false
+        });
+ 
+        req.user.save(function (err, user) {
+          if (err) { return next(err); }
+ 
+          if (req.user.id.toString() === pairedWith.id.toString()) {
+            return res.sendStatus(200);
+          }
+          index = pairedWith.uncompletedChallenges.indexOf(challengeId);
+          if (index > -1) {
+            pairedWith.progressTimestamps.push(Date.now() || 0);
+            pairedWith.uncompletedChallenges.splice(index, 1);
+ 
+          }
+ 
+          pairedWith.completedChallenges.push({
+            id: challengeId,
+            name: req.body.challengeInfo.coursewareName,
+            completedWith: req.user.id,
+            completedDate: isCompletedDate,
+            solution: solutionLink,
+            githubLink: githubLink,
+            challengeType: challengeType,
+            verified: false
+          });
+          pairedWith.save(function (err, paired) {
+            if (err) {
+              return next(err);
+            }
+            if (user && paired) {
+              return res.sendStatus(200);
+            }
+          });
+        });
+      });
+    } else {
+ 
+      req.user.completedChallenges.push({
+        id: challengeId,
+        name: req.body.challengeInfo.challengeName,
+        completedWith: null,
+        completedDate: isCompletedDate,
+        solution: solutionLink,
+        githubLink: githubLink,
+        challengeType: challengeType,
+        verified: false
+      });
+ 
+      var index = req.user.uncompletedChallenges.indexOf(challengeId);
+      if (index > -1) {
+        req.user.progressTimestamps.push(Date.now() || 0);
+        req.user.uncompletedChallenges.splice(index, 1);
+      }
+ 
+      req.user.save(function (err, user) {
+        if (err) {
+          return next(err);
+        }
+        // NOTE(berks): under certain conditions this will not close
+        // the response.
+        if (user) {
+          return res.sendStatus(200);
+        }
+      });
+    }
+  }
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/boot/challengeMap.js.html b/coverage/lcov-report/server/boot/challengeMap.js.html new file mode 100644 index 00000000000000..1de4e494201bcf --- /dev/null +++ b/coverage/lcov-report/server/boot/challengeMap.js.html @@ -0,0 +1,240 @@ + + + + Code coverage report for server/boot/challengeMap.js + + + + + + +
+

Code coverage report for server/boot/challengeMap.js

+

+ Statements: 32.26% (10 / 31)      + Branches: 0% (0 / 4)      + Functions: 11.11% (1 / 9)      + Lines: 33.33% (10 / 30)      + Ignored: none      +

+
All files » server/boot/ » challengeMap.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +661 +  +  +  +  +  +1 +1 +1 +  +1 +1 +  +  +1 +  +  +  +1 +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
var R = require('ramda'),
+  // debug = require('debug')('freecc:cntr:challengeMap'),
+  utils = require('./../utils'),
+  middleware = require('../utils/middleware');
+ 
+ 
+module.exports = function(app) {
+  var User = app.models.User;
+  var router = app.loopback.Router();
+ 
+  router.get('/map', middleware.userMigration, challengeMap);
+  router.get('/learn-to-code', function(req, res) {
+    res.redirect(301, '/map');
+  });
+  router.get('/about', function(req, res) {
+    res.redirect(301, '/map');
+  });
+ 
+  app.use(router);
+ 
+  function challengeMap(req, res, next) {
+    var completedList = [];
+ 
+    if (req.user) {
+      completedList = req.user.completedChallenges;
+    }
+ 
+    var noDuplicatedChallenges = R.uniq(completedList);
+ 
+    var completedChallengeList = noDuplicatedChallenges
+      .map(function(challenge) {
+        return challenge.id;
+      });
+    var challengeList = utils.
+      getChallengeMapForDisplay(completedChallengeList);
+ 
+    Object.keys(challengeList).forEach(function(key) {
+      challengeList[key].completed = challengeList[key]
+        .challenges.filter(function(elem) {
+        return completedChallengeList.indexOf(elem.id) > -1;
+      });
+    });
+ 
+    function numberWithCommas(x) {
+      return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
+    }
+ 
+    var date1 = new Date('10/15/2014');
+    var date2 = new Date();
+    var timeDiff = Math.abs(date2.getTime() - date1.getTime());
+    var daysRunning = Math.ceil(timeDiff / (1000 * 3600 * 24));
+ 
+    User.count(function(err, camperCount) {
+      if (err) { return next(err); }
+ 
+      res.render('challengeMap/show', {
+        daysRunning: daysRunning,
+        camperCount: numberWithCommas(camperCount),
+        title: "A map of all Free Code Camp's Challenges",
+        challengeList: challengeList,
+        completedChallengeList: completedChallengeList
+      });
+    });
+  }
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/boot/explorer.js.html b/coverage/lcov-report/server/boot/explorer.js.html new file mode 100644 index 00000000000000..ba001d55a16979 --- /dev/null +++ b/coverage/lcov-report/server/boot/explorer.js.html @@ -0,0 +1,135 @@ + + + + Code coverage report for server/boot/explorer.js + + + + + + +
+

Code coverage report for server/boot/explorer.js

+

+ Statements: 56.25% (9 / 16)      + Branches: 25% (1 / 4)      + Functions: 33.33% (1 / 3)      + Lines: 56.25% (9 / 16)      + Ignored: none      +

+
All files » server/boot/ » explorer.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +311 +1 +  +  +1 +1 +1 +  +  +  +  +  +  +  +  +  +  +  +1 +  +1 +1 +1 +  +  +  +  +  +  +  + 
module.exports = function mountLoopBackExplorer(app) {
+  Iif (process.env.NODE_ENV === 'production') {
+    return;
+  }
+  var explorer;
+  try {
+    explorer = require('loopback-explorer');
+  } catch(err) {
+    // Print the message only when the app was started via `app.listen()`.
+    // Do not print any message when the project is used as a component.
+    app.once('started', function() {
+      console.log(
+        'Run `npm install loopback-explorer` to enable the LoopBack explorer'
+      );
+    });
+    return;
+  }
+ 
+  var restApiRoot = app.get('restApiRoot');
+ 
+  var explorerApp = explorer(app, { basePath: restApiRoot });
+  app.use('/explorer', explorerApp);
+  app.once('started', function() {
+    var baseUrl = app.get('url').replace(/\/$/, '');
+    // express 4.x (loopback 2.x) uses `mountpath`
+    // express 3.x (loopback 1.x) uses `route`
+    var explorerPath = explorerApp.mountpath || explorerApp.route;
+    console.log('Browse your REST API at %s%s', baseUrl, explorerPath);
+  });
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/boot/fieldGuide.js.html b/coverage/lcov-report/server/boot/fieldGuide.js.html new file mode 100644 index 00000000000000..f26ad94064548f --- /dev/null +++ b/coverage/lcov-report/server/boot/fieldGuide.js.html @@ -0,0 +1,426 @@ + + + + Code coverage report for server/boot/fieldGuide.js + + + + + + +
+

Code coverage report for server/boot/fieldGuide.js

+

+ Statements: 24.14% (14 / 58)      + Branches: 0% (0 / 24)      + Functions: 9.09% (1 / 11)      + Lines: 25% (14 / 56)      + Ignored: none      +

+
All files » server/boot/ » fieldGuide.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +1281 +  +  +  +  +1 +1 +1 +  +1 +1 +1 +1 +  +1 +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
var R = require('ramda'),
+// Rx = require('rx'),
+// debug = require('debug')('freecc:fieldguides'),
+  utils = require('../utils');
+ 
+module.exports = function(app) {
+  var router = app.loopback.Router();
+  var FieldGuide = app.models.FieldGuide;
+ 
+  router.get('/field-guide/all-articles', showAllFieldGuides);
+  router.get('/field-guide/:fieldGuideName', returnIndividualFieldGuide);
+  router.get('/field-guide/', returnNextFieldGuide);
+  router.post('/completed-field-guide/', completedFieldGuide);
+ 
+  app.use(router);
+ 
+  function returnIndividualFieldGuide(req, res, next) {
+    var dashedNameFromQuery = req.params.fieldGuideName;
+    if (req.user) {
+      var completed = req.user.completedFieldGuides;
+ 
+      var uncompletedFieldGuides = utils.allFieldGuideIds()
+        .filter(function (elem) {
+          if (completed.indexOf(elem) === -1) {
+            return elem;
+          }
+        });
+      req.user.uncompletedFieldGuides = uncompletedFieldGuides;
+      // TODO(berks): handle callback properly
+      req.user.save(function(err) {
+        if (err) { return next(err); }
+      });
+    }
+ 
+    FieldGuide.find({ where: {'dashedName': dashedNameFromQuery}},
+      function(err, fieldGuideFromMongo) {
+        if (err) {
+          return next(err);
+        }
+ 
+        if (fieldGuideFromMongo.length < 1) {
+          req.flash('errors', {
+            msg: '404: We couldn\'t find a field guide entry with that name. ' +
+            'Please double check the name.'
+          });
+ 
+          return res.redirect('/');
+        }
+ 
+        var fieldGuide = R.head(fieldGuideFromMongo);
+        fieldGuide.name.toLowerCase().replace(/\s/g, '-').replace(/\?/g, '');
+ 
+        // if (fieldGuide.dashedName !== dashedNameFromQuery) {
+        //   return res.redirect('../field-guide/' + fieldGuide.dashedName);
+        // }
+        res.render('field-guide/show', {
+          title: fieldGuide.name,
+          fieldGuideId: fieldGuide.id,
+          description: fieldGuide.description.join('')
+        });
+      }
+    );
+  }
+ 
+  function showAllFieldGuides(req, res) {
+    var allFieldGuideNamesAndIds = utils.allFieldGuideNamesAndIds();
+ 
+    var completedFieldGuides = [];
+    if (req.user && req.user.completedFieldGuides) {
+      completedFieldGuides = req.user.completedFieldGuides;
+    }
+    res.render('field-guide/all-articles', {
+      allFieldGuideNamesAndIds: allFieldGuideNamesAndIds,
+      completedFieldGuides: completedFieldGuides
+    });
+  }
+ 
+  function showCompletedFieldGuideFunction(req, res) {
+    req.flash('success', {
+              msg: [
+                'You\'ve read all our current Field Guide entries. ' +
+                'If you have ideas for other Field Guide articles, ' +
+                'please let us know on ',
+                '<a href=\'https://github.com/freecodecamp/freecodecamp/' +
+                'issues/new?&body=Please describe your idea for a Field Guide' +
+                ' article and include links if possible.\'>GitHub</a>.'
+              ].join('')
+            });
+    return res.redirect('../field-guide/how-do-i-use-this-guide');
+  }
+ 
+  function returnNextFieldGuide(req, res, next) {
+    if (!req.user) {
+      return res.redirect('/field-guide/how-do-i-use-this-guide');
+    }
+ 
+    if (!req.user.uncompletedFieldGuides.length) {
+      return showCompletedFieldGuideFunction(req, res, next);
+    }
+ 
+    FieldGuide.findById(req.user.uncompletedFieldGuides[0],
+      function(err, fieldGuide) {
+ 
+        if (err) { return next(err); }
+        return res.redirect('../field-guide/' + fieldGuide.dashedName);
+      });
+  }
+};
+ 
+function completedFieldGuide(req, res, next) {
+  var fieldGuideId = req.body.fieldGuideInfo.fieldGuideId;
+ 
+  req.user.completedFieldGuides.push(fieldGuideId);
+ 
+  var index = req.user.uncompletedFieldGuides.indexOf(fieldGuideId);
+  if (index > -1) {
+    req.user.progressTimestamps.push(Date.now());
+    req.user.uncompletedFieldGuides.splice(index, 1);
+  }
+ 
+  req.user.save(function (err) {
+    if (err) {
+      return next(err);
+    }
+    res.send(true);
+  });
+}
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/boot/home.js.html b/coverage/lcov-report/server/boot/home.js.html new file mode 100644 index 00000000000000..77c076e2fe40bf --- /dev/null +++ b/coverage/lcov-report/server/boot/home.js.html @@ -0,0 +1,117 @@ + + + + Code coverage report for server/boot/home.js + + + + + + +
+

Code coverage report for server/boot/home.js

+

+ Statements: 50% (7 / 14)      + Branches: 0% (0 / 6)      + Functions: 33.33% (1 / 3)      + Lines: 53.85% (7 / 13)      + Ignored: none      +

+
All files » server/boot/ » home.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +251 +  +1 +  +  +1 +1 +1 +  +1 +  +1 +  +  +  +  +  +  +  +  +  +  +  +  + 
var defaultProfileImage =
+  require('../../common/utils/constantStrings.json').defaultProfileImage;
+var message =
+  'Learn to Code JavaScript and get a Coding Job by Helping Nonprofits';
+ 
+module.exports = function(app) {
+  var router = app.loopback.Router();
+  router.get('/', index);
+ 
+  app.use(router);
+ 
+  function index(req, res, next) {
+    if (req.user && !req.user.picture) {
+      req.user.picture = defaultProfileImage;
+ 
+      req.user.save(function(err) {
+        if (err) { return next(err); }
+        res.render('home', { title: message });
+      });
+    } else {
+      res.render('home', { title: message });
+    }
+  }
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/boot/index.html b/coverage/lcov-report/server/boot/index.html new file mode 100644 index 00000000000000..b8c391e4b88e35 --- /dev/null +++ b/coverage/lcov-report/server/boot/index.html @@ -0,0 +1,255 @@ + + + + Code coverage report for server/boot/ + + + + + + +
+

Code coverage report for server/boot/

+

+ Statements: 20.49% (218 / 1064)      + Branches: 0.2% (1 / 503)      + Functions: 6.03% (14 / 232)      + Lines: 21.23% (218 / 1027)      + Ignored: none      +

+
All files » server/boot/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
a-extendUser.js34.78%(8 / 23)0%(0 / 8)14.29%(1 / 7)36.36%(8 / 22)
authentication.js100%(2 / 2)100%(0 / 0)100%(1 / 1)100%(2 / 2)
challenge.js10.71%(21 / 196)0%(0 / 118)2.78%(1 / 36)11.05%(21 / 190)
challengeMap.js32.26%(10 / 31)0%(0 / 4)11.11%(1 / 9)33.33%(10 / 30)
explorer.js56.25%(9 / 16)25%(1 / 4)33.33%(1 / 3)56.25%(9 / 16)
fieldGuide.js24.14%(14 / 58)0%(0 / 24)9.09%(1 / 11)25%(14 / 56)
home.js50%(7 / 14)0%(0 / 6)33.33%(1 / 3)53.85%(7 / 13)
jobs.js60%(6 / 10)0%(0 / 2)33.33%(1 / 3)66.67%(6 / 9)
middlewares.js100%(0 / 0)100%(0 / 0)100%(0 / 0)100%(0 / 0)
nonprofits.js24.24%(8 / 33)0%(0 / 16)16.67%(1 / 6)25%(8 / 32)
randomAPIs.js28.92%(48 / 166)0%(0 / 60)2.13%(1 / 47)29.81%(48 / 161)
redirects.js66.67%(6 / 9)100%(0 / 0)25%(1 / 4)66.67%(6 / 9)
restApi.js100%(3 / 3)100%(0 / 0)100%(1 / 1)100%(3 / 3)
story.js16.28%(35 / 215)0%(0 / 111)2.5%(1 / 40)16.43%(35 / 213)
user.js14.24%(41 / 288)0%(0 / 150)1.64%(1 / 61)15.13%(41 / 271)
+
+
+ + + + + + diff --git a/coverage/lcov-report/server/boot/jobs.js.html b/coverage/lcov-report/server/boot/jobs.js.html new file mode 100644 index 00000000000000..8e2fd426564e43 --- /dev/null +++ b/coverage/lcov-report/server/boot/jobs.js.html @@ -0,0 +1,99 @@ + + + + Code coverage report for server/boot/jobs.js + + + + + + +
+

Code coverage report for server/boot/jobs.js

+

+ Statements: 60% (6 / 10)      + Branches: 0% (0 / 2)      + Functions: 33.33% (1 / 3)      + Lines: 66.67% (6 / 9)      + Ignored: none      +

+
All files » server/boot/ » jobs.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +191 +1 +1 +  +1 +1 +  +1 +  +  +  +  +  +  +  +  +  +  + 
module.exports = function(app) {
+  var Job = app.models.Job;
+  var router = app.loopback.Router();
+ 
+  router.get('/jobs', jobsDirectory);
+  app.use(router);
+ 
+  function jobsDirectory(req, res, next) {
+    Job.find({}, function(err, jobs) {
+      if (err) { return next(err); }
+ 
+      res.render('jobs/directory', {
+        title: 'Junior JavaScript Engineer Jobs',
+        jobs: jobs
+      });
+    });
+  }
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/boot/middlewares.js.html b/coverage/lcov-report/server/boot/middlewares.js.html new file mode 100644 index 00000000000000..9c2afd6fe298d4 --- /dev/null +++ b/coverage/lcov-report/server/boot/middlewares.js.html @@ -0,0 +1,45 @@ + + + + Code coverage report for server/boot/middlewares.js + + + + + + +
+

Code coverage report for server/boot/middlewares.js

+

+ Statements: 100% (0 / 0)      + Branches: 100% (0 / 0)      + Functions: 100% (0 / 0)      + Lines: 100% (0 / 0)      + Ignored: none      +

+
All files » server/boot/ » middlewares.js
+
+
+

+
+
1 
 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/boot/nonprofits.js.html b/coverage/lcov-report/server/boot/nonprofits.js.html new file mode 100644 index 00000000000000..8ee0651b86ad87 --- /dev/null +++ b/coverage/lcov-report/server/boot/nonprofits.js.html @@ -0,0 +1,432 @@ + + + + Code coverage report for server/boot/nonprofits.js + + + + + + +
+

Code coverage report for server/boot/nonprofits.js

+

+ Statements: 24.24% (8 / 33)      + Branches: 0% (0 / 16)      + Functions: 16.67% (1 / 6)      + Lines: 25% (8 / 32)      + Ignored: none      +

+
All files » server/boot/ » nonprofits.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +1301 +1 +1 +  +1 +1 +  +1 +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
module.exports = function(app) {
+  var router = app.loopback.Router();
+  var Nonprofit = app.models.Nonprofit;
+ 
+  router.get('/nonprofits/directory', nonprofitsDirectory);
+  router.get('/nonprofits/:nonprofitName', returnIndividualNonprofit);
+ 
+  app.use(router);
+ 
+  function nonprofitsDirectory(req, res, next) {
+    Nonprofit.find(
+      { where: { estimatedHours: { $gt: 0 } } },
+      function(err, nonprofits) {
+        if (err) { return next(err); }
+ 
+        res.render('nonprofits/directory', {
+          title: 'Nonprofits we help',
+          nonprofits: nonprofits
+        });
+      }
+    );
+  }
+ 
+  function returnIndividualNonprofit(req, res, next) {
+    var dashedName = req.params.nonprofitName;
+    var nonprofitName = dashedName.replace(/\-/g, ' ');
+ 
+    Nonprofit.find(
+      { where: { name: new RegExp(nonprofitName, 'i') } },
+      function(err, nonprofit) {
+        if (err) {
+          return next(err);
+        }
+ 
+        if (nonprofit.length < 1) {
+          req.flash('errors', {
+            msg: "404: We couldn't find a nonprofit with that name. " +
+              'Please double check the name.'
+          });
+ 
+          return res.redirect('/nonprofits');
+        }
+ 
+        nonprofit = nonprofit.pop();
+        var dashedNameFull = nonprofit.name.toLowerCase().replace(/\s/g, '-');
+        if (dashedNameFull !== dashedName) {
+          return res.redirect('../nonprofit/' + dashedNameFull);
+        }
+        var buttonActive = false;
+        if (req.user) {
+          if (req.user.uncompletedBonfires.length === 0) {
+            if (req.user.completedCoursewares.length > 63) {
+              var hasShownInterest =
+                nonprofit.interestedCampers.filter(function ( obj ) {
+                  return obj.username === req.user.username;
+                });
+ 
+              if (hasShownInterest.length === 0) {
+                buttonActive = true;
+              }
+            }
+          }
+        }
+ 
+        res.render('nonprofits/show', {
+          dashedName: dashedNameFull,
+          title: nonprofit.name,
+          logoUrl: nonprofit.logoUrl,
+          estimatedHours: nonprofit.estimatedHours,
+          projectDescription: nonprofit.projectDescription,
+ 
+          approvedOther:
+            nonprofit.approvedDeliverables.indexOf('other') > -1,
+          approvedWebsite:
+            nonprofit.approvedDeliverables.indexOf('website') > -1,
+ 
+          approvedDonor:
+            nonprofit.approvedDeliverables.indexOf('donor') > -1,
+          approvedInventory:
+            nonprofit.approvedDeliverables.indexOf('inventory') > -1,
+ 
+          approvedVolunteer:
+            nonprofit.approvedDeliverables.indexOf('volunteer') > -1,
+          approvedForm:
+            nonprofit.approvedDeliverables.indexOf('form') > -1,
+ 
+          approvedCommunity:
+            nonprofit.approvedDeliverables.indexOf('community') > -1,
+          approvedELearning:
+            nonprofit.approvedDeliverables.indexOf('eLearning') > -1,
+ 
+          websiteLink: nonprofit.websiteLink,
+          imageUrl: nonprofit.imageUrl,
+          whatDoesNonprofitDo: nonprofit.whatDoesNonprofitDo,
+          interestedCampers: nonprofit.interestedCampers,
+          assignedCampers: nonprofit.assignedCampers,
+          buttonActive: buttonActive,
+          currentStatus: nonprofit.currentStatus
+        });
+      }
+    );
+  }
+ 
+  /*
+  function interestedInNonprofit(req, res, next) {
+    if (req.user) {
+      Nonprofit.findOne(
+        { name: new RegExp(req.params.nonprofitName.replace(/-/, ' '), 'i') },
+        function(err, nonprofit) {
+          if (err) { return next(err); }
+          nonprofit.interestedCampers.push({
+            username: req.user.username,
+            picture: req.user.picture,
+            timeOfInterest: Date.now()
+          });
+          nonprofit.save(function(err) {
+            if (err) { return next(err); }
+            req.flash('success', {
+            msg: 'Thanks for expressing interest in this nonprofit project! ' +
+                "We've added you to this project as an interested camper!"
+            });
+            res.redirect('back');
+          });
+        }
+      );
+    }
+  }
+  */
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/boot/randomAPIs.js.html b/coverage/lcov-report/server/boot/randomAPIs.js.html new file mode 100644 index 00000000000000..7d81474bfa0b69 --- /dev/null +++ b/coverage/lcov-report/server/boot/randomAPIs.js.html @@ -0,0 +1,1527 @@ + + + + Code coverage report for server/boot/randomAPIs.js + + + + + + +
+

Code coverage report for server/boot/randomAPIs.js

+

+ Statements: 28.92% (48 / 166)      + Branches: 0% (0 / 60)      + Functions: 2.13% (1 / 47)      + Lines: 29.81% (48 / 161)      + Ignored: none      +

+
All files » server/boot/ » randomAPIs.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +4951 +  +  +  +  +  +  +  +  +  +  +1 +1 +1 +1 +1 +1 +1 +1 +  +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +  +1 +  +1 +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +1 +  +  +  +  +  +  +1 +  +  +  +  +  +1 +  +  +  +  +  +1 +  +  +  +  +  +1 +  +  +  +  +  +1 +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
var Rx = require('rx'),
+    Twit = require('twit'),
+    async = require('async'),
+    moment = require('moment'),
+    Slack = require('node-slack'),
+    request = require('request'),
+    debug = require('debug')('freecc:cntr:resources'),
+ 
+    constantStrings = require('../utils/constantStrings.json'),
+    secrets = require('../../config/secrets');
+ 
+var slack = new Slack(secrets.slackHook);
+module.exports = function(app) {
+  var router = app.loopback.Router();
+  var User = app.models.User;
+  var Challenge = app.models.Challenge;
+  var Story = app.models.Store;
+  var FieldGuide = app.models.FieldGuide;
+  var Nonprofit = app.models.Nonprofit;
+ 
+  router.get('/api/github', githubCalls);
+  router.get('/api/blogger', bloggerCalls);
+  router.get('/api/trello', trelloCalls);
+  router.get('/api/codepen/twitter/:screenName', twitter);
+  router.get('/sitemap.xml', sitemap);
+  router.post('/get-help', getHelp);
+  router.post('/get-pair', getPair);
+  router.get('/chat', chat);
+  router.get('/twitch', twitch);
+  router.get('/pmi-acp-agile-project-managers', agileProjectManagers);
+  router.get('/pmi-acp-agile-project-managers-form', agileProjectManagersForm);
+  router.get('/nonprofits', nonprofits);
+  router.get('/nonprofits-form', nonprofitsForm);
+  router.get('/jobs-form', jobsForm);
+  router.get('/submit-cat-photo', catPhotoSubmit);
+  router.get('/unsubscribe/:email', unsubscribe);
+  router.get('/unsubscribed', unsubscribed);
+  router.get('/cats.json', getCats);
+ 
+  router.get('/api/slack', slackInvite);
+ 
+  app.use(router);
+ 
+  function slackInvite(req, res, next) {
+    if (req.user) {
+      if (req.user.email) {
+        var invite = {
+          'email': req.user.email,
+          'token': process.env.SLACK_KEY,
+          'set_active': true
+        };
+ 
+        var headers = {
+          'User-Agent': 'Node Browser/0.0.1',
+          'Content-Type': 'application/x-www-form-urlencoded'
+        };
+ 
+        var options = {
+          url: 'https://freecodecamp.slack.com/api/users.admin.invite',
+          method: 'POST',
+          headers: headers,
+          form: invite
+        };
+ 
+        request(options, function (error, response) {
+          if (!error && response.statusCode === 200) {
+            req.flash('success', {
+              msg: 'We\'ve successfully requested an invite for you.' +
+                ' Please check your email and follow the ' +
+                'instructions from Slack.'
+            });
+            req.user.sentSlackInvite = true;
+            req.user.save(function(err) {
+              if (err) {
+                return next(err);
+              }
+              return res.redirect('back');
+            });
+          } else {
+            req.flash('errors', {
+              msg: 'The invitation email did not go through for some reason.' +
+                ' Please try again or <a href=\'mailto:team@' +
+                'freecodecamp.com?subject=' +
+                'slack%20invite%20failed%20to%20send\'>' +
+                'email us</a>.'
+            });
+            return res.redirect('back');
+          }
+        });
+      } else {
+        req.flash('notice', {
+          msg: 'Before we can send your Slack invite, we need your email ' +
+            'address. Please update your profile information here.'
+        });
+        return res.redirect('/account');
+      }
+    } else {
+      req.flash('notice', {
+        msg: 'You need to sign in to Free Code Camp before ' +
+          'we can send you a Slack invite.'
+      });
+      return res.redirect('/account');
+    }
+  }
+ 
+  function twitter(req, res, next) {
+    // sends out random tweets about javascript
+    var T = new Twit({
+      'consumer_key': secrets.twitter.consumerKey,
+      'consumer_secret': secrets.twitter.consumerSecret,
+      'access_token': secrets.twitter.token,
+      'access_token_secret': secrets.twitter.tokenSecret
+    });
+ 
+    var screenName;
+    if (req.params.screenName) {
+      screenName = req.params.screenName;
+    } else {
+      screenName = 'freecodecamp';
+    }
+ 
+    T.get(
+      'statuses/user_timeline',
+      {
+        'screen_name': screenName,
+        count: 10
+      },
+      function(err, data) {
+        if (err) { return next(err); }
+        return res.json(data);
+      }
+    );
+  }
+ 
+ 
+  function getHelp(req, res) {
+    var userName = req.user.username;
+    var code = req.body.payload.code ? '\n```\n' +
+    req.body.payload.code + '\n```\n'
+      : '';
+    var challenge = req.body.payload.challenge;
+ 
+    slack.send({
+      text: '*@' + userName + '* wants help with ' + challenge + '. ' +
+        code + 'Hey, *@' + userName + '*, if no one helps you right ' +
+        'away, try typing out your problem in detail to me. Like this: ' +
+        'http://en.wikipedia.org/wiki/Rubber_duck_debugging',
+      channel: '#help',
+      username: 'Debuggy the Rubber Duck',
+      'icon_url': 'https://pbs.twimg.com/profile_images/' +
+      '3609875545/569237541c920fa78d78902069615caf.jpeg'
+    });
+    return res.sendStatus(200);
+  }
+ 
+  function getPair(req, res) {
+    var userName = req.user.username;
+    var challenge = req.body.payload.challenge;
+    slack.send({
+      text: [
+        'Anyone want to pair with *@',
+        userName,
+        '* on ',
+        challenge,
+        '?\nMake sure you install Screen Hero here: ',
+        'http://freecodecamp.com/field-guide/how-do-i-install-screenhero\n',
+        'Then start your pair program session with *@',
+        userName,
+        '* by typing \"/hero @',
+        userName,
+        '\" into Slack.\n And *@',
+        userName,
+        '*, be sure to launch Screen Hero, then keep coding. ',
+        'Another camper may pair with you soon.'
+      ].join(''),
+      channel: '#letspair',
+      username: 'Companion Cube',
+      'icon_url':
+        'https://lh3.googleusercontent.com/-f6xDPDV2rPE/AAAAAAAAAAI/' +
+        'AAAAAAAAAAA/mdlESXQu11Q/photo.jpg'
+    });
+    return res.sendStatus(200);
+  }
+ 
+  function sitemap(req, res, next) {
+    var appUrl = 'http://www.freecodecamp.com';
+    var now = moment(new Date()).format('YYYY-MM-DD');
+ 
+    // TODO(berks): refactor async to rx
+    async.parallel({
+        users: function(callback) {
+          User.find(
+            {
+              where: { 'profile.username': { nlike: '' } },
+              fields: { 'profile.username': true }
+            },
+            function(err, users) {
+              if (err) {
+                debug('User err: ', err);
+                callback(err);
+              } else {
+                Rx.Observable.from(users)
+                  .map(function(user) {
+                    return user.username;
+                  })
+                  .toArray()
+                  .subscribe(
+                    function(usernames) {
+                      callback(null, usernames);
+                    },
+                    callback
+                  );
+              }
+            });
+        },
+ 
+        challenges: function (callback) {
+          Challenge.find(
+            { fields: { name: true } },
+            function (err, challenges) {
+              if (err) {
+                debug('Challenge err: ', err);
+                callback(err);
+              } else {
+                Rx.Observable.from(challenges)
+                  .map(function(challenge) {
+                    return challenge.name;
+                  })
+                  .toArray()
+                  .subscribe(
+                    callback.bind(callback, null),
+                    callback
+                  );
+              }
+            });
+        },
+        stories: function (callback) {
+          Story.find(
+            { field: { link: true } },
+            function (err, stories) {
+              if (err) {
+                debug('Story err: ', err);
+                callback(err);
+              } else {
+                Rx.Observable.from(stories)
+                  .map(function(story) {
+                    return story.link;
+                  })
+                  .toArray()
+                  .subscribe(
+                    callback.bind(callback, null),
+                    callback
+                  );
+              }
+            }
+          );
+        },
+        nonprofits: function (callback) {
+          Nonprofit.find(
+            { field: { name: true } },
+            function(err, nonprofits) {
+              if (err) {
+                debug('User err: ', err);
+                callback(err);
+              } else {
+                Rx.Observable.from(nonprofits)
+                  .map(function(nonprofit) {
+                    return nonprofit.name;
+                  })
+                  .toArray()
+                  .subscribe(
+                    callback.bind(callback, null),
+                    callback
+                  );
+              }
+            });
+        },
+        fieldGuides: function(callback) {
+          FieldGuide.find(
+            { field: { name: true } },
+            function(err, fieldGuides) {
+              if (err) {
+                debug('User err: ', err);
+                callback(err);
+              } else {
+                Rx.Observable.from(fieldGuides)
+                  .map(function(fieldGuide) {
+                    return fieldGuide.name;
+                  })
+                  .toArray()
+                  .subscribe(
+                    callback.bind(callback, null),
+                    callback
+                  );
+              }
+            });
+        }
+      }, function(err, results) {
+        if (err) {
+          return next(err);
+        }
+        setTimeout(function() {
+          res.header('Content-Type', 'application/xml');
+          res.render('resources/sitemap', {
+            appUrl: appUrl,
+            now: now,
+            users: results.users,
+            challenges: results.challenges,
+            stories: results.stories,
+            nonprofits: results.nonprofits,
+            fieldGuides: results.fieldGuides
+          });
+        }, 0);
+      }
+    );
+  }
+ 
+  function chat(req, res) {
+    if (req.user && req.user.progressTimestamps.length > 5) {
+      res.redirect('http://freecodecamp.slack.com');
+    } else {
+      res.render('resources/chat', {
+        title: 'Watch us code live on Twitch.tv'
+      });
+    }
+  }
+ 
+  function jobsForm(req, res) {
+    res.render('resources/jobs-form', {
+      title: 'Employer Partnership Form for Job Postings,' +
+        ' Recruitment and Corporate Sponsorships'
+    });
+  }
+ 
+  function catPhotoSubmit(req, res) {
+    res.send(
+      'Success! You have submitted your cat photo. Return to your website ' +
+      'by typing any letter into your code editor.'
+    );
+  }
+ 
+  function nonprofits(req, res) {
+    res.render('resources/nonprofits', {
+      title: 'A guide to our Nonprofit Projects'
+    });
+  }
+ 
+  function nonprofitsForm(req, res) {
+    res.render('resources/nonprofits-form', {
+      title: 'Nonprofit Projects Proposal Form'
+    });
+  }
+ 
+  function agileProjectManagers(req, res) {
+    res.render('resources/pmi-acp-agile-project-managers', {
+      title: 'Get Agile Project Management Experience for the PMI-ACP'
+    });
+  }
+ 
+  function agileProjectManagersForm(req, res) {
+    res.render('resources/pmi-acp-agile-project-managers-form', {
+      title: 'Agile Project Management Program Application Form'
+    });
+  }
+ 
+  function twitch(req, res) {
+    res.render('resources/twitch', {
+      title: 'Enter Free Code Camp\'s Chat Rooms'
+    });
+  }
+ 
+  function unsubscribe(req, res, next) {
+    User.findOne({ email: req.params.email }, function(err, user) {
+      if (user) {
+        if (err) {
+          return next(err);
+        }
+        user.sendMonthlyEmail = false;
+        user.save(function () {
+          if (err) {
+            return next(err);
+          }
+          res.redirect('/unsubscribed');
+        });
+      } else {
+        res.redirect('/unsubscribed');
+      }
+    });
+  }
+ 
+  function unsubscribed(req, res) {
+    res.render('resources/unsubscribed', {
+      title: 'You have been unsubscribed'
+    });
+  }
+ 
+  function githubCalls(req, res, next) {
+    var githubHeaders = {
+      headers: {
+        'User-Agent': constantStrings.gitHubUserAgent
+      },
+      port: 80
+    };
+    request(
+      [
+        'https://api.github.com/repos/freecodecamp/',
+        'freecodecamp/pulls?client_id=',
+        secrets.github.clientID,
+        '&client_secret=',
+        secrets.github.clientSecret
+      ].join(''),
+      githubHeaders,
+      function(err, status1, pulls) {
+        if (err) { return next(err); }
+        pulls = pulls ?
+          Object.keys(JSON.parse(pulls)).length :
+          'Can\'t connect to github';
+ 
+        request(
+          [
+            'https://api.github.com/repos/freecodecamp/',
+            'freecodecamp/issues?client_id=',
+            secrets.github.clientID,
+            '&client_secret=',
+            secrets.github.clientSecret
+          ].join(''),
+          githubHeaders,
+          function (err, status2, issues) {
+            if (err) { return next(err); }
+            issues = ((pulls === parseInt(pulls, 10)) && issues) ?
+            Object.keys(JSON.parse(issues)).length - pulls :
+              "Can't connect to GitHub";
+            res.send({
+              issues: issues,
+              pulls: pulls
+            });
+          }
+        );
+      }
+    );
+  }
+ 
+  function trelloCalls(req, res, next) {
+    request(
+      'https://trello.com/1/boards/BA3xVpz9/cards?key=' +
+      secrets.trello.key,
+      function(err, status, trello) {
+        if (err) { return next(err); }
+        trello = (status && status.statusCode === 200) ?
+          (JSON.parse(trello)) :
+          'Can\'t connect to to Trello';
+ 
+        res.end(JSON.stringify(trello));
+      });
+  }
+ 
+  function bloggerCalls(req, res, next) {
+    request(
+      'https://www.googleapis.com/blogger/v3/blogs/2421288658305323950/' +
+        'posts?key=' +
+      secrets.blogger.key,
+      function (err, status, blog) {
+        if (err) { return next(err); }
+ 
+        blog = (status && status.statusCode === 200) ?
+          JSON.parse(blog) :
+          'Can\'t connect to Blogger';
+        res.end(JSON.stringify(blog));
+      }
+    );
+  }
+ 
+  function getCats(req, res) {
+    res.send(
+      [
+        {
+          'name': 'cute',
+          'imageLink': 'https://encrypted-tbn3.gstatic.com/images' +
+            '?q=tbn:ANd9GcRaP1ecF2jerISkdhjr4R9yM9-8ClUy-TA36MnDiFBukd5IvEME0g'
+        },
+        {
+          'name': 'grumpy',
+          'imageLink': 'http://cdn.grumpycats.com/wp-content/uploads/' +
+            '2012/09/GC-Gravatar-copy.png'
+        },
+        {
+          'name': 'mischievous',
+          'imageLink': 'http://www.kittenspet.com/wp-content' +
+            '/uploads/2012/08/cat_with_funny_face_3-200x200.jpg'
+        }
+      ]
+    );
+  }
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/boot/redirects.js.html b/coverage/lcov-report/server/boot/redirects.js.html new file mode 100644 index 00000000000000..edb4458da271e4 --- /dev/null +++ b/coverage/lcov-report/server/boot/redirects.js.html @@ -0,0 +1,111 @@ + + + + Code coverage report for server/boot/redirects.js + + + + + + +
+

Code coverage report for server/boot/redirects.js

+

+ Statements: 66.67% (6 / 9)      + Branches: 100% (0 / 0)      + Functions: 25% (1 / 4)      + Lines: 66.67% (6 / 9)      + Ignored: none      +

+
All files » server/boot/ » redirects.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +231 +1 +  +1 +  +  +  +  +  +  +1 +  +  +  +1 +  +  +  +  +  +1 +  + 
module.exports = function(app) {
+  var router = app.loopback.Router();
+ 
+  router.get('/nonprofit-project-instructions', function(req, res) {
+    res.redirect(
+      301,
+      '/field-guide/how-do-free-code-camps-nonprofit-projects-work'
+    );
+  });
+ 
+  router.get('/agile', function(req, res) {
+    res.redirect(301, '/pmi-acp-agile-project-managers');
+  });
+ 
+  router.get('/privacy', function(req, res) {
+    res.redirect(
+      301, '/field-guide/what-is-the-free-code-camp-privacy-policy?'
+    );
+  });
+ 
+  app.use(router);
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/boot/restApi.js.html b/coverage/lcov-report/server/boot/restApi.js.html new file mode 100644 index 00000000000000..4806e5bf6a9757 --- /dev/null +++ b/coverage/lcov-report/server/boot/restApi.js.html @@ -0,0 +1,57 @@ + + + + Code coverage report for server/boot/restApi.js + + + + + + +
+

Code coverage report for server/boot/restApi.js

+

+ Statements: 100% (3 / 3)      + Branches: 100% (0 / 0)      + Functions: 100% (1 / 1)      + Lines: 100% (3 / 3)      + Ignored: none      +

+
All files » server/boot/ » restApi.js
+
+
+

+
+
1 +2 +3 +4 +51 +1 +1 +  + 
module.exports = function mountRestApi(app) {
+  var restApiRoot = app.get('restApiRoot');
+  app.use(restApiRoot, app.loopback.rest());
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/boot/story.js.html b/coverage/lcov-report/server/boot/story.js.html new file mode 100644 index 00000000000000..91c86a8b5eb2e3 --- /dev/null +++ b/coverage/lcov-report/server/boot/story.js.html @@ -0,0 +1,1869 @@ + + + + Code coverage report for server/boot/story.js + + + + + + +
+

Code coverage report for server/boot/story.js

+

+ Statements: 16.28% (35 / 215)      + Branches: 0% (0 / 111)      + Functions: 2.5% (1 / 40)      + Lines: 16.43% (35 / 213)      + Ignored: none      +

+
All files » server/boot/ » story.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +6091 +  +  +  +  +  +  +  +  +1 +1 +1 +1 +  +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +  +1 +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
var nodemailer = require('nodemailer'),
+    sanitizeHtml = require('sanitize-html'),
+    moment = require('moment'),
+    mongodb = require('mongodb'),
+    // debug = require('debug')('freecc:cntr:story'),
+    utils = require('../utils'),
+    MongoClient = mongodb.MongoClient,
+    secrets = require('../../config/secrets');
+ 
+module.exports = function(app) {
+  var router = app.loopback.Router();
+  var User = app.models.User;
+  var Story = app.models.Story;
+ 
+  router.get('/stories/hotStories', hotJSON);
+  router.get('/stories/comments/:id', comments);
+  router.post('/stories/comment/', commentSubmit);
+  router.post('/stories/comment/:id/comment', commentOnCommentSubmit);
+  router.put('/stories/comment/:id/edit', commentEdit);
+  router.get('/stories/submit', submitNew);
+  router.get('/stories/submit/new-story', preSubmit);
+  router.post('/stories/preliminary', newStory);
+  router.post('/stories/', storySubmission);
+  router.get('/stories/', hot);
+  router.post('/stories/search', getStories);
+  router.get('/stories/:storyName', returnIndividualStory);
+  router.post('/stories/upvote/', upvote);
+ 
+  app.use(router);
+ 
+  function hotRank(timeValue, rank) {
+    /*
+    * Hotness ranking algorithm: http://amix.dk/blog/post/19588
+    * tMS = postedOnDate - foundationTime;
+    * Ranking...
+    * f(ts, 1, rank) = log(10)z + (ts)/45000;
+    */
+    var time48Hours = 172800000;
+    var hotness;
+    var z = Math.log(rank) / Math.log(10);
+    hotness = z + (timeValue / time48Hours);
+    return hotness;
+  }
+ 
+  function hotJSON(req, res, next) {
+    Story.find({order: 'timePosted DESC', limit: 1000}, function(err, stories) {
+      if (err) {
+        return next(err);
+      }
+      var foundationDate = 1413298800000;
+ 
+      var sliceVal = stories.length >= 100 ? 100 : stories.length;
+      return res.json(stories.map(function(elem) {
+        return elem;
+      }).sort(function(a, b) {
+        return hotRank(b.timePosted - foundationDate, b.rank, b.headline)
+          - hotRank(a.timePosted - foundationDate, a.rank, a.headline);
+      }).slice(0, sliceVal));
+ 
+    });
+  }
+ 
+  function hot(req, res) {
+    return res.render('stories/index', {
+      title: 'Hot stories currently trending on Camper News',
+      page: 'hot'
+    });
+  }
+ 
+  function submitNew(req, res) {
+    return res.render('stories/index', {
+      title: 'Submit a new story to Camper News',
+      page: 'submit'
+    });
+  }
+ 
+  /*
+  * no used anywhere
+  function search(req, res) {
+    return res.render('stories/index', {
+      title: 'Search the archives of Camper News',
+      page: 'search'
+    });
+  }
+ 
+  function recent(req, res) {
+    return res.render('stories/index', {
+      title: 'Recently submitted stories on Camper News',
+      page: 'recent'
+    });
+  }
+  */
+ 
+  function preSubmit(req, res) {
+ 
+    var data = req.query;
+    var cleanData = sanitizeHtml(data.url, {
+      allowedTags: [],
+      allowedAttributes: []
+    }).replace(/&quot;;/g, '"');
+    if (data.url.replace(/&/g, '&amp;') !== cleanData) {
+ 
+      req.flash('errors', {
+        msg: 'The data for this post is malformed'
+      });
+      return res.render('stories/index', {
+        page: 'stories/submit'
+      });
+    }
+ 
+    var title = data.title || '';
+    var image = data.image || '';
+    var description = data.description || '';
+    return res.render('stories/index', {
+      title: 'Confirm your Camper News story submission',
+      page: 'storySubmission',
+      storyURL: data.url,
+      storyTitle: title,
+      storyImage: image,
+      storyMetaDescription: description
+    });
+  }
+ 
+ 
+  function returnIndividualStory(req, res, next) {
+    var dashedName = req.params.storyName;
+ 
+    var storyName = dashedName.replace(/\-/g, ' ').trim();
+ 
+    Story.find({where: {'storyLink': storyName}}, function(err, story) {
+      if (err) {
+        return next(err);
+      }
+ 
+ 
+      if (story.length < 1) {
+        req.flash('errors', {
+          msg: "404: We couldn't find a story with that name. " +
+          'Please double check the name.'
+        });
+ 
+        return res.redirect('/stories/');
+      }
+ 
+      story = story.pop();
+      var dashedNameFull = story.storyLink.toLowerCase()
+        .replace(/\s+/g, ' ')
+        .replace(/\s/g, '-');
+      if (dashedNameFull !== dashedName) {
+        return res.redirect('../stories/' + dashedNameFull);
+      }
+ 
+      var userVoted = false;
+      try {
+        var votedObj = story.upVotes.filter(function(a) {
+          return a['upVotedByUsername'] === req.user['profile']['username'];
+        });
+        if (votedObj.length > 0) {
+          userVoted = true;
+        }
+      } catch(e) {
+        userVoted = false;
+      }
+      res.render('stories/index', {
+        title: story.headline,
+        link: story.link,
+        originalStoryLink: dashedName,
+        originalStoryAuthorEmail: story.author.email || '',
+        author: story.author,
+        description: story.description,
+        rank: story.upVotes.length,
+        upVotes: story.upVotes,
+        comments: story.comments,
+        id: story.id,
+        timeAgo: moment(story.timePosted).fromNow(),
+        image: story.image,
+        page: 'show',
+        storyMetaDescription: story.metaDescription,
+        hasUserVoted: userVoted
+      });
+    });
+  }
+ 
+  function getStories(req, res, next) {
+    MongoClient.connect(secrets.db, function(err, database) {
+      if (err) {
+        return next(err);
+      }
+      database.collection('stories').find({
+        '$text': {
+          '$search': req.body.data ? req.body.data.searchValue : ''
+        }
+      }, {
+        headline: 1,
+        timePosted: 1,
+        link: 1,
+        description: 1,
+        rank: 1,
+        upVotes: 1,
+        author: 1,
+        comments: 1,
+        image: 1,
+        storyLink: 1,
+        metaDescription: 1,
+        textScore: {
+          $meta: 'textScore'
+        }
+      }, {
+        sort: {
+          textScore: {
+            $meta: 'textScore'
+          }
+        }
+      }).toArray(function(err, items) {
+        if (err) {
+          return next(err);
+        }
+        if (items !== null && items.length !== 0) {
+          return res.json(items);
+        }
+        return res.sendStatus(404);
+      });
+    });
+  }
+ 
+  function upvote(req, res, next) {
+    var data = req.body.data;
+    Story.find({'id': data.id}, function(err, story) {
+      if (err) {
+        return next(err);
+      }
+      story = story.pop();
+      story.rank++;
+      story.upVotes.push(
+        {
+          upVotedBy: req.user.id,
+          upVotedByUsername: req.user.username
+        }
+      );
+      story.markModified('rank');
+      story.save();
+      // NOTE(Berks): This logic is full of wholes and race conditions
+      // this could be the source of many 'can't set headers after
+      // they are sent'
+      // errors. This needs cleaning
+      User.findOne(
+        { where: { id: story.author.userId } },
+        function(err, user) {
+          if (err) { return next(err); }
+ 
+          user.progressTimestamps.push(Date.now() || 0);
+          user.save(function (err) {
+            req.user.save(function (err) {
+              if (err) { return next(err); }
+            });
+            req.user.progressTimestamps.push(Date.now() || 0);
+            if (err) {
+              return next(err);
+            }
+          });
+        }
+      );
+      return res.send(story);
+    });
+  }
+ 
+  function comments(req, res, next) {
+    var data = req.params.id;
+    Comment.find(
+      { where: {'id': data } },
+      function(err, comment) {
+        if (err) {
+          return next(err);
+        }
+        comment = comment.pop();
+        return res.send(comment);
+      });
+  }
+ 
+  function newStory(req, res, next) {
+    if (!req.user) {
+      return next(new Error('Must be logged in'));
+    }
+    var url = req.body.data.url;
+    var cleanURL = sanitizeHtml(url, {
+      allowedTags: [],
+      allowedAttributes: []
+    }).replace(/&quot;/g, '"');
+    if (cleanURL !== url) {
+      req.flash('errors', {
+        msg: "The URL you submitted doesn't appear valid"
+      });
+      return res.json({
+        alreadyPosted: true,
+        storyURL: '/stories/submit'
+      });
+ 
+    }
+    if (url.search(/^https?:\/\//g) === -1) {
+      url = 'http://' + url;
+    }
+    Story.find(
+      { where: {'link': url} },
+      function(err, story) {
+        if (err) {
+          return next(err);
+        }
+        if (story.length) {
+          req.flash('errors', {
+            msg: "Someone's already posted that link. Here's the discussion."
+          });
+          return res.json({
+            alreadyPosted: true,
+            storyURL: '/stories/' + story.pop().storyLink
+          });
+        }
+        utils.getURLTitle(url, processResponse);
+      }
+    );
+ 
+    function processResponse(err, story) {
+      if (err) {
+        res.json({
+          alreadyPosted: false,
+          storyURL: url,
+          storyTitle: '',
+          storyImage: '',
+          storyMetaDescription: ''
+        });
+      } else {
+        res.json({
+          alreadyPosted: false,
+          storyURL: url,
+          storyTitle: story.title,
+          storyImage: story.image,
+          storyMetaDescription: story.description
+        });
+      }
+    }
+  }
+ 
+  function storySubmission(req, res, next) {
+    var data = req.body.data;
+    if (!req.user) {
+      return next(new Error('Not authorized'));
+    }
+    var storyLink = data.headline
+      .replace(/[^a-z0-9\s]/gi, '')
+      .replace(/\s+/g, ' ')
+      .toLowerCase()
+      .trim();
+ 
+    var link = data.link;
+ 
+    if (link.search(/^https?:\/\//g) === -1) {
+      link = 'http://' + link;
+    }
+ 
+    Story.count({
+      storyLink: { like: new RegExp('^' + storyLink + '(?: [0-9]+)?$', 'i') }
+    }, function (err, storyCount) {
+      if (err) {
+        return next(err);
+      }
+ 
+      // if duplicate storyLink add unique number
+      storyLink = (storyCount === 0) ? storyLink : storyLink + ' ' + storyCount;
+ 
+      var link = data.link;
+      if (link.search(/^https?:\/\//g) === -1) {
+        link = 'http://' + link;
+      }
+      var story = new Story({
+        headline: sanitizeHtml(data.headline, {
+          allowedTags: [],
+          allowedAttributes: []
+        }).replace(/&quot;/g, '"'),
+        timePosted: Date.now(),
+        link: link,
+        description: sanitizeHtml(data.description, {
+          allowedTags: [],
+          allowedAttributes: []
+        }).replace(/&quot;/g, '"'),
+        rank: 1,
+        upVotes: [({
+          upVotedBy: req.user.id,
+          upVotedByUsername: req.user.username
+        })],
+        author: {
+          picture: req.user.picture,
+          userId: req.user.id,
+          username: req.user.username,
+          email: req.user.email
+        },
+        comments: [],
+        image: data.image,
+        storyLink: storyLink,
+        metaDescription: data.storyMetaDescription,
+        originalStoryAuthorEmail: req.user.email
+      });
+      story.save(function (err) {
+        if (err) {
+          return next(err);
+        }
+        req.user.progressTimestamps.push(Date.now() || 0);
+        req.user.save(function (err) {
+          if (err) {
+            return next(err);
+          }
+          res.send(JSON.stringify({
+            storyLink: story.storyLink.replace(/\s+/g, '-').toLowerCase()
+          }));
+        });
+      });
+    });
+  }
+ 
+  function commentSubmit(req, res, next) {
+    var data = req.body.data;
+    if (!req.user) {
+      return next(new Error('Not authorized'));
+    }
+    var sanitizedBody = sanitizeHtml(data.body,
+      {
+        allowedTags: [],
+        allowedAttributes: []
+      }).replace(/&quot;/g, '"');
+    if (data.body !== sanitizedBody) {
+      req.flash('errors', {
+        msg: 'HTML is not allowed'
+      });
+      return res.send(true);
+    }
+    var comment = new Comment({
+      associatedPost: data.associatedPost,
+      originalStoryLink: data.originalStoryLink,
+      originalStoryAuthorEmail: data.originalStoryAuthorEmail,
+      body: sanitizedBody,
+      rank: 0,
+      upvotes: 0,
+      author: {
+        picture: req.user.picture,
+        userId: req.user.id,
+        username: req.user.username,
+        email: req.user.email
+      },
+      comments: [],
+      topLevel: true,
+      commentOn: Date.now()
+    });
+ 
+    commentSave(comment, Story, res, next);
+  }
+ 
+  function commentOnCommentSubmit(req, res, next) {
+    var data = req.body.data;
+    if (!req.user) {
+      return next(new Error('Not authorized'));
+    }
+ 
+    var sanitizedBody = sanitizeHtml(
+      data.body,
+      {
+        allowedTags: [],
+        allowedAttributes: []
+      }
+    ).replace(/&quot;/g, '"');
+ 
+    if (data.body !== sanitizedBody) {
+      req.flash('errors', {
+        msg: 'HTML is not allowed'
+      });
+      return res.send(true);
+    }
+ 
+    var comment = new Comment({
+      associatedPost: data.associatedPost,
+      body: sanitizedBody,
+      rank: 0,
+      upvotes: 0,
+      originalStoryLink: data.originalStoryLink,
+      originalStoryAuthorEmail: data.originalStoryAuthorEmail,
+      author: {
+        picture: req.user.picture,
+        userId: req.user.id,
+        username: req.user.username,
+        email: req.user.email
+      },
+      comments: [],
+      topLevel: false,
+      commentOn: Date.now()
+    });
+    commentSave(comment, Comment, res, next);
+  }
+ 
+  function commentEdit(req, res, next) {
+ 
+    Comment.find({ id: req.params.id }, function(err, cmt) {
+      if (err) {
+        return next(err);
+      }
+      cmt = cmt.pop();
+ 
+      if (!req.user && cmt.author.userId !== req.user.id) {
+        return next(new Error('Not authorized'));
+      }
+ 
+      var sanitizedBody = sanitizeHtml(req.body.body, {
+        allowedTags: [],
+        allowedAttributes: []
+      }).replace(/&quot;/g, '"');
+      if (req.body.body !== sanitizedBody) {
+        req.flash('errors', {
+          msg: 'HTML is not allowed'
+        });
+        return res.send(true);
+      }
+ 
+      cmt.body = sanitizedBody;
+      cmt.commentOn = Date.now();
+      cmt.save(function(err) {
+        if (err) {
+          return next(err);
+        }
+        res.send(true);
+      });
+ 
+    });
+ 
+  }
+ 
+  function commentSave(comment, Context, res, next) {
+    comment.save(function(err, data) {
+      if (err) {
+        return next(err);
+      }
+      try {
+        // Based on the context retrieve the parent
+        // object of the comment (Story/Comment)
+        Context.find({
+          id: data.associatedPost
+        }, function (err, associatedContext) {
+          if (err) {
+            return next(err);
+          }
+          associatedContext = associatedContext.pop();
+          if (associatedContext) {
+            associatedContext.comments.push(data.id);
+            associatedContext.save(function (err) {
+              if (err) {
+                return next(err);
+              }
+              res.send(true);
+            });
+          }
+          // Find the author of the parent object
+          User.findOne({
+            'profile.username': associatedContext.author.username
+          }, function(err, recipient) {
+            if (err) {
+              return next(err);
+            }
+            // If the emails of both authors differ,
+            // only then proceed with email notification
+            if (
+              typeof data.author !== 'undefined' &&
+              data.author.email &&
+              typeof recipient !== 'undefined' &&
+              recipient.email &&
+              (data.author.email !== recipient.email)
+            ) {
+              var transporter = nodemailer.createTransport({
+                service: 'Mandrill',
+                auth: {
+                  user: secrets.mandrill.user,
+                  pass: secrets.mandrill.password
+                }
+              });
+ 
+              var mailOptions = {
+                to: recipient.email,
+                from: 'Team@freecodecamp.com',
+                subject: data.author.username +
+                ' replied to your post on Camper News',
+                text: [
+                  'Just a quick heads-up: ',
+                  data.author.username + ' replied to you on Camper News.',
+                  'You can keep this conversation going.',
+                  'Just head back to the discussion here: ',
+                  'http://freecodecamp.com/stories/' + data.originalStoryLink,
+                  '- the Free Code Camp Volunteer Team'
+                ].join('\n')
+              };
+ 
+              transporter.sendMail(mailOptions, function (err) {
+                if (err) {
+                  return err;
+                }
+              });
+            }
+          });
+        });
+      } catch (e) {
+        return next(err);
+      }
+    });
+  }
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/boot/user.js.html b/coverage/lcov-report/server/boot/user.js.html new file mode 100644 index 00000000000000..0ceb54332e98f7 --- /dev/null +++ b/coverage/lcov-report/server/boot/user.js.html @@ -0,0 +1,2076 @@ + + + + Code coverage report for server/boot/user.js + + + + + + +
+

Code coverage report for server/boot/user.js

+

+ Statements: 14.24% (41 / 288)      + Branches: 0% (0 / 150)      + Functions: 1.64% (1 / 61)      + Lines: 15.13% (41 / 271)      + Ignored: none      +

+
All files » server/boot/ » user.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +6781 +  +  +  +  +  +  +  +  +  +1 +1 +1 +1 +1 +  +1 +  +  +1 +  +  +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +  +1 +  +1 +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
var _ = require('lodash'),
+  R = require('ramda'),
+  async = require('async'),
+  crypto = require('crypto'),
+  nodemailer = require('nodemailer'),
+  moment = require('moment'),
+  debug = require('debug')('freecc:cntr:userController'),
+ 
+  secrets = require('../../config/secrets');
+ 
+module.exports = function(app) {
+  var router = app.loopback.Router();
+  var User = app.models.User;
+  var Story = app.models.Story;
+  var Comment = app.models.Comment;
+ 
+  router.get('/login', function(req, res) {
+    res.redirect(301, '/signin');
+  });
+  router.get('/logout', function(req, res) {
+    res.redirect(301, '/signout');
+  });
+  router.get('/signin', getSignin);
+  router.get('/signout', signout);
+  router.get('/forgot', getForgot);
+  router.post('/forgot', postForgot);
+  router.get('/reset/:token', getReset);
+  router.post('/reset/:token', postReset);
+  router.get('/email-signup', getEmailSignup);
+  router.get('/email-signin', getEmailSignin);
+  router.get('/account/api', getAccountAngular);
+  router.post('/account/profile', postUpdateProfile);
+  router.post('/account/password', postUpdatePassword);
+  router.post('/account/delete', postDeleteAccount);
+  router.get('/account/unlink/:provider', getOauthUnlink);
+  router.get('/account', getAccount);
+  // Ensure this is the last route!
+  router.get('/:username', returnUser);
+ 
+  app.use(router);
+ 
+  /**
+  * GET /signin
+  * Siginin page.
+  */
+ 
+  function getSignin (req, res) {
+    if (req.user) {
+      return res.redirect('/');
+    }
+    res.render('account/signin', {
+      title: 'Free Code Camp Login'
+    });
+  }
+ 
+  /**
+  * GET /signout
+  * Log out.
+  */
+ 
+  function signout (req, res) {
+    req.logout();
+    res.redirect('/');
+  }
+ 
+  /**
+  * GET /email-signup
+  * Signup page.
+  */
+ 
+  function getEmailSignin (req, res) {
+    if (req.user) {
+      return res.redirect('/');
+    }
+    res.render('account/email-signin', {
+      title: 'Sign in to your Free Code Camp Account'
+    });
+  }
+ 
+  /**
+  * GET /signin
+  * Signup page.
+  */
+ 
+  function getEmailSignup (req, res) {
+    if (req.user) {
+      return res.redirect('/');
+    }
+    res.render('account/email-signup', {
+      title: 'Create Your Free Code Camp Account'
+    });
+  }
+ 
+  /**
+  * GET /account
+  * Profile page.
+  */
+ 
+  function getAccount (req, res) {
+    res.render('account/account', {
+      title: 'Manage your Free Code Camp Account'
+    });
+  }
+ 
+  /**
+  * Angular API Call
+  */
+ 
+  function getAccountAngular (req, res) {
+    res.json({
+      user: req.user
+    });
+  }
+ 
+ 
+  /**
+  * GET /campers/:username
+  * Public Profile page.
+  */
+ 
+  function returnUser (req, res, next) {
+    User.findOne(
+      { where: { username: req.params.username.toLowerCase() } },
+      function(err, user) {
+        if (err) {
+          debug('Username err: ', err);
+          return next(err);
+        }
+        if (user) {
+          user.progressTimestamps =
+            user.progressTimestamps.sort(function(a, b) {
+              return a - b;
+            });
+ 
+          var timeObject = Object.create(null);
+          R.forEach(function(time) {
+            timeObject[moment(time).format('YYYY-MM-DD')] = time;
+          }, user.progressTimestamps);
+ 
+          var tmpLongest = 1;
+          var timeKeys = R.keys(timeObject);
+ 
+          user.longestStreak = 0;
+          for (var i = 1; i <= timeKeys.length; i++) {
+            if (moment(timeKeys[i - 1]).add(1, 'd').toString()
+              === moment(timeKeys[i]).toString()) {
+              tmpLongest++;
+              if (tmpLongest > user.longestStreak) {
+                user.longestStreak = tmpLongest;
+              }
+            } else {
+              tmpLongest = 1;
+            }
+          }
+ 
+          timeKeys = timeKeys.reverse();
+          tmpLongest = 1;
+ 
+          user.currentStreak = 1;
+          var today = moment(Date.now()).format('YYYY-MM-DD');
+ 
+          if (
+            moment(today).toString() === moment(timeKeys[0]).toString() ||
+            moment(today).subtract(1, 'd').toString() ===
+              moment(timeKeys[0]).toString()
+          ) {
+            for (var _i = 1; _i <= timeKeys.length; _i++) {
+ 
+              if (
+                moment(timeKeys[_i - 1]).subtract(1, 'd').toString() ===
+                  moment(timeKeys[_i]).toString()
+              ) {
+ 
+                tmpLongest++;
+ 
+                if (tmpLongest > user.currentStreak) {
+                  user.currentStreak = tmpLongest;
+                }
+              } else {
+                break;
+              }
+            }
+          } else {
+            user.currentStreak = 1;
+          }
+ 
+          user.save(function(err) {
+            if (err) {
+              return next(err);
+            }
+ 
+            var data = {};
+            var progressTimestamps = user.progressTimestamps;
+            progressTimestamps.forEach(function(timeStamp) {
+              data[(timeStamp / 1000)] = 1;
+            });
+ 
+            user.currentStreak = user.currentStreak || 1;
+            user.longestStreak = user.longestStreak || 1;
+            var challenges = user.completedChallenges.filter(function ( obj ) {
+              return obj.challengeType === 3 || obj.challengeType === 4;
+            });
+ 
+            res.render('account/show', {
+              title: 'Camper ' + user.username + '\'s portfolio',
+              username: user.username,
+              name: user.name,
+              location: user.location,
+              githubProfile: user.githubProfile,
+              linkedinProfile: user.linkedinProfile,
+              codepenProfile: user.codepenProfile,
+              facebookProfile: user.facebookProfile,
+              twitterHandle: user.twitterHandle,
+              bio: user.bio,
+              picture: user.picture,
+              progressTimestamps: user.progressTimestamps,
+              website1Link: user.website1Link,
+              website1Title: user.website1Title,
+              website1Image: user.website1Image,
+              website2Link: user.website2Link,
+              website2Title: user.website2Title,
+              website2Image: user.website2Image,
+              website3Link: user.website3Link,
+              website3Title: user.website3Title,
+              website3Image: user.website3Image,
+              challenges: challenges,
+              bonfires: user.completedChallenges.filter(function(challenge) {
+                return challenge.challengeType === 5;
+              }),
+              calender: data,
+              moment: moment,
+              longestStreak: user.longestStreak +
+                (user.longestStreak === 1 ? ' day' : ' days'),
+              currentStreak: user.currentStreak +
+                (user.currentStreak === 1 ? ' day' : ' days')
+            });
+          });
+        } else {
+          req.flash('errors', {
+            msg: "404: We couldn't find a page with that url. " +
+              'Please double check the link.'
+          });
+          return res.redirect('/');
+        }
+      }
+    );
+  }
+ 
+  /**
+  * POST /account/profile
+  * Update profile information.
+  */
+ 
+  function postUpdateProfile (req, res, next) {
+ 
+    User.findById(req.user.id, function(err) {
+      if (err) { return next(err); }
+      var errors = req.validationErrors();
+      if (errors) {
+        req.flash('errors', errors);
+        return res.redirect('/account');
+      }
+ 
+      User.findOne({
+        where: { email: req.body.email }
+      }, function(err, existingEmail) {
+        if (err) {
+          return next(err);
+        }
+        var user = req.user;
+        if (existingEmail && existingEmail.email !== user.email) {
+          req.flash('errors', {
+            msg: 'An account with that email address already exists.'
+          });
+          return res.redirect('/account');
+        }
+        User.findOne(
+          { where: { username: req.body.username } },
+          function(err, existingUsername) {
+            if (err) {
+              return next(err);
+            }
+            var user = req.user;
+            if (
+              existingUsername &&
+              existingUsername.username !== user.username
+            ) {
+              req.flash('errors', {
+                msg: 'An account with that username already exists.'
+              });
+              return res.redirect('/account');
+            }
+            var body = req.body || {};
+            user.email = body.email.trim() || '';
+            user.name = body.name.trim() || '';
+            user.username = body.username.trim() || '';
+            user.location = body.location.trim() || '';
+ 
+            user.githubProfile = body.githubProfile.trim() || '';
+            user.facebookProfile = body.facebookProfile.trim() || '';
+            user.linkedinProfile = body.linkedinProfile.trim() || '';
+ 
+            user.codepenProfile = body.codepenProfile.trim() || '';
+            user.twitterHandle = body.twitterHandle.trim() || '';
+            user.bio = body.bio.trim() || '';
+ 
+            user.picture = body.picture.trim() ||
+              'https://s3.amazonaws.com/freecodecamp/' +
+              'camper-image-placeholder.png';
+            user.website1Title = body.website1Title.trim() || '';
+            user.website1Link = body.website1Link.trim() || '';
+            user.website1Image = body.website1Image.trim() || '';
+ 
+            user.website2Title = body.website2Title.trim() || '';
+            user.website2Link = body.website2Link.trim() || '';
+            user.website2Image = body.website2Image.trim() || '';
+ 
+            user.website3Title = body.website3Title.trim() || '';
+            user.website3Link = body.website3Link.trim() || '';
+            user.website3Image = body.website3Image.trim() || '';
+ 
+ 
+            user.save(function (err) {
+              if (err) {
+                return next(err);
+              }
+              updateUserStoryPictures(
+                user.id.toString(),
+                user.picture,
+                user.username,
+                function(err) {
+                  if (err) { return next(err); }
+                  req.flash('success', {
+                    msg: 'Profile information updated.'
+                  });
+                  res.redirect('/account');
+                }
+              );
+            });
+          }
+        );
+      });
+    });
+  }
+ 
+  /**
+  * POST /account/password
+  * Update current password.
+  */
+ 
+  function postUpdatePassword (req, res, next) {
+    req.assert('password', 'Password must be at least 4 characters long')
+      .len(4);
+ 
+    req.assert('confirmPassword', 'Passwords do not match')
+      .equals(req.body.password);
+ 
+    var errors = req.validationErrors();
+ 
+    if (errors) {
+      req.flash('errors', errors);
+      return res.redirect('/account');
+    }
+ 
+    User.findById(req.user.id, function(err, user) {
+      if (err) { return next(err); }
+ 
+      user.password = req.body.password;
+ 
+      user.save(function(err) {
+        if (err) { return next(err); }
+ 
+        req.flash('success', { msg: 'Password has been changed.' });
+        res.redirect('/account');
+      });
+    });
+  }
+ 
+  /**
+  * POST /account/delete
+  * Delete user account.
+  */
+ 
+  function postDeleteAccount (req, res, next) {
+    User.destroyById(req.user.id, function(err) {
+      if (err) { return next(err); }
+      req.logout();
+      req.flash('info', { msg: 'Your account has been deleted.' });
+      res.redirect('/');
+    });
+  }
+ 
+  /**
+  * GET /account/unlink/:provider
+  * Unlink OAuth provider.
+  */
+ 
+  function getOauthUnlink (req, res, next) {
+    var provider = req.params.provider;
+    User.findById(req.user.id, function(err, user) {
+      if (err) { return next(err); }
+ 
+      user[provider] = null;
+      user.tokens =
+        _.reject(user.tokens, function(token) {
+          return token.kind === provider;
+        });
+ 
+      user.save(function(err) {
+        if (err) { return next(err); }
+        req.flash('info', { msg: provider + ' account has been unlinked.' });
+        res.redirect('/account');
+      });
+    });
+  }
+ 
+  /**
+  * GET /reset/:token
+  * Reset Password page.
+  */
+ 
+  function getReset (req, res, next) {
+    if (req.isAuthenticated()) {
+      return res.redirect('/');
+    }
+    User.findOne(
+      {
+        where: {
+          resetPasswordToken: req.params.token,
+          resetPasswordExpires: Date.now()
+        }
+      },
+      function(err, user) {
+        if (err) { return next(err); }
+        if (!user) {
+          req.flash('errors', {
+            msg: 'Password reset token is invalid or has expired.'
+          });
+          return res.redirect('/forgot');
+        }
+        res.render('account/reset', {
+          title: 'Password Reset',
+          token: req.params.token
+        });
+      });
+  }
+ 
+  /**
+  * POST /reset/:token
+  * Process the reset password request.
+  */
+ 
+  function postReset (req, res, next) {
+    var errors = req.validationErrors();
+ 
+    if (errors) {
+      req.flash('errors', errors);
+      return res.redirect('back');
+    }
+ 
+    async.waterfall([
+      function(done) {
+        User.findOne(
+          {
+            where: {
+              resetPasswordToken: req.params.token,
+              resetPasswordExpires: Date.now()
+            }
+          },
+          function(err, user) {
+            if (err) { return next(err); }
+            if (!user) {
+              req.flash('errors', {
+                msg: 'Password reset token is invalid or has expired.'
+              });
+              return res.redirect('back');
+            }
+ 
+            user.password = req.body.password;
+            user.resetPasswordToken = null;
+            user.resetPasswordExpires = null;
+ 
+            user.save(function(err) {
+              if (err) { return done(err); }
+              req.logIn(user, function(err) {
+                done(err, user);
+              });
+            });
+          });
+      },
+      function(user, done) {
+        var transporter = nodemailer.createTransport({
+          service: 'Mandrill',
+          auth: {
+            user: secrets.mandrill.user,
+            pass: secrets.mandrill.password
+          }
+        });
+        var mailOptions = {
+          to: user.email,
+          from: 'Team@freecodecamp.com',
+          subject: 'Your Free Code Camp password has been changed',
+          text: [
+            'Hello,\n\n',
+            'This email is confirming that you requested to',
+            'reset your password for your Free Code Camp account.',
+            'This is your email:',
+            user.email,
+            '\n'
+          ].join(' ')
+        };
+        transporter.sendMail(mailOptions, function(err) {
+          if (err) { return done(err); }
+          req.flash('success', {
+            msg: 'Success! Your password has been changed.'
+          });
+          done();
+        });
+      }
+    ], function(err) {
+      if (err) { return next(err); }
+      res.redirect('/');
+    });
+  }
+ 
+  /**
+  * GET /forgot
+  * Forgot Password page.
+  */
+ 
+  function getForgot (req, res) {
+    if (req.isAuthenticated()) {
+      return res.redirect('/');
+    }
+    res.render('account/forgot', {
+      title: 'Forgot Password'
+    });
+  }
+ 
+  /**
+  * POST /forgot
+  * Create a random token, then the send user an email with a reset link.
+  */
+ 
+  function postForgot (req, res, next) {
+    var errors = req.validationErrors();
+ 
+    if (errors) {
+      req.flash('errors', errors);
+      return res.redirect('/forgot');
+    }
+ 
+    async.waterfall([
+      function(done) {
+        crypto.randomBytes(16, function(err, buf) {
+          if (err) { return done(err); }
+          var token = buf.toString('hex');
+          done(null, token);
+        });
+      },
+      function(token, done) {
+        User.findOne({
+          where: { email: req.body.email.toLowerCase() }
+        }, function(err, user) {
+          if (err) { return done(err); }
+          if (!user) {
+            req.flash('errors', {
+              msg: 'No account with that email address exists.'
+            });
+            return res.redirect('/forgot');
+          }
+ 
+          user.resetPasswordToken = token;
+          // 3600000 = 1 hour
+          user.resetPasswordExpires = Date.now() + 3600000;
+ 
+          user.save(function(err) {
+            if (err) { return done(err); }
+            done(null, token, user);
+          });
+        });
+      },
+      function(token, user, done) {
+        var transporter = nodemailer.createTransport({
+          service: 'Mandrill',
+          auth: {
+            user: secrets.mandrill.user,
+            pass: secrets.mandrill.password
+          }
+        });
+        var mailOptions = {
+          to: user.email,
+          from: 'Team@freecodecamp.com',
+          subject: 'Reset your Free Code Camp password',
+          text: [
+            'You are receiving this email because you (or someone else)\n',
+            'requested we reset your Free Code Camp account\'s password.\n\n',
+            'Please click on the following link, or paste this into your\n',
+            'browser to complete the process:\n\n',
+            'http://',
+            req.headers.host,
+            '/reset/',
+            token,
+            '\n\n',
+            'If you did not request this, please ignore this email and\n',
+            'your password will remain unchanged.\n'
+          ].join('')
+        };
+        transporter.sendMail(mailOptions, function(err) {
+          if (err) { return done(err); }
+          req.flash('info', {
+            msg: 'An e-mail has been sent to ' +
+            user.email +
+            ' with further instructions.'
+          });
+          done(null, 'done');
+        });
+      }
+    ], function(err) {
+      if (err) { return next(err); }
+      res.redirect('/forgot');
+    });
+  }
+ 
+  function updateUserStoryPictures(userId, picture, username, cb) {
+ 
+    var counter = 0,
+      foundStories,
+      foundComments;
+ 
+    Story.find({ 'author.userId': userId }, function (err, stories) {
+      if (err) {
+        return cb(err);
+      }
+      foundStories = stories;
+      counter++;
+      saveStoriesAndComments();
+    });
+ 
+    Comment.find({ 'author.userId': userId }, function (err, comments) {
+      if (err) {
+        return cb(err);
+      }
+      foundComments = comments;
+      counter++;
+      saveStoriesAndComments();
+    });
+ 
+    function saveStoriesAndComments() {
+      if (counter !== 2) {
+        return;
+      }
+      var tasks = [];
+      R.forEach(function (comment) {
+        comment.author.picture = picture;
+        comment.author.username = username;
+        tasks.push(function (cb) {
+          comment.save(cb);
+        });
+      }, foundComments);
+ 
+      R.forEach(function (story) {
+        story.author.picture = picture;
+        story.author.username = username;
+        tasks.push(function (cb) {
+          story.save(cb);
+        });
+      }, foundStories);
+      async.parallel(tasks, function (err) {
+        if (err) {
+          return cb(err);
+        }
+        cb();
+      });
+    }
+  }
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/config.development.js.html b/coverage/lcov-report/server/config.development.js.html new file mode 100644 index 00000000000000..c8ad19225e7198 --- /dev/null +++ b/coverage/lcov-report/server/config.development.js.html @@ -0,0 +1,99 @@ + + + + Code coverage report for server/config.development.js + + + + + + +
+

Code coverage report for server/config.development.js

+

+ Statements: 100% (1 / 1)      + Branches: 100% (0 / 0)      + Functions: 100% (0 / 0)      + Lines: 100% (1 / 1)      + Ignored: none      +

+
All files » server/ » config.development.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +191 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
module.exports = {
+  host: '127.0.0.1',
+  sessionSecret: process.env.SESSION_SECRET,
+ 
+  trello: {
+    key: process.env.TRELLO_KEY,
+    secret: process.env.TRELLO_SECRET
+  },
+ 
+  blogger: {
+    key: process.env.BLOGGER_KEY
+  },
+ 
+  github: {
+    clientID: process.env.GITHUB_ID,
+    clientSecret: process.env.GITHUB_SECRET
+  }
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/config.local.js.html b/coverage/lcov-report/server/config.local.js.html new file mode 100644 index 00000000000000..60f05ee8052fdd --- /dev/null +++ b/coverage/lcov-report/server/config.local.js.html @@ -0,0 +1,60 @@ + + + + Code coverage report for server/config.local.js + + + + + + +
+

Code coverage report for server/config.local.js

+

+ Statements: 100% (2 / 2)      + Branches: 100% (0 / 0)      + Functions: 100% (0 / 0)      + Lines: 100% (2 / 2)      + Ignored: none      +

+
All files » server/ » config.local.js
+
+
+

+
+
1 +2 +3 +4 +5 +61 +  +1 +  +  + 
var globalConfig = require('../common/config.global');
+ 
+module.exports = {
+  restApiRoot: globalConfig.restApi
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/datasources.local.js.html b/coverage/lcov-report/server/datasources.local.js.html new file mode 100644 index 00000000000000..8c34ccf82fafc1 --- /dev/null +++ b/coverage/lcov-report/server/datasources.local.js.html @@ -0,0 +1,102 @@ + + + + Code coverage report for server/datasources.local.js + + + + + + +
+

Code coverage report for server/datasources.local.js

+

+ Statements: 100% (2 / 2)      + Branches: 100% (0 / 0)      + Functions: 100% (0 / 0)      + Lines: 100% (2 / 2)      + Ignored: none      +

+
All files » server/ » datasources.local.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +201 +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
var secrets = require('../config/secrets');
+ 
+module.exports = {
+  db: {
+    connector: 'mongodb',
+    url: process.env.MONGOHQ_URL
+  },
+  mail: {
+    connector: 'mail',
+    transports: [{
+      type: 'smtp',
+      service: 'Mandrill',
+      auth: {
+        user: secrets.mandrill.user,
+        pass: secrets.mandrill.password
+      }
+    }]
+  }
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/index.html b/coverage/lcov-report/server/index.html new file mode 100644 index 00000000000000..46ec44b833bfc3 --- /dev/null +++ b/coverage/lcov-report/server/index.html @@ -0,0 +1,125 @@ + + + + Code coverage report for server/ + + + + + + +
+

Code coverage report for server/

+

+ Statements: 56.7% (55 / 97)      + Branches: 16.13% (5 / 31)      + Functions: 20% (2 / 10)      + Lines: 56.7% (55 / 97)      + Ignored: none      +

+
All files » server/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
config.development.js100%(1 / 1)100%(0 / 0)100%(0 / 0)100%(1 / 1)
config.local.js100%(2 / 2)100%(0 / 0)100%(0 / 0)100%(2 / 2)
datasources.local.js100%(2 / 2)100%(0 / 0)100%(0 / 0)100%(2 / 2)
passport-providers.js100%(3 / 3)100%(0 / 0)100%(0 / 0)100%(3 / 3)
server.js52.81%(47 / 89)16.13%(5 / 31)20%(2 / 10)52.81%(47 / 89)
+
+
+ + + + + + diff --git a/coverage/lcov-report/server/passport-providers.js.html b/coverage/lcov-report/server/passport-providers.js.html new file mode 100644 index 00000000000000..b4a8ebafa29089 --- /dev/null +++ b/coverage/lcov-report/server/passport-providers.js.html @@ -0,0 +1,414 @@ + + + + Code coverage report for server/passport-providers.js + + + + + + +
+

Code coverage report for server/passport-providers.js

+

+ Statements: 100% (3 / 3)      + Branches: 100% (0 / 0)      + Functions: 100% (0 / 0)      + Lines: 100% (3 / 3)      + Ignored: none      +

+
All files » server/ » passport-providers.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +1241 +1 +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
var successRedirect = '/';
+var failureRedirect = '/login';
+module.exports = {
+  local: {
+    provider: 'local',
+    module: 'passport-local',
+    usernameField: 'email',
+    passwordField: 'password',
+    authPath: '/auth/local',
+    successRedirect: successRedirect,
+    failureRedirect: '/email-signin',
+    session: true,
+    failureFlash: true
+  },
+  'facebook-login': {
+    provider: 'facebook',
+    module: 'passport-facebook',
+    clientID: process.env.FACEBOOK_ID,
+    clientSecret: process.env.FACEBOOK_SECRET,
+    authPath: '/auth/facebook',
+    callbackURL: '/auth/facebook/callback',
+    callbackPath: '/auth/facebook/callback',
+    successRedirect: successRedirect,
+    failureRedirect: failureRedirect,
+    scope: ['email'],
+    failureFlash: true
+  },
+  'facebook-link': {
+    provider: 'facebook',
+    module: 'passport-facebook',
+    clientID: process.env.FACEBOOK_ID,
+    clientSecret: process.env.FACEBOOK_SECRET,
+    authPath: '/link/facebook',
+    callbackURL: '/link/facebook/callback',
+    callbackPath: '/link/facebook/callback',
+    successRedirect: successRedirect,
+    failureRedirect: failureRedirect,
+    scope: ['email', 'user_likes'],
+    link: true,
+    failureFlash: true
+  },
+  'google-login': {
+    provider: 'google',
+    module: 'passport-google-oauth2',
+    clientID: process.env.GOOGLE_ID,
+    clientSecret: process.env.GOOGLE_SECRET,
+    authPath: '/auth/google',
+    callbackURL: '/auth/google/callback',
+    callbackPath: '/auth/google/callback',
+    successRedirect: successRedirect,
+    failureRedirect: failureRedirect,
+    scope: ['email', 'profile'],
+    failureFlash: true
+  },
+  'google-link': {
+    provider: 'google',
+    module: 'passport-google-oauth2',
+    clientID: process.env.GOOGLE_ID,
+    clientSecret: process.env.GOOGLE_SECRET,
+    authPath: '/link/google',
+    callbackURL: '/link/google/callback',
+    callbackPath: '/link/google/callback',
+    successRedirect: successRedirect,
+    failureRedirect: failureRedirect,
+    scope: ['email', 'profile'],
+    link: true,
+    failureFlash: true
+  },
+  'twitter-login': {
+    provider: 'twitter',
+    authScheme: 'oauth',
+    module: 'passport-twitter',
+    authPath: '/auth/twitter',
+    callbackURL: '/auth/twitter/callback',
+    callbackPath: '/auth/twitter/callback',
+    successRedirect: successRedirect,
+    failureRedirect: failureRedirect,
+    consumerKey: process.env.TWITTER_KEY,
+    consumerSecret: process.env.TWITTER_SECRET,
+    failureFlash: true
+  },
+  'twitter-link': {
+    provider: 'twitter',
+    authScheme: 'oauth',
+    module: 'passport-twitter',
+    authPath: '/link/twitter',
+    callbackURL: '/link/twitter/callback',
+    callbackPath: '/link/twitter/callback',
+    successRedirect: successRedirect,
+    failureRedirect: failureRedirect,
+    consumerKey: process.env.TWITTER_KEY,
+    consumerSecret: process.env.TWITTER_SECRET,
+    failureFlash: true
+  },
+  'linkedin-login': {
+    provider: 'linkedin',
+    authScheme: 'oauth',
+    module: 'passport-linkedin-oauth2',
+    authPath: '/auth/linkedin',
+    callbackURL: '/auth/linkedin/callback',
+    callbackPath: '/auth/linkedin/callback',
+    successRedirect: successRedirect,
+    failureRedirect: failureRedirect,
+    clientID: process.env.LINKEDIN_ID,
+    clientSecret: process.env.LINKEDIN_SECRET,
+    scope: ['r_fullprofile', 'r_emailaddress'],
+    failureFlash: true
+  },
+  'linkedin-link': {
+    provider: 'linkedin',
+    authScheme: 'oauth',
+    module: 'passport-linkedin-oauth2',
+    authPath: '/link/linkedin',
+    callbackURL: '/link/linkedin/callback',
+    callbackPath: '/link/linkedin/callback',
+    successRedirect: successRedirect,
+    failureRedirect: failureRedirect,
+    clientID: process.env.LINKEDIN_ID,
+    clientSecret: process.env.LINKEDIN_SECRET,
+    scope: ['r_fullprofile', 'r_emailaddress'],
+    failureFlash: true
+  }
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/server.js.html b/coverage/lcov-report/server/server.js.html new file mode 100644 index 00000000000000..f0a17086966430 --- /dev/null +++ b/coverage/lcov-report/server/server.js.html @@ -0,0 +1,951 @@ + + + + Code coverage report for server/server.js + + + + + + +
+

Code coverage report for server/server.js

+

+ Statements: 52.81% (47 / 89)      + Branches: 16.13% (5 / 31)      + Functions: 20% (2 / 10)      + Lines: 52.81% (47 / 89)      + Ignored: none      +

+
All files » server/ » server.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +3031 +  +1 +1 +  +  +  +1 +1 +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +1 +1 +  +1 +  +1 +1 +1 +  +1 +  +  +  +  +  +1 +1 +1 +1 +1 +1 +  +  +  +  +  +  +1 +1 +1 +  +  +  +  +  +  +  +  +  +1 +1 +  +1 +1 +1 +1 +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +1 +  +  +  +  +  +1 +  +  +  +1 +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +9 +9 +9 +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +1 + 
require('dotenv').load();
+// handle uncaught exceptions. Forever will restart process on shutdown
+process.on('uncaughtException', function (err) {
+  console.error(
+    (new Date()).toUTCString() + ' uncaughtException:',
+    err.message
+  );
+  console.error(err.stack);
+  process.exit(1); // eslint-disable-line
+});
+ 
+var R = require('ramda'),
+    assign = require('lodash').assign,
+    loopback = require('loopback'),
+    boot = require('loopback-boot'),
+    accepts = require('accepts'),
+    cookieParser = require('cookie-parser'),
+    compress = require('compression'),
+    session = require('express-session'),
+    logger = require('morgan'),
+    errorHandler = require('errorhandler'),
+    methodOverride = require('method-override'),
+    bodyParser = require('body-parser'),
+    helmet = require('helmet'),
+    MongoStore = require('connect-mongo')(session),
+    flash = require('express-flash'),
+    path = require('path'),
+    expressValidator = require('express-validator'),
+    forceDomain = require('forcedomain'),
+    lessMiddleware = require('less-middleware'),
+ 
+    passportProviders = require('./passport-providers'),
+    /**
+    * API keys and Passport configuration.
+    */
+    secrets = require('./../config/secrets');
+ 
+var generateKey =
+  require('loopback-component-passport/lib/models/utils').generateKey;
+/**
+ * Create Express server.
+ */
+var app = loopback();
+var PassportConfigurator =
+  require('loopback-component-passport').PassportConfigurator;
+var passportConfigurator = new PassportConfigurator(app);
+ 
+app.set('port', process.env.PORT || 3000);
+app.set('views', path.join(__dirname, 'views'));
+app.set('view engine', 'jade');
+ 
+Iif (process.env.NODE_ENV === 'production') {
+  app.use(forceDomain({
+    hostname: 'www.freecodecamp.com'
+  }));
+}
+ 
+app.use(compress());
+app.use(lessMiddleware(path.join(__dirname, '/public')));
+app.use(logger('dev'));
+app.use(bodyParser.json());
+app.use(bodyParser.urlencoded({ extended: true }));
+app.use(expressValidator({
+  customValidators: {
+    matchRegex: function (param, regex) {
+      return regex.test(param);
+    }
+  }
+}));
+app.use(methodOverride());
+app.use(cookieParser(secrets.cookieSecret));
+app.use(session({
+  resave: true,
+  saveUninitialized: true,
+  secret: secrets.sessionSecret,
+  store: new MongoStore({
+    url: secrets.db,
+    'autoReconnect': true
+  })
+}));
+ 
+app.use(flash());
+app.disable('x-powered-by');
+ 
+app.use(helmet.xssFilter());
+app.use(helmet.noSniff());
+app.use(helmet.frameguard());
+app.use(function(req, res, next) {
+  res.header('Access-Control-Allow-Origin', '*');
+  res.header('Access-Control-Allow-Headers',
+    'Origin, X-Requested-With, Content-Type, Accept'
+  );
+  next();
+});
+ 
+var trusted = [
+  "'self'",
+  'blob:',
+  '*.freecodecamp.com',
+  'http://www.freecodecamp.com',
+  'ws://freecodecamp.com/',
+  'ws://www.freecodecamp.com/',
+  '*.gstatic.com',
+  '*.google-analytics.com',
+  '*.googleapis.com',
+  '*.google.com',
+  '*.gstatic.com',
+  '*.doubleclick.net',
+  '*.twitter.com',
+  '*.twitch.tv',
+  '*.twimg.com',
+  "'unsafe-eval'",
+  "'unsafe-inline'",
+  '*.bootstrapcdn.com',
+  '*.cloudflare.com',
+  'https://*.cloudflare.com',
+  'localhost:3001',
+  'ws://localhost:3001/',
+  'http://localhost:3001',
+  'localhost:3000',
+  'ws://localhost:3000/',
+  'http://localhost:3000',
+  '*.ionicframework.com',
+  'https://syndication.twitter.com',
+  '*.youtube.com',
+  '*.jsdelivr.net',
+  'https://*.jsdelivr.net',
+  '*.ytimg.com',
+  '*.bitly.com',
+  'http://cdn.inspectlet.com/',
+  'wss://inspectletws.herokuapp.com/',
+  'http://hn.inspectlet.com/'
+];
+ 
+app.use(helmet.csp({
+  defaultSrc: trusted,
+  scriptSrc: [
+    '*.optimizely.com',
+    '*.aspnetcdn.com',
+    '*.d3js.org'
+  ].concat(trusted),
+  'connect-src': [
+  ].concat(trusted),
+  styleSrc: trusted,
+  imgSrc: [
+    /* allow all input since we have user submitted images for public profile*/
+    '*'
+  ].concat(trusted),
+  fontSrc: ['*.googleapis.com'].concat(trusted),
+  mediaSrc: [
+    '*.amazonaws.com',
+    '*.twitter.com'
+  ].concat(trusted),
+  frameSrc: [
+ 
+    '*.gitter.im',
+    '*.gitter.im https:',
+    '*.vimeo.com',
+    '*.twitter.com',
+    '*.ghbtns.com'
+  ].concat(trusted),
+  // set to true if you only want to report errors
+  reportOnly: false,
+  // set to true if you want to set all headers
+  setAllHeaders: false,
+  // set to true if you want to force buggy CSP in Safari 5
+  safari5: false
+}));
+ 
+passportConfigurator.init();
+ 
+app.use(function (req, res, next) {
+  // Make user object available in templates.
+  res.locals.user = req.user;
+  next();
+});
+ 
+app.use(
+  loopback.static(path.join(__dirname, '../public'), { maxAge: 86400000 })
+);
+ 
+boot(app, {
+  appRootDir: __dirname,
+  dev: process.env.NODE_ENV
+});
+ 
+app.use(function (req, res, next) {
+  // Remember original destination before login.
+  var path = req.path.split('/')[1];
+  if (/auth|login|logout|signin|signup|fonts|favicon/i.test(path)) {
+    return next();
+  } else if (/\/stories\/comments\/\w+/i.test(req.path)) {
+    return next();
+  }
+  req.session.returnTo = req.path;
+  next();
+});
+ 
+passportConfigurator.setupModels({
+  userModel: app.models.user,
+  userIdentityModel: app.models.userIdentity,
+  userCredentialModel: app.models.userCredential
+});
+ 
+var passportOptions = {
+  emailOptional: true,
+  profileToUser: function(provider, profile) {
+    var emails = profile.emails;
+    // NOTE(berks): get email or set to null.
+    // MongoDB indexs email but can be sparse(blank)
+    var email = emails && emails[0] && emails[0].value ?
+        emails[0].value :
+        null;
+ 
+    var username = (profile.username || profile.id);
+    username = typeof username === 'string' ? username.toLowerCase() : username;
+    var password = generateKey('password');
+    var userObj = {
+      username: username,
+      password: password
+    };
+ 
+    if (email) {
+      userObj.email = email;
+    }
+    return userObj;
+  }
+};
+ 
+R.keys(passportProviders).map(function(strategy) {
+  var config = passportProviders[strategy];
+  config.session = config.session !== false;
+  passportConfigurator.configureProvider(
+    strategy,
+    assign(config, passportOptions)
+  );
+});
+ 
+/**
+ * OAuth sign-in routes.
+ */
+ 
+/**
+ * 500 Error Handler.
+ */
+Iif (process.env.NODE_ENV === 'development') {
+  app.use(errorHandler({ log: true }));
+} else {
+  // error handling in production disabling eslint due to express parity rules
+  // for error handlers
+  app.use(function(err, req, res, next) { // eslint-disable-line
+ 
+    // respect err.status
+    if (err.status) {
+      res.statusCode = err.status;
+    }
+ 
+    // default status code to 500
+    if (res.statusCode < 400) {
+      res.statusCode = 500;
+    }
+ 
+    // parse res type
+    var accept = accepts(req);
+    var type = accept.type('html', 'json', 'text');
+ 
+    var message = 'opps! Something went wrong. Please try again later';
+    if (type === 'html') {
+      req.flash('errors', { msg: message });
+      return res.redirect('/');
+      // json
+    } else if (type === 'json') {
+      res.setHeader('Content-Type', 'application/json');
+      return res.send({ message: message });
+      // plain text
+    } else {
+      res.setHeader('Content-Type', 'text/plain');
+      return res.send(message);
+    }
+  });
+}
+ 
+/**
+ * Start Express server.
+ */
+ 
+app.start = function() {
+  app.listen(app.get('port'), function () {
+    console.log(
+      'FreeCodeCamp server listening on port %d in %s mode',
+      app.get('port'),
+      app.get('env')
+    );
+  });
+};
+ 
+// start the server if `$ node server.js`
+Iif (require.main === module) {
+  app.start();
+}
+ 
+module.exports = app;
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/utils/constants.js.html b/coverage/lcov-report/server/utils/constants.js.html new file mode 100644 index 00000000000000..fd077180252b92 --- /dev/null +++ b/coverage/lcov-report/server/utils/constants.js.html @@ -0,0 +1,162 @@ + + + + Code coverage report for server/utils/constants.js + + + + + + +
+

Code coverage report for server/utils/constants.js

+

+ Statements: 100% (1 / 1)      + Branches: 100% (0 / 0)      + Functions: 100% (0 / 0)      + Lines: 100% (1 / 1)      + Ignored: none      +

+
All files » server/utils/ » constants.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +401 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
exports.blacklistedUsernames = [
+  'bonfire',
+  'account',
+  'user',
+  'challenge',
+  'challenges',
+  'completed-challenge',
+  'completed-zipline-or-basejump',
+  'completed-bonfire',
+  'map',
+  'learn-to-code',
+  'about',
+  'api',
+  'explorer',
+  'field-guide',
+  'completed-field-guide',
+  'jobs',
+  'nonprofits',
+  'api',
+  'sitemap.xml',
+  'get-help',
+  'chat',
+  'twitch',
+  'get-pai',
+  'get-help',
+  'nonprofits',
+  'nonproifts-form',
+  'jobs-form',
+  'unsubscribe',
+  'unsubscribed',
+  'cats.json',
+  'agile',
+  'privacy',
+  'stories',
+  'signin',
+  'signout',
+  'forgot',
+  'reset'
+];
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/utils/index.html b/coverage/lcov-report/server/utils/index.html new file mode 100644 index 00000000000000..bdc9f32c09ae3d --- /dev/null +++ b/coverage/lcov-report/server/utils/index.html @@ -0,0 +1,99 @@ + + + + Code coverage report for server/utils/ + + + + + + +
+

Code coverage report for server/utils/

+

+ Statements: 35.11% (33 / 94)      + Branches: 9.38% (3 / 32)      + Functions: 30.3% (10 / 33)      + Lines: 35.11% (33 / 94)      + Ignored: none      +

+
All files » server/utils/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
constants.js100%(1 / 1)100%(0 / 0)100%(0 / 0)100%(1 / 1)
index.js35.29%(30 / 85)10.71%(3 / 28)33.33%(10 / 30)35.29%(30 / 85)
middleware.js25%(2 / 8)0%(0 / 4)0%(0 / 3)25%(2 / 8)
+
+
+ + + + + + diff --git a/coverage/lcov-report/server/utils/index.js.html b/coverage/lcov-report/server/utils/index.js.html new file mode 100644 index 00000000000000..f56040edfe71af --- /dev/null +++ b/coverage/lcov-report/server/utils/index.js.html @@ -0,0 +1,693 @@ + + + + Code coverage report for server/utils/index.js + + + + + + +
+

Code coverage report for server/utils/index.js

+

+ Statements: 35.29% (30 / 85)      + Branches: 10.71% (3 / 28)      + Functions: 33.33% (10 / 30)      + Lines: 35.29% (30 / 85)      + Ignored: none      +

+
All files » server/utils/ » index.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +2171 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +1 +1 +1 +1 +  +  +1 +1 +14 +  +  +  +1 +39 +  +1 +14 +  +1 +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +1 +1 +14 +175 +  +14 +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +1 +1 +  +14 +175 +  +14 +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
var path = require('path'),
+    // debug = require('debug')('freecc:cntr:resources'),
+    cheerio = require('cheerio'),
+    request = require('request'),
+    R = require('ramda'),
+    _ = require('lodash'),
+    fs = require('fs'),
+ 
+ 
+    resources = require('./resources.json'),
+    nonprofits = require('../../seed/nonprofits.json'),
+    fieldGuides = require('../../seed/field-guides.json');
+ 
+/**
+ * Cached values
+ */
+var allFieldGuideIds, allFieldGuideNames, allNonprofitNames,
+  challengeMap, challengeMapForDisplay, challengeMapWithIds,
+  challengeMapWithNames, allChallengeIds, allChallenges;
+ 
+/**
+ * GET /
+ * Resources.
+ */
+ 
+Array.zip = function(left, right, combinerFunction) {
+  var counter,
+    results = [];
+ 
+  for (counter = 0; counter < Math.min(left.length, right.length); counter++) {
+    results.push(combinerFunction(left[counter], right[counter]));
+  }
+ 
+  return results;
+};
+ 
+(function() {
+  Eif (!challengeMap) {
+    var localChallengeMap = {};
+    var files = fs.readdirSync(
+      path.join(__dirname, '../../seed/challenges')
+    );
+    var keyCounter = 0;
+    files = files.map(function (file) {
+      return require(
+        path.join(__dirname, '../../seed/challenges/' + file)
+      );
+    });
+    files = files.sort(function (a, b) {
+      return a.order - b.order;
+    });
+    files.forEach(function (file) {
+      localChallengeMap[keyCounter++] = file;
+    });
+    challengeMap = _.cloneDeep(localChallengeMap);
+  }
+})();
+ 
+ 
+module.exports = {
+  getChallengeMapForDisplay: function () {
+    if (!challengeMapForDisplay) {
+      challengeMapForDisplay = {};
+      Object.keys(challengeMap).forEach(function (key) {
+        challengeMapForDisplay[key] = {
+          name: challengeMap[key].name,
+          dashedName: challengeMap[key].name.replace(/\s/g, '-'),
+          challenges: challengeMap[key].challenges,
+          completedCount: challengeMap[key].challenges
+        };
+      });
+    }
+    return challengeMapForDisplay;
+  },
+ 
+  getChallengeMapWithIds: function () {
+    Eif (!challengeMapWithIds) {
+      challengeMapWithIds = {};
+      Object.keys(challengeMap).forEach(function (key) {
+        var onlyIds = challengeMap[key].challenges.map(function (elem) {
+          return elem.id;
+        });
+        challengeMapWithIds[key] = onlyIds;
+      });
+    }
+    return challengeMapWithIds;
+  },
+ 
+  allChallengeIds: function () {
+ 
+    if (!allChallengeIds) {
+      allChallengeIds = [];
+      Object.keys(this.getChallengeMapWithIds()).forEach(function (key) {
+        allChallengeIds.push(challengeMapWithIds[key]);
+      });
+      allChallengeIds = R.flatten(allChallengeIds);
+    }
+    return allChallengeIds;
+  },
+ 
+  allChallenges: function () {
+    if (!allChallenges) {
+      allChallenges = [];
+      Object.keys(this.getChallengeMapWithNames()).forEach(function (key) {
+        allChallenges.push(challengeMap[key].challenges);
+      });
+      allChallenges = R.flatten(allChallenges);
+    }
+    return allChallenges;
+  },
+ 
+  getChallengeMapWithNames: function () {
+    Eif (!challengeMapWithNames) {
+      challengeMapWithNames = {};
+      Object.keys(challengeMap).
+        forEach(function (key) {
+          var onlyNames = challengeMap[key].challenges.map(function (elem) {
+            return elem.name;
+          });
+          challengeMapWithNames[key] = onlyNames;
+        });
+    }
+    return challengeMapWithNames;
+  },
+ 
+ 
+  randomPhrase: function () {
+    return resources.phrases[
+      Math.floor(Math.random() * resources.phrases.length)
+      ];
+  },
+ 
+  randomVerb: function () {
+    return resources.verbs[
+      Math.floor(Math.random() * resources.verbs.length)
+      ];
+  },
+ 
+  randomCompliment: function () {
+    return resources.compliments[
+      Math.floor(Math.random() * resources.compliments.length)
+      ];
+  },
+ 
+  allFieldGuideIds: function () {
+    if (allFieldGuideIds) {
+      return allFieldGuideIds;
+    } else {
+      allFieldGuideIds = fieldGuides.map(function (elem) {
+        return elem.id;
+      });
+      return allFieldGuideIds;
+    }
+  },
+ 
+  allFieldGuideNamesAndIds: function () {
+    if (allFieldGuideNames) {
+      return allFieldGuideNames;
+    } else {
+      allFieldGuideNames = fieldGuides.map(function (elem) {
+        return {
+          name: elem.name,
+          dashedName: elem.dashedName,
+          id: elem.id
+        };
+      });
+      return allFieldGuideNames;
+    }
+  },
+ 
+  allNonprofitNames: function () {
+    if (allNonprofitNames) {
+      return allNonprofitNames;
+    } else {
+      allNonprofitNames = nonprofits.map(function (elem) {
+        return {name: elem.name};
+      });
+      return allNonprofitNames;
+    }
+  },
+ 
+  whichEnvironment: function () {
+    return process.env.NODE_ENV;
+  },
+ 
+  getURLTitle: function (url, callback) {
+    (function () {
+      var result = {title: '', image: '', url: '', description: ''};
+      request(url, function (error, response, body) {
+        if (!error && response.statusCode === 200) {
+          var $ = cheerio.load(body);
+          var metaDescription = $("meta[name='description']");
+          var metaImage = $("meta[property='og:image']");
+          var urlImage = metaImage.attr('content') ?
+            metaImage.attr('content') :
+            '';
+ 
+          var metaTitle = $('title');
+          var description = metaDescription.attr('content') ?
+            metaDescription.attr('content') :
+            '';
+ 
+          result.title = metaTitle.text().length < 90 ?
+            metaTitle.text() :
+          metaTitle.text().slice(0, 87) + '...';
+ 
+          result.image = urlImage;
+          result.description = description;
+          callback(null, result);
+        } else {
+          callback(new Error('failed'));
+        }
+      });
+    })();
+  }
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/server/utils/middleware.js.html b/coverage/lcov-report/server/utils/middleware.js.html new file mode 100644 index 00000000000000..a6676d120d9cb4 --- /dev/null +++ b/coverage/lcov-report/server/utils/middleware.js.html @@ -0,0 +1,150 @@ + + + + Code coverage report for server/utils/middleware.js + + + + + + +
+

Code coverage report for server/utils/middleware.js

+

+ Statements: 25% (2 / 8)      + Branches: 0% (0 / 4)      + Functions: 0% (0 / 3)      + Lines: 25% (2 / 8)      + Ignored: none      +

+
All files » server/utils/ » middleware.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +361 +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
var R = require('ramda');
+ 
+/*
+ * Middleware to migrate users from fragmented challenge structure to unified
+ * challenge structure
+ *
+ * @param req
+ * @param res
+ * @returns null
+ */
+exports.userMigration = function userMigration(req, res, next) {
+  if (!req.user || req.user.completedChallenges.length !== 0) {
+    return next();
+  }
+  req.user.completedChallenges = R.filter(function (elem) {
+    // getting rid of undefined
+    return elem;
+  }, R.concat(
+      req.user.completedCoursewares,
+      req.user.completedBonfires.map(function (bonfire) {
+        return ({
+          completedDate: bonfire.completedDate,
+          id: bonfire.id,
+          name: bonfire.name,
+          completedWith: bonfire.completedWith,
+          solution: bonfire.solution,
+          githubLink: '',
+          verified: false,
+          challengeType: 5
+        });
+      })
+    )
+  );
+  return next();
+};
+ 
+ +
+ + + + + + diff --git a/coverage/lcov-report/sort-arrow-sprite.png b/coverage/lcov-report/sort-arrow-sprite.png new file mode 100644 index 00000000000000..03f704a609c6fd Binary files /dev/null and b/coverage/lcov-report/sort-arrow-sprite.png differ diff --git a/coverage/lcov-report/sorter.js b/coverage/lcov-report/sorter.js new file mode 100644 index 00000000000000..6afb736c39fb15 --- /dev/null +++ b/coverage/lcov-report/sorter.js @@ -0,0 +1,156 @@ +var addSorting = (function () { + "use strict"; + var cols, + currentSort = { + index: 0, + desc: false + }; + + // returns the summary table element + function getTable() { return document.querySelector('.coverage-summary table'); } + // returns the thead element of the summary table + function getTableHeader() { return getTable().querySelector('thead tr'); } + // returns the tbody element of the summary table + function getTableBody() { return getTable().querySelector('tbody'); } + // returns the th element for nth column + function getNthColumn(n) { return getTableHeader().querySelectorAll('th')[n]; } + + // loads all columns + function loadColumns() { + var colNodes = getTableHeader().querySelectorAll('th'), + colNode, + cols = [], + col, + i; + + for (i = 0; i < colNodes.length; i += 1) { + colNode = colNodes[i]; + col = { + key: colNode.getAttribute('data-col'), + sortable: !colNode.getAttribute('data-nosort'), + type: colNode.getAttribute('data-type') || 'string' + }; + cols.push(col); + if (col.sortable) { + col.defaultDescSort = col.type === 'number'; + colNode.innerHTML = colNode.innerHTML + ''; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function (a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function (a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function () { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i =0 ; i < cols.length; i += 1) { + if (cols[i].sortable) { + el = getNthColumn(i).querySelector('.sorter'); + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function () { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(cols); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/coverage/lcov.info b/coverage/lcov.info new file mode 100644 index 00000000000000..69da7eaca80596 --- /dev/null +++ b/coverage/lcov.info @@ -0,0 +1,2762 @@ +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/server.js +FN:3,(anonymous_1) +FN:65,(anonymous_2) +FN:88,(anonymous_3) +FN:172,(anonymous_4) +FN:187,(anonymous_5) +FN:207,(anonymous_6) +FN:230,(anonymous_7) +FN:251,(anonymous_8) +FN:287,(anonymous_9) +FN:288,(anonymous_10) +FNF:10 +FNH:2 +FNDA:1,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:9,(anonymous_7) +FNDA:0,(anonymous_8) +FNDA:0,(anonymous_9) +FNDA:0,(anonymous_10) +DA:1,1 +DA:3,1 +DA:4,1 +DA:8,1 +DA:9,1 +DA:12,1 +DA:38,1 +DA:43,1 +DA:44,1 +DA:46,1 +DA:48,1 +DA:49,1 +DA:50,1 +DA:52,1 +DA:53,0 +DA:58,1 +DA:59,1 +DA:60,1 +DA:61,1 +DA:62,1 +DA:63,1 +DA:66,0 +DA:70,1 +DA:71,1 +DA:72,1 +DA:82,1 +DA:83,1 +DA:85,1 +DA:86,1 +DA:87,1 +DA:88,1 +DA:89,0 +DA:90,0 +DA:93,0 +DA:96,1 +DA:135,1 +DA:170,1 +DA:172,1 +DA:174,0 +DA:175,0 +DA:178,1 +DA:182,1 +DA:187,1 +DA:189,0 +DA:190,0 +DA:191,0 +DA:192,0 +DA:193,0 +DA:195,0 +DA:196,0 +DA:199,1 +DA:205,1 +DA:208,0 +DA:211,0 +DA:215,0 +DA:216,0 +DA:217,0 +DA:218,0 +DA:223,0 +DA:224,0 +DA:226,0 +DA:230,1 +DA:231,9 +DA:232,9 +DA:233,9 +DA:246,1 +DA:247,0 +DA:251,1 +DA:254,0 +DA:255,0 +DA:259,0 +DA:260,0 +DA:264,0 +DA:265,0 +DA:267,0 +DA:268,0 +DA:269,0 +DA:270,0 +DA:272,0 +DA:273,0 +DA:274,0 +DA:277,0 +DA:278,0 +DA:287,1 +DA:288,0 +DA:289,0 +DA:298,1 +DA:299,0 +DA:302,1 +LF:89 +LH:47 +BRDA:48,1,0,1 +BRDA:48,1,1,1 +BRDA:52,2,0,0 +BRDA:52,2,1,1 +BRDA:190,3,0,0 +BRDA:190,3,1,0 +BRDA:192,4,0,0 +BRDA:192,4,1,0 +BRDA:211,5,0,0 +BRDA:211,5,1,0 +BRDA:211,6,0,0 +BRDA:211,6,1,0 +BRDA:211,6,2,0 +BRDA:215,7,0,0 +BRDA:215,7,1,0 +BRDA:216,8,0,0 +BRDA:216,8,1,0 +BRDA:223,9,0,0 +BRDA:223,9,1,0 +BRDA:246,10,0,0 +BRDA:246,10,1,1 +BRDA:254,11,0,0 +BRDA:254,11,1,0 +BRDA:259,12,0,0 +BRDA:259,12,1,0 +BRDA:268,13,0,0 +BRDA:268,13,1,0 +BRDA:272,14,0,0 +BRDA:272,14,1,0 +BRDA:298,15,0,0 +BRDA:298,15,1,1 +BRF:31 +BRH:5 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/passport-providers.js +FNF:0 +FNH:0 +DA:1,1 +DA:2,1 +DA:3,1 +LF:3 +LH:3 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/config/secrets.js +FNF:0 +FNH:0 +DA:1,1 +LF:1 +LH:1 +BRDA:3,1,0,1 +BRDA:3,1,1,1 +BRF:2 +BRH:2 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/config.local.js +FNF:0 +FNH:0 +DA:1,1 +DA:3,1 +LF:2 +LH:2 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/common/config.global.js +FNF:0 +FNH:0 +DA:2,1 +DA:7,1 +LF:2 +LH:2 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/config.development.js +FNF:0 +FNH:0 +DA:1,1 +LF:1 +LH:1 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/datasources.local.js +FNF:0 +FNH:0 +DA:1,1 +DA:3,1 +LF:2 +LH:2 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/common/models/user.js +FN:5,(anonymous_1) +FN:13,(anonymous_2) +FN:34,(anonymous_3) +FN:47,(anonymous_4) +FN:56,(anonymous_5) +FN:61,(anonymous_6) +FN:72,(anonymous_7) +FN:89,(anonymous_8) +FN:101,(anonymous_9) +FN:108,doesExist +FN:110,(anonymous_11) +FN:130,(anonymous_12) +FNF:12 +FNH:1 +FNDA:1,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:0,(anonymous_7) +FNDA:0,(anonymous_8) +FNDA:0,(anonymous_9) +FNDA:0,doesExist +FNDA:0,(anonymous_11) +FNDA:0,(anonymous_12) +DA:1,1 +DA:2,1 +DA:5,1 +DA:10,1 +DA:11,1 +DA:13,1 +DA:14,0 +DA:15,0 +DA:17,0 +DA:34,0 +DA:35,0 +DA:36,0 +DA:37,0 +DA:43,0 +DA:47,1 +DA:48,0 +DA:53,0 +DA:56,1 +DA:57,0 +DA:58,0 +DA:60,0 +DA:62,0 +DA:63,0 +DA:65,0 +DA:66,0 +DA:68,0 +DA:73,0 +DA:74,0 +DA:79,0 +DA:81,0 +DA:85,0 +DA:86,0 +DA:87,0 +DA:89,0 +DA:90,0 +DA:91,0 +DA:93,0 +DA:94,0 +DA:98,0 +DA:101,1 +DA:102,0 +DA:103,0 +DA:104,0 +DA:105,0 +DA:108,1 +DA:109,0 +DA:110,0 +DA:111,0 +DA:114,0 +DA:117,0 +DA:118,0 +DA:121,0 +DA:122,0 +DA:123,0 +DA:125,0 +DA:127,0 +DA:128,0 +DA:131,0 +DA:132,0 +DA:133,0 +DA:135,0 +DA:136,0 +DA:138,0 +DA:143,1 +LF:64 +LH:11 +BRDA:15,1,0,0 +BRDA:15,1,1,0 +BRDA:35,2,0,0 +BRDA:35,2,1,0 +BRDA:62,3,0,0 +BRDA:62,3,1,0 +BRDA:65,4,0,0 +BRDA:65,4,1,0 +BRDA:73,5,0,0 +BRDA:73,5,1,0 +BRDA:85,6,0,0 +BRDA:85,6,1,0 +BRDA:85,7,0,0 +BRDA:85,7,1,0 +BRDA:90,8,0,0 +BRDA:90,8,1,0 +BRDA:109,9,0,0 +BRDA:109,9,1,0 +BRDA:109,10,0,0 +BRDA:109,10,1,0 +BRDA:117,11,0,0 +BRDA:117,11,1,0 +BRDA:117,12,0,0 +BRDA:117,12,1,0 +BRDA:122,13,0,0 +BRDA:122,13,1,0 +BRDA:125,14,0,0 +BRDA:125,14,1,0 +BRDA:131,15,0,0 +BRDA:131,15,1,0 +BRDA:135,16,0,0 +BRDA:135,16,1,0 +BRF:32 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/utils/constants.js +FNF:0 +FNH:0 +DA:1,1 +LF:1 +LH:1 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/common/models/User-Identity.js +FN:6,(anonymous_1) +FN:7,(anonymous_2) +FN:13,(anonymous_3) +FN:29,(anonymous_4) +FNF:4 +FNH:1 +FNDA:1,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +DA:1,1 +DA:3,1 +DA:6,1 +DA:7,1 +DA:8,0 +DA:9,0 +DA:10,0 +DA:11,0 +DA:13,0 +DA:14,0 +DA:15,0 +DA:16,0 +DA:17,0 +DA:20,0 +DA:26,0 +DA:27,0 +DA:28,0 +DA:29,0 +DA:30,0 +DA:31,0 +DA:34,0 +DA:35,0 +LF:22 +LH:4 +BRDA:8,1,0,0 +BRDA:8,1,1,0 +BRDA:9,2,0,0 +BRDA:9,2,1,0 +BRDA:14,3,0,0 +BRDA:14,3,1,0 +BRDA:15,4,0,0 +BRDA:15,4,1,0 +BRDA:20,5,0,0 +BRDA:20,5,1,0 +BRDA:20,6,0,0 +BRDA:20,6,1,0 +BRDA:26,7,0,0 +BRDA:26,7,1,0 +BRDA:26,8,0,0 +BRDA:26,8,1,0 +BRDA:26,8,2,0 +BRDA:30,9,0,0 +BRDA:30,9,1,0 +BRF:19 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/a-extendUser.js +FN:4,destroyById +FN:5,(anonymous_2) +FN:6,(anonymous_3) +FN:14,(anonymous_4) +FN:18,(anonymous_5) +FN:30,(anonymous_6) +FN:34,(anonymous_7) +FNF:7 +FNH:1 +FNDA:0,destroyById +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:1,(anonymous_4) +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:0,(anonymous_7) +DA:1,1 +DA:2,1 +DA:4,1 +DA:5,0 +DA:6,0 +DA:7,0 +DA:8,0 +DA:10,0 +DA:14,1 +DA:15,1 +DA:16,1 +DA:17,1 +DA:18,1 +DA:19,0 +DA:20,0 +DA:21,0 +DA:22,0 +DA:24,0 +DA:31,0 +DA:32,0 +DA:35,0 +DA:36,0 +LF:22 +LH:8 +BRDA:7,1,0,0 +BRDA:7,1,1,0 +BRDA:20,2,0,0 +BRDA:20,2,1,0 +BRDA:20,3,0,0 +BRDA:20,3,1,0 +BRDA:21,4,0,0 +BRDA:21,4,1,0 +BRF:8 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/authentication.js +FN:1,enableAuthentication +FNF:1 +FNH:1 +FNDA:1,enableAuthentication +DA:1,1 +DA:3,1 +LF:2 +LH:2 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/challenge.js +FN:42,getMDNlinks +FN:49,(anonymous_2) +FN:56,(anonymous_3) +FN:80,returnNextChallenge +FN:84,(anonymous_5) +FN:89,(anonymous_6) +FN:126,(anonymous_7) +FN:134,returnCurrentChallenge +FN:138,(anonymous_9) +FN:143,(anonymous_10) +FN:153,(anonymous_11) +FN:163,(anonymous_12) +FN:171,returnIndividualChallenge +FN:185,(anonymous_14) +FN:209,(anonymous_15) +FN:211,(anonymous_16) +FN:213,(anonymous_17) +FN:222,(anonymous_18) +FN:240,(anonymous_19) +FN:257,(anonymous_20) +FN:273,(anonymous_21) +FN:288,(anonymous_22) +FN:303,(anonymous_23) +FN:326,(anonymous_24) +FN:338,completedBonfire +FN:349,(anonymous_26) +FN:395,(anonymous_27) +FN:399,(anonymous_28) +FN:429,(anonymous_29) +FN:436,completedChallenge +FN:456,(anonymous_31) +FN:466,completedZiplineOrBasejump +FN:488,(anonymous_33) +FN:508,(anonymous_34) +FN:531,(anonymous_35) +FN:560,(anonymous_36) +FNF:36 +FNH:1 +FNDA:0,getMDNlinks +FNDA:0,(anonymous_2) +FNDA:1,(anonymous_3) +FNDA:0,returnNextChallenge +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:0,(anonymous_7) +FNDA:0,returnCurrentChallenge +FNDA:0,(anonymous_9) +FNDA:0,(anonymous_10) +FNDA:0,(anonymous_11) +FNDA:0,(anonymous_12) +FNDA:0,returnIndividualChallenge +FNDA:0,(anonymous_14) +FNDA:0,(anonymous_15) +FNDA:0,(anonymous_16) +FNDA:0,(anonymous_17) +FNDA:0,(anonymous_18) +FNDA:0,(anonymous_19) +FNDA:0,(anonymous_20) +FNDA:0,(anonymous_21) +FNDA:0,(anonymous_22) +FNDA:0,(anonymous_23) +FNDA:0,(anonymous_24) +FNDA:0,completedBonfire +FNDA:0,(anonymous_26) +FNDA:0,(anonymous_27) +FNDA:0,(anonymous_28) +FNDA:0,(anonymous_29) +FNDA:0,completedChallenge +FNDA:0,(anonymous_31) +FNDA:0,completedZiplineOrBasejump +FNDA:0,(anonymous_33) +FNDA:0,(anonymous_34) +FNDA:0,(anonymous_35) +FNDA:0,(anonymous_36) +DA:33,1 +DA:38,1 +DA:39,1 +DA:42,1 +DA:44,0 +DA:48,0 +DA:49,0 +DA:50,0 +DA:53,0 +DA:56,1 +DA:57,1 +DA:58,1 +DA:59,1 +DA:61,1 +DA:67,1 +DA:73,1 +DA:74,1 +DA:75,1 +DA:76,1 +DA:78,1 +DA:80,1 +DA:81,0 +DA:82,0 +DA:84,0 +DA:85,0 +DA:88,0 +DA:90,0 +DA:91,0 +DA:101,0 +DA:103,0 +DA:104,0 +DA:105,0 +DA:108,0 +DA:110,0 +DA:112,0 +DA:113,0 +DA:115,0 +DA:119,0 +DA:122,0 +DA:126,0 +DA:127,0 +DA:128,0 +DA:130,0 +DA:134,1 +DA:135,0 +DA:136,0 +DA:138,0 +DA:139,0 +DA:142,0 +DA:144,0 +DA:145,0 +DA:148,0 +DA:149,0 +DA:150,0 +DA:151,0 +DA:152,0 +DA:153,0 +DA:154,0 +DA:155,0 +DA:159,0 +DA:163,0 +DA:164,0 +DA:165,0 +DA:167,0 +DA:171,1 +DA:172,0 +DA:174,0 +DA:183,0 +DA:186,0 +DA:189,0 +DA:190,0 +DA:194,0 +DA:196,0 +DA:198,0 +DA:202,0 +DA:203,0 +DA:204,0 +DA:205,0 +DA:210,0 +DA:212,0 +DA:214,0 +DA:221,0 +DA:223,0 +DA:241,0 +DA:258,0 +DA:274,0 +DA:289,0 +DA:304,0 +DA:325,0 +DA:326,0 +DA:327,0 +DA:328,0 +DA:330,0 +DA:333,0 +DA:338,1 +DA:339,0 +DA:340,0 +DA:341,0 +DA:342,0 +DA:343,0 +DA:345,0 +DA:346,0 +DA:350,0 +DA:352,0 +DA:353,0 +DA:354,0 +DA:355,0 +DA:357,0 +DA:358,0 +DA:360,0 +DA:361,0 +DA:362,0 +DA:363,0 +DA:367,0 +DA:376,0 +DA:386,0 +DA:395,0 +DA:396,0 +DA:398,0 +DA:399,0 +DA:400,0 +DA:401,0 +DA:403,0 +DA:404,0 +DA:407,0 +DA:408,0 +DA:413,0 +DA:422,0 +DA:423,0 +DA:425,0 +DA:426,0 +DA:429,0 +DA:430,0 +DA:431,0 +DA:436,1 +DA:438,0 +DA:439,0 +DA:441,0 +DA:449,0 +DA:451,0 +DA:452,0 +DA:453,0 +DA:456,0 +DA:457,0 +DA:458,0 +DA:460,0 +DA:461,0 +DA:466,1 +DA:468,0 +DA:469,0 +DA:470,0 +DA:471,0 +DA:472,0 +DA:474,0 +DA:476,0 +DA:477,0 +DA:481,0 +DA:484,0 +DA:485,0 +DA:489,0 +DA:490,0 +DA:491,0 +DA:492,0 +DA:493,0 +DA:495,0 +DA:497,0 +DA:508,0 +DA:509,0 +DA:511,0 +DA:512,0 +DA:514,0 +DA:515,0 +DA:516,0 +DA:517,0 +DA:521,0 +DA:531,0 +DA:532,0 +DA:533,0 +DA:535,0 +DA:536,0 +DA:543,0 +DA:554,0 +DA:555,0 +DA:556,0 +DA:557,0 +DA:560,0 +DA:561,0 +DA:562,0 +DA:566,0 +DA:567,0 +LF:190 +LH:21 +BRDA:48,1,0,0 +BRDA:48,1,1,0 +BRDA:81,2,0,0 +BRDA:81,2,1,0 +BRDA:90,3,0,0 +BRDA:90,3,1,0 +BRDA:108,4,0,0 +BRDA:108,4,1,0 +BRDA:112,5,0,0 +BRDA:112,5,1,0 +BRDA:127,6,0,0 +BRDA:127,6,1,0 +BRDA:135,7,0,0 +BRDA:135,7,1,0 +BRDA:144,8,0,0 +BRDA:144,8,1,0 +BRDA:148,9,0,0 +BRDA:148,9,1,0 +BRDA:154,10,0,0 +BRDA:154,10,1,0 +BRDA:164,11,0,0 +BRDA:164,11,1,0 +BRDA:175,12,0,0 +BRDA:175,12,1,0 +BRDA:186,13,0,0 +BRDA:186,13,1,0 +BRDA:189,14,0,0 +BRDA:189,14,1,0 +BRDA:202,15,0,0 +BRDA:202,15,1,0 +BRDA:204,16,0,0 +BRDA:204,16,1,0 +BRDA:325,17,0,0 +BRDA:325,17,1,0 +BRDA:327,18,0,0 +BRDA:327,18,1,0 +BRDA:339,19,0,0 +BRDA:339,19,1,0 +BRDA:345,20,0,0 +BRDA:345,20,1,0 +BRDA:350,21,0,0 +BRDA:350,21,1,0 +BRDA:353,22,0,0 +BRDA:353,22,1,0 +BRDA:354,23,0,0 +BRDA:354,23,1,0 +BRDA:358,24,0,0 +BRDA:358,24,1,0 +BRDA:361,25,0,0 +BRDA:361,25,1,0 +BRDA:362,26,0,0 +BRDA:362,26,1,0 +BRDA:396,27,0,0 +BRDA:396,27,1,0 +BRDA:398,28,0,0 +BRDA:398,28,1,0 +BRDA:400,29,0,0 +BRDA:400,29,1,0 +BRDA:403,30,0,0 +BRDA:403,30,1,0 +BRDA:403,31,0,0 +BRDA:403,31,1,0 +BRDA:407,32,0,0 +BRDA:407,32,1,0 +BRDA:423,33,0,0 +BRDA:423,33,1,0 +BRDA:425,34,0,0 +BRDA:425,34,1,0 +BRDA:430,35,0,0 +BRDA:430,35,1,0 +BRDA:451,36,0,0 +BRDA:451,36,1,0 +BRDA:452,37,0,0 +BRDA:452,37,1,0 +BRDA:457,38,0,0 +BRDA:457,38,1,0 +BRDA:460,39,0,0 +BRDA:460,39,1,0 +BRDA:468,40,0,0 +BRDA:468,40,1,0 +BRDA:472,41,0,0 +BRDA:472,41,1,0 +BRDA:474,42,0,0 +BRDA:474,42,1,0 +BRDA:476,43,0,0 +BRDA:476,43,1,0 +BRDA:476,44,0,0 +BRDA:476,44,1,0 +BRDA:484,45,0,0 +BRDA:484,45,1,0 +BRDA:489,46,0,0 +BRDA:489,46,1,0 +BRDA:491,47,0,0 +BRDA:491,47,1,0 +BRDA:492,48,0,0 +BRDA:492,48,1,0 +BRDA:509,49,0,0 +BRDA:509,49,1,0 +BRDA:511,50,0,0 +BRDA:511,50,1,0 +BRDA:515,51,0,0 +BRDA:515,51,1,0 +BRDA:516,52,0,0 +BRDA:516,52,1,0 +BRDA:532,53,0,0 +BRDA:532,53,1,0 +BRDA:535,54,0,0 +BRDA:535,54,1,0 +BRDA:535,55,0,0 +BRDA:535,55,1,0 +BRDA:555,56,0,0 +BRDA:555,56,1,0 +BRDA:556,57,0,0 +BRDA:556,57,1,0 +BRDA:561,58,0,0 +BRDA:561,58,1,0 +BRDA:566,59,0,0 +BRDA:566,59,1,0 +BRF:118 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/utils/index.js +FN:26,(anonymous_1) +FN:37,(anonymous_2) +FN:44,(anonymous_3) +FN:49,(anonymous_4) +FN:52,(anonymous_5) +FN:61,(anonymous_6) +FN:64,(anonymous_7) +FN:76,(anonymous_8) +FN:79,(anonymous_9) +FN:80,(anonymous_10) +FN:89,(anonymous_11) +FN:93,(anonymous_12) +FN:101,(anonymous_13) +FN:104,(anonymous_14) +FN:112,(anonymous_15) +FN:116,(anonymous_16) +FN:117,(anonymous_17) +FN:127,(anonymous_18) +FN:133,(anonymous_19) +FN:139,(anonymous_20) +FN:145,(anonymous_21) +FN:149,(anonymous_22) +FN:156,(anonymous_23) +FN:160,(anonymous_24) +FN:171,(anonymous_25) +FN:175,(anonymous_26) +FN:182,(anonymous_27) +FN:186,(anonymous_28) +FN:187,(anonymous_29) +FN:189,(anonymous_30) +FNF:30 +FNH:10 +FNDA:0,(anonymous_1) +FNDA:1,(anonymous_2) +FNDA:14,(anonymous_3) +FNDA:39,(anonymous_4) +FNDA:14,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:0,(anonymous_7) +FNDA:1,(anonymous_8) +FNDA:14,(anonymous_9) +FNDA:175,(anonymous_10) +FNDA:0,(anonymous_11) +FNDA:0,(anonymous_12) +FNDA:0,(anonymous_13) +FNDA:0,(anonymous_14) +FNDA:1,(anonymous_15) +FNDA:14,(anonymous_16) +FNDA:175,(anonymous_17) +FNDA:0,(anonymous_18) +FNDA:0,(anonymous_19) +FNDA:0,(anonymous_20) +FNDA:0,(anonymous_21) +FNDA:0,(anonymous_22) +FNDA:0,(anonymous_23) +FNDA:0,(anonymous_24) +FNDA:0,(anonymous_25) +FNDA:0,(anonymous_26) +FNDA:0,(anonymous_27) +FNDA:0,(anonymous_28) +FNDA:0,(anonymous_29) +FNDA:0,(anonymous_30) +DA:1,1 +DA:17,1 +DA:26,1 +DA:27,0 +DA:30,0 +DA:31,0 +DA:34,0 +DA:37,1 +DA:38,1 +DA:39,1 +DA:40,1 +DA:43,1 +DA:44,1 +DA:45,14 +DA:49,1 +DA:50,39 +DA:52,1 +DA:53,14 +DA:55,1 +DA:60,1 +DA:62,0 +DA:63,0 +DA:64,0 +DA:65,0 +DA:73,0 +DA:77,1 +DA:78,1 +DA:79,1 +DA:80,14 +DA:81,175 +DA:83,14 +DA:86,1 +DA:91,0 +DA:92,0 +DA:93,0 +DA:94,0 +DA:96,0 +DA:98,0 +DA:102,0 +DA:103,0 +DA:104,0 +DA:105,0 +DA:107,0 +DA:109,0 +DA:113,1 +DA:114,1 +DA:115,1 +DA:117,14 +DA:118,175 +DA:120,14 +DA:123,1 +DA:128,0 +DA:134,0 +DA:140,0 +DA:146,0 +DA:147,0 +DA:149,0 +DA:150,0 +DA:152,0 +DA:157,0 +DA:158,0 +DA:160,0 +DA:161,0 +DA:167,0 +DA:172,0 +DA:173,0 +DA:175,0 +DA:176,0 +DA:178,0 +DA:183,0 +DA:187,0 +DA:188,0 +DA:189,0 +DA:190,0 +DA:191,0 +DA:192,0 +DA:193,0 +DA:194,0 +DA:198,0 +DA:199,0 +DA:203,0 +DA:207,0 +DA:208,0 +DA:209,0 +DA:211,0 +LF:85 +LH:30 +BRDA:38,1,0,1 +BRDA:38,1,1,0 +BRDA:62,2,0,0 +BRDA:62,2,1,0 +BRDA:77,3,0,1 +BRDA:77,3,1,0 +BRDA:91,4,0,0 +BRDA:91,4,1,0 +BRDA:102,5,0,0 +BRDA:102,5,1,0 +BRDA:113,6,0,1 +BRDA:113,6,1,0 +BRDA:146,7,0,0 +BRDA:146,7,1,0 +BRDA:157,8,0,0 +BRDA:157,8,1,0 +BRDA:172,9,0,0 +BRDA:172,9,1,0 +BRDA:190,10,0,0 +BRDA:190,10,1,0 +BRDA:190,11,0,0 +BRDA:190,11,1,0 +BRDA:194,12,0,0 +BRDA:194,12,1,0 +BRDA:199,13,0,0 +BRDA:199,13,1,0 +BRDA:203,14,0,0 +BRDA:203,14,1,0 +BRF:28 +BRH:3 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/utils/middleware.js +FN:11,userMigration +FN:15,(anonymous_2) +FN:20,(anonymous_3) +FNF:3 +FNH:0 +FNDA:0,userMigration +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +DA:1,1 +DA:11,1 +DA:12,0 +DA:13,0 +DA:15,0 +DA:17,0 +DA:21,0 +DA:34,0 +LF:8 +LH:2 +BRDA:12,1,0,0 +BRDA:12,1,1,0 +BRDA:12,2,0,0 +BRDA:12,2,1,0 +BRF:4 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/seed/bonfireMDNlinks.js +FNF:0 +FNH:0 +DA:9,1 +DA:91,1 +LF:2 +LH:2 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/challengeMap.js +FN:7,(anonymous_1) +FN:12,(anonymous_2) +FN:15,(anonymous_3) +FN:21,challengeMap +FN:31,(anonymous_5) +FN:37,(anonymous_6) +FN:39,(anonymous_7) +FN:44,numberWithCommas +FN:53,(anonymous_9) +FNF:9 +FNH:1 +FNDA:1,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,challengeMap +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:0,(anonymous_7) +FNDA:0,numberWithCommas +FNDA:0,(anonymous_9) +DA:1,1 +DA:7,1 +DA:8,1 +DA:9,1 +DA:11,1 +DA:12,1 +DA:13,0 +DA:15,1 +DA:16,0 +DA:19,1 +DA:21,1 +DA:22,0 +DA:24,0 +DA:25,0 +DA:28,0 +DA:30,0 +DA:32,0 +DA:34,0 +DA:37,0 +DA:38,0 +DA:40,0 +DA:44,1 +DA:45,0 +DA:48,0 +DA:49,0 +DA:50,0 +DA:51,0 +DA:53,0 +DA:54,0 +DA:56,0 +LF:30 +LH:10 +BRDA:24,1,0,0 +BRDA:24,1,1,0 +BRDA:54,2,0,0 +BRDA:54,2,1,0 +BRF:4 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/explorer.js +FN:1,mountLoopBackExplorer +FN:11,(anonymous_2) +FN:23,(anonymous_3) +FNF:3 +FNH:1 +FNDA:1,mountLoopBackExplorer +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +DA:1,1 +DA:2,1 +DA:3,0 +DA:5,1 +DA:6,1 +DA:7,1 +DA:11,0 +DA:12,0 +DA:16,0 +DA:19,1 +DA:21,1 +DA:22,1 +DA:23,1 +DA:24,0 +DA:27,0 +DA:28,0 +LF:16 +LH:9 +BRDA:2,1,0,0 +BRDA:2,1,1,1 +BRDA:27,2,0,0 +BRDA:27,2,1,0 +BRF:4 +BRH:1 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/fieldGuide.js +FN:6,(anonymous_1) +FN:17,returnIndividualFieldGuide +FN:23,(anonymous_3) +FN:30,(anonymous_4) +FN:36,(anonymous_5) +FN:65,showAllFieldGuides +FN:78,showCompletedFieldGuideFunction +FN:92,returnNextFieldGuide +FN:102,(anonymous_9) +FN:110,completedFieldGuide +FN:121,(anonymous_11) +FNF:11 +FNH:1 +FNDA:1,(anonymous_1) +FNDA:0,returnIndividualFieldGuide +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:0,(anonymous_5) +FNDA:0,showAllFieldGuides +FNDA:0,showCompletedFieldGuideFunction +FNDA:0,returnNextFieldGuide +FNDA:0,(anonymous_9) +FNDA:0,completedFieldGuide +FNDA:0,(anonymous_11) +DA:1,1 +DA:6,1 +DA:7,1 +DA:8,1 +DA:10,1 +DA:11,1 +DA:12,1 +DA:13,1 +DA:15,1 +DA:17,1 +DA:18,0 +DA:19,0 +DA:20,0 +DA:22,0 +DA:24,0 +DA:25,0 +DA:28,0 +DA:30,0 +DA:31,0 +DA:35,0 +DA:37,0 +DA:38,0 +DA:41,0 +DA:42,0 +DA:47,0 +DA:50,0 +DA:51,0 +DA:56,0 +DA:65,1 +DA:66,0 +DA:68,0 +DA:69,0 +DA:70,0 +DA:72,0 +DA:78,1 +DA:79,0 +DA:89,0 +DA:92,1 +DA:93,0 +DA:94,0 +DA:97,0 +DA:98,0 +DA:101,0 +DA:104,0 +DA:105,0 +DA:110,1 +DA:111,0 +DA:113,0 +DA:115,0 +DA:116,0 +DA:117,0 +DA:118,0 +DA:121,0 +DA:122,0 +DA:123,0 +DA:125,0 +LF:56 +LH:14 +BRDA:19,1,0,0 +BRDA:19,1,1,0 +BRDA:24,2,0,0 +BRDA:24,2,1,0 +BRDA:31,3,0,0 +BRDA:31,3,1,0 +BRDA:37,4,0,0 +BRDA:37,4,1,0 +BRDA:41,5,0,0 +BRDA:41,5,1,0 +BRDA:69,6,0,0 +BRDA:69,6,1,0 +BRDA:69,7,0,0 +BRDA:69,7,1,0 +BRDA:93,8,0,0 +BRDA:93,8,1,0 +BRDA:97,9,0,0 +BRDA:97,9,1,0 +BRDA:104,10,0,0 +BRDA:104,10,1,0 +BRDA:116,11,0,0 +BRDA:116,11,1,0 +BRDA:122,12,0,0 +BRDA:122,12,1,0 +BRF:24 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/home.js +FN:6,(anonymous_1) +FN:12,index +FN:16,(anonymous_3) +FNF:3 +FNH:1 +FNDA:1,(anonymous_1) +FNDA:0,index +FNDA:0,(anonymous_3) +DA:1,1 +DA:3,1 +DA:6,1 +DA:7,1 +DA:8,1 +DA:10,1 +DA:12,1 +DA:13,0 +DA:14,0 +DA:16,0 +DA:17,0 +DA:18,0 +DA:21,0 +LF:13 +LH:7 +BRDA:13,1,0,0 +BRDA:13,1,1,0 +BRDA:13,2,0,0 +BRDA:13,2,1,0 +BRDA:17,3,0,0 +BRDA:17,3,1,0 +BRF:6 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/jobs.js +FN:1,(anonymous_1) +FN:8,jobsDirectory +FN:9,(anonymous_3) +FNF:3 +FNH:1 +FNDA:1,(anonymous_1) +FNDA:0,jobsDirectory +FNDA:0,(anonymous_3) +DA:1,1 +DA:2,1 +DA:3,1 +DA:5,1 +DA:6,1 +DA:8,1 +DA:9,0 +DA:10,0 +DA:12,0 +LF:9 +LH:6 +BRDA:10,1,0,0 +BRDA:10,1,1,0 +BRF:2 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/middlewares.js +FNF:0 +FNH:0 +LF:0 +LH:0 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/nonprofits.js +FN:1,(anonymous_1) +FN:10,nonprofitsDirectory +FN:13,(anonymous_3) +FN:24,returnIndividualNonprofit +FN:30,(anonymous_5) +FN:54,(anonymous_6) +FNF:6 +FNH:1 +FNDA:1,(anonymous_1) +FNDA:0,nonprofitsDirectory +FNDA:0,(anonymous_3) +FNDA:0,returnIndividualNonprofit +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +DA:1,1 +DA:2,1 +DA:3,1 +DA:5,1 +DA:6,1 +DA:8,1 +DA:10,1 +DA:11,0 +DA:14,0 +DA:16,0 +DA:24,1 +DA:25,0 +DA:26,0 +DA:28,0 +DA:31,0 +DA:32,0 +DA:35,0 +DA:36,0 +DA:41,0 +DA:44,0 +DA:45,0 +DA:46,0 +DA:47,0 +DA:49,0 +DA:50,0 +DA:51,0 +DA:52,0 +DA:53,0 +DA:55,0 +DA:58,0 +DA:59,0 +DA:65,0 +LF:32 +LH:8 +BRDA:14,1,0,0 +BRDA:14,1,1,0 +BRDA:31,2,0,0 +BRDA:31,2,1,0 +BRDA:35,3,0,0 +BRDA:35,3,1,0 +BRDA:46,4,0,0 +BRDA:46,4,1,0 +BRDA:50,5,0,0 +BRDA:50,5,1,0 +BRDA:51,6,0,0 +BRDA:51,6,1,0 +BRDA:52,7,0,0 +BRDA:52,7,1,0 +BRDA:58,8,0,0 +BRDA:58,8,1,0 +BRF:16 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/randomAPIs.js +FN:13,(anonymous_1) +FN:44,slackInvite +FN:65,(anonymous_3) +FN:73,(anonymous_4) +FN:106,twitter +FN:128,(anonymous_6) +FN:136,getHelp +FN:156,getPair +FN:185,sitemap +FN:191,(anonymous_10) +FN:197,(anonymous_11) +FN:203,(anonymous_12) +FN:208,(anonymous_13) +FN:217,(anonymous_14) +FN:220,(anonymous_15) +FN:226,(anonymous_16) +FN:237,(anonymous_17) +FN:240,(anonymous_18) +FN:246,(anonymous_19) +FN:258,(anonymous_20) +FN:261,(anonymous_21) +FN:267,(anonymous_22) +FN:278,(anonymous_23) +FN:281,(anonymous_24) +FN:287,(anonymous_25) +FN:298,(anonymous_26) +FN:302,(anonymous_27) +FN:318,chat +FN:328,jobsForm +FN:335,catPhotoSubmit +FN:342,nonprofits +FN:348,nonprofitsForm +FN:354,agileProjectManagers +FN:360,agileProjectManagersForm +FN:366,twitch +FN:372,unsubscribe +FN:373,(anonymous_37) +FN:379,(anonymous_38) +FN:391,unsubscribed +FN:397,githubCalls +FN:413,(anonymous_41) +FN:428,(anonymous_42) +FN:443,trelloCalls +FN:447,(anonymous_44) +FN:457,bloggerCalls +FN:462,(anonymous_46) +FN:473,getCats +FNF:47 +FNH:1 +FNDA:1,(anonymous_1) +FNDA:0,slackInvite +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:0,twitter +FNDA:0,(anonymous_6) +FNDA:0,getHelp +FNDA:0,getPair +FNDA:0,sitemap +FNDA:0,(anonymous_10) +FNDA:0,(anonymous_11) +FNDA:0,(anonymous_12) +FNDA:0,(anonymous_13) +FNDA:0,(anonymous_14) +FNDA:0,(anonymous_15) +FNDA:0,(anonymous_16) +FNDA:0,(anonymous_17) +FNDA:0,(anonymous_18) +FNDA:0,(anonymous_19) +FNDA:0,(anonymous_20) +FNDA:0,(anonymous_21) +FNDA:0,(anonymous_22) +FNDA:0,(anonymous_23) +FNDA:0,(anonymous_24) +FNDA:0,(anonymous_25) +FNDA:0,(anonymous_26) +FNDA:0,(anonymous_27) +FNDA:0,chat +FNDA:0,jobsForm +FNDA:0,catPhotoSubmit +FNDA:0,nonprofits +FNDA:0,nonprofitsForm +FNDA:0,agileProjectManagers +FNDA:0,agileProjectManagersForm +FNDA:0,twitch +FNDA:0,unsubscribe +FNDA:0,(anonymous_37) +FNDA:0,(anonymous_38) +FNDA:0,unsubscribed +FNDA:0,githubCalls +FNDA:0,(anonymous_41) +FNDA:0,(anonymous_42) +FNDA:0,trelloCalls +FNDA:0,(anonymous_44) +FNDA:0,bloggerCalls +FNDA:0,(anonymous_46) +FNDA:0,getCats +DA:1,1 +DA:12,1 +DA:13,1 +DA:14,1 +DA:15,1 +DA:16,1 +DA:17,1 +DA:18,1 +DA:19,1 +DA:21,1 +DA:22,1 +DA:23,1 +DA:24,1 +DA:25,1 +DA:26,1 +DA:27,1 +DA:28,1 +DA:29,1 +DA:30,1 +DA:31,1 +DA:32,1 +DA:33,1 +DA:34,1 +DA:35,1 +DA:36,1 +DA:37,1 +DA:38,1 +DA:40,1 +DA:42,1 +DA:44,1 +DA:45,0 +DA:46,0 +DA:47,0 +DA:53,0 +DA:58,0 +DA:65,0 +DA:66,0 +DA:67,0 +DA:72,0 +DA:73,0 +DA:74,0 +DA:75,0 +DA:77,0 +DA:80,0 +DA:87,0 +DA:91,0 +DA:95,0 +DA:98,0 +DA:102,0 +DA:106,1 +DA:108,0 +DA:115,0 +DA:116,0 +DA:117,0 +DA:119,0 +DA:122,0 +DA:129,0 +DA:130,0 +DA:136,1 +DA:137,0 +DA:138,0 +DA:141,0 +DA:143,0 +DA:153,0 +DA:156,1 +DA:157,0 +DA:158,0 +DA:159,0 +DA:182,0 +DA:185,1 +DA:186,0 +DA:187,0 +DA:190,0 +DA:192,0 +DA:198,0 +DA:199,0 +DA:200,0 +DA:202,0 +DA:204,0 +DA:209,0 +DA:218,0 +DA:221,0 +DA:222,0 +DA:223,0 +DA:225,0 +DA:227,0 +DA:238,0 +DA:241,0 +DA:242,0 +DA:243,0 +DA:245,0 +DA:247,0 +DA:259,0 +DA:262,0 +DA:263,0 +DA:264,0 +DA:266,0 +DA:268,0 +DA:279,0 +DA:282,0 +DA:283,0 +DA:284,0 +DA:286,0 +DA:288,0 +DA:299,0 +DA:300,0 +DA:302,0 +DA:303,0 +DA:304,0 +DA:318,1 +DA:319,0 +DA:320,0 +DA:322,0 +DA:328,1 +DA:329,0 +DA:335,1 +DA:336,0 +DA:342,1 +DA:343,0 +DA:348,1 +DA:349,0 +DA:354,1 +DA:355,0 +DA:360,1 +DA:361,0 +DA:366,1 +DA:367,0 +DA:372,1 +DA:373,0 +DA:374,0 +DA:375,0 +DA:376,0 +DA:378,0 +DA:379,0 +DA:380,0 +DA:381,0 +DA:383,0 +DA:386,0 +DA:391,1 +DA:392,0 +DA:397,1 +DA:398,0 +DA:404,0 +DA:414,0 +DA:415,0 +DA:419,0 +DA:429,0 +DA:430,0 +DA:433,0 +DA:443,1 +DA:444,0 +DA:448,0 +DA:449,0 +DA:453,0 +DA:457,1 +DA:458,0 +DA:463,0 +DA:465,0 +DA:468,0 +DA:473,1 +DA:474,0 +LF:161 +LH:48 +BRDA:45,1,0,0 +BRDA:45,1,1,0 +BRDA:46,2,0,0 +BRDA:46,2,1,0 +BRDA:66,3,0,0 +BRDA:66,3,1,0 +BRDA:66,4,0,0 +BRDA:66,4,1,0 +BRDA:74,5,0,0 +BRDA:74,5,1,0 +BRDA:116,6,0,0 +BRDA:116,6,1,0 +BRDA:129,7,0,0 +BRDA:129,7,1,0 +BRDA:138,8,0,0 +BRDA:138,8,1,0 +BRDA:198,9,0,0 +BRDA:198,9,1,0 +BRDA:221,10,0,0 +BRDA:221,10,1,0 +BRDA:241,11,0,0 +BRDA:241,11,1,0 +BRDA:262,12,0,0 +BRDA:262,12,1,0 +BRDA:282,13,0,0 +BRDA:282,13,1,0 +BRDA:299,14,0,0 +BRDA:299,14,1,0 +BRDA:319,15,0,0 +BRDA:319,15,1,0 +BRDA:319,16,0,0 +BRDA:319,16,1,0 +BRDA:374,17,0,0 +BRDA:374,17,1,0 +BRDA:375,18,0,0 +BRDA:375,18,1,0 +BRDA:380,19,0,0 +BRDA:380,19,1,0 +BRDA:414,20,0,0 +BRDA:414,20,1,0 +BRDA:415,21,0,0 +BRDA:415,21,1,0 +BRDA:429,22,0,0 +BRDA:429,22,1,0 +BRDA:430,23,0,0 +BRDA:430,23,1,0 +BRDA:430,24,0,0 +BRDA:430,24,1,0 +BRDA:448,25,0,0 +BRDA:448,25,1,0 +BRDA:449,26,0,0 +BRDA:449,26,1,0 +BRDA:449,27,0,0 +BRDA:449,27,1,0 +BRDA:463,28,0,0 +BRDA:463,28,1,0 +BRDA:465,29,0,0 +BRDA:465,29,1,0 +BRDA:465,30,0,0 +BRDA:465,30,1,0 +BRF:60 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/redirects.js +FN:1,(anonymous_1) +FN:4,(anonymous_2) +FN:11,(anonymous_3) +FN:15,(anonymous_4) +FNF:4 +FNH:1 +FNDA:1,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +DA:1,1 +DA:2,1 +DA:4,1 +DA:5,0 +DA:11,1 +DA:12,0 +DA:15,1 +DA:16,0 +DA:21,1 +LF:9 +LH:6 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/restApi.js +FN:1,mountRestApi +FNF:1 +FNH:1 +FNDA:1,mountRestApi +DA:1,1 +DA:2,1 +DA:3,1 +LF:3 +LH:3 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/story.js +FN:10,(anonymous_1) +FN:31,hotRank +FN:45,hotJSON +FN:46,(anonymous_4) +FN:53,(anonymous_5) +FN:55,(anonymous_6) +FN:63,hot +FN:70,submitNew +FN:94,preSubmit +FN:125,returnIndividualStory +FN:130,(anonymous_11) +FN:155,(anonymous_12) +FN:184,getStories +FN:185,(anonymous_14) +FN:214,(anonymous_15) +FN:226,upvote +FN:228,(anonymous_17) +FN:248,(anonymous_18) +FN:252,(anonymous_19) +FN:253,(anonymous_20) +FN:267,comments +FN:271,(anonymous_22) +FN:280,newStory +FN:304,(anonymous_24) +FN:321,processResponse +FN:342,storySubmission +FN:361,(anonymous_27) +FN:401,(anonymous_28) +FN:406,(anonymous_29) +FN:418,commentSubmit +FN:455,commentOnCommentSubmit +FN:496,commentEdit +FN:498,(anonymous_33) +FN:521,(anonymous_34) +FN:532,commentSave +FN:533,(anonymous_36) +FN:542,(anonymous_37) +FN:549,(anonymous_38) +FN:559,(anonymous_39) +FN:595,(anonymous_40) +FNF:40 +FNH:1 +FNDA:1,(anonymous_1) +FNDA:0,hotRank +FNDA:0,hotJSON +FNDA:0,(anonymous_4) +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:0,hot +FNDA:0,submitNew +FNDA:0,preSubmit +FNDA:0,returnIndividualStory +FNDA:0,(anonymous_11) +FNDA:0,(anonymous_12) +FNDA:0,getStories +FNDA:0,(anonymous_14) +FNDA:0,(anonymous_15) +FNDA:0,upvote +FNDA:0,(anonymous_17) +FNDA:0,(anonymous_18) +FNDA:0,(anonymous_19) +FNDA:0,(anonymous_20) +FNDA:0,comments +FNDA:0,(anonymous_22) +FNDA:0,newStory +FNDA:0,(anonymous_24) +FNDA:0,processResponse +FNDA:0,storySubmission +FNDA:0,(anonymous_27) +FNDA:0,(anonymous_28) +FNDA:0,(anonymous_29) +FNDA:0,commentSubmit +FNDA:0,commentOnCommentSubmit +FNDA:0,commentEdit +FNDA:0,(anonymous_33) +FNDA:0,(anonymous_34) +FNDA:0,commentSave +FNDA:0,(anonymous_36) +FNDA:0,(anonymous_37) +FNDA:0,(anonymous_38) +FNDA:0,(anonymous_39) +FNDA:0,(anonymous_40) +DA:1,1 +DA:10,1 +DA:11,1 +DA:12,1 +DA:13,1 +DA:15,1 +DA:16,1 +DA:17,1 +DA:18,1 +DA:19,1 +DA:20,1 +DA:21,1 +DA:22,1 +DA:23,1 +DA:24,1 +DA:25,1 +DA:26,1 +DA:27,1 +DA:29,1 +DA:31,1 +DA:38,0 +DA:39,0 +DA:40,0 +DA:41,0 +DA:42,0 +DA:45,1 +DA:46,0 +DA:47,0 +DA:48,0 +DA:50,0 +DA:52,0 +DA:53,0 +DA:54,0 +DA:56,0 +DA:63,1 +DA:64,0 +DA:70,1 +DA:71,0 +DA:94,1 +DA:96,0 +DA:97,0 +DA:101,0 +DA:103,0 +DA:106,0 +DA:111,0 +DA:112,0 +DA:113,0 +DA:114,0 +DA:125,1 +DA:126,0 +DA:128,0 +DA:130,0 +DA:131,0 +DA:132,0 +DA:136,0 +DA:137,0 +DA:142,0 +DA:145,0 +DA:146,0 +DA:149,0 +DA:150,0 +DA:153,0 +DA:154,0 +DA:155,0 +DA:156,0 +DA:158,0 +DA:159,0 +DA:162,0 +DA:164,0 +DA:184,1 +DA:185,0 +DA:186,0 +DA:187,0 +DA:189,0 +DA:215,0 +DA:216,0 +DA:218,0 +DA:219,0 +DA:221,0 +DA:226,1 +DA:227,0 +DA:228,0 +DA:229,0 +DA:230,0 +DA:232,0 +DA:233,0 +DA:234,0 +DA:240,0 +DA:241,0 +DA:246,0 +DA:249,0 +DA:251,0 +DA:252,0 +DA:253,0 +DA:254,0 +DA:256,0 +DA:257,0 +DA:258,0 +DA:263,0 +DA:267,1 +DA:268,0 +DA:269,0 +DA:272,0 +DA:273,0 +DA:275,0 +DA:276,0 +DA:280,1 +DA:281,0 +DA:282,0 +DA:284,0 +DA:285,0 +DA:289,0 +DA:290,0 +DA:293,0 +DA:299,0 +DA:300,0 +DA:302,0 +DA:305,0 +DA:306,0 +DA:308,0 +DA:309,0 +DA:312,0 +DA:317,0 +DA:321,1 +DA:322,0 +DA:323,0 +DA:331,0 +DA:342,1 +DA:343,0 +DA:344,0 +DA:345,0 +DA:347,0 +DA:353,0 +DA:355,0 +DA:356,0 +DA:359,0 +DA:362,0 +DA:363,0 +DA:367,0 +DA:369,0 +DA:370,0 +DA:371,0 +DA:373,0 +DA:401,0 +DA:402,0 +DA:403,0 +DA:405,0 +DA:406,0 +DA:407,0 +DA:408,0 +DA:410,0 +DA:418,1 +DA:419,0 +DA:420,0 +DA:421,0 +DA:423,0 +DA:428,0 +DA:429,0 +DA:432,0 +DA:434,0 +DA:452,0 +DA:455,1 +DA:456,0 +DA:457,0 +DA:458,0 +DA:461,0 +DA:469,0 +DA:470,0 +DA:473,0 +DA:476,0 +DA:493,0 +DA:496,1 +DA:498,0 +DA:499,0 +DA:500,0 +DA:502,0 +DA:504,0 +DA:505,0 +DA:508,0 +DA:512,0 +DA:513,0 +DA:516,0 +DA:519,0 +DA:520,0 +DA:521,0 +DA:522,0 +DA:523,0 +DA:525,0 +DA:532,1 +DA:533,0 +DA:534,0 +DA:535,0 +DA:537,0 +DA:540,0 +DA:543,0 +DA:544,0 +DA:546,0 +DA:547,0 +DA:548,0 +DA:549,0 +DA:550,0 +DA:551,0 +DA:553,0 +DA:557,0 +DA:560,0 +DA:561,0 +DA:565,0 +DA:572,0 +DA:580,0 +DA:595,0 +DA:596,0 +DA:597,0 +DA:604,0 +LF:213 +LH:35 +BRDA:47,1,0,0 +BRDA:47,1,1,0 +BRDA:52,2,0,0 +BRDA:52,2,1,0 +BRDA:101,3,0,0 +BRDA:101,3,1,0 +BRDA:111,4,0,0 +BRDA:111,4,1,0 +BRDA:112,5,0,0 +BRDA:112,5,1,0 +BRDA:113,6,0,0 +BRDA:113,6,1,0 +BRDA:131,7,0,0 +BRDA:131,7,1,0 +BRDA:136,8,0,0 +BRDA:136,8,1,0 +BRDA:149,9,0,0 +BRDA:149,9,1,0 +BRDA:158,10,0,0 +BRDA:158,10,1,0 +BRDA:168,11,0,0 +BRDA:168,11,1,0 +BRDA:186,12,0,0 +BRDA:186,12,1,0 +BRDA:191,13,0,0 +BRDA:191,13,1,0 +BRDA:215,14,0,0 +BRDA:215,14,1,0 +BRDA:218,15,0,0 +BRDA:218,15,1,0 +BRDA:218,16,0,0 +BRDA:218,16,1,0 +BRDA:229,17,0,0 +BRDA:229,17,1,0 +BRDA:249,18,0,0 +BRDA:249,18,1,0 +BRDA:251,19,0,0 +BRDA:251,19,1,0 +BRDA:254,20,0,0 +BRDA:254,20,1,0 +BRDA:256,21,0,0 +BRDA:256,21,1,0 +BRDA:257,22,0,0 +BRDA:257,22,1,0 +BRDA:272,23,0,0 +BRDA:272,23,1,0 +BRDA:281,24,0,0 +BRDA:281,24,1,0 +BRDA:289,25,0,0 +BRDA:289,25,1,0 +BRDA:299,26,0,0 +BRDA:299,26,1,0 +BRDA:305,27,0,0 +BRDA:305,27,1,0 +BRDA:308,28,0,0 +BRDA:308,28,1,0 +BRDA:322,29,0,0 +BRDA:322,29,1,0 +BRDA:344,30,0,0 +BRDA:344,30,1,0 +BRDA:355,31,0,0 +BRDA:355,31,1,0 +BRDA:362,32,0,0 +BRDA:362,32,1,0 +BRDA:367,33,0,0 +BRDA:367,33,1,0 +BRDA:370,34,0,0 +BRDA:370,34,1,0 +BRDA:402,35,0,0 +BRDA:402,35,1,0 +BRDA:405,36,0,0 +BRDA:405,36,1,0 +BRDA:407,37,0,0 +BRDA:407,37,1,0 +BRDA:420,38,0,0 +BRDA:420,38,1,0 +BRDA:428,39,0,0 +BRDA:428,39,1,0 +BRDA:457,40,0,0 +BRDA:457,40,1,0 +BRDA:469,41,0,0 +BRDA:469,41,1,0 +BRDA:499,42,0,0 +BRDA:499,42,1,0 +BRDA:504,43,0,0 +BRDA:504,43,1,0 +BRDA:504,44,0,0 +BRDA:504,44,1,0 +BRDA:512,45,0,0 +BRDA:512,45,1,0 +BRDA:522,46,0,0 +BRDA:522,46,1,0 +BRDA:534,47,0,0 +BRDA:534,47,1,0 +BRDA:543,48,0,0 +BRDA:543,48,1,0 +BRDA:547,49,0,0 +BRDA:547,49,1,0 +BRDA:550,50,0,0 +BRDA:550,50,1,0 +BRDA:560,51,0,0 +BRDA:560,51,1,0 +BRDA:565,52,0,0 +BRDA:565,52,1,0 +BRDA:566,53,0,0 +BRDA:566,53,1,0 +BRDA:566,53,2,0 +BRDA:566,53,3,0 +BRDA:566,53,4,0 +BRDA:596,54,0,0 +BRDA:596,54,1,0 +BRF:111 +BRH:0 +end_of_record +TN: +SF:/Users/nathanleniz/Developer/freecodecamp/server/boot/user.js +FN:11,(anonymous_1) +FN:17,(anonymous_2) +FN:20,(anonymous_3) +FN:47,getSignin +FN:61,signout +FN:71,getEmailSignin +FN:85,getEmailSignup +FN:99,getAccount +FN:109,getAccountAngular +FN:121,returnUser +FN:124,(anonymous_11) +FN:131,(anonymous_12) +FN:136,(anonymous_13) +FN:187,(anonymous_14) +FN:194,(anonymous_15) +FN:200,(anonymous_16) +FN:227,(anonymous_17) +FN:254,postUpdateProfile +FN:256,(anonymous_19) +FN:266,(anonymous_20) +FN:279,(anonymous_21) +FN:323,(anonymous_22) +FN:331,(anonymous_23) +FN:351,postUpdatePassword +FN:365,(anonymous_25) +FN:370,(anonymous_26) +FN:384,postDeleteAccount +FN:385,(anonymous_28) +FN:398,getOauthUnlink +FN:400,(anonymous_30) +FN:405,(anonymous_31) +FN:409,(anonymous_32) +FN:422,getReset +FN:433,(anonymous_34) +FN:453,postReset +FN:462,(anonymous_36) +FN:470,(anonymous_37) +FN:483,(anonymous_38) +FN:485,(anonymous_39) +FN:491,(anonymous_40) +FN:512,(anonymous_41) +FN:520,(anonymous_42) +FN:531,getForgot +FN:545,postForgot +FN:554,(anonymous_45) +FN:555,(anonymous_46) +FN:561,(anonymous_47) +FN:564,(anonymous_48) +FN:577,(anonymous_49) +FN:583,(anonymous_50) +FN:609,(anonymous_51) +FN:619,(anonymous_52) +FN:625,updateUserStoryPictures +FN:631,(anonymous_54) +FN:640,(anonymous_55) +FN:649,saveStoriesAndComments +FN:654,(anonymous_57) +FN:657,(anonymous_58) +FN:662,(anonymous_59) +FN:665,(anonymous_60) +FN:669,(anonymous_61) +FNF:61 +FNH:1 +FNDA:1,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,getSignin +FNDA:0,signout +FNDA:0,getEmailSignin +FNDA:0,getEmailSignup +FNDA:0,getAccount +FNDA:0,getAccountAngular +FNDA:0,returnUser +FNDA:0,(anonymous_11) +FNDA:0,(anonymous_12) +FNDA:0,(anonymous_13) +FNDA:0,(anonymous_14) +FNDA:0,(anonymous_15) +FNDA:0,(anonymous_16) +FNDA:0,(anonymous_17) +FNDA:0,postUpdateProfile +FNDA:0,(anonymous_19) +FNDA:0,(anonymous_20) +FNDA:0,(anonymous_21) +FNDA:0,(anonymous_22) +FNDA:0,(anonymous_23) +FNDA:0,postUpdatePassword +FNDA:0,(anonymous_25) +FNDA:0,(anonymous_26) +FNDA:0,postDeleteAccount +FNDA:0,(anonymous_28) +FNDA:0,getOauthUnlink +FNDA:0,(anonymous_30) +FNDA:0,(anonymous_31) +FNDA:0,(anonymous_32) +FNDA:0,getReset +FNDA:0,(anonymous_34) +FNDA:0,postReset +FNDA:0,(anonymous_36) +FNDA:0,(anonymous_37) +FNDA:0,(anonymous_38) +FNDA:0,(anonymous_39) +FNDA:0,(anonymous_40) +FNDA:0,(anonymous_41) +FNDA:0,(anonymous_42) +FNDA:0,getForgot +FNDA:0,postForgot +FNDA:0,(anonymous_45) +FNDA:0,(anonymous_46) +FNDA:0,(anonymous_47) +FNDA:0,(anonymous_48) +FNDA:0,(anonymous_49) +FNDA:0,(anonymous_50) +FNDA:0,(anonymous_51) +FNDA:0,(anonymous_52) +FNDA:0,updateUserStoryPictures +FNDA:0,(anonymous_54) +FNDA:0,(anonymous_55) +FNDA:0,saveStoriesAndComments +FNDA:0,(anonymous_57) +FNDA:0,(anonymous_58) +FNDA:0,(anonymous_59) +FNDA:0,(anonymous_60) +FNDA:0,(anonymous_61) +DA:1,1 +DA:11,1 +DA:12,1 +DA:13,1 +DA:14,1 +DA:15,1 +DA:17,1 +DA:18,0 +DA:20,1 +DA:21,0 +DA:23,1 +DA:24,1 +DA:25,1 +DA:26,1 +DA:27,1 +DA:28,1 +DA:29,1 +DA:30,1 +DA:31,1 +DA:32,1 +DA:33,1 +DA:34,1 +DA:35,1 +DA:36,1 +DA:38,1 +DA:40,1 +DA:47,1 +DA:48,0 +DA:49,0 +DA:51,0 +DA:61,1 +DA:62,0 +DA:63,0 +DA:71,1 +DA:72,0 +DA:73,0 +DA:75,0 +DA:85,1 +DA:86,0 +DA:87,0 +DA:89,0 +DA:99,1 +DA:100,0 +DA:109,1 +DA:110,0 +DA:121,1 +DA:122,0 +DA:125,0 +DA:126,0 +DA:127,0 +DA:129,0 +DA:130,0 +DA:132,0 +DA:135,0 +DA:136,0 +DA:137,0 +DA:140,0 +DA:141,0 +DA:143,0 +DA:144,0 +DA:145,0 +DA:147,0 +DA:148,0 +DA:149,0 +DA:152,0 +DA:156,0 +DA:157,0 +DA:159,0 +DA:160,0 +DA:162,0 +DA:167,0 +DA:169,0 +DA:174,0 +DA:176,0 +DA:177,0 +DA:180,0 +DA:184,0 +DA:187,0 +DA:188,0 +DA:189,0 +DA:192,0 +DA:193,0 +DA:194,0 +DA:195,0 +DA:198,0 +DA:199,0 +DA:200,0 +DA:201,0 +DA:204,0 +DA:228,0 +DA:239,0 +DA:243,0 +DA:254,1 +DA:256,0 +DA:257,0 +DA:258,0 +DA:259,0 +DA:260,0 +DA:261,0 +DA:264,0 +DA:267,0 +DA:268,0 +DA:270,0 +DA:271,0 +DA:272,0 +DA:275,0 +DA:277,0 +DA:280,0 +DA:281,0 +DA:283,0 +DA:284,0 +DA:288,0 +DA:291,0 +DA:293,0 +DA:294,0 +DA:295,0 +DA:296,0 +DA:297,0 +DA:299,0 +DA:300,0 +DA:301,0 +DA:303,0 +DA:304,0 +DA:305,0 +DA:307,0 +DA:310,0 +DA:311,0 +DA:312,0 +DA:314,0 +DA:315,0 +DA:316,0 +DA:318,0 +DA:319,0 +DA:320,0 +DA:323,0 +DA:324,0 +DA:325,0 +DA:327,0 +DA:332,0 +DA:333,0 +DA:336,0 +DA:351,1 +DA:352,0 +DA:355,0 +DA:358,0 +DA:360,0 +DA:361,0 +DA:362,0 +DA:365,0 +DA:366,0 +DA:368,0 +DA:370,0 +DA:371,0 +DA:373,0 +DA:374,0 +DA:384,1 +DA:385,0 +DA:386,0 +DA:387,0 +DA:388,0 +DA:389,0 +DA:398,1 +DA:399,0 +DA:400,0 +DA:401,0 +DA:403,0 +DA:404,0 +DA:406,0 +DA:409,0 +DA:410,0 +DA:411,0 +DA:412,0 +DA:422,1 +DA:423,0 +DA:424,0 +DA:426,0 +DA:434,0 +DA:435,0 +DA:436,0 +DA:439,0 +DA:441,0 +DA:453,1 +DA:454,0 +DA:456,0 +DA:457,0 +DA:458,0 +DA:461,0 +DA:463,0 +DA:471,0 +DA:472,0 +DA:473,0 +DA:476,0 +DA:479,0 +DA:480,0 +DA:481,0 +DA:483,0 +DA:484,0 +DA:485,0 +DA:486,0 +DA:492,0 +DA:499,0 +DA:512,0 +DA:513,0 +DA:514,0 +DA:517,0 +DA:521,0 +DA:522,0 +DA:531,1 +DA:532,0 +DA:533,0 +DA:535,0 +DA:545,1 +DA:546,0 +DA:548,0 +DA:549,0 +DA:550,0 +DA:553,0 +DA:555,0 +DA:556,0 +DA:557,0 +DA:558,0 +DA:562,0 +DA:565,0 +DA:566,0 +DA:567,0 +DA:570,0 +DA:573,0 +DA:575,0 +DA:577,0 +DA:578,0 +DA:579,0 +DA:584,0 +DA:591,0 +DA:609,0 +DA:610,0 +DA:611,0 +DA:616,0 +DA:620,0 +DA:621,0 +DA:625,1 +DA:627,0 +DA:631,0 +DA:632,0 +DA:633,0 +DA:635,0 +DA:636,0 +DA:637,0 +DA:640,0 +DA:641,0 +DA:642,0 +DA:644,0 +DA:645,0 +DA:646,0 +DA:649,1 +DA:650,0 +DA:651,0 +DA:653,0 +DA:654,0 +DA:655,0 +DA:656,0 +DA:657,0 +DA:658,0 +DA:662,0 +DA:663,0 +DA:664,0 +DA:665,0 +DA:666,0 +DA:669,0 +DA:670,0 +DA:671,0 +DA:673,0 +LF:271 +LH:41 +BRDA:48,1,0,0 +BRDA:48,1,1,0 +BRDA:72,2,0,0 +BRDA:72,2,1,0 +BRDA:86,3,0,0 +BRDA:86,3,1,0 +BRDA:125,4,0,0 +BRDA:125,4,1,0 +BRDA:129,5,0,0 +BRDA:129,5,1,0 +BRDA:145,6,0,0 +BRDA:145,6,1,0 +BRDA:148,7,0,0 +BRDA:148,7,1,0 +BRDA:162,8,0,0 +BRDA:162,8,1,0 +BRDA:163,9,0,0 +BRDA:163,9,1,0 +BRDA:169,10,0,0 +BRDA:169,10,1,0 +BRDA:176,11,0,0 +BRDA:176,11,1,0 +BRDA:188,12,0,0 +BRDA:188,12,1,0 +BRDA:198,13,0,0 +BRDA:198,13,1,0 +BRDA:199,14,0,0 +BRDA:199,14,1,0 +BRDA:201,15,0,0 +BRDA:201,15,1,0 +BRDA:233,16,0,0 +BRDA:233,16,1,0 +BRDA:235,17,0,0 +BRDA:235,17,1,0 +BRDA:257,18,0,0 +BRDA:257,18,1,0 +BRDA:259,19,0,0 +BRDA:259,19,1,0 +BRDA:267,20,0,0 +BRDA:267,20,1,0 +BRDA:271,21,0,0 +BRDA:271,21,1,0 +BRDA:271,22,0,0 +BRDA:271,22,1,0 +BRDA:280,23,0,0 +BRDA:280,23,1,0 +BRDA:284,24,0,0 +BRDA:284,24,1,0 +BRDA:285,25,0,0 +BRDA:285,25,1,0 +BRDA:293,26,0,0 +BRDA:293,26,1,0 +BRDA:294,27,0,0 +BRDA:294,27,1,0 +BRDA:295,28,0,0 +BRDA:295,28,1,0 +BRDA:296,29,0,0 +BRDA:296,29,1,0 +BRDA:297,30,0,0 +BRDA:297,30,1,0 +BRDA:299,31,0,0 +BRDA:299,31,1,0 +BRDA:300,32,0,0 +BRDA:300,32,1,0 +BRDA:301,33,0,0 +BRDA:301,33,1,0 +BRDA:303,34,0,0 +BRDA:303,34,1,0 +BRDA:304,35,0,0 +BRDA:304,35,1,0 +BRDA:305,36,0,0 +BRDA:305,36,1,0 +BRDA:307,37,0,0 +BRDA:307,37,1,0 +BRDA:310,38,0,0 +BRDA:310,38,1,0 +BRDA:311,39,0,0 +BRDA:311,39,1,0 +BRDA:312,40,0,0 +BRDA:312,40,1,0 +BRDA:314,41,0,0 +BRDA:314,41,1,0 +BRDA:315,42,0,0 +BRDA:315,42,1,0 +BRDA:316,43,0,0 +BRDA:316,43,1,0 +BRDA:318,44,0,0 +BRDA:318,44,1,0 +BRDA:319,45,0,0 +BRDA:319,45,1,0 +BRDA:320,46,0,0 +BRDA:320,46,1,0 +BRDA:324,47,0,0 +BRDA:324,47,1,0 +BRDA:332,48,0,0 +BRDA:332,48,1,0 +BRDA:360,49,0,0 +BRDA:360,49,1,0 +BRDA:366,50,0,0 +BRDA:366,50,1,0 +BRDA:371,51,0,0 +BRDA:371,51,1,0 +BRDA:386,52,0,0 +BRDA:386,52,1,0 +BRDA:401,53,0,0 +BRDA:401,53,1,0 +BRDA:410,54,0,0 +BRDA:410,54,1,0 +BRDA:423,55,0,0 +BRDA:423,55,1,0 +BRDA:434,56,0,0 +BRDA:434,56,1,0 +BRDA:435,57,0,0 +BRDA:435,57,1,0 +BRDA:456,58,0,0 +BRDA:456,58,1,0 +BRDA:471,59,0,0 +BRDA:471,59,1,0 +BRDA:472,60,0,0 +BRDA:472,60,1,0 +BRDA:484,61,0,0 +BRDA:484,61,1,0 +BRDA:513,62,0,0 +BRDA:513,62,1,0 +BRDA:521,63,0,0 +BRDA:521,63,1,0 +BRDA:532,64,0,0 +BRDA:532,64,1,0 +BRDA:548,65,0,0 +BRDA:548,65,1,0 +BRDA:556,66,0,0 +BRDA:556,66,1,0 +BRDA:565,67,0,0 +BRDA:565,67,1,0 +BRDA:566,68,0,0 +BRDA:566,68,1,0 +BRDA:578,69,0,0 +BRDA:578,69,1,0 +BRDA:610,70,0,0 +BRDA:610,70,1,0 +BRDA:620,71,0,0 +BRDA:620,71,1,0 +BRDA:632,72,0,0 +BRDA:632,72,1,0 +BRDA:641,73,0,0 +BRDA:641,73,1,0 +BRDA:650,74,0,0 +BRDA:650,74,1,0 +BRDA:670,75,0,0 +BRDA:670,75,1,0 +BRF:150 +BRH:0 +end_of_record diff --git a/index.html b/index.html new file mode 100644 index 00000000000000..cd3ee82b9cdaec --- /dev/null +++ b/index.html @@ -0,0 +1,8 @@ + + + Free Code Camp + + + + + diff --git a/package.json b/package.json index acbc84c80d048d..23c49e675c46da 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,9 @@ "gulp-eslint": "~0.9.0", "gulp-inject": "~1.0.2", "gulp-nodemon": "^2.0.3", + "istanbul": "^0.3.15", "loopback-explorer": "^1.7.2", + "loopback-testing": "^1.1.0", "mocha": "~2.0.1", "multiline": "~1.0.1", "supertest": "~0.15.0" diff --git a/seed/field-guides.json b/seed/field-guides.json index 56ad3be106191e..2de429b5698ff2 100644 --- a/seed/field-guides.json +++ b/seed/field-guides.json @@ -1,6 +1,6 @@ [ { - "_id": "bd7158d9c441eddfaeb5bdef", + "id": "bd7158d9c441eddfaeb5bdef", "name": "How do I use this guide?", "dashedName": "how-do-i-use-this-guide", "description": [ @@ -12,7 +12,7 @@ ] }, { - "_id": "bd7158d9c441eddfaeb5bdff", + "id": "bd7158d9c441eddfaeb5bdff", "name": "What exactly is Free Code Camp?", "dashedName": "what-exactly-is-free-code-camp", "description": [ @@ -30,7 +30,7 @@ ] }, { - "_id": "bd7158d9c441eddfaeb5bd1f", + "id": "bd7158d9c441eddfaeb5bd1f", "name": "Why do I need Free Code Camp?", "dashedName": "why-do-i-need-free-code-camp", "description": [ @@ -48,7 +48,7 @@ ] }, { - "_id": "bd7158d9c441eddfaeb5bd2f", + "id": "bd7158d9c441eddfaeb5bd2f", "name": "What are the main advantages of Free Code Camp?", "dashedName": "what-are-the-main-advantages-of-free-code-camp", "description": [ @@ -65,7 +65,7 @@ ] }, { - "_id": "bd7158d9c441eddfaeb5bd3f", + "id": "bd7158d9c441eddfaeb5bd3f", "name": "How does Free Code Camp work?", "dashedName": "how-does-free-code-camp-work", "description": [ @@ -87,7 +87,7 @@ ] }, { - "_id": "bd7158d9c441eddfaeb5bd4f", + "id": "bd7158d9c441eddfaeb5bd4f", "name": "Will I really be able to get software engineering job after Free Code Camp?", "dashedName": "will-i-really-be-able-to-get-a-software-engineering-job-after-free-code-camp", "description": [ @@ -107,7 +107,7 @@ ] }, { - "_id": "bd7158d9c440eddfaeb5bdef", + "id": "bd7158d9c440eddfaeb5bdef", "name": "What will I learn, and in what sequence?", "dashedName": "what-will-i-learn-and-in-what-sequence", "description": [ @@ -144,7 +144,7 @@ ] }, { - "_id": "bd7158d9c434eddfaeb5bdef", + "id": "bd7158d9c434eddfaeb5bdef", "name": "How long does Free Code Camp take?", "dashedName": "how-long-does-free-code-camp-take", "description": [ @@ -182,7 +182,7 @@ ] }, { - "_id": "bd7158d9c438eddfaeb5bdef", + "id": "bd7158d9c438eddfaeb5bdef", "name": "Why does Free Code Camp use JavaScript instead of Ruby or Python?", "dashedName": "why-does-free-code-camp-use-javascript-instead-of-ruby-or-python", "description": [ @@ -196,7 +196,7 @@ ] }, { - "_id": "bd7158d9c437eddfaeb5bdef", + "id": "bd7158d9c437eddfaeb5bdef", "name": "What is pair programming, and why is it special?", "dashedName": "what-is-pair-programming-and-why-is-it-special", "description": [ @@ -209,7 +209,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5bd2f", + "id": "bd7158d9c436eddfaeb5bd2f", "name": "How do I get help when I get stuck?", "dashedName": "how-do-i-get-help-when-i-get-stuck", "description": [ @@ -232,7 +232,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5bd3f", + "id": "bd7158d9c436eddfaeb5bd3f", "name": "Can I jump around in this guide?", "dashedName": "can-i-jump-around-in-this-guide", "description": [ @@ -244,7 +244,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5bdef", + "id": "bd7158d9c436eddfaeb5bdef", "name": "If Free Code Camp is free, how does it make money?", "dashedName": "if-free-code-camp-is-free-how-does-it-make-money", "description": [ @@ -257,7 +257,7 @@ ] }, { - "_id": "bd7158d9c435eddfaeb5bdef", + "id": "bd7158d9c435eddfaeb5bdef", "name": "Does Free Code Camp have an application process?", "dashedName": "does-free-code-camp-have-an-application-process", "description": [ @@ -269,7 +269,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5bd3b", + "id": "bd7158d9c436eddfaeb5bd3b", "name": "How can I stream my live coding sessions on Free Code Camp's Twitch.tv channel?", "dashedName": "how-can-i-stream-my-live-coding-sessions-on-free-code-camps-twitch-tv-channel", "description": [ @@ -290,7 +290,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5bd3d", + "id": "bd7158d9c436eddfaeb5bd3d", "name": "How can I find other Free Code Camp campers in my city?", "dashedName": "how-can-i-find-other-free-code-camp-campers-in-my-city", "description": [ @@ -502,17 +502,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5bd3e", - "name": "Does Free Code Camp have an alumni network?", - "dashedName": "does-free-code-camp-have-an-alumni-network", - "description": [ - "
", - "

We have a growing alumni network on LinkedIn. Once you've finished Free Code Camp and have gotten a coding job, we'd love to include you in this group, too!

", - "
" - ] - }, - { - "_id": "bd7158d9c442eddfaeb5bdef", + "id": "bd7158d9c442eddfaeb5bdef", "name": "How do I best use the Global Control Shortcuts for Mac?", "dashedName": "how-do-i-best-use-the-global-control-shortcuts-for-mac", "description": [ @@ -537,7 +527,7 @@ ] }, { - "_id": "bd7158d9c445eddfaeb5bdef", + "id": "bd7158d9c445eddfaeb5bdef", "name": "How can I get to Inbox Zero with Gmail shortcuts?", "dashedName": "how-can-i-get-to-inbox-zero-with-gmail-shortcuts", "description": [ @@ -566,7 +556,7 @@ ] }, { - "_id": "bd7158d9c445eddfaeb5bdff", + "id": "bd7158d9c445eddfaeb5bdff", "name": "How can I deploy a website without writing any code at all?", "dashedName": "how-can-i-deploy-a-website-without-writing-any-code-at-all", "description": [ @@ -589,7 +579,7 @@ ] }, { - "_id": "bd7158d9c446eddfaeb5bdef", + "id": "bd7158d9c446eddfaeb5bdef", "name": "How do Free Code Camp's Nonprofit Projects work?", "dashedName": "how-do-free-code-camps-nonprofit-projects-work", "description": [ @@ -664,7 +654,7 @@ ] }, { - "_id": "bd7158d9c447eddfaeb5bdef", + "id": "bd7158d9c447eddfaeb5bdef", "name": "How do I install Screenhero?", "dashedName": "how-do-i-install-screenhero", "description": [ @@ -676,7 +666,7 @@ ] }, { - "_id": "bd7158d9c451eddfaeb5bded", + "id": "bd7158d9c451eddfaeb5bded", "name": "What is the style guide for Bonfires?", "dashedName": "what-is-the-style-guide-for-bonfires", "description": [ @@ -712,7 +702,7 @@ ] }, { - "_id": "bd7158d9c451eddfaeb5bdee", + "id": "bd7158d9c451eddfaeb5bdee", "name": "What is the Free Code Camp Code of Conduct?", "dashedName": "what-is-the-free-code-camp-code-of-conduct", "description": [ @@ -737,7 +727,7 @@ ] }, { - "_id": "bd7158d9c451eddfaeb5bdef", + "id": "bd7158d9c451eddfaeb5bdef", "name": "What is the Free Code Camp Privacy Policy?", "dashedName": "what-is-the-free-code-camp-privacy-policy", "description": [ @@ -779,7 +769,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5bd3c", + "id": "bd7158d9c436eddfaeb5bd3c", "name": "How can I reach the Free Code Camp team to interview them for my publication?", "dashedName": "how-can-i-reach-the-free-code-camp-team-to-interview-them-for-my-publication", "description": [ @@ -798,7 +788,7 @@ ] }, { - "_id": "bd7158d9c436eddfaeb5dd3b", + "id": "bd7158d9c436eddfaeb5dd3b", "name": "What other resources does Free Code Camp recommend to nonprofits?", "dashedName": "what-other-resources-does-free-code-camp-recommend-to-nonprofits", "description": [ @@ -840,7 +830,7 @@ ] }, { - "_id": "bd7158d9c436eddfadb5bd3e", + "id": "bd7158d9c436eddfadb5bd3e", "name": "How can I contribute to this guide?", "dashedName": "how-can-i-contribute-to-this-guide", "description": [ @@ -856,7 +846,7 @@ ] }, { - "_id": "bd7158d9c436eddfadb5bd32", + "id": "bd7158d9c436eddfadb5bd32", "name": "How can I help the Free Code Camp translation effort?", "dashedName": "how-can-i-help-the-free-code-camp-translation-effort", "description": [ @@ -867,7 +857,7 @@ ] }, { - "_id": "bd7158d9c436eddfadb5bd31", + "id": "bd7158d9c436eddfadb5bd31", "name": "What if I speak a language that Free Code Camp does not yet support?", "dashedName": "what-if-i-speak-a-language-that-free-code-camp-does-not-yet-support", "description": [ @@ -880,7 +870,7 @@ ] }, { - "_id": "bd7158d9c436eddfadb5bd30", + "id": "bd7158d9c436eddfadb5bd30", "name": "Can I do Free Code Camp completely in my native language?", "dashedName": "can-i-do-free-code-camp-completely-in-my-native-language", "description": [ @@ -893,7 +883,7 @@ ] }, { - "_id": "bd7158d9c436eddfadb5bd3c", + "id": "bd7158d9c436eddfadb5bd3c", "name": "What is the new Free Code Camp Mobile Experience?", "dashedName": "what-is-the-new-free-code-camp-mobile-experience", "description": [ @@ -910,7 +900,7 @@ ] }, { - "_id": "bd7158d9c436eddfadb5bd3b", + "id": "bd7158d9c436eddfadb5bd3b", "name": "What is the Free Code Camp Front End Development Certificate?", "dashedName": "what-is-the-free-code-camp-front-end-development-certificate", "description": [ diff --git a/server/boot/a-extendUser.js b/server/boot/a-extendUser.js index ebb7b4724a2101..ff4b08ed2c90f5 100644 --- a/server/boot/a-extendUser.js +++ b/server/boot/a-extendUser.js @@ -1,121 +1,44 @@ -var debug = require('debug')('freecc:extendUser'); +var Rx = require('rx'); +var debug = require('debug')('freecc:user:remote'); + +function destroyAllRelated(id, Model) { + return Rx.Observable.fromNodeCallback( + Model.destroyAll, + Model + )({ userId: id }); +} module.exports = function(app) { var User = app.models.User; - // NOTE(berks): user email validation currently not needed but build in. This - // work around should let us sneak by - // see: - // https://github.com/strongloop/loopback/issues/1137#issuecomment-109200135 - delete User.validations.email; - debug('setting up user hooks'); - // send verification email to new camper - User.afterRemote('create', function(ctx, user, next) { - debug('user created, sending email'); - if (!user.email) { return next(); } - - var mailOptions = { - type: 'email', - to: user.email, - from: 'Team@freecodecamp.com', - subject: 'Welcome to Free Code Camp!', - redirect: '/', - text: [ - 'Greetings from San Francisco!\n\n', - 'Thank you for joining our community.\n', - 'Feel free to email us at this address if you have ', - 'any questions about Free Code Camp.\n', - 'And if you have a moment, check out our blog: ', - 'blog.freecodecamp.com.\n', - 'Good luck with the challenges!\n\n', - '- the Free Code Camp Volunteer Team' - ].join('') - }; - user.verify(mailOptions, function(err) { - if (err) { return next(err); } - debug('verification email sent'); - ctx.req.flash({ - msg: 'Please check your email and click on the verification link ' - + 'before logging in.' - }); - ctx.res.redirect('/'); - }); - }); - - User.afterRemote('login', function(ctx, accessToken) { - var res = ctx.res; - var req = ctx.req; - - var config = { - signed: !!req.signedCookies, - maxAge: 1000 * accessToken.ttl - }; - if (accessToken && accessToken.id) { - res.cookie('access_token', accessToken.id, config); - res.cookie('userId', accessToken.userId, config); - } - res.redirect('/'); - }); - - User.afterRemote('logout', function(ctx, result, next) { - var res = ctx.result; - res.clearCookie('access_token'); - res.clearCookie('userId'); - next(); - }); - - User.doesExist = function doesExist(username, email, cb) { - if (!username && !email) { - return process.nextTick(function() { - cb(null, false); - }); + var UserIdentity = app.models.UserIdentity; + var UserCredential = app.models.UserCredential; + User.observe('before delete', function(ctx, next) { + debug('removing user', ctx.where); + var id = ctx.where && ctx.where.id ? ctx.where.id : null; + if (!id) { + return next(); } - debug('checking existence'); - var where = {}; - if (username) { - where.username = username.toLowerCase(); - } else { - where.email = email ? email.toLowerCase() : email; - } - debug('where', where); - User.count( - where, - function (err, count) { - if (err) { - debug('err checking existance: ', err); - return cb(err); - } - if (count > 0) { - return cb(null, true); - } - return cb(null, false); + Rx.Observable.combineLatest( + destroyAllRelated(id, UserIdentity), + destroyAllRelated(id, UserCredential), + function(identData, credData) { + return { + identData: identData, + credData: credData + }; } - ); - }; - - User.remoteMethod( - 'doesExist', - { - description: 'checks whether a user exists using email or username', - accepts: [ - { - arg: 'username', - type: 'string' - }, - { - arg: 'email', - type: 'string' - } - ], - returns: [ - { - arg: 'exists', - type: 'boolean' - } - ], - http: { - path: '/exists', - verb: 'get' + ).subscribe( + function(data) { + debug('deleted', data); + }, + function(err) { + debug('error deleting user %s stuff', id, err); + next(err); + }, + function() { + debug('user stuff deleted for user %s', id); + next(); } - } - ); + ); + }); }; diff --git a/server/boot/fieldGuide.js b/server/boot/fieldGuide.js index 3714847d72628a..eabb3e61d3d0ba 100644 --- a/server/boot/fieldGuide.js +++ b/server/boot/fieldGuide.js @@ -1,7 +1,7 @@ var R = require('ramda'), - // Rx = require('rx'), - // debug = require('debug')('freecc:fieldguides'), - utils = require('../utils'); +// Rx = require('rx'), +// debug = require('debug')('freecc:fieldguides'), + utils = require('../utils'); module.exports = function(app) { var router = app.loopback.Router(); @@ -40,7 +40,7 @@ module.exports = function(app) { if (fieldGuideFromMongo.length < 1) { req.flash('errors', { - msg: "404: We couldn't find a field guide entry with that name. " + + msg: '404: We couldn\'t find a field guide entry with that name. ' + 'Please double check the name.' }); @@ -48,7 +48,7 @@ module.exports = function(app) { } var fieldGuide = R.head(fieldGuideFromMongo); - fieldGuide.name.toLowerCase().replace(/\s/g, '-').replace(/\?/g, ''); + fieldGuide.name.toLowerCase().replace(/\s/g, '-').replace(/\?/g, ''); // if (fieldGuide.dashedName !== dashedNameFromQuery) { // return res.redirect('../field-guide/' + fieldGuide.dashedName); @@ -75,50 +75,53 @@ module.exports = function(app) { }); } + function showCompletedFieldGuideFunction(req, res) { + req.flash('success', { + msg: [ + 'You\'ve read all our current Field Guide entries. ' + + 'If you have ideas for other Field Guide articles, ' + + 'please let us know on ', + 'GitHub.' + ].join('') + }); + return res.redirect('../field-guide/how-do-i-use-this-guide'); + } + function returnNextFieldGuide(req, res, next) { if (!req.user) { return res.redirect('/field-guide/how-do-i-use-this-guide'); } - var displayedFieldGuides = - FieldGuide.find({'id': req.user.uncompletedFieldGuides[0]}); - - displayedFieldGuides.exec(function(err, fieldGuide) { - if (err) { return next(err); } - fieldGuide = fieldGuide.pop(); - - if (typeof fieldGuide === 'undefined') { - if (req.user.completedFieldGuides.length > 0) { - req.flash('success', { - msg: [ - "You've read all our current Field Guide entries. If you have ", - 'ideas for other Field Guide articles, please let us know on ', - "GitHub." - ].join('') - }); - } - return res.redirect('../field-guide/how-do-i-use-this-guide'); - } - return res.redirect('../field-guide/' + fieldGuide.dashedName); - }); - } + if (!req.user.uncompletedFieldGuides.length) { + return showCompletedFieldGuideFunction(req, res, next); + } - function completedFieldGuide(req, res, next) { - var fieldGuideId = req.body.fieldGuideInfo.fieldGuideId; + FieldGuide.findById(req.user.uncompletedFieldGuides[0], + function(err, fieldGuide) { - req.user.completedFieldGuides.push(fieldGuideId); + if (err) { return next(err); } + return res.redirect('../field-guide/' + fieldGuide.dashedName); + }); + } +}; - var index = req.user.uncompletedFieldGuides.indexOf(fieldGuideId); - if (index > -1) { - req.user.progressTimestamps.push(Date.now()); - req.user.uncompletedFieldGuides.splice(index, 1); - } +function completedFieldGuide(req, res, next) { + var fieldGuideId = req.body.fieldGuideInfo.fieldGuideId; - req.user.save(function (err) { - if (err) { - return next(err); - } - res.send(true); - }); + req.user.completedFieldGuides.push(fieldGuideId); + + var index = req.user.uncompletedFieldGuides.indexOf(fieldGuideId); + if (index > -1) { + req.user.progressTimestamps.push(Date.now()); + req.user.uncompletedFieldGuides.splice(index, 1); } -}; + + req.user.save(function (err) { + if (err) { + return next(err); + } + res.send(true); + }); +} diff --git a/server/boot/user.js b/server/boot/user.js index e2e4ec0494de03..f5753c9b988a9c 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -654,7 +654,6 @@ module.exports = function(app) { R.forEach(function (comment) { comment.author.picture = picture; comment.author.username = username; - comment.markModified('author'); tasks.push(function (cb) { comment.save(cb); }); @@ -663,7 +662,6 @@ module.exports = function(app) { R.forEach(function (story) { story.author.picture = picture; story.author.username = username; - story.markModified('author'); tasks.push(function (cb) { story.save(cb); }); diff --git a/server/config.json b/server/config.json index 8404e744fb64f4..643481ac4596ec 100644 --- a/server/config.json +++ b/server/config.json @@ -2,6 +2,7 @@ "restApiRoot": "/api", "host": "0.0.0.0", "port": 3000, + "legacyExplorer" : false, "remoting": { "context": { "enableHttpContext": false diff --git a/server/model-config.json b/server/model-config.json index f944fb292ac157..56cd5a317d89c9 100644 --- a/server/model-config.json +++ b/server/model-config.json @@ -61,7 +61,10 @@ }, "user": { "dataSource": "db", - "public": true + "public": true, + "options": { + "emailVerificationRequired": true + } }, "userCredential": { "dataSource": "db", diff --git a/server/utils/constants.js b/server/utils/constants.js new file mode 100644 index 00000000000000..49055b3477cd10 --- /dev/null +++ b/server/utils/constants.js @@ -0,0 +1,39 @@ +exports.blacklistedUsernames = [ + 'bonfire', + 'account', + 'user', + 'challenge', + 'challenges', + 'completed-challenge', + 'completed-zipline-or-basejump', + 'completed-bonfire', + 'map', + 'learn-to-code', + 'about', + 'api', + 'explorer', + 'field-guide', + 'completed-field-guide', + 'jobs', + 'nonprofits', + 'api', + 'sitemap.xml', + 'get-help', + 'chat', + 'twitch', + 'get-pai', + 'get-help', + 'nonprofits', + 'nonproifts-form', + 'jobs-form', + 'unsubscribe', + 'unsubscribed', + 'cats.json', + 'agile', + 'privacy', + 'stories', + 'signin', + 'signout', + 'forgot', + 'reset' +]; diff --git a/server/views/account/email-signin.jade b/server/views/account/email-signin.jade index 4bc51797a25437..b1c3fa4b46c886 100644 --- a/server/views/account/email-signin.jade +++ b/server/views/account/email-signin.jade @@ -2,7 +2,7 @@ extends ../layout block content .jumbotron.text-center(ng-controller="emailSignInController") h2 Sign in with an email address here: - form(method='POST', action='/auth/local') + form(method='POST', action='/api/users/login') input(type='hidden', name='_csrf', value=_csrf) .col-sm-6.col-sm-offset-3 .form-group diff --git a/server/views/field-guide/all-articles.jade b/server/views/field-guide/all-articles.jade index c79d8aaa8fd06d..882bccd44a1865 100644 --- a/server/views/field-guide/all-articles.jade +++ b/server/views/field-guide/all-articles.jade @@ -1,5 +1,8 @@ extends ../layout block content + script. + var completed = !{JSON.stringify(completedFieldGuides)} + var all = !{JSON.stringify(allFieldGuideNamesAndIds)} .col-xs-12.col-sm-12.col-md-12 .panel.panel-info .panel-heading.text-center Read our Field Guide in any order diff --git a/test/app.js b/test/app.js index baa2906877ed98..a019e072ec275a 100644 --- a/test/app.js +++ b/test/app.js @@ -1,50 +1,45 @@ var request = require('supertest'); var app = require('../server/server.js'); -describe('GET /', function() { - it('should return 200 OK', function(done) { - request(app) - .get('/') - .expect(200, done); - }); -}); +describe('#ROUTES', function() { -describe('GET /login', function() { - it('should return 200 OK', function(done) { - request(app) - .get('/login') - .expect(200, done); + describe('GET /', function () { + it('should return 200 OK', function (done) { + request(app) + .get('/') + .expect(200, done); + }); }); -}); -describe('GET /signup', function() { - it('should return 200 OK', function(done) { - request(app) - .get('/signup') - .expect(200, done); + describe('GET /signin', function () { + it('should return 200 OK', function (done) { + request(app) + .get('/signin') + .expect(200, done); + }); }); -}); -describe('GET /api', function() { - it('should return 200 OK', function(done) { - request(app) - .get('/api') - .expect(200, done); + describe('GET /email-signup', function () { + it('should return 200 OK', function (done) { + request(app) + .get('/email-signup') + .expect(200, done); + }); }); -}); -describe('GET /contact', function() { - it('should return 200 OK', function(done) { - request(app) - .get('/contact') - .expect(200, done); + describe('GET /random-url', function () { + it('should return 302', function (done) { + request(app) + .get('/reset') + .expect(302, done); + }); }); -}); -describe('GET /random-url', function() { - it('should return 404', function(done) { - request(app) - .get('/reset') - .expect(404, done); + describe('Get /camperName', function () { + it('should return 200', function (done) { + request(app) + .get('/terakilobyte') + .expect(200, done); + }); }); }); diff --git a/test/models.js b/test/models.js deleted file mode 100644 index b4666b5e6e655e..00000000000000 --- a/test/models.js +++ /dev/null @@ -1,42 +0,0 @@ -var chai = require('chai'); -var should = chai.should(); -var User = require('../models/User'); - -describe('User Model', function() { - it('should create a new user', function(done) { - var user = new User({ - email: 'test@gmail.com', - password: 'password' - }); - user.save(function(err) { - if (err) return done(err); - done(); - }); - }); - - it('should not create a user with the unique email', function(done) { - var user = new User({ - email: 'test@gmail.com', - password: 'password' - }); - user.save(function(err) { - if (err) err.code.should.equal(11000); - done(); - }); - }); - - it('should find user by email', function(done) { - User.findOne({ email: 'test@gmail.com' }, function(err, user) { - if (err) return done(err); - user.email.should.equal('test@gmail.com'); - done(); - }); - }); - - it('should delete a user', function(done) { - User.remove({ email: 'test@gmail.com' }, function(err) { - if (err) return done(err); - done(); - }); - }); -});