mymundo-error-codes
v1.0.4
Published
Centralized error code definitions for MyMundo admin and storefront
Maintainers
Readme
mymundo-error-codes
Centralized error code definitions for MyMundo admin and storefront.
Installation
npm install mymundo-error-codesUsage
import { ValidationErrorCode } from 'mymundo-error-codes';
// Use validation error codes
const errorCode = ValidationErrorCode.REGISTRY_EMAIL_INVALID_FORMAT;Development
To build the package:
npm run buildPublishing
Automatic Publishing via CI/CD
This package is automatically published when changes are detected in the packages/be-error-codes directory:
- When: Changes are detected in
src/,package.json, ortsconfig.json - Version: Automatically bumps patch version (e.g., 1.0.0 → 1.0.1)
- Trigger: Runs automatically on commits to
mainbranch - Process:
- Detects changes in the package
- Bumps patch version
- Builds the package
- Publishes to npm registry
- Commits version bump back to repository
Manual Publishing
To publish manually:
npm publishTo use locally in this repo (before publishing), you can:
- Use yalc (already in your devDependencies)
- Or add it as a local dependency using npm link or file path
CI/CD Requirements
For automatic publishing to work, ensure the following CI/CD variables are set in GitLab:
NPM_TOKEN: npm authentication token with publish permissions
The CI job will:
- Check for changes in
packages/be-error-codes/src/,package.json, andtsconfig.json - Only run on the
mainbranch (or manually on other branches) - Automatically bump patch version and publish
- Commit the version bump back to the repository
Exports
ValidationErrorCode (enum)
Validation error codes:
REGISTRY_EMAIL_INVALID_FORMATREGISTRY_EMAIL_TAKENREGISTRY_VAT_INVALID_FORMATREGISTRY_PINCODE_INVALID_FORMAT
