diff options
Diffstat (limited to 'node_modules/is-retry-allowed')
-rw-r--r-- | node_modules/is-retry-allowed/index.js | 60 | ||||
-rw-r--r-- | node_modules/is-retry-allowed/license | 21 | ||||
-rw-r--r-- | node_modules/is-retry-allowed/package.json | 29 | ||||
-rw-r--r-- | node_modules/is-retry-allowed/readme.md | 42 |
4 files changed, 0 insertions, 152 deletions
diff --git a/node_modules/is-retry-allowed/index.js b/node_modules/is-retry-allowed/index.js deleted file mode 100644 index 663ee338f..000000000 --- a/node_modules/is-retry-allowed/index.js +++ /dev/null @@ -1,60 +0,0 @@ -'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; -}; diff --git a/node_modules/is-retry-allowed/license b/node_modules/is-retry-allowed/license deleted file mode 100644 index 1aeb74fd2..000000000 --- a/node_modules/is-retry-allowed/license +++ /dev/null @@ -1,21 +0,0 @@ -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. diff --git a/node_modules/is-retry-allowed/package.json b/node_modules/is-retry-allowed/package.json deleted file mode 100644 index 452b76f5a..000000000 --- a/node_modules/is-retry-allowed/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "is-retry-allowed", - "version": "1.1.0", - "description": "My prime module", - "license": "MIT", - "repository": "floatdrop/is-retry-allowed", - "author": { - "name": "Vsevolod Strukchinsky", - "email": "floatdrop@gmail.com", - "url": "github.com/floatdrop" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "" - ], - "dependencies": {}, - "devDependencies": { - "ava": "^0.8.0", - "xo": "^0.12.1" - } -} diff --git a/node_modules/is-retry-allowed/readme.md b/node_modules/is-retry-allowed/readme.md deleted file mode 100644 index 4212d099b..000000000 --- a/node_modules/is-retry-allowed/readme.md +++ /dev/null @@ -1,42 +0,0 @@ -# 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) |