11.0.0 • Published 1h ago
@mean-stream/nestx
Licence
—
Version
11.0.0
Deps
0
Size
87 kB
Vulns
0
Weekly
0
nestx
nestx is an extension package for NestJS apps.
Installation
$ npm install @mean-stream/nestx
Compatibility
| NestX | NestJS |
|---|---|
| 0.15 | ^10, ^11 |
| 11 | ^11 |
Usage
Nestx provides many standalone modules that can be combined at will.
- Events -
@mean-stream/nestx/event- Simple event gateway and emitter based on NATS. - Errors -
@mean-stream/nestx/error(formerly@mean-stream/nestx/not-found) - Simplified error handling and documentation with Swagger. - Ref -
@mean-stream/nestx/ref- Declare model properties as ObjectIds with support for Swagger, validation and populate. - Resource -
@mean-stream/nestx/resource- Helpers for CRUD services and controllers.
Submodules can be imported individually or all at once:
import {EventModule, NotFound, Ref} from '@mean-stream/nestx';
// or
import {EventModule} from '@mean-stream/nestx/event';
import {NotFound} from '@mean-stream/nestx/not-found';
import {Ref} from '@mean-stream/nestx/ref';
The second form is preferred if you want to avoid some optional dependencies.
Keep in mind that it requires "moduleResolution": "NodeNext" in your tsconfig.json.
Development
Building
Run nx build nestx to build the library.
Running unit tests
Run nx test nestx to execute the unit tests via Jest.