A repository that consists of all the common code related to integrations that is shared across different environments
npm install @hybr1d/integrations-commonA repository that consists of all the common code related to integrations that is shared across different environments.
This package can be installed using npm:
``bash`
npm install @hybr1d/integrations-common
1. Clone the repository:
`bash`
git clone [repository-url]
cd integrations-common
2. Install dependencies:
`bash`
npm install
3. Create a .env file in the root directory (see Configuration section for required variables)
4. Build the project:
`bash`
npm run build
bash
npm run dev
`$3
To run the project in production mode:
`bash
npm run build
npm start
`$3
When using this package as a dependency in other projects:`typescript
import { SomeIntegration } from '@hybr1d/integrations-common';// Example usage
const integration = new SomeIntegration(config);
`Features
- Common integration patterns and utilities
- Shared TypeScript types and interfaces
- Integrated AWS SDK support
- HTTP client with Axios
- Cryptography utilities (crypto-js and cryptr)
- MongoDB integration
- Promise utilities with Bluebird
- Logging with Pino
- Date/time manipulation with Moment.js
- Query string handling with qs
Configuration
The following environment variables are required to run the project:
`env
AWS Configuration
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=MongoDB Configuration
MONGODB_URI=Application Configuration
NODE_ENV=development
LOG_LEVEL=infoAdd other required environment variables
`Contact the development team to obtain the necessary credentials and configuration values.
Contributing
$3
1. Create a new branch from
main:
`bash
git checkout -b feature/your-feature-name
`2. Make your changes and ensure they follow the project's coding standards:
- Use TypeScript for all new files
- Follow the existing project structure
- Add appropriate tests for new features
- Update documentation as needed
3. Build and test your changes:
`bash
npm run build
`4. Commit your changes using conventional commit messages:
`bash
git commit -m "feat: add new integration feature"
`5. Push your changes and create a pull request:
`bash
git push origin feature/your-feature-name
`$3
To publish a new version:
1. Update the version in
package.json
2. Run the build:
`bash
npm run build
`
3. Publish to npm:
`bash
npm publish
`Deployment
This package is published to npm and can be deployed using the following steps:
1. Ensure all tests pass and the build is successful
2. Update the version number in
package.json
3. Run the prepublish script:
`bash
npm run prepublish
`
4. Publish to npm:
`bash
npm publish
`$3
This project follows semantic versioning (MAJOR.MINOR.PATCH). Current version: 2.10.2
$3
Key dependencies include:
- aws-sdk (^2.1445.0) - AWS SDK for Node.js
- axios (^1.5.0) - HTTP client
- mongodb (^5.8.1) - MongoDB driver
- typescript (^4.9.5) - TypeScript compiler
- Other utilities: bluebird, crypto-js, cryptr, moment, pino, qs
For the complete list of dependencies, refer to the
package.json` file.