diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..5086f01 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,8 @@ +# Contributing Rules + +[**Global Contributing Rules**](https://github.com/INeedJobToStartWork/INeedJobToStartWork/tree/main/other/contribute/CONTRIBUTING.md) - +Here you can find general contribution guide for most of [INEEDJ](https://github.com/INeedJobToStartWork) projects. + +## Local contributing rules + +_empty_ diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..86ed7b0 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 INeedJobToStartWork + +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/README.md b/README.md index 5db7263..8e77aed 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,31 @@ ![image](https://github.com/INeedJobToStartWork/MyError/assets/97305201/03fa3e50-af28-4345-a3f7-f84d091b4eb1)

MyError

+

🎉2.0.0.prerelease.0🎊

A Very Clean Error Handler!

📗Tutorials (in soon) | 📘Docs (in soon) | - 🏗️Contributing Guide + 🏗️Contributing Guide

-Benefits: +About packages: -- All Errors in one Place -- Easier in Maintaining code (No more `trycatches`) -- +- 📖 TSDocs (Internal documentation) +- ♻️ Minified & Compressed +- ⚠️ Error Handler (`oh-my-error`) +- ✅ Support JS/TS & CJS/ESM + +What you get: + +- 🛡️ Type safety +- 🎯 Centralized error management +- 🚀 One-line error handling +- 🧑‍💻👥 Developer and user-friendly error messages +- 📝 Pre-defined error templates +- 🏗️ Consistent error structure across your application +- 🔌 Easy integration with existing codebases ## **Showcase** @@ -46,8 +58,8 @@ const data = myErrorWrapper(readFile, Error("Cant Load File!"))("...path"); - [myErrorHandler](#myerrorhandler) - [Types](#types-1) - [TMyErrorList](#tmyerrorlist) - - [Error Templates (Interfaces)](#error-templates-interfaces) - - [Predefined elements for Functions (Atoms)](#predefined-elements-for-functions-atoms) + - [Error Templates (Interfaces) `new!`](#error-templates-interfaces-new) + - [Predefined elements for Functions (Atoms) `new!`](#predefined-elements-for-functions-atoms-new) ## Install @@ -204,7 +216,7 @@ const ErrorList = { } as const satisfies TMyErrorList; ``` -### Error Templates (Interfaces) +### Error Templates (Interfaces) `new!` There you can find ready error structures. @@ -215,14 +227,14 @@ There you can find ready error structures. | IMyErrorRateLimit `new!` | API error for RateLimit | [IMyError](#error-templates-interfaces), [TApiRateLimit](#predefined-elements-for-functions-atoms) | | IMyErrorValidation `new!` | API error for Validation problems | [IMyError](#error-templates-interfaces), [TValidationError](#predefined-elements-for-functions-atoms) | -### Predefined elements for Functions (Atoms) +### Predefined elements for Functions (Atoms) `new!` Short predefined types to easy creating own Error types! -| Name (Col1) | Name (Col2) | Name (Col3) | -| ------------------------ | ----------------------- | --------------------- | -| TSeverity `new!` | TSeverity2 `new!` | TErrorMessages `new!` | -| TErrorMessagesExt `new!` | TMyErrorList `new!` | TErrorList `new!` | -| TCauseError `new!` | TDetails `new!` | TBaseError `new!` | -| TBaseErrorExt `new!` | TValidationError `new!` | TApiError `new!` | -| TApiRateLimit `new!` | | | +| Name (Col1) | Name (Col2) | Name (Col3) | +| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| [TSeverity](https://github.com/INeedJobToStartWork/MyError/blob/main/src/types/errors.ts) `new!` | [TSeverity2](https://github.com/INeedJobToStartWork/MyError/blob/main/src/types/errors.ts) `new!` | [TErrorMessages](https://github.com/INeedJobToStartWork/MyError/blob/main/src/types/errors.ts) `new!` | +| [TErrorMessagesExt](https://github.com/INeedJobToStartWork/MyError/blob/main/src/types/errors.ts) `new!` | [TMyErrorList](https://github.com/INeedJobToStartWork/MyError/blob/main/src/types/errors.ts) `new!` | [TErrorList](https://github.com/INeedJobToStartWork/MyError/blob/main/src/types/errors.ts) `new!` | +| [TCauseError](https://github.com/INeedJobToStartWork/MyError/blob/main/src/types/errors.ts) `new!` | [TDetails](https://github.com/INeedJobToStartWork/MyError/blob/main/src/types/errors.ts) `new!` | [TBaseError](https://github.com/INeedJobToStartWork/MyError/blob/main/src/types/errors.ts) `new!` | +| [TBaseErrorExt](https://github.com/INeedJobToStartWork/MyError/blob/main/src/types/errors.ts) `new!` | [TValidationError](https://github.com/INeedJobToStartWork/MyError/blob/main/src/types/errors.ts) `new!` | [TApiError](https://github.com/INeedJobToStartWork/MyError/blob/main/src/types/errors.ts) `new!` | +| [TApiRateLimit](https://github.com/INeedJobToStartWork/MyError/blob/main/src/types/errors.ts) `new!` | | |