open-index/open-npm huggingface dataset:
npm package: @neohelden/commons-nestjs-server-transactional
Description: This module provides a database-agnostic transactional service for NestJS applications. The transactional service is build in a way, that any underlying database or transaction-supporting service can be used.
Author: msg systems ag
Latest version: 1.1.0

# neohelden-commons-nestjs-server-transactional

This module provides a database-agnostic transactional service for NestJS applications.
The transactional service is build in a way, that any underlying database or transaction-supporting service can be used.

## Transaction Bundle

The decisions are available to the Application using decorators.
An example to load the module with TypeORM is:

```typescript
import {
  TransactionHelper,
  Transactional,
  ReplicationMode,
} from "@neohelden/nestjs-server-transactional";

class BookService {
  @Transactional({ replicationMode: ReplicationMode.MASTER })
  async save(book: Book): Promise<Book> {
    repository.save(book);
    return book;
  }
}

class Repository {
  constructor(private readonly helper: TransactionHelper) {}

  @Transactional()
  async save(book: Book): Promise<Book> {
    return helper.transaction(async (dataManager) => {
      dataManager.save(book);
    });
  }
}
```

## Configuration

The configuration of this module is accomplished using NestJS Dynamic modules.
Therefore import the `TransactionModule` in your `AppModule` and provide the configuration.

Example:

```typescript
TransactionModule.forRoot({
  getDataManager: async (replicationMode: ReplicationMode) => {
    // Here you can return a DataManager instance based on the replication mode
    // For example, you might return a master DataManager for MASTER mode
    return new DataManager();
  },
});
```

# Replication Mode

Databases usually support a replication feature. In this system, an operation can either be directed torward a master or a slave database.
This module makes loose assumptions about the underlying database and its replication capabilities.
Therefore, the `ReplicationMode` enum is used to indicate the desired replication mode for a transaction.
The available modes are:

- `MASTER`: The transaction will be executed on the master database. If not specified, this is the default mode.
- `SLAVE`: The transaction will be executed on a slave database.
npm package: @neoimpulse/cap-js-notifications
Description: A CDS plugin to provide an easy action for the notification service
Author: Neoimpulse GmbH
Latest version: 1.0.9

# CAP JS Notifications

## Overview

CAP JS Notifications is a CDS plugin designed to provide an easy action for the notification service. It supports sending notifications to different destinations based on the environment configuration.

**Note:** This project is a copy of the [cap-js/notifications](https://github.com/cap-js/notifications) repository. Please refer to the original repository for more details.

## Features

- Send notifications to REST endpoints or console based on the environment.
- Validate and process notification types.
- Deploy notification types to the notification service.
- Customizable notification templates.

## Installation

To install the dependencies, run:

```bash
npm install
```

## Usage

### Configuration

The plugin configuration is defined in the `package.json` file under the `cds.requires.notifications` section. It includes settings for different environments, notification types, and destinations.

### Notification Types

Notification types are defined in the `srv/notification-types.json` file. Each notification type includes templates for different languages and versions.

### Running the Plugin

To run the plugin, use the following command:

```bash
cds run
```

### Building the Project

To build the project, use the following command:

```bash
cds build
```

### Releasing the Project

The release process is automated using GitHub Actions. The configuration is defined in the `.github/workflows/release.yml` file.

## License

This project is licensed under the Apache License 2.0. See the [LICENSE](./LICENSE) file for more details.

## Contributing

Contributions are welcome! Please read the [CONTRIBUTING](./CONTRIBUTING.md) guidelines before submitting a pull request.

## Contact

For any questions or issues, please contact the author at Neoimpulse GmbH.