@opra/nestjs-rabbitmq 1.26.3 → 1.26.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,26 @@
1
- # OPRA
1
+ # @opra/nestjs-rabbitmq
2
2
 
3
- Open Protocol for Restful Api
3
+ [![NPM Version][npm-image]][npm-url]
4
+ [![NPM Downloads][downloads-image]][downloads-url]
5
+ [![CI Tests][ci-test-image]][ci-test-url]
6
+ [![Test Coverage][coveralls-image]][coveralls-url]
7
+
8
+
9
+ ## Support
10
+ You can report bugs and discuss features on the [GitHub issues](https://github.com/panates/opra/issues) page.
11
+
12
+ ## Node Compatibility
13
+ - node >= 20.x
14
+
15
+
16
+ ## License
17
+ Available under [MIT](LICENSE) license.
18
+
19
+ [npm-image]: https://img.shields.io/npm/v/@opra/nestjs-rabbitmq
20
+ [npm-url]: https://npmjs.org/package/@opra/nestjs-rabbitmq
21
+ [downloads-image]: https://img.shields.io/npm/dm/@opra/nestjs-rabbitmq.svg
22
+ [downloads-url]: https://npmjs.org/package/@opra/nestjs-rabbitmq
23
+ [ci-test-image]: https://github.com/panates/opra/actions/workflows/test.yml/badge.svg
24
+ [ci-test-url]: https://github.com/panates/opra/actions/workflows/test.yml
25
+ [coveralls-image]: https://coveralls.io/repos/github/panates/opra/badge.svg?branch=main
26
+ [coveralls-url]: https://coveralls.io/github/panates/opra?branch=main
@@ -2,36 +2,68 @@ import { type DynamicModule, Logger, type Type } from '@nestjs/common';
2
2
  import type { ApiDocumentFactory } from '@opra/common';
3
3
  import type { RabbitmqAdapter } from '@opra/rabbitmq';
4
4
  export declare namespace OpraRabbitmqModule {
5
+ /**
6
+ * Synchronous configuration options for OpraRabbitmqModule.
7
+ */
5
8
  export interface ModuleOptions extends BaseModuleOptions, ApiConfig {
6
9
  }
10
+ /**
11
+ * Asynchronous configuration options for OpraRabbitmqModule.
12
+ */
7
13
  export interface AsyncModuleOptions extends BaseModuleOptions {
14
+ /** Providers to be injected into the factory function */
8
15
  inject?: any[];
16
+ /** Factory function that returns the ApiConfig object asynchronously */
9
17
  useFactory?: (...args: any[]) => Promise<ApiConfig> | ApiConfig;
10
18
  }
19
+ /**
20
+ * Base configuration options for the module.
21
+ */
11
22
  interface BaseModuleOptions extends Pick<DynamicModule, 'imports' | 'providers' | 'exports' | 'controllers' | 'global'> {
23
+ /** Module ID */
12
24
  id?: any;
25
+ /** Interceptor list for the RabbitMQ adapter */
13
26
  interceptors?: (RabbitmqAdapter.InterceptorFunction | RabbitmqAdapter.IRabbitmqInterceptor | Type<RabbitmqAdapter.IRabbitmqInterceptor>)[];
14
27
  }
28
+ /**
29
+ * OPRA RabbitMQ API configuration details.
30
+ */
15
31
  export interface ApiConfig extends Pick<ApiDocumentFactory.InitArguments, 'types' | 'references' | 'info'> {
32
+ /** RabbitMQ connection configuration */
16
33
  connection?: RabbitmqAdapter.Config['connection'];
34
+ /** Extra logging configuration */
17
35
  logExtra?: RabbitmqAdapter.Config['logExtra'];
36
+ /** Default settings */
18
37
  defaults?: RabbitmqAdapter.Config['defaults'];
38
+ /** API name */
19
39
  name: string;
40
+ /** API description */
20
41
  description?: string;
42
+ /** API scope */
21
43
  scope?: string;
44
+ /** Logger to be used */
22
45
  logger?: Logger;
23
46
  }
24
47
  export {};
25
48
  }
49
+ /**
50
+ * OpraRabbitmqModule
51
+ *
52
+ * Module that integrates OPRA RabbitMQ support into the NestJS application.
53
+ */
26
54
  export declare class OpraRabbitmqModule {
27
55
  /**
56
+ * Configures the module synchronously and imports it at the root level.
28
57
  *
29
- * @param options
58
+ * @param options - Module configuration options.
59
+ * @returns {DynamicModule} NestJS dynamic module.
30
60
  */
31
61
  static forRoot(options: OpraRabbitmqModule.ModuleOptions): DynamicModule;
32
62
  /**
63
+ * Configures the module asynchronously and imports it at the root level.
33
64
  *
34
- * @param options
65
+ * @param options - Asynchronous module configuration options.
66
+ * @returns {DynamicModule} NestJS dynamic module.
35
67
  */
36
68
  static forRootAsync(options: OpraRabbitmqModule.AsyncModuleOptions): DynamicModule;
37
69
  }
@@ -2,10 +2,17 @@ var OpraRabbitmqModule_1;
2
2
  import { __decorate } from "tslib";
3
3
  import { Module } from '@nestjs/common';
4
4
  import { OpraRabbitmqCoreModule } from './opra-rabbitmq-core.module.js';
5
+ /**
6
+ * OpraRabbitmqModule
7
+ *
8
+ * Module that integrates OPRA RabbitMQ support into the NestJS application.
9
+ */
5
10
  let OpraRabbitmqModule = OpraRabbitmqModule_1 = class OpraRabbitmqModule {
6
11
  /**
12
+ * Configures the module synchronously and imports it at the root level.
7
13
  *
8
- * @param options
14
+ * @param options - Module configuration options.
15
+ * @returns {DynamicModule} NestJS dynamic module.
9
16
  */
10
17
  static forRoot(options) {
11
18
  return {
@@ -14,8 +21,10 @@ let OpraRabbitmqModule = OpraRabbitmqModule_1 = class OpraRabbitmqModule {
14
21
  };
15
22
  }
16
23
  /**
24
+ * Configures the module asynchronously and imports it at the root level.
17
25
  *
18
- * @param options
26
+ * @param options - Asynchronous module configuration options.
27
+ * @returns {DynamicModule} NestJS dynamic module.
19
28
  */
20
29
  static forRootAsync(options) {
21
30
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opra/nestjs-rabbitmq",
3
- "version": "1.26.3",
3
+ "version": "1.26.4",
4
4
  "description": "Opra NestJS RabbitMQ Module",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
@@ -9,10 +9,10 @@
9
9
  "tslib": "^2.8.1"
10
10
  },
11
11
  "peerDependencies": {
12
- "@opra/common": "^1.26.3",
13
- "@opra/core": "^1.26.3",
14
- "@opra/nestjs": "^1.26.3",
15
- "@opra/rabbitmq": "^1.26.3",
12
+ "@opra/common": "^1.26.4",
13
+ "@opra/core": "^1.26.4",
14
+ "@opra/nestjs": "^1.26.4",
15
+ "@opra/rabbitmq": "^1.26.4",
16
16
  "@nestjs/common": "^10.0.0 || ^11.0.0",
17
17
  "@nestjs/core": "^10.0.0 || ^11.0.0",
18
18
  "@nestjs/microservices": "^10.0.0 || ^11.0.0",