0.0.1 • Published 3 months ago

central-error-codes v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

Sure! Here’s the updated README in Markdown format:

# Centralized Error Codes

## Overview
This repository provides a centralized collection of error codes that can be used across multiple microservices. It is designed to standardize error handling for both Node.js and Python-based applications.

## Publishing a New Node Module
Follow these steps to publish a new version of the module:

1. Install dependencies:
   ```bash
   npm i --save-dev @types/node
  1. Build the project:
    npm run build
  2. Package the module:
    npm pack
  3. Publish the package to npm (ensure you are logged in):
    npm publish --access public
    If not logged in, run:
    npm login

Installation

To use this package in a Node.js application, install it via npm:

npm install central-error-codes

Usage in Node.js

Import and use the error codes in your application:

import { ErrorCode } from "central-error-codes";

const ALL_ERROR_CODE = ErrorCode.getAllErrors();
const CMS_ERROR_CODE = ErrorCode.getCMSGatewayError();

Usage in Python

For Python-based applications, usage instructions will be provided in a future update.

Publishing a New Version for Python

To publish a new version of this package to PyPI, follow these steps:

  1. Install the required tools:
    pip install setuptools wheel twine
  2. Build the distribution files:
    python3 setup.py sdist bdist_wheel
    or alternatively:
    python3 -m build
  3. Upload the package to PyPI using Twine:
    twine upload $(find dist -type f -not -path "dist/typescript/*")
0.0.1

3 months ago

2.0.3

3 months ago

2.0.1

3 months ago

2.0.0

3 months ago

1.1.1

3 months ago

1.0.0

4 months ago