@rsdk/kafka.transport 3.6.1-next.0 → 3.8.1
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.8.1](https://github.com/R-Vision/rsdk/compare/v3.8.0...v3.8.1) (2023-11-16)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **kafka:** settled specify Transport.KAFKA in `EventPattern` decorator ([#160](https://github.com/R-Vision/rsdk/issues/160)) ([c16dff2](https://github.com/R-Vision/rsdk/commit/c16dff2fa3256f2ec7cf3ac09b480064cf6f297f))
|
|
11
|
+
|
|
12
|
+
## [3.6.1](https://github.com/R-Vision/rsdk/compare/v3.6.1-next.1...v3.6.1) (2023-10-24)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @rsdk/kafka.transport
|
|
15
|
+
|
|
6
16
|
## [3.6.1-next.0](https://github.com/R-Vision/rsdk/compare/v3.6.0...v3.6.1-next.0) (2023-10-20)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @rsdk/kafka.transport
|
|
@@ -23,11 +23,6 @@ const KafkaConsumeMetadata = (eventType) => (target) => {
|
|
|
23
23
|
eventType: (0, lodash_1.omit)(eventType, 'toJSON', 'encode', 'decode'),
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
|
-
const Consume = (eventType) =>
|
|
27
|
-
return (target, propertyKey, descriptor) => {
|
|
28
|
-
(0, microservices_1.EventPattern)(eventType)(target, propertyKey, descriptor);
|
|
29
|
-
(0, common_1.applyDecorators)(KafkaConsumeMetadata(eventType))(target, propertyKey, descriptor);
|
|
30
|
-
};
|
|
31
|
-
};
|
|
26
|
+
const Consume = (eventType) => (0, common_1.applyDecorators)((0, microservices_1.EventPattern)(eventType, microservices_1.Transport.KAFKA), KafkaConsumeMetadata(eventType));
|
|
32
27
|
exports.Consume = Consume;
|
|
33
28
|
//# sourceMappingURL=consume.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consume.decorator.js","sourceRoot":"","sources":["../../src/decorators/consume.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"consume.decorator.js","sourceRoot":"","sources":["../../src/decorators/consume.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAiD;AACjD,yDAAgE;AAEhE,qDAI4B;AAC5B,6CAA8C;AAC9C,mCAA8B;AAE9B,MAAM,oBAAoB,GACxB,CAAI,SAAgC,EAAmB,EAAE,CACzD,CAAC,MAAM,EAAE,EAAE;IACT,MAAM,YAAY,GAAG,IAAI,uBAAY,CACnC,MAAM,CAAC,WAAW,EAClB,8CAA+B,CAChC,CAAC;IAEF,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;QACjC,YAAY,CAAC,GAAG,CAAC;YACf,SAAS,EAAE,SAAS;YACpB,IAAI,EAAE,6BAAc,CAAC,OAAO;SAC7B,CAAC,CAAC;QACH,OAAO;KACR;IACD,YAAY,CAAC,GAAG,CAAC;QACf,iBAAiB,EAAE,SAAS,CAAC,kBAAkB;QAC/C,SAAS,EAAE,IAAA,2BAAY,EAAC,SAAS,CAAC;QAClC,KAAK,EAAE,SAAS,CAAC,MAAM;QACvB,IAAI,EAAE,6BAAc,CAAC,OAAO;QAC5B,SAAS,EAAE,IAAA,aAAI,EAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;KACzD,CAAC,CAAC;AACL,CAAC,CAAC;AAEG,MAAM,OAAO,GAAG,CAAI,SAAgC,EAAmB,EAAE,CAC9E,IAAA,wBAAe,EACb,IAAA,4BAAY,EAAC,SAAS,EAAE,yBAAS,CAAC,KAAK,CAAC,EACxC,oBAAoB,CAAC,SAAS,CAAC,CAChC,CAAC;AAJS,QAAA,OAAO,WAIhB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/kafka.transport",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.1",
|
|
4
4
|
"description": "Transport that consumes messages from kafka",
|
|
5
5
|
"license": "Apache License 2.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"peerDependencies": {
|
|
14
14
|
"@nestjs/common": "^10.1.3",
|
|
15
15
|
"@nestjs/microservices": "^10.1.3",
|
|
16
|
-
"@rsdk/core": "^3.6.1
|
|
17
|
-
"@rsdk/kafka.common": "^3.6.1
|
|
16
|
+
"@rsdk/core": "^3.6.1",
|
|
17
|
+
"@rsdk/kafka.common": "^3.6.1",
|
|
18
18
|
"@rsdk/logging": "^3.6.0",
|
|
19
19
|
"@rsdk/metadata": "^3.6.0",
|
|
20
20
|
"kafkajs": "^2.2.4",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"lodash": "^4.17.21"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "f57e9b34a5d9720347c9b7ac92816769e0c5bea4"
|
|
27
27
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { applyDecorators } from '@nestjs/common';
|
|
2
|
-
import { EventPattern } from '@nestjs/microservices';
|
|
2
|
+
import { EventPattern, Transport } from '@nestjs/microservices';
|
|
3
3
|
import type { EventType, KafkaTopicMetadata } from '@rsdk/kafka.common';
|
|
4
4
|
import {
|
|
5
5
|
getTopicName,
|
|
@@ -33,15 +33,8 @@ const KafkaConsumeMetadata =
|
|
|
33
33
|
});
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
export const Consume = <T>(
|
|
37
|
-
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
applyDecorators(KafkaConsumeMetadata(eventType))(
|
|
42
|
-
target,
|
|
43
|
-
propertyKey,
|
|
44
|
-
descriptor,
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
};
|
|
36
|
+
export const Consume = <T>(eventType: EventType<T> | string): MethodDecorator =>
|
|
37
|
+
applyDecorators(
|
|
38
|
+
EventPattern(eventType, Transport.KAFKA),
|
|
39
|
+
KafkaConsumeMetadata(eventType),
|
|
40
|
+
);
|