handle-cli-error
Advanced tools
Comparing version 1.0.1 to 1.1.0
{ | ||
"name": "handle-cli-error", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"type": "module", | ||
@@ -9,3 +9,3 @@ "exports": "./build/src/main.js", | ||
"files": [ | ||
"build/src/**/*.{js,d.ts,map,json,sh,md}" | ||
"build/src/**/*.{js,d.ts,json}" | ||
], | ||
@@ -39,3 +39,3 @@ "scripts": { | ||
"license": "Apache-2.0", | ||
"homepage": "https://bit.ly/3Otrw5m", | ||
"homepage": "https://www.github.com/ehmicky/handle-cli-error", | ||
"repository": "ehmicky/handle-cli-error", | ||
@@ -54,3 +54,3 @@ "bugs": { | ||
"execa": "^6.1.0", | ||
"test-each": "^5.1.1" | ||
"test-each": "^5.2.0" | ||
}, | ||
@@ -61,6 +61,6 @@ "engines": { | ||
"dependencies": { | ||
"filter-obj": "^4.0.0", | ||
"filter-obj": "^5.1.0", | ||
"is-plain-obj": "^4.1.0", | ||
"normalize-exception": "^1.3.0" | ||
"normalize-exception": "^1.5.0" | ||
} | ||
} |
@@ -17,6 +17,6 @@ <picture> | ||
- 💣 [Error type-specific](#-types) handling | ||
- 👨🚒️ [Graceful exit](#%EF%B8%8F-timeout) | ||
- 🧯 [Normalize](https://github.com/ehmicky/normalize-exception) invalid errors | ||
- 🚒 [Graceful exit](#-timeout) | ||
- ⛑️ [Normalize](https://github.com/ehmicky/normalize-exception) invalid errors | ||
- 📕 Log verbosity: full, [short](#-short) or [silent](#-silent) | ||
- 🚒 Custom [exit code](#-exitcode) | ||
- 🚨 Custom [exit code](#-exitcode) | ||
- 💥 Exception-safe | ||
@@ -47,5 +47,7 @@ | ||
handleCliError(error, { | ||
InputError: { exitCode: 1, short: true }, | ||
DatabaseError: { exitCode: 2, short: true }, | ||
InternalError: { exitCode: 3 }, | ||
types: { | ||
InputError: { exitCode: 1, short: true }, | ||
DatabaseError: { exitCode: 2, short: true }, | ||
InternalError: { exitCode: 3 }, | ||
}, | ||
}) | ||
@@ -79,3 +81,3 @@ ``` | ||
#### 🚒 exitCode | ||
#### 🚨 exitCode | ||
@@ -107,3 +109,3 @@ _Type_: `integer`\ | ||
#### 👨🚒️ timeout | ||
#### 🚒 timeout | ||
@@ -140,2 +142,4 @@ _Type_: `integer` (in milliseconds)\ | ||
types | ||
- [`error-serializer`](https://github.com/ehmicky/error-serializer): Convert | ||
errors to/from plain objects | ||
- [`normalize-exception`](https://github.com/ehmicky/normalize-exception): | ||
@@ -142,0 +146,0 @@ Normalize exceptions/errors |
179
25545
12
+ Addedfilter-obj@5.1.0(transitive)
- Removedfilter-obj@4.0.0(transitive)
Updatedfilter-obj@^5.1.0
Updatednormalize-exception@^1.5.0