Template Upload

This commit is contained in:
SOUTHERNCO\x2mjbyrn
2017-05-17 13:45:25 -04:00
parent 415b9c25f3
commit 7efe7605b8
11476 changed files with 2170865 additions and 34 deletions

78
node_modules/etag/HISTORY.md generated vendored Normal file
View File

@ -0,0 +1,78 @@
1.8.0 / 2017-02-18
==================
* Use SHA1 instead of MD5 for ETag hashing
- Improves performance for larger entities
- Works with FIPS 140-2 OpenSSL configuration
1.7.0 / 2015-06-08
==================
* Always include entity length in ETags for hash length extensions
* Generate non-Stats ETags using MD5 only (no longer CRC32)
* Improve stat performance by removing hashing
* Remove base64 padding in ETags to shorten
* Use MD5 instead of MD4 in weak ETags over 1KB
1.6.0 / 2015-05-10
==================
* Improve support for JXcore
* Remove requirement of `atime` in the stats object
* Support "fake" stats objects in environments without `fs`
1.5.1 / 2014-11-19
==================
* deps: crc@3.2.1
- Minor fixes
1.5.0 / 2014-10-14
==================
* Improve string performance
* Slightly improve speed for weak ETags over 1KB
1.4.0 / 2014-09-21
==================
* Support "fake" stats objects
* Support Node.js 0.6
1.3.1 / 2014-09-14
==================
* Use the (new and improved) `crc` for crc32
1.3.0 / 2014-08-29
==================
* Default strings to strong ETags
* Improve speed for weak ETags over 1KB
1.2.1 / 2014-08-29
==================
* Use the (much faster) `buffer-crc32` for crc32
1.2.0 / 2014-08-24
==================
* Add support for file stat objects
1.1.0 / 2014-08-24
==================
* Add fast-path for empty entity
* Add weak ETag generation
* Shrink size of generated ETags
1.0.1 / 2014-08-24
==================
* Fix behavior of string containing Unicode
1.0.0 / 2014-05-18
==================
* Initial release

22
node_modules/etag/LICENSE generated vendored Normal file
View File

@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2014-2016 Douglas Christopher Wilson
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.

159
node_modules/etag/README.md generated vendored Normal file
View File

@ -0,0 +1,159 @@
# etag
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Create simple HTTP ETags
This module generates HTTP ETags (as defined in RFC 7232) for use in
HTTP responses.
## Installation
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```sh
$ npm install etag
```
## API
<!-- eslint-disable no-unused-vars -->
```js
var etag = require('etag')
```
### etag(entity, [options])
Generate a strong ETag for the given entity. This should be the complete
body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By
default, a strong ETag is generated except for `fs.Stats`, which will
generate a weak ETag (this can be overwritten by `options.weak`).
<!-- eslint-disable no-undef -->
```js
res.setHeader('ETag', etag(body))
```
#### Options
`etag` accepts these properties in the options object.
##### weak
Specifies if the generated ETag will include the weak validator mark (that
is, the leading `W/`). The actual entity tag is the same. The default value
is `false`, unless the `entity` is `fs.Stats`, in which case it is `true`.
## Testing
```sh
$ npm test
```
## Benchmark
```bash
$ npm run-script bench
> etag@1.8.0 bench nodejs-etag
> node benchmark/index.js
http_parser@2.7.0
node@6.9.1
v8@5.1.281.84
uv@1.9.1
zlib@1.2.8
ares@1.10.1-DEV
icu@57.1
modules@48
openssl@1.0.2j
> node benchmark/body0-100b.js
100B body
4 tests completed.
* buffer - strong x 498,600 ops/sec ±0.82% (191 runs sampled)
* buffer - weak x 496,249 ops/sec ±0.59% (179 runs sampled)
string - strong x 466,298 ops/sec ±0.88% (186 runs sampled)
string - weak x 464,298 ops/sec ±0.84% (184 runs sampled)
> node benchmark/body1-1kb.js
1KB body
4 tests completed.
* buffer - strong x 346,535 ops/sec ±0.32% (189 runs sampled)
* buffer - weak x 344,958 ops/sec ±0.52% (185 runs sampled)
string - strong x 259,672 ops/sec ±0.82% (191 runs sampled)
string - weak x 260,931 ops/sec ±0.76% (190 runs sampled)
> node benchmark/body2-5kb.js
5KB body
4 tests completed.
* buffer - strong x 136,510 ops/sec ±0.62% (189 runs sampled)
* buffer - weak x 136,604 ops/sec ±0.51% (191 runs sampled)
string - strong x 80,903 ops/sec ±0.84% (192 runs sampled)
string - weak x 82,785 ops/sec ±0.50% (193 runs sampled)
> node benchmark/body3-10kb.js
10KB body
4 tests completed.
* buffer - strong x 78,650 ops/sec ±0.31% (193 runs sampled)
* buffer - weak x 78,685 ops/sec ±0.41% (193 runs sampled)
string - strong x 43,999 ops/sec ±0.43% (193 runs sampled)
string - weak x 44,081 ops/sec ±0.45% (192 runs sampled)
> node benchmark/body4-100kb.js
100KB body
4 tests completed.
buffer - strong x 8,860 ops/sec ±0.66% (191 runs sampled)
* buffer - weak x 9,030 ops/sec ±0.26% (193 runs sampled)
string - strong x 4,838 ops/sec ±0.16% (194 runs sampled)
string - weak x 4,800 ops/sec ±0.52% (192 runs sampled)
> node benchmark/stats.js
stat
4 tests completed.
* real - strong x 1,468,073 ops/sec ±0.32% (191 runs sampled)
* real - weak x 1,446,852 ops/sec ±0.64% (190 runs sampled)
fake - strong x 635,707 ops/sec ±0.33% (194 runs sampled)
fake - weak x 627,708 ops/sec ±0.36% (192 runs sampled)
```
## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/etag.svg
[npm-url]: https://npmjs.org/package/etag
[node-version-image]: https://img.shields.io/node/v/etag.svg
[node-version-url]: https://nodejs.org/en/download/
[travis-image]: https://img.shields.io/travis/jshttp/etag/master.svg
[travis-url]: https://travis-ci.org/jshttp/etag
[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag/master.svg
[coveralls-url]: https://coveralls.io/r/jshttp/etag?branch=master
[downloads-image]: https://img.shields.io/npm/dm/etag.svg
[downloads-url]: https://npmjs.org/package/etag

132
node_modules/etag/index.js generated vendored Normal file
View File

@ -0,0 +1,132 @@
/*!
* etag
* Copyright(c) 2014-2016 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module exports.
* @public
*/
module.exports = etag
/**
* Module dependencies.
* @private
*/
var crypto = require('crypto')
var Stats = require('fs').Stats
/**
* Module variables.
* @private
*/
var base64PadCharRegExp = /=+$/
var toString = Object.prototype.toString
/**
* Generate an entity tag.
*
* @param {Buffer|string} entity
* @return {string}
* @private
*/
function entitytag (entity) {
if (entity.length === 0) {
// fast-path empty
return '"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"'
}
// compute hash of entity
var hash = crypto
.createHash('sha1')
.update(entity, 'utf8')
.digest('base64')
.replace(base64PadCharRegExp, '')
// compute length of entity
var len = typeof entity === 'string'
? Buffer.byteLength(entity, 'utf8')
: entity.length
return '"' + len.toString(16) + '-' + hash + '"'
}
/**
* Create a simple ETag.
*
* @param {string|Buffer|Stats} entity
* @param {object} [options]
* @param {boolean} [options.weak]
* @return {String}
* @public
*/
function etag (entity, options) {
if (entity == null) {
throw new TypeError('argument entity is required')
}
// support fs.Stats object
var isStats = isstats(entity)
var weak = options && typeof options.weak === 'boolean'
? options.weak
: isStats
// validate argument
if (!isStats && typeof entity !== 'string' && !Buffer.isBuffer(entity)) {
throw new TypeError('argument entity must be string, Buffer, or fs.Stats')
}
// generate entity tag
var tag = isStats
? stattag(entity)
: entitytag(entity)
return weak
? 'W/' + tag
: tag
}
/**
* Determine if object is a Stats object.
*
* @param {object} obj
* @return {boolean}
* @api private
*/
function isstats (obj) {
// genuine fs.Stats
if (typeof Stats === 'function' && obj instanceof Stats) {
return true
}
// quack quack
return obj && typeof obj === 'object' &&
'ctime' in obj && toString.call(obj.ctime) === '[object Date]' &&
'mtime' in obj && toString.call(obj.mtime) === '[object Date]' &&
'ino' in obj && typeof obj.ino === 'number' &&
'size' in obj && typeof obj.size === 'number'
}
/**
* Generate a tag for a stat.
*
* @param {object} stat
* @return {string}
* @private
*/
function stattag (stat) {
var mtime = stat.mtime.getTime().toString(16)
var size = stat.size.toString(16)
return '"' + size + '-' + mtime + '"'
}

110
node_modules/etag/package.json generated vendored Normal file
View File

@ -0,0 +1,110 @@
{
"_args": [
[
"etag@^1.7.0",
"C:\\Users\\x2mjbyrn\\Source\\Repos\\Skeleton\\node_modules\\browser-sync-client"
]
],
"_from": "etag@>=1.7.0-0 <2.0.0-0",
"_id": "etag@1.8.0",
"_inCache": true,
"_location": "/etag",
"_nodeVersion": "4.7.3",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/etag-1.8.0.tgz_1487475735517_0.6724899658001959"
},
"_npmUser": {
"email": "doug@somethingdoug.com",
"name": "dougwilson"
},
"_npmVersion": "2.15.11",
"_phantomChildren": {},
"_requested": {
"name": "etag",
"raw": "etag@^1.7.0",
"rawSpec": "^1.7.0",
"scope": null,
"spec": ">=1.7.0-0 <2.0.0-0",
"type": "range"
},
"_requiredBy": [
"/browser-sync-client",
"/send"
],
"_resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz",
"_shasum": "6f631aef336d6c46362b51764044ce216be3c051",
"_shrinkwrap": null,
"_spec": "etag@^1.7.0",
"_where": "C:\\Users\\x2mjbyrn\\Source\\Repos\\Skeleton\\node_modules\\browser-sync-client",
"bugs": {
"url": "https://github.com/jshttp/etag/issues"
},
"contributors": [
{
"name": "Douglas Christopher Wilson",
"email": "doug@somethingdoug.com"
},
{
"name": "David Björklund",
"email": "david.bjorklund@gmail.com"
}
],
"dependencies": {},
"description": "Create simple HTTP ETags",
"devDependencies": {
"beautify-benchmark": "0.2.4",
"benchmark": "2.1.3",
"eslint": "3.15.0",
"eslint-config-standard": "6.2.1",
"eslint-plugin-markdown": "1.0.0-beta.3",
"eslint-plugin-promise": "3.4.2",
"eslint-plugin-standard": "2.0.1",
"istanbul": "0.4.5",
"mocha": "1.21.5",
"seedrandom": "2.4.2"
},
"directories": {},
"dist": {
"shasum": "6f631aef336d6c46362b51764044ce216be3c051",
"tarball": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz"
},
"engines": {
"node": ">= 0.6"
},
"files": [
"HISTORY.md",
"LICENSE",
"README.md",
"index.js"
],
"gitHead": "16979f788efa8c793c8d07543b4d6aef3d2bfff8",
"homepage": "https://github.com/jshttp/etag#readme",
"installable": true,
"keywords": [
"etag",
"http",
"res"
],
"license": "MIT",
"maintainers": [
{
"name": "dougwilson",
"email": "doug@somethingdoug.com"
}
],
"name": "etag",
"optionalDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/jshttp/etag.git"
},
"scripts": {
"bench": "node benchmark/index.js",
"lint": "eslint --plugin markdown --ext js,md .",
"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.8.0"
}