Revert "Changements dans les modules (nouvelle version Express, mysql, ..)"

This reverts commit bdab795506.
This commit is contained in:
2023-11-23 16:13:50 +01:00
parent 756f928ced
commit 5b0d68d66f
818 changed files with 35968 additions and 82263 deletions

16
node_modules/vary/HISTORY.md generated vendored
View File

@@ -1,3 +1,19 @@
1.1.2 / 2017-09-23
==================
* perf: improve header token parsing speed
1.1.1 / 2017-03-20
==================
* perf: hoist regular expression
1.1.0 / 2015-09-29
==================
* Only accept valid field names in the `field` argument
- Ensures the resulting string is a valid HTTP header value
1.0.1 / 2015-07-08
==================

2
node_modules/vary/LICENSE generated vendored
View File

@@ -1,6 +1,6 @@
(The MIT License)
Copyright (c) 2014-2015 Douglas Christopher Wilson
Copyright (c) 2014-2017 Douglas Christopher Wilson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

14
node_modules/vary/README.md generated vendored
View File

@@ -10,12 +10,18 @@ Manipulate the HTTP Vary header
## 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 vary
```
## API
<!-- eslint-disable no-unused-vars -->
```js
var vary = require('vary')
```
@@ -29,6 +35,8 @@ header, or an array of multiple fields.
This will append the header if not already listed, otherwise leaves
it listed in the current location.
<!-- eslint-disable no-undef -->
```js
// Append "Origin" to the Vary header of the response
vary(res, 'Origin')
@@ -43,6 +51,8 @@ or an array of multiple fields.
This will append the header if not already listed, otherwise leaves
it listed in the current location. The new header string is returned.
<!-- eslint-disable no-undef -->
```js
// Get header string appending "Origin" to "Accept, User-Agent"
vary.append('Accept, User-Agent', 'Origin')
@@ -56,7 +66,7 @@ vary.append('Accept, User-Agent', 'Origin')
var http = require('http')
var vary = require('vary')
http.createServer(function onRequest(req, res) {
http.createServer(function onRequest (req, res) {
// about to user-agent sniff
vary(res, 'User-Agent')
@@ -82,7 +92,7 @@ $ npm test
[npm-image]: https://img.shields.io/npm/v/vary.svg
[npm-url]: https://npmjs.org/package/vary
[node-version-image]: https://img.shields.io/node/v/vary.svg
[node-version-url]: http://nodejs.org/download/
[node-version-url]: https://nodejs.org/en/download
[travis-image]: https://img.shields.io/travis/jshttp/vary/master.svg
[travis-url]: https://travis-ci.org/jshttp/vary
[coveralls-image]: https://img.shields.io/coveralls/jshttp/vary/master.svg

94
node_modules/vary/index.js generated vendored
View File

@@ -1,23 +1,30 @@
/*!
* vary
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* Copyright(c) 2014-2017 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict';
'use strict'
/**
* Module exports.
*/
module.exports = vary;
module.exports.append = append;
module.exports = vary
module.exports.append = append
/**
* Variables.
* RegExp to match field-name in RFC 7230 sec 3.2
*
* field-name = token
* token = 1*tchar
* tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
* / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
* / DIGIT / ALPHA
* ; any VCHAR, except delimiters
*/
var separators = /[\(\)<>@,;:\\"\/\[\]\?=\{\}\u0020\u0009]/;
var FIELD_NAME_REGEXP = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/
/**
* Append a field to a vary header.
@@ -25,57 +32,57 @@ var separators = /[\(\)<>@,;:\\"\/\[\]\?=\{\}\u0020\u0009]/;
* @param {String} header
* @param {String|Array} field
* @return {String}
* @api public
* @public
*/
function append(header, field) {
function append (header, field) {
if (typeof header !== 'string') {
throw new TypeError('header argument is required');
throw new TypeError('header argument is required')
}
if (!field) {
throw new TypeError('field argument is required');
throw new TypeError('field argument is required')
}
// get fields array
var fields = !Array.isArray(field)
? parse(String(field))
: field;
: field
// assert on invalid fields
for (var i = 0; i < fields.length; i++) {
if (separators.test(fields[i])) {
throw new TypeError('field argument contains an invalid header');
// assert on invalid field names
for (var j = 0; j < fields.length; j++) {
if (!FIELD_NAME_REGEXP.test(fields[j])) {
throw new TypeError('field argument contains an invalid header name')
}
}
// existing, unspecified vary
if (header === '*') {
return header;
return header
}
// enumerate current values
var val = header;
var vals = parse(header.toLowerCase());
var val = header
var vals = parse(header.toLowerCase())
// unspecified vary
if (fields.indexOf('*') !== -1 || vals.indexOf('*') !== -1) {
return '*';
return '*'
}
for (var i = 0; i < fields.length; i++) {
var fld = fields[i].toLowerCase();
var fld = fields[i].toLowerCase()
// append value (case-preserving)
if (vals.indexOf(fld) === -1) {
vals.push(fld);
vals.push(fld)
val = val
? val + ', ' + fields[i]
: fields[i];
: fields[i]
}
}
return val;
return val
}
/**
@@ -83,11 +90,36 @@ function append(header, field) {
*
* @param {String} header
* @return {Array}
* @api private
* @private
*/
function parse(header) {
return header.trim().split(/ *, */);
function parse (header) {
var end = 0
var list = []
var start = 0
// gather tokens
for (var i = 0, len = header.length; i < len; i++) {
switch (header.charCodeAt(i)) {
case 0x20: /* */
if (start === end) {
start = end = i + 1
}
break
case 0x2c: /* , */
list.push(header.substring(start, end))
start = end = i + 1
break
default:
end = i + 1
break
}
}
// final token
list.push(header.substring(start, end))
return list
}
/**
@@ -95,23 +127,23 @@ function parse(header) {
*
* @param {Object} res
* @param {String|Array} field
* @api public
* @public
*/
function vary(res, field) {
function vary (res, field) {
if (!res || !res.getHeader || !res.setHeader) {
// quack quack
throw new TypeError('res argument is required');
throw new TypeError('res argument is required')
}
// get existing header
var val = res.getHeader('Vary') || ''
var header = Array.isArray(val)
? val.join(', ')
: String(val);
: String(val)
// set new header
if ((val = append(header, field))) {
res.setHeader('Vary', val);
res.setHeader('Vary', val)
}
}

19
node_modules/vary/package.json generated vendored
View File

@@ -1,7 +1,7 @@
{
"name": "vary",
"description": "Manipulate the HTTP Vary header",
"version": "1.0.1",
"version": "1.1.2",
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
"license": "MIT",
"keywords": [
@@ -11,9 +11,18 @@
],
"repository": "jshttp/vary",
"devDependencies": {
"istanbul": "0.3.17",
"mocha": "2.2.5",
"supertest": "1.0.1"
"beautify-benchmark": "0.2.4",
"benchmark": "2.1.4",
"eslint": "3.19.0",
"eslint-config-standard": "10.2.1",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-markdown": "1.0.0-beta.6",
"eslint-plugin-node": "5.1.1",
"eslint-plugin-promise": "3.5.0",
"eslint-plugin-standard": "3.0.1",
"istanbul": "0.4.5",
"mocha": "2.5.3",
"supertest": "1.1.0"
},
"files": [
"HISTORY.md",
@@ -25,6 +34,8 @@
"node": ">= 0.8"
},
"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/"