1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 10:52:47 +00:00

updated bunch of file paths and changed the way posts are loaded

This commit is contained in:
2016-01-05 12:28:04 -06:00
parent 719ae331ae
commit c96a84d0ff
13249 changed files with 317868 additions and 2101398 deletions

132
node_modules/errorhandler/HISTORY.md generated vendored Normal file
View File

@@ -0,0 +1,132 @@
1.4.2 / 2015-07-30
==================
* deps: accepts@~1.2.12
- deps: mime-types@~2.1.4
1.4.1 / 2015-07-05
==================
* deps: accepts@~1.2.10
- deps: mime-types@~2.1.2
1.4.0 / 2015-06-10
==================
* Add charset to the `Content-Type` header
* Support `statusCode` property on `Error` objects
* deps: accepts@~1.2.9
- deps: mime-types@~2.1.1
- deps: negotiator@0.5.3
- perf: avoid argument reassignment & argument slice
- perf: avoid negotiator recursive construction
- perf: enable strict mode
- perf: remove unnecessary bitwise operator
* deps: escape-html@1.0.2
1.3.6 / 2015-05-14
==================
* deps: accepts@~1.2.7
- deps: mime-types@~2.0.11
- deps: negotiator@0.5.3
1.3.5 / 2015-03-14
==================
* deps: accepts@~1.2.5
- deps: mime-types@~2.0.10
1.3.4 / 2015-02-15
==================
* deps: accepts@~1.2.4
- deps: mime-types@~2.0.9
- deps: negotiator@0.5.1
1.3.3 / 2015-01-31
==================
* deps: accepts@~1.2.3
- deps: mime-types@~2.0.8
1.3.2 / 2015-01-01
==================
* Fix heading content to not include stack
1.3.1 / 2014-12-31
==================
* deps: accepts@~1.2.2
- deps: mime-types@~2.0.7
- deps: negotiator@0.5.0
1.3.0 / 2014-11-22
==================
* Add `log` option
1.2.4 / 2015-01-01
==================
* Fix heading content to not include stack
1.2.3 / 2014-11-21
==================
* deps: accepts@~1.1.3
- deps: mime-types@~2.0.3
1.2.2 / 2014-10-15
==================
* deps: accepts@~1.1.2
- Fix error when media type has invalid parameter
- deps: negotiator@0.4.9
1.2.1 / 2014-10-12
==================
* deps: accepts@~1.1.1
- deps: mime-types@~2.0.2
- deps: negotiator@0.4.8
1.2.0 / 2014-09-02
==================
* Display error using `util.inspect` if no other representation
* deps: accepts@~1.1.0
1.1.1 / 2014-06-20
==================
* deps: accepts@~1.0.4
- use `mime-types`
1.1.0 / 2014-06-16
==================
* Display error on console formatted like `throw`
* Escape HTML with `escape-html` module
* Escape HTML in stack trace
* Escape HTML in title
* Fix up edge cases with error sent in response
* Set `X-Content-Type-Options: nosniff` header
* Use accepts for negotiation
1.0.2 / 2014-06-05
==================
* Pass on errors from reading error files
1.0.1 / 2014-04-29
==================
* Clean up error CSS
* Do not respond after headers sent
1.0.0 / 2014-03-03
==================
* Genesis from `connect`

23
node_modules/errorhandler/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,23 @@
(The MIT License)
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

111
node_modules/errorhandler/README.md generated vendored Normal file
View File

@@ -0,0 +1,111 @@
# errorhandler
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
[![Gratipay][gratipay-image]][gratipay-url]
Development-only error handler middleware
## Install
```sh
$ npm install errorhandler
```
## API
```js
var errorhandler = require('errorhandler')
```
### errorhandler(options)
Create new middleware to handle errors and respond with content negotiation.
This middleware is only intended to be used in a development environment, as
the full error stack traces will be sent back to the client when an error
occurs.
#### Options
Error handler accepts these properties in the options object.
##### log
Provide a function to be called with the error and a string representation of
the error. Can be used to write the error to any desired location, or set to
`false` to only send the error back in the response. Called as
`log(err, str, req, res)` where `err` is the `Error` object, `str` is a string
representation of the error, `req` is the request object and `res` is the
response object (note, this function is invoked _after_ the response has been
written).
The default value for this option is `true` unless `process.env.NODE_ENV === 'test'`.
Possible values:
* `true`: Log errors using `console.error(str)`.
* `false`: Only send the error back in the response.
* A function: pass the error to a function for handling.
## Examples
### Simple example
Basic example of adding this middleware as the error handler only in development
with `connect` (`express` also can be used in this example).
```js
var connect = require('connect')
var errorhandler = require('errorhandler')
var app = connect()
if (process.env.NODE_ENV === 'development') {
// only use in development
app.use(errorhandler())
}
```
### Custom output location
Sometimes you may want to output the errors to a different location than STDERR
during development, like a system notification, for example.
```js
var connect = require('connect')
var errorhandler = require('errorhandler')
var notifier = require('node-notifier')
var app = connect()
if (process.env.NODE_ENV === 'development') {
// only use in development
app.use(errorhandler({log: errorNotification}))
}
function errorNotification(err, str, req) {
var title = 'Error in ' + req.method + ' ' + req.url
notifier.notify({
title: title,
message: str
})
}
```
## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/errorhandler.svg
[npm-url]: https://npmjs.org/package/errorhandler
[travis-image]: https://img.shields.io/travis/expressjs/errorhandler/master.svg
[travis-url]: https://travis-ci.org/expressjs/errorhandler
[coveralls-image]: https://img.shields.io/coveralls/expressjs/errorhandler/master.svg
[coveralls-url]: https://coveralls.io/r/expressjs/errorhandler?branch=master
[downloads-image]: https://img.shields.io/npm/dm/errorhandler.svg
[downloads-url]: https://npmjs.org/package/errorhandler
[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
[gratipay-url]: https://www.gratipay.com/dougwilson/

201
node_modules/errorhandler/index.js generated vendored Normal file
View File

@@ -0,0 +1,201 @@
/*!
* errorhandler
* Copyright(c) 2010 Sencha Inc.
* Copyright(c) 2011 TJ Holowaychuk
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module dependencies.
* @private
*/
var accepts = require('accepts')
var escapeHtml = require('escape-html');
var fs = require('fs');
var util = require('util')
/**
* Module variables.
* @private
*/
var doubleSpaceGlobalRegExp = / /g
var inspect = util.inspect
var newLineGlobalRegExp = /\n/g
var toString = Object.prototype.toString
/* istanbul ignore next */
var defer = typeof setImmediate === 'function'
? setImmediate
: function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) }
/**
* Error handler:
*
* Development error handler, providing stack traces
* and error message responses for requests accepting text, html,
* or json.
*
* Text:
*
* By default, and when _text/plain_ is accepted a simple stack trace
* or error message will be returned.
*
* JSON:
*
* When _application/json_ is accepted, connect will respond with
* an object in the form of `{ "error": error }`.
*
* HTML:
*
* When accepted connect will output a nice html stack trace.
*
* @return {Function}
* @api public
*/
exports = module.exports = function errorHandler(options) {
// get environment
var env = process.env.NODE_ENV || 'development'
// get options
var opts = options || {}
// get log option
var log = opts.log === undefined
? env !== 'test'
: opts.log
if (typeof log !== 'function' && typeof log !== 'boolean') {
throw new TypeError('option log must be function or boolean')
}
// default logging using console.error
if (log === true) {
log = logerror
}
return function errorHandler(err, req, res, next){
// respect err.statusCode
if (err.statusCode) {
res.statusCode = err.statusCode
}
// respect err.status
if (err.status) {
res.statusCode = err.status
}
// default status code to 500
if (res.statusCode < 400) {
res.statusCode = 500
}
// log the error
var str = stringify(err)
if (log) {
defer(log, err, str, req, res)
}
// cannot actually respond
if (res._header) {
return req.socket.destroy()
}
// negotiate
var accept = accepts(req)
var type = accept.type('html', 'json', 'text')
// Security header for content sniffing
res.setHeader('X-Content-Type-Options', 'nosniff')
// html
if (type === 'html') {
fs.readFile(__dirname + '/public/style.css', 'utf8', function(e, style){
if (e) return next(e);
fs.readFile(__dirname + '/public/error.html', 'utf8', function(e, html){
if (e) return next(e);
var isInspect = !err.stack && String(err) === toString.call(err)
var errorHtml = !isInspect
? escapeHtmlBlock(str.split('\n', 1)[0] || 'Error')
: 'Error'
var stack = !isInspect
? String(str).split('\n').slice(1)
: [str]
var stackHtml = stack
.map(function (v) { return '<li>' + escapeHtmlBlock(v) + '</li>' })
.join('')
var body = html
.replace('{style}', style)
.replace('{stack}', stackHtml)
.replace('{title}', escapeHtml(exports.title))
.replace('{statusCode}', res.statusCode)
.replace(/\{error\}/g, errorHtml)
res.setHeader('Content-Type', 'text/html; charset=utf-8')
res.end(body)
});
});
// json
} else if (type === 'json') {
var error = { message: err.message, stack: err.stack };
for (var prop in err) error[prop] = err[prop];
var json = JSON.stringify({ error: error });
res.setHeader('Content-Type', 'application/json; charset=utf-8')
res.end(json);
// plain text
} else {
res.setHeader('Content-Type', 'text/plain; charset=utf-8')
res.end(str)
}
};
};
/**
* Template title, framework authors may override this value.
*/
exports.title = 'Connect';
/**
* Escape a block of HTML, preserving whitespace.
* @api private
*/
function escapeHtmlBlock(str) {
return escapeHtml(str)
.replace(doubleSpaceGlobalRegExp, ' &nbsp;')
.replace(newLineGlobalRegExp, '<br>')
}
/**
* Stringify a value.
* @api private
*/
function stringify(val) {
var stack = val.stack
if (stack) {
return String(stack)
}
var str = String(val)
return str === toString.call(val)
? inspect(val)
: str
}
/**
* Log error to console.
* @api private
*/
function logerror(err, str) {
console.error(str)
}

116
node_modules/errorhandler/package.json generated vendored Normal file
View File

@@ -0,0 +1,116 @@
{
"_args": [
[
"errorhandler@1.4.2",
"/home/mitchell/Desktop/test-mywebsite/mywebsite/node_modules/mongo-express"
]
],
"_from": "errorhandler@1.4.2",
"_id": "errorhandler@1.4.2",
"_inCache": true,
"_installable": true,
"_location": "/errorhandler",
"_npmUser": {
"email": "doug@somethingdoug.com",
"name": "dougwilson"
},
"_npmVersion": "1.4.28",
"_phantomChildren": {},
"_requested": {
"name": "errorhandler",
"raw": "errorhandler@1.4.2",
"rawSpec": "1.4.2",
"scope": null,
"spec": "1.4.2",
"type": "version"
},
"_requiredBy": [
"/mongo-express"
],
"_resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.4.2.tgz",
"_shasum": "e51ebf04a7e6cb8220b41780d657925e8c0257a9",
"_shrinkwrap": null,
"_spec": "errorhandler@1.4.2",
"_where": "/home/mitchell/Desktop/test-mywebsite/mywebsite/node_modules/mongo-express",
"bugs": {
"url": "https://github.com/expressjs/errorhandler/issues"
},
"contributors": [
{
"name": "Douglas Christopher Wilson",
"email": "doug@somethingdoug.com"
},
{
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
"url": "http://jongleberry.com"
}
],
"dependencies": {
"accepts": "~1.2.12",
"escape-html": "1.0.2"
},
"description": "Development-only error handler middleware",
"devDependencies": {
"after": "0.8.1",
"istanbul": "0.3.17",
"mocha": "2.2.5",
"supertest": "1.0.1"
},
"directories": {},
"dist": {
"shasum": "e51ebf04a7e6cb8220b41780d657925e8c0257a9",
"tarball": "http://registry.npmjs.org/errorhandler/-/errorhandler-1.4.2.tgz"
},
"engines": {
"node": ">= 0.8"
},
"files": [
"HISTORY.md",
"LICENSE",
"index.js",
"public/"
],
"gitHead": "a7a6dcef61ec3a9f797bb669fe49b10fb1653a7e",
"homepage": "https://github.com/expressjs/errorhandler",
"license": "MIT",
"maintainers": [
{
"name": "jongleberry",
"email": "jonathanrichardong@gmail.com"
},
{
"name": "dougwilson",
"email": "doug@somethingdoug.com"
},
{
"name": "tjholowaychuk",
"email": "tj@vision-media.ca"
},
{
"name": "mscdex",
"email": "mscdex@mscdex.net"
},
{
"name": "fishrock123",
"email": "fishrock123@rocketmail.com"
},
{
"name": "defunctzombie",
"email": "shtylman@gmail.com"
}
],
"name": "errorhandler",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/expressjs/errorhandler.git"
},
"scripts": {
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
},
"version": "1.4.2"
}

14
node_modules/errorhandler/public/error.html generated vendored Normal file
View File

@@ -0,0 +1,14 @@
<html>
<head>
<meta charset='utf-8'>
<title>{error}</title>
<style>{style}</style>
</head>
<body>
<div id="wrapper">
<h1>{title}</h1>
<h2><em>{statusCode}</em> {error}</h2>
<ul id="stacktrace">{stack}</ul>
</div>
</body>
</html>

35
node_modules/errorhandler/public/style.css generated vendored Normal file
View File

@@ -0,0 +1,35 @@
* {
margin: 0;
padding: 0;
outline: 0;
}
body {
padding: 80px 100px;
font: 13px "Helvetica Neue", "Lucida Grande", "Arial";
background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9));
background: #ECE9E9 -moz-linear-gradient(top, #fff, #ECE9E9);
background-repeat: no-repeat;
color: #555;
-webkit-font-smoothing: antialiased;
}
h1, h2 {
font-size: 22px;
color: #343434;
}
h1 em, h2 em {
padding: 0 5px;
font-weight: normal;
}
h1 {
font-size: 60px;
}
h2 {
margin-top: 10px;
}
ul li {
list-style: none;
}
#stacktrace {
margin-left: 60px;
}