UNPKG

@opra/nestjs

Version:

Opra NestJS module

57 lines (38 loc) โ€ข 2.25 kB
<div align="center"> <a href="https://oprajs.com"> <img src="https://oprajs.com/img/opra-header-block.webp" width="880" alt="OPRA โ€” Open Platform for Rich APIs" /> </a> # @opra/nestjs Core NestJS integration for the OPRA framework [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![CI Tests][ci-test-image]][ci-test-url] [![Test Coverage][coveralls-image]][coveralls-url] [๐ŸŒ Documentation](https://oprajs.com) ยท [๐Ÿš€ Getting Started](https://oprajs.com/docs/introduction) ยท [๐Ÿ“ฆ Packages](https://github.com/panates/opra#packages) ยท [๐Ÿ’ฌ Issues](https://github.com/panates/opra/issues) </div> --- Core NestJS integration for the [OPRA](https://oprajs.com) framework. Bridges OPRA controllers and NestJS's dependency injection and module system. ## Features - **`RpcControllerFactory`** โ€” Wraps OPRA RPC controllers as NestJS-compatible classes - **`MQControllerFactory`** โ€” NestJS wrapper for OPRA message queue controllers - **`WsControllerFactory`** โ€” NestJS wrapper for OPRA WebSocket controllers - **`RpcParamsFactory`** โ€” Parameter extraction and validation from NestJS execution context - **`@Public()`** โ€” Decorator to mark endpoints as publicly accessible - **`OpraNestUtils`** โ€” Shared utilities for NestJS adapter packages ## Installation ```bash npm install @opra/nestjs ``` > This package is a shared foundation. For transport-specific modules use [`@opra/nestjs-http`](../nestjs-http), [`@opra/nestjs-kafka`](../nestjs-kafka), [`@opra/nestjs-rabbitmq`](../nestjs-rabbitmq), or [`@opra/nestjs-socketio`](../nestjs-socketio). ## Node Compatibility - node >= 20.x ## License Available under [MIT](LICENSE) license. [npm-image]: https://img.shields.io/npm/v/@opra/nestjs [npm-url]: https://npmjs.org/package/@opra/nestjs [downloads-image]: https://img.shields.io/npm/dm/@opra/nestjs.svg [downloads-url]: https://npmjs.org/package/@opra/nestjs [ci-test-image]: https://github.com/panates/opra/actions/workflows/test.yml/badge.svg [ci-test-url]: https://github.com/panates/opra/actions/workflows/test.yml [coveralls-image]: https://coveralls.io/repos/github/panates/opra/badge.svg?branch=main [coveralls-url]: https://coveralls.io/github/panates/opra?branch=main