This commit is contained in:
arnaucode
2017-02-03 08:56:51 +01:00
parent c4b7414770
commit 112745d6fa
1585 changed files with 450241 additions and 0 deletions

2
server/node_modules/cookie/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,2 @@
test
.travis.yml

9
server/node_modules/cookie/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,9 @@
// MIT License
Copyright (C) Roman Shtylman <shtylman@gmail.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.

44
server/node_modules/cookie/README.md generated vendored Normal file
View File

@@ -0,0 +1,44 @@
# cookie [![Build Status](https://secure.travis-ci.org/defunctzombie/node-cookie.png?branch=master)](http://travis-ci.org/defunctzombie/node-cookie) #
cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers.
See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies.
## how?
```
npm install cookie
```
```javascript
var cookie = require('cookie');
var hdr = cookie.serialize('foo', 'bar');
// hdr = 'foo=bar';
var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff');
// cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' };
```
## more
The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values.
### path
> cookie path
### expires
> absolute expiration date for the cookie (Date object)
### maxAge
> relative max age of the cookie from when the client receives it (seconds)
### domain
> domain for the cookie
### secure
> true or false
### httpOnly
> true or false

75
server/node_modules/cookie/index.js generated vendored Normal file
View File

@@ -0,0 +1,75 @@
/// Serialize the a name value pair into a cookie string suitable for
/// http headers. An optional options object specified cookie parameters
///
/// serialize('foo', 'bar', { httpOnly: true })
/// => "foo=bar; httpOnly"
///
/// @param {String} name
/// @param {String} val
/// @param {Object} options
/// @return {String}
var serialize = function(name, val, opt){
opt = opt || {};
var enc = opt.encode || encode;
var pairs = [name + '=' + enc(val)];
if (null != opt.maxAge) {
var maxAge = opt.maxAge - 0;
if (isNaN(maxAge)) throw new Error('maxAge should be a Number');
pairs.push('Max-Age=' + maxAge);
}
if (opt.domain) pairs.push('Domain=' + opt.domain);
if (opt.path) pairs.push('Path=' + opt.path);
if (opt.expires) pairs.push('Expires=' + opt.expires.toUTCString());
if (opt.httpOnly) pairs.push('HttpOnly');
if (opt.secure) pairs.push('Secure');
return pairs.join('; ');
};
/// Parse the given cookie header string into an object
/// The object has the various cookies as keys(names) => values
/// @param {String} str
/// @return {Object}
var parse = function(str, opt) {
opt = opt || {};
var obj = {}
var pairs = str.split(/; */);
var dec = opt.decode || decode;
pairs.forEach(function(pair) {
var eq_idx = pair.indexOf('=')
// skip things that don't look like key=value
if (eq_idx < 0) {
return;
}
var key = pair.substr(0, eq_idx).trim()
var val = pair.substr(++eq_idx, pair.length).trim();
// quoted values
if ('"' == val[0]) {
val = val.slice(1, -1);
}
// only assign once
if (undefined == obj[key]) {
try {
obj[key] = dec(val);
} catch (e) {
obj[key] = val;
}
}
});
return obj;
};
var encode = encodeURIComponent;
var decode = decodeURIComponent;
module.exports.serialize = serialize;
module.exports.parse = parse;

86
server/node_modules/cookie/package.json generated vendored Normal file
View File

@@ -0,0 +1,86 @@
{
"_args": [
[
{
"raw": "cookie@0.1.2",
"scope": null,
"escapedName": "cookie",
"name": "cookie",
"rawSpec": "0.1.2",
"spec": "0.1.2",
"type": "version"
},
"/home/nau/MEGA/CODI/githubRepos/colspace/node_modules/express"
]
],
"_from": "cookie@0.1.2",
"_id": "cookie@0.1.2",
"_inCache": true,
"_location": "/cookie",
"_npmUser": {
"name": "shtylman",
"email": "shtylman@gmail.com"
},
"_npmVersion": "1.4.6",
"_phantomChildren": {},
"_requested": {
"raw": "cookie@0.1.2",
"scope": null,
"escapedName": "cookie",
"name": "cookie",
"rawSpec": "0.1.2",
"spec": "0.1.2",
"type": "version"
},
"_requiredBy": [
"/express"
],
"_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.2.tgz",
"_shasum": "72fec3d24e48a3432073d90c12642005061004b1",
"_shrinkwrap": null,
"_spec": "cookie@0.1.2",
"_where": "/home/nau/MEGA/CODI/githubRepos/colspace/node_modules/express",
"author": {
"name": "Roman Shtylman",
"email": "shtylman@gmail.com"
},
"bugs": {
"url": "https://github.com/shtylman/node-cookie/issues"
},
"dependencies": {},
"description": "cookie parsing and serialization",
"devDependencies": {
"mocha": "1.x.x"
},
"directories": {},
"dist": {
"shasum": "72fec3d24e48a3432073d90c12642005061004b1",
"tarball": "https://registry.npmjs.org/cookie/-/cookie-0.1.2.tgz"
},
"engines": {
"node": "*"
},
"homepage": "https://github.com/shtylman/node-cookie",
"keywords": [
"cookie",
"cookies"
],
"main": "index.js",
"maintainers": [
{
"name": "shtylman",
"email": "shtylman@gmail.com"
}
],
"name": "cookie",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/shtylman/node-cookie.git"
},
"scripts": {
"test": "mocha"
},
"version": "0.1.2"
}