shared is a group of utilities that are shared between runner, nodes, and triggers. It includes utilities for logging, error handling, and other common tasks and classes.


For a complete reference visit runner

Guide to Contributing to shared in Nanoservice-ts

Make sure you follow the recommendations on how to set up local environment and steps to complete before committing your changes. To learn more visit

The Shared module in nanoservice-ts contains common utilities used across the framework, including the Runner, Nodes, and Triggers. These utilities handle logging, error management, and other core functionalities. This guide will help you contribute to the shared utilities effectively.


Repository & Setup

The nanoservice-ts framework is hosted at:
🔗 GitHub Repository

Clone the Repository**

git clone https://github.com/deskree-inc/nanoservice-ts.git
cd nanoservice-ts/core/shared
npm install

Adding Features or Fixing Bugs

1. Create a Feature Branch

git checkout -b feature/improve-logging

2. Make Your Changes

Modify the relevant files inside /core/shared/src/.
Example: Adding a debug log level in logger.ts

export function logDebug(message: string) {
  if (process.env.LOG_LEVEL === 'debug') {
    console.debug(`[DEBUG]: ${message}`);
  }
}

3. Test Your Changes

Run unit tests to ensure no regressions:

npm test

4. Submit a Pull Request

Push your changes and open a PR on GitHub.

git push origin feature/improve-logging

In the PR description, include:

  • What was changed?
  • Why was it changed?
  • How was it tested?

Best Practices

✅ Keep utilities generic and reusable.
✅ Write unit tests for all new functions.
✅ Follow consistent logging and error handling patterns.
✅ Ensure backward compatibility with existing modules.


Final Notes

Contributing to Shared ensures that all components of nanoservice-ts (Runner, Nodes, and Triggers) function smoothly and consistently. If you have any questions, open an issue or PR on GitHub! 🚀

🔗 GitHub Repository