Detailansicht verbessert
This commit is contained in:
60
express-server/node_modules/is-retry-allowed/index.js
generated
vendored
Normal file
60
express-server/node_modules/is-retry-allowed/index.js
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
'use strict';
|
||||
|
||||
var WHITELIST = [
|
||||
'ETIMEDOUT',
|
||||
'ECONNRESET',
|
||||
'EADDRINUSE',
|
||||
'ESOCKETTIMEDOUT',
|
||||
'ECONNREFUSED',
|
||||
'EPIPE'
|
||||
];
|
||||
|
||||
var BLACKLIST = [
|
||||
'ENOTFOUND',
|
||||
'ENETUNREACH',
|
||||
|
||||
// SSL errors from https://github.com/nodejs/node/blob/ed3d8b13ee9a705d89f9e0397d9e96519e7e47ac/src/node_crypto.cc#L1950
|
||||
'UNABLE_TO_GET_ISSUER_CERT',
|
||||
'UNABLE_TO_GET_CRL',
|
||||
'UNABLE_TO_DECRYPT_CERT_SIGNATURE',
|
||||
'UNABLE_TO_DECRYPT_CRL_SIGNATURE',
|
||||
'UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY',
|
||||
'CERT_SIGNATURE_FAILURE',
|
||||
'CRL_SIGNATURE_FAILURE',
|
||||
'CERT_NOT_YET_VALID',
|
||||
'CERT_HAS_EXPIRED',
|
||||
'CRL_NOT_YET_VALID',
|
||||
'CRL_HAS_EXPIRED',
|
||||
'ERROR_IN_CERT_NOT_BEFORE_FIELD',
|
||||
'ERROR_IN_CERT_NOT_AFTER_FIELD',
|
||||
'ERROR_IN_CRL_LAST_UPDATE_FIELD',
|
||||
'ERROR_IN_CRL_NEXT_UPDATE_FIELD',
|
||||
'OUT_OF_MEM',
|
||||
'DEPTH_ZERO_SELF_SIGNED_CERT',
|
||||
'SELF_SIGNED_CERT_IN_CHAIN',
|
||||
'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
|
||||
'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
|
||||
'CERT_CHAIN_TOO_LONG',
|
||||
'CERT_REVOKED',
|
||||
'INVALID_CA',
|
||||
'PATH_LENGTH_EXCEEDED',
|
||||
'INVALID_PURPOSE',
|
||||
'CERT_UNTRUSTED',
|
||||
'CERT_REJECTED'
|
||||
];
|
||||
|
||||
module.exports = function (err) {
|
||||
if (!err || !err.code) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (WHITELIST.indexOf(err.code) !== -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (BLACKLIST.indexOf(err.code) !== -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
21
express-server/node_modules/is-retry-allowed/license
generated
vendored
Normal file
21
express-server/node_modules/is-retry-allowed/license
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com> (github.com/floatdrop)
|
||||
|
||||
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.
|
59
express-server/node_modules/is-retry-allowed/package.json
generated
vendored
Normal file
59
express-server/node_modules/is-retry-allowed/package.json
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
{
|
||||
"_from": "is-retry-allowed@^1.0.0",
|
||||
"_id": "is-retry-allowed@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=",
|
||||
"_location": "/is-retry-allowed",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "is-retry-allowed@^1.0.0",
|
||||
"name": "is-retry-allowed",
|
||||
"escapedName": "is-retry-allowed",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/got"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz",
|
||||
"_shasum": "11a060568b67339444033d0125a61a20d564fb34",
|
||||
"_spec": "is-retry-allowed@^1.0.0",
|
||||
"_where": "D:\\5CHITM\\Diplomarbeit\\SmartShopper\\SmartShopper\\express-server\\node_modules\\got",
|
||||
"author": {
|
||||
"name": "Vsevolod Strukchinsky",
|
||||
"email": "floatdrop@gmail.com",
|
||||
"url": "github.com/floatdrop"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/floatdrop/is-retry-allowed/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "My prime module",
|
||||
"devDependencies": {
|
||||
"ava": "^0.8.0",
|
||||
"xo": "^0.12.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/floatdrop/is-retry-allowed#readme",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
"name": "is-retry-allowed",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/floatdrop/is-retry-allowed.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
42
express-server/node_modules/is-retry-allowed/readme.md
generated
vendored
Normal file
42
express-server/node_modules/is-retry-allowed/readme.md
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
# is-retry-allowed [](https://travis-ci.org/floatdrop/is-retry-allowed)
|
||||
|
||||
Is retry allowed for Error?
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save is-retry-allowed
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const isRetryAllowed = require('is-retry-allowed');
|
||||
|
||||
isRetryAllowed({code: 'ETIMEDOUT'});
|
||||
//=> true
|
||||
|
||||
isRetryAllowed({code: 'ENOTFOUND'});
|
||||
//=> false
|
||||
|
||||
isRetryAllowed({});
|
||||
//=> true
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### isRetryAllowed(error)
|
||||
|
||||
#### error
|
||||
|
||||
Type: `object`
|
||||
|
||||
Object with `code` property, which will be used to determine retry.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)
|
Reference in New Issue
Block a user