@ooneex/exception 0.0.18 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +7 -25
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,51 +1,33 @@
1
1
  # @ooneex/exception
2
2
 
3
- A type-safe exception handling library with HTTP status code integration for structured error management. This package provides a base `Exception` class and specialized exception types for common HTTP error scenarios with rich metadata including timestamps, status codes, and structured stack traces.
3
+ Structured exception handling with HTTP status code mapping, typed error data, and JSON-formatted stack traces for consistent error reporting. This package provides a base `Exception` class and specialized exception types for common HTTP error scenarios with rich metadata including timestamps, status codes, and structured stack traces.
4
4
 
5
5
  ![Bun](https://img.shields.io/badge/Bun-Compatible-orange?style=flat-square&logo=bun)
6
- ![Deno](https://img.shields.io/badge/Deno-Compatible-blue?style=flat-square&logo=deno)
7
- ![Node.js](https://img.shields.io/badge/Node.js-Compatible-green?style=flat-square&logo=node.js)
8
6
  ![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue?style=flat-square&logo=typescript)
9
7
  ![MIT License](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)
10
8
 
11
9
  ## Features
12
10
 
13
- ✅ **HTTP Status Integration** - Built-in support for all HTTP status codes
11
+ ✅ **HTTP Status Mapping** - Built-in support for all HTTP status codes via `@ooneex/http-status`
14
12
 
15
- ✅ **Structured Stack Traces** - Parse stack traces into JSON for logging and debugging
13
+ ✅ **JSON Stack Traces** - Parse stack traces into structured JSON arrays for logging and debugging
16
14
 
17
- ✅ **Rich Metadata** - Include timestamps, custom data, and original errors
15
+ ✅ **Typed Error Data** - Include timestamps, custom data, and original errors with read-only access
18
16
 
19
- ✅ **Specialized Exceptions** - Pre-built exceptions for common HTTP errors
17
+ ✅ **Specialized Exceptions** - Pre-built `BadRequestException`, `NotFoundException`, `UnauthorizedException`, and `MethodNotAllowedException`
20
18
 
21
- ✅ **Type-Safe** - Full TypeScript support with proper type definitions
19
+ ✅ **Type-Safe** - Full TypeScript support with `IException` interface and `ExceptionStackFrameType`
22
20
 
23
21
  ✅ **Immutable Data** - Exception data is frozen after creation
24
22
 
25
- ✅ **Native Error Wrapping** - Wrap native JavaScript errors while preserving context
23
+ ✅ **Native Error Wrapping** - Wrap native JavaScript errors while preserving context and stack traces
26
24
 
27
25
  ## Installation
28
26
 
29
- ### Bun
30
27
  ```bash
31
28
  bun add @ooneex/exception
32
29
  ```
33
30
 
34
- ### pnpm
35
- ```bash
36
- pnpm add @ooneex/exception
37
- ```
38
-
39
- ### Yarn
40
- ```bash
41
- yarn add @ooneex/exception
42
- ```
43
-
44
- ### npm
45
- ```bash
46
- npm install @ooneex/exception
47
- ```
48
-
49
31
  ## Usage
50
32
 
51
33
  ### Basic Exception
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ooneex/exception",
3
- "description": "Type-safe exception handling with HTTP status code integration for structured error management",
4
- "version": "0.0.18",
3
+ "description": "Structured exception handling with HTTP status code mapping, typed error data, and JSON-formatted stack traces for consistent error reporting",
4
+ "version": "1.0.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -28,7 +28,7 @@
28
28
  "npm:publish": "bun publish --tolerate-republish --access public"
29
29
  },
30
30
  "dependencies": {
31
- "@ooneex/http-status": "0.0.17"
31
+ "@ooneex/http-status": "0.0.18"
32
32
  },
33
33
  "devDependencies": {},
34
34
  "keywords": [