diff --git a/README.md b/README.md index 14cb616..a7faaa0 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,11 @@ # Hestia Libraries - `hestiaERROR` -[![Hestia Libraries](.src/icons/banner_1200x270.svg)](#) +[![Hestia Libraries](/src/icons/banner_1200x270.svg)](#) One Peaceful Frontend+Backend Software Library Suite. -This repository houses the operating components of the error code numbering -definitions and representations for various supported programming languages. The -repository splits itself into multiple parts depending on its language-specific -or deployment-specific usage. +This repository facilitates error numbering definitions for error reporting in +memory constrained environment. @@ -20,13 +18,31 @@ This project was initiated primarily because of: making sure the `hestiaERROR` library talks to each other seamlessly across programming languages with the same context. 2. **Utilizing low memory, language-free, and simple error reporting** - - using simple 1 byte number across the projects and software layers for - highest efficiency and works as a signal. -3. **Keeping string representations within the project's language - internationalization libraries** - making string processing and translations - a lot more simple to manage and operate. -4. **Simple to integrate** - simple enough to use the supported programming - language's package manager. + using simple 1 byte number across all technologies and software layers for + highest signal consistencies. +3. **Keeping string error representations internationalization capable** - + making string translations a lot easier to manage. +5. **Simple to integrate** - simple enough to use for all supported programming + languages. + + + + +## Design Principles + +The definitions complies to only the following rules: + +1. **STRICTLY**: **`0` represents OK**. +2. Restricts within 8-bits unsigned integer (1 byte) range (`0` to `255`). +3. Numbers' definitions are context free (e.g. each software layers can response + differently). +4. Avoid redefining existing codes (can but frown upon). + +Based on years of programming experiences across multiple programming languages, +each software layer or project can redefine the list whenever needed +for independent packaging purposes as long as the rules' above are complied. + +Also, this library is heavily guarded with unit tests whenever available. @@ -37,12 +53,78 @@ This library supports multiple programming languages for the same dataset. Hence, in order to use it, please import based on your deployed programming language: + + +### Javascript Ecosystems + +To use `hestiaERROR` library in your Javascript|Typescript project, you may use +the following methods for integrations: + + +#### Git Release Branches (Recommended) + +It's highly recommended to use `git` release branches inside your `package.json` +dependencies list. This is to avoid the registry configurations problem +involving `npm`: + +``` +{ + "dependencies": { + ... + "@chewkeanho/hestiaERROR": "git+https://github.com/ChewKeanHo/hestiaERROR.git#[VERSION]_js" + ... + } +} +``` + +For always latest release, the `latest` version tag can be used. Example: + +``` +{ + ... + "dependencies": { + ... + "@chewkeanho/hestiaERROR": "git+https://github.com/ChewKeanHo/hestiaERROR.git#latest_js" + ... + } + ... +} +``` + + +#### NPM + > **NOTE** > > To be updated. +### Git + +To source the library using `git` directly, simply execute the following +instructions: + +``` +git clone --single-branch --branch [BRANCH_VERSION]_git https://github.com/ChewKeanHo/hestiaERROR.git +``` + +For always latest release, use the `main` branch. Example: + +``` +git clone --single-branch --branch `main` https://github.com/ChewKeanHo/hestiaERROR.git +``` + +> **SIDE NOTES** +> +> 1. Branches like `next` and `experimental` are for maintenance & development. +> Only use it at your own risk. +> 2. `next` branch simply means the next release version (next `main`) for +> release testing purposes. +> 3. `experimental` is for maintainers' development. + + + ## Data Source @@ -54,7 +136,7 @@ The libraries are based on the following data sources: 1. Source: `include/uapi/asm-generic/errno.h` 3. Linux Kernel - Extended Error Numbers 1. Source: `include/linux/errno.h` -4. BASH Exit Status list +4. BASH Exit Statuses 1. Source: https://tldp.org/LDP/abs/html/exitcodes.html 5. PowerShell Error Handling 1. Source: https://learn.microsoft.com/en-us/powershell/scripting/learn/deep-dives/everything-about-exceptions @@ -63,25 +145,6 @@ These sources are strongly referencing from the Linux Kernel while maintaining the definitions usable even at operating system scripting level for both UNIX and Windows OSes. -The definitions complies to only the following rules: - -1. **STRICTLY**: **`0` represents OK**. -2. Restricts within 8-bits unsigned integer (1 byte) range (`0` to `255`). -3. Numbers' definitions are context free (e.g. each software layers can response - differently). -4. Avoid redefining existing codes (can but frown upon). - -Based on years of programming experiences across multiple languages, these error -codes are newly defined and each software layers can redefine the list whenever -needed for independent packaging purposes. - - - - -## Test Cases - -The library is heavily guarded with unit tests whenever available. -