@amqp-contract/worker-nestjs 0.16.0 → 0.17.0
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/docs/index.md +17 -17
- package/package.json +4 -4
package/docs/index.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
### AmqpWorkerModule
|
|
10
10
|
|
|
11
|
-
Defined in: [worker-nestjs/src/worker.module.ts:89](https://github.com/btravers/amqp-contract/blob/
|
|
11
|
+
Defined in: [worker-nestjs/src/worker.module.ts:89](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.module.ts#L89)
|
|
12
12
|
|
|
13
13
|
NestJS module for AMQP worker integration
|
|
14
14
|
This module provides type-safe AMQP worker functionality using @amqp-contract/worker
|
|
@@ -80,7 +80,7 @@ new AmqpWorkerModule(): AmqpWorkerModule;
|
|
|
80
80
|
static forRoot<TContract>(options): DynamicModule;
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
Defined in: [worker-nestjs/src/worker.module.ts:96](https://github.com/btravers/amqp-contract/blob/
|
|
83
|
+
Defined in: [worker-nestjs/src/worker.module.ts:96](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.module.ts#L96)
|
|
84
84
|
|
|
85
85
|
Register the AMQP worker module with synchronous configuration
|
|
86
86
|
|
|
@@ -108,7 +108,7 @@ A dynamic module for NestJS
|
|
|
108
108
|
static forRootAsync<TContract>(options): DynamicModule;
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
Defined in: [worker-nestjs/src/worker.module.ts:118](https://github.com/btravers/amqp-contract/blob/
|
|
111
|
+
Defined in: [worker-nestjs/src/worker.module.ts:118](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.module.ts#L118)
|
|
112
112
|
|
|
113
113
|
Register the AMQP worker module with asynchronous configuration
|
|
114
114
|
|
|
@@ -134,7 +134,7 @@ A dynamic module for NestJS
|
|
|
134
134
|
|
|
135
135
|
### AmqpWorkerService
|
|
136
136
|
|
|
137
|
-
Defined in: [worker-nestjs/src/worker.service.ts:75](https://github.com/btravers/amqp-contract/blob/
|
|
137
|
+
Defined in: [worker-nestjs/src/worker.service.ts:75](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.service.ts#L75)
|
|
138
138
|
|
|
139
139
|
Type-safe AMQP worker service for NestJS applications.
|
|
140
140
|
|
|
@@ -187,7 +187,7 @@ export class AppModule {}
|
|
|
187
187
|
new AmqpWorkerService<TContract>(options): AmqpWorkerService<TContract>;
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
-
Defined in: [worker-nestjs/src/worker.service.ts:80](https://github.com/btravers/amqp-contract/blob/
|
|
190
|
+
Defined in: [worker-nestjs/src/worker.service.ts:80](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.service.ts#L80)
|
|
191
191
|
|
|
192
192
|
###### Parameters
|
|
193
193
|
|
|
@@ -207,7 +207,7 @@ Defined in: [worker-nestjs/src/worker.service.ts:80](https://github.com/btravers
|
|
|
207
207
|
onModuleDestroy(): Promise<void>;
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
-
Defined in: [worker-nestjs/src/worker.service.ts:106](https://github.com/btravers/amqp-contract/blob/
|
|
210
|
+
Defined in: [worker-nestjs/src/worker.service.ts:106](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.service.ts#L106)
|
|
211
211
|
|
|
212
212
|
Close the AMQP worker when the NestJS module is destroyed.
|
|
213
213
|
|
|
@@ -231,7 +231,7 @@ OnModuleDestroy.onModuleDestroy
|
|
|
231
231
|
onModuleInit(): Promise<void>;
|
|
232
232
|
```
|
|
233
233
|
|
|
234
|
-
Defined in: [worker-nestjs/src/worker.service.ts:95](https://github.com/btravers/amqp-contract/blob/
|
|
234
|
+
Defined in: [worker-nestjs/src/worker.service.ts:95](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.service.ts#L95)
|
|
235
235
|
|
|
236
236
|
Initialize the AMQP worker when the NestJS module starts.
|
|
237
237
|
|
|
@@ -262,7 +262,7 @@ OnModuleInit.onModuleInit
|
|
|
262
262
|
type AmqpWorkerModuleAsyncOptions<TContract> = object;
|
|
263
263
|
```
|
|
264
264
|
|
|
265
|
-
Defined in: [worker-nestjs/src/worker.module.ts:22](https://github.com/btravers/amqp-contract/blob/
|
|
265
|
+
Defined in: [worker-nestjs/src/worker.module.ts:22](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.module.ts#L22)
|
|
266
266
|
|
|
267
267
|
Options for async module configuration using factory pattern
|
|
268
268
|
|
|
@@ -276,9 +276,9 @@ Options for async module configuration using factory pattern
|
|
|
276
276
|
|
|
277
277
|
| Property | Type | Description | Defined in |
|
|
278
278
|
| ------ | ------ | ------ | ------ |
|
|
279
|
-
| <a id="imports"></a> `imports?` | `ModuleMetadata`\[`"imports"`\] | Optional list of imported modules that export providers needed by the factory | [worker-nestjs/src/worker.module.ts:37](https://github.com/btravers/amqp-contract/blob/
|
|
280
|
-
| <a id="inject"></a> `inject?` | (`string` \| `symbol` \| `Type`<`unknown`>)[] | Optional dependencies to inject into the factory function. Can be a token (string/symbol) a class or a reference to a provider. | [worker-nestjs/src/worker.module.ts:33](https://github.com/btravers/amqp-contract/blob/
|
|
281
|
-
| <a id="usefactory"></a> `useFactory` | (...`args`) => `AmqpWorkerModuleOptionsFactory`<`TContract`> | Factory function that returns the module options. Can use injected dependencies to create configuration. | [worker-nestjs/src/worker.module.ts:28](https://github.com/btravers/amqp-contract/blob/
|
|
279
|
+
| <a id="imports"></a> `imports?` | `ModuleMetadata`\[`"imports"`\] | Optional list of imported modules that export providers needed by the factory | [worker-nestjs/src/worker.module.ts:37](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.module.ts#L37) |
|
|
280
|
+
| <a id="inject"></a> `inject?` | (`string` \| `symbol` \| `Type`<`unknown`>)[] | Optional dependencies to inject into the factory function. Can be a token (string/symbol) a class or a reference to a provider. | [worker-nestjs/src/worker.module.ts:33](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.module.ts#L33) |
|
|
281
|
+
| <a id="usefactory"></a> `useFactory` | (...`args`) => `AmqpWorkerModuleOptionsFactory`<`TContract`> | Factory function that returns the module options. Can use injected dependencies to create configuration. | [worker-nestjs/src/worker.module.ts:28](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.module.ts#L28) |
|
|
282
282
|
|
|
283
283
|
***
|
|
284
284
|
|
|
@@ -288,7 +288,7 @@ Options for async module configuration using factory pattern
|
|
|
288
288
|
type AmqpWorkerModuleOptions<TContract> = object;
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
Defined in: [worker-nestjs/src/worker.service.ts:29](https://github.com/btravers/amqp-contract/blob/
|
|
291
|
+
Defined in: [worker-nestjs/src/worker.service.ts:29](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.service.ts#L29)
|
|
292
292
|
|
|
293
293
|
Configuration options for the AMQP worker NestJS module.
|
|
294
294
|
|
|
@@ -320,10 +320,10 @@ const options: AmqpWorkerModuleOptions<typeof contract> = {
|
|
|
320
320
|
|
|
321
321
|
| Property | Type | Description | Defined in |
|
|
322
322
|
| ------ | ------ | ------ | ------ |
|
|
323
|
-
| <a id="connectionoptions"></a> `connectionOptions?` | `AmqpConnectionManagerOptions` | Optional connection configuration (heartbeat, reconnect settings, etc.) | [worker-nestjs/src/worker.service.ts:37](https://github.com/btravers/amqp-contract/blob/
|
|
324
|
-
| <a id="contract"></a> `contract` | `TContract` | The AMQP contract definition specifying consumers and their message schemas | [worker-nestjs/src/worker.service.ts:31](https://github.com/btravers/amqp-contract/blob/
|
|
325
|
-
| <a id="handlers"></a> `handlers` | [`WorkerInferSafeConsumerHandlers`](#workerinfersafeconsumerhandlers)<`TContract`> | Message handlers for each consumer defined in the contract. Use defineHandlers to create type-safe handlers. | [worker-nestjs/src/worker.service.ts:33](https://github.com/btravers/amqp-contract/blob/
|
|
326
|
-
| <a id="urls"></a> `urls` | `ConnectionUrl`[] | AMQP broker URL(s). Multiple URLs provide failover support | [worker-nestjs/src/worker.service.ts:35](https://github.com/btravers/amqp-contract/blob/
|
|
323
|
+
| <a id="connectionoptions"></a> `connectionOptions?` | `AmqpConnectionManagerOptions` | Optional connection configuration (heartbeat, reconnect settings, etc.) | [worker-nestjs/src/worker.service.ts:37](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.service.ts#L37) |
|
|
324
|
+
| <a id="contract"></a> `contract` | `TContract` | The AMQP contract definition specifying consumers and their message schemas | [worker-nestjs/src/worker.service.ts:31](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.service.ts#L31) |
|
|
325
|
+
| <a id="handlers"></a> `handlers` | [`WorkerInferSafeConsumerHandlers`](#workerinfersafeconsumerhandlers)<`TContract`> | Message handlers for each consumer defined in the contract. Use defineHandlers to create type-safe handlers. | [worker-nestjs/src/worker.service.ts:33](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.service.ts#L33) |
|
|
326
|
+
| <a id="urls"></a> `urls` | `ConnectionUrl`[] | AMQP broker URL(s). Multiple URLs provide failover support | [worker-nestjs/src/worker.service.ts:35](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.service.ts#L35) |
|
|
327
327
|
|
|
328
328
|
***
|
|
329
329
|
|
|
@@ -353,7 +353,7 @@ Use `WorkerInferConsumerHandlers` instead. Will be removed in next major version
|
|
|
353
353
|
const MODULE_OPTIONS_TOKEN: typeof MODULE_OPTIONS_TOKEN;
|
|
354
354
|
```
|
|
355
355
|
|
|
356
|
-
Defined in: [worker-nestjs/src/worker.module-definition.ts:5](https://github.com/btravers/amqp-contract/blob/
|
|
356
|
+
Defined in: [worker-nestjs/src/worker.module-definition.ts:5](https://github.com/btravers/amqp-contract/blob/5f68ac0e7a01403c51ddebd327d65b70384c2e2f/packages/worker-nestjs/src/worker.module-definition.ts#L5)
|
|
357
357
|
|
|
358
358
|
Injection token for AMQP worker module options
|
|
359
359
|
Used by NestJS DI system to inject configuration into AmqpWorkerService
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amqp-contract/worker-nestjs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "NestJS integration for @amqp-contract/worker",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"amqp",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"docs"
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@amqp-contract/contract": "0.
|
|
56
|
-
"@amqp-contract/worker": "0.
|
|
55
|
+
"@amqp-contract/contract": "0.17.0",
|
|
56
|
+
"@amqp-contract/worker": "0.17.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@nestjs/common": "11.1.13",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"typescript": "5.9.3",
|
|
73
73
|
"vitest": "4.0.18",
|
|
74
74
|
"zod": "4.3.6",
|
|
75
|
-
"@amqp-contract/testing": "0.
|
|
75
|
+
"@amqp-contract/testing": "0.17.0",
|
|
76
76
|
"@amqp-contract/tsconfig": "0.1.0",
|
|
77
77
|
"@amqp-contract/typedoc": "0.1.0"
|
|
78
78
|
},
|