NUEVA BUSQUEDA DE DATOS SRI
This commit is contained in:
31
node_modules/http-errors/HISTORY.md
generated
vendored
31
node_modules/http-errors/HISTORY.md
generated
vendored
@@ -1,3 +1,34 @@
|
||||
2.0.0 / 2021-12-17
|
||||
==================
|
||||
|
||||
* Drop support for Node.js 0.6
|
||||
* Remove `I'mateapot` export; use `ImATeapot` instead
|
||||
* Remove support for status being non-first argument
|
||||
* Rename `UnorderedCollection` constructor to `TooEarly`
|
||||
* deps: depd@2.0.0
|
||||
- Replace internal `eval` usage with `Function` constructor
|
||||
- Use instance methods on `process` to check for listeners
|
||||
* deps: statuses@2.0.1
|
||||
- Fix messaging casing of `418 I'm a Teapot`
|
||||
- Remove code 306
|
||||
- Rename `425 Unordered Collection` to standard `425 Too Early`
|
||||
|
||||
2021-11-14 / 1.8.1
|
||||
==================
|
||||
|
||||
* deps: toidentifier@1.0.1
|
||||
|
||||
2020-06-29 / 1.8.0
|
||||
==================
|
||||
|
||||
* Add `isHttpError` export to determine if value is an HTTP error
|
||||
* deps: setprototypeof@1.2.0
|
||||
|
||||
2019-06-24 / 1.7.3
|
||||
==================
|
||||
|
||||
* deps: inherits@2.0.4
|
||||
|
||||
2019-02-18 / 1.7.2
|
||||
==================
|
||||
|
||||
|
||||
22
node_modules/http-errors/README.md
generated
vendored
22
node_modules/http-errors/README.md
generated
vendored
@@ -3,7 +3,7 @@
|
||||
[![NPM Version][npm-version-image]][npm-url]
|
||||
[![NPM Downloads][npm-downloads-image]][node-url]
|
||||
[![Node.js Version][node-image]][node-url]
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![Build Status][ci-image]][ci-url]
|
||||
[![Test Coverage][coveralls-image]][coveralls-url]
|
||||
|
||||
Create HTTP errors for Express, Koa, Connect, etc. with ease.
|
||||
@@ -14,7 +14,7 @@ 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):
|
||||
|
||||
```bash
|
||||
```console
|
||||
$ npm install http-errors
|
||||
```
|
||||
|
||||
@@ -53,8 +53,6 @@ This is the current API, currently extracted from Koa and subject to change.
|
||||
Create a new error object with the given message `msg`.
|
||||
The error object inherits from `createError.HttpError`.
|
||||
|
||||
<!-- eslint-disable no-undef, no-unused-vars -->
|
||||
|
||||
```js
|
||||
var err = createError(404, 'This video does not exist!')
|
||||
```
|
||||
@@ -70,7 +68,7 @@ properties. This will not alter the inheritance of the given
|
||||
`error` object, and the modified `error` object is the
|
||||
return value.
|
||||
|
||||
<!-- eslint-disable no-redeclare, no-undef, no-unused-vars -->
|
||||
<!-- eslint-disable no-redeclare -->
|
||||
|
||||
```js
|
||||
fs.readFile('foo.txt', function (err, buf) {
|
||||
@@ -88,13 +86,19 @@ fs.readFile('foo.txt', function (err, buf) {
|
||||
- `error` - the error object to extend
|
||||
- `properties` - custom properties to attach to the object
|
||||
|
||||
### createError.isHttpError(val)
|
||||
|
||||
Determine if the provided `val` is an `HttpError`. This will return `true`
|
||||
if the error inherits from the `HttpError` constructor of this module or
|
||||
matches the "duck type" for an error this module creates. All outputs from
|
||||
the `createError` factory will return `true` for this function, including
|
||||
if an non-`HttpError` was passed into the factory.
|
||||
|
||||
### new createError\[code || name\](\[msg]\))
|
||||
|
||||
Create a new error object with the given message `msg`.
|
||||
The error object inherits from `createError.HttpError`.
|
||||
|
||||
<!-- eslint-disable no-undef, no-unused-vars -->
|
||||
|
||||
```js
|
||||
var err = new createError.NotFound()
|
||||
```
|
||||
@@ -129,7 +133,7 @@ var err = new createError.NotFound()
|
||||
|422 |UnprocessableEntity |
|
||||
|423 |Locked |
|
||||
|424 |FailedDependency |
|
||||
|425 |UnorderedCollection |
|
||||
|425 |TooEarly |
|
||||
|426 |UpgradeRequired |
|
||||
|428 |PreconditionRequired |
|
||||
|429 |TooManyRequests |
|
||||
@@ -152,6 +156,8 @@ var err = new createError.NotFound()
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[ci-image]: https://badgen.net/github/checks/jshttp/http-errors/master?label=ci
|
||||
[ci-url]: https://github.com/jshttp/http-errors/actions?query=workflow%3Aci
|
||||
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/http-errors/master
|
||||
[coveralls-url]: https://coveralls.io/r/jshttp/http-errors?branch=master
|
||||
[node-image]: https://badgen.net/npm/node/http-errors
|
||||
|
||||
77
node_modules/http-errors/index.js
generated
vendored
77
node_modules/http-errors/index.js
generated
vendored
@@ -25,6 +25,7 @@ var toIdentifier = require('toidentifier')
|
||||
|
||||
module.exports = createError
|
||||
module.exports.HttpError = createHttpErrorConstructor()
|
||||
module.exports.isHttpError = createIsHttpErrorFunction(module.exports.HttpError)
|
||||
|
||||
// Populate exports for all constructors
|
||||
populateConstructorExports(module.exports, statuses.codes, module.exports.HttpError)
|
||||
@@ -53,24 +54,18 @@ function createError () {
|
||||
var props = {}
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var arg = arguments[i]
|
||||
if (arg instanceof Error) {
|
||||
var type = typeof arg
|
||||
if (type === 'object' && arg instanceof Error) {
|
||||
err = arg
|
||||
status = err.status || err.statusCode || status
|
||||
continue
|
||||
}
|
||||
switch (typeof arg) {
|
||||
case 'string':
|
||||
msg = arg
|
||||
break
|
||||
case 'number':
|
||||
status = arg
|
||||
if (i !== 0) {
|
||||
deprecate('non-first-argument status code; replace with createError(' + arg + ', ...)')
|
||||
}
|
||||
break
|
||||
case 'object':
|
||||
props = arg
|
||||
break
|
||||
} else if (type === 'number' && i === 0) {
|
||||
status = arg
|
||||
} else if (type === 'string') {
|
||||
msg = arg
|
||||
} else if (type === 'object') {
|
||||
props = arg
|
||||
} else {
|
||||
throw new TypeError('argument #' + (i + 1) + ' unsupported type ' + type)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +74,7 @@ function createError () {
|
||||
}
|
||||
|
||||
if (typeof status !== 'number' ||
|
||||
(!statuses[status] && (status < 400 || status >= 600))) {
|
||||
(!statuses.message[status] && (status < 400 || status >= 600))) {
|
||||
status = 500
|
||||
}
|
||||
|
||||
@@ -90,7 +85,7 @@ function createError () {
|
||||
// create error
|
||||
err = HttpError
|
||||
? new HttpError(msg)
|
||||
: new Error(msg || statuses[status])
|
||||
: new Error(msg || statuses.message[status])
|
||||
Error.captureStackTrace(err, createError)
|
||||
}
|
||||
|
||||
@@ -130,11 +125,11 @@ function createHttpErrorConstructor () {
|
||||
*/
|
||||
|
||||
function createClientErrorConstructor (HttpError, name, code) {
|
||||
var className = name.match(/Error$/) ? name : name + 'Error'
|
||||
var className = toClassName(name)
|
||||
|
||||
function ClientError (message) {
|
||||
// create the error object
|
||||
var msg = message != null ? message : statuses[code]
|
||||
var msg = message != null ? message : statuses.message[code]
|
||||
var err = new Error(msg)
|
||||
|
||||
// capture a stack trace to the construction point
|
||||
@@ -172,17 +167,38 @@ function createClientErrorConstructor (HttpError, name, code) {
|
||||
return ClientError
|
||||
}
|
||||
|
||||
/**
|
||||
* Create function to test is a value is a HttpError.
|
||||
* @private
|
||||
*/
|
||||
|
||||
function createIsHttpErrorFunction (HttpError) {
|
||||
return function isHttpError (val) {
|
||||
if (!val || typeof val !== 'object') {
|
||||
return false
|
||||
}
|
||||
|
||||
if (val instanceof HttpError) {
|
||||
return true
|
||||
}
|
||||
|
||||
return val instanceof Error &&
|
||||
typeof val.expose === 'boolean' &&
|
||||
typeof val.statusCode === 'number' && val.status === val.statusCode
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a constructor for a server error.
|
||||
* @private
|
||||
*/
|
||||
|
||||
function createServerErrorConstructor (HttpError, name, code) {
|
||||
var className = name.match(/Error$/) ? name : name + 'Error'
|
||||
var className = toClassName(name)
|
||||
|
||||
function ServerError (message) {
|
||||
// create the error object
|
||||
var msg = message != null ? message : statuses[code]
|
||||
var msg = message != null ? message : statuses.message[code]
|
||||
var err = new Error(msg)
|
||||
|
||||
// capture a stack trace to the construction point
|
||||
@@ -242,7 +258,7 @@ function nameFunc (func, name) {
|
||||
function populateConstructorExports (exports, codes, HttpError) {
|
||||
codes.forEach(function forEachCode (code) {
|
||||
var CodeError
|
||||
var name = toIdentifier(statuses[code])
|
||||
var name = toIdentifier(statuses.message[code])
|
||||
|
||||
switch (codeClass(code)) {
|
||||
case 400:
|
||||
@@ -259,8 +275,15 @@ function populateConstructorExports (exports, codes, HttpError) {
|
||||
exports[name] = CodeError
|
||||
}
|
||||
})
|
||||
|
||||
// backwards-compatibility
|
||||
exports["I'mateapot"] = deprecate.function(exports.ImATeapot,
|
||||
'"I\'mateapot"; use "ImATeapot" instead')
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a class name from a name identifier.
|
||||
* @private
|
||||
*/
|
||||
|
||||
function toClassName (name) {
|
||||
return name.substr(-5) !== 'Error'
|
||||
? name + 'Error'
|
||||
: name
|
||||
}
|
||||
|
||||
119
node_modules/http-errors/package.json
generated
vendored
119
node_modules/http-errors/package.json
generated
vendored
@@ -1,93 +1,50 @@
|
||||
{
|
||||
"_from": "http-errors@1.7.2",
|
||||
"_id": "http-errors@1.7.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
|
||||
"_location": "/http-errors",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "http-errors@1.7.2",
|
||||
"name": "http-errors",
|
||||
"escapedName": "http-errors",
|
||||
"rawSpec": "1.7.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.7.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/body-parser",
|
||||
"/raw-body",
|
||||
"/send"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
|
||||
"_shasum": "4f5029cf13239f31036e5b2e55292bcfbcc85c8f",
|
||||
"_spec": "http-errors@1.7.2",
|
||||
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/body-parser",
|
||||
"author": {
|
||||
"name": "Jonathan Ong",
|
||||
"email": "me@jongleberry.com",
|
||||
"url": "http://jongleberry.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jshttp/http-errors/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Alan Plum",
|
||||
"email": "me@pluma.io"
|
||||
},
|
||||
{
|
||||
"name": "Douglas Christopher Wilson",
|
||||
"email": "doug@somethingdoug.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"depd": "~1.1.2",
|
||||
"inherits": "2.0.3",
|
||||
"setprototypeof": "1.1.1",
|
||||
"statuses": ">= 1.5.0 < 2",
|
||||
"toidentifier": "1.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"name": "http-errors",
|
||||
"description": "Create HTTP error objects",
|
||||
"version": "2.0.0",
|
||||
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",
|
||||
"contributors": [
|
||||
"Alan Plum <me@pluma.io>",
|
||||
"Douglas Christopher Wilson <doug@somethingdoug.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"repository": "jshttp/http-errors",
|
||||
"dependencies": {
|
||||
"depd": "2.0.0",
|
||||
"inherits": "2.0.4",
|
||||
"setprototypeof": "1.2.0",
|
||||
"statuses": "2.0.1",
|
||||
"toidentifier": "1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "5.13.0",
|
||||
"eslint-config-standard": "12.0.0",
|
||||
"eslint-plugin-import": "2.16.0",
|
||||
"eslint-plugin-markdown": "1.0.0",
|
||||
"eslint-plugin-node": "7.0.1",
|
||||
"eslint-plugin-promise": "4.0.1",
|
||||
"eslint-plugin-standard": "4.0.0",
|
||||
"istanbul": "0.4.5",
|
||||
"mocha": "5.2.0"
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-standard": "14.1.1",
|
||||
"eslint-plugin-import": "2.25.3",
|
||||
"eslint-plugin-markdown": "2.2.1",
|
||||
"eslint-plugin-node": "11.1.0",
|
||||
"eslint-plugin-promise": "5.2.0",
|
||||
"eslint-plugin-standard": "4.1.0",
|
||||
"mocha": "9.1.3",
|
||||
"nyc": "15.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
"node": ">= 0.8"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint . && node ./scripts/lint-readme-list.js",
|
||||
"test": "mocha --reporter spec --bail",
|
||||
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
||||
"test-cov": "nyc --reporter=html --reporter=text npm test",
|
||||
"version": "node scripts/version-history.js && git add HISTORY.md"
|
||||
},
|
||||
"keywords": [
|
||||
"http",
|
||||
"error"
|
||||
],
|
||||
"files": [
|
||||
"index.js",
|
||||
"HISTORY.md",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
],
|
||||
"homepage": "https://github.com/jshttp/http-errors#readme",
|
||||
"keywords": [
|
||||
"http",
|
||||
"error"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "http-errors",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jshttp/http-errors.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --plugin markdown --ext js,md . && node ./scripts/lint-readme-list.js",
|
||||
"test": "mocha --reporter spec --bail",
|
||||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
|
||||
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
|
||||
},
|
||||
"version": "1.7.2"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user