@restorecommerce/kafka-client 0.2.18 → 0.2.23
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,52 @@
|
|
|
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
|
+
## [0.2.23](https://github.com/restorecommerce/kafka-client/compare/@restorecommerce/kafka-client@0.2.22...@restorecommerce/kafka-client@0.2.23) (2021-09-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @restorecommerce/kafka-client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.2.22](https://github.com/restorecommerce/kafka-client/compare/@restorecommerce/kafka-client@0.2.21...@restorecommerce/kafka-client@0.2.22) (2021-09-13)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **kafka-client:** rename bufferFields to omittedFields config ([d4678da](https://github.com/restorecommerce/kafka-client/commit/d4678dad1d782724004929116d5770b993b057c6))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [0.2.21](https://github.com/restorecommerce/kafka-client/compare/@restorecommerce/kafka-client@0.2.20...@restorecommerce/kafka-client@0.2.21) (2021-09-09)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @restorecommerce/kafka-client
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [0.2.20](https://github.com/restorecommerce/kafka-client/compare/@restorecommerce/kafka-client@0.2.19...@restorecommerce/kafka-client@0.2.20) (2021-09-09)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @restorecommerce/kafka-client
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## [0.2.19](https://github.com/restorecommerce/kafka-client/compare/@restorecommerce/kafka-client@0.2.18...@restorecommerce/kafka-client@0.2.19) (2021-08-23)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* **version:** up version to be in sync in package-lock ([b8f22c1](https://github.com/restorecommerce/kafka-client/commit/b8f22c1268ee2af4beff7d88bda30f197896e3d2))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
6
52
|
## [0.2.18](https://github.com/restorecommerce/kafka-client/compare/@restorecommerce/kafka-client@0.2.17...@restorecommerce/kafka-client@0.2.18) (2021-08-10)
|
|
7
53
|
|
|
8
54
|
|
|
@@ -597,9 +597,9 @@ class Kafka {
|
|
|
597
597
|
});
|
|
598
598
|
}
|
|
599
599
|
for (let msg of messages) {
|
|
600
|
-
if (this.config && this.config[eventName].
|
|
601
|
-
const keys = this.config[eventName].
|
|
602
|
-
this.
|
|
600
|
+
if (this.config && this.config[eventName].omittedFields) {
|
|
601
|
+
const keys = this.config[eventName].omittedFields;
|
|
602
|
+
this.omitFields(keys, msg, this.config[eventName].enableLogging);
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
this.logger.debug(`Sending event ${eventName} to topic ${topicName}`, { messages });
|
|
@@ -624,7 +624,7 @@ class Kafka {
|
|
|
624
624
|
}
|
|
625
625
|
});
|
|
626
626
|
}
|
|
627
|
-
|
|
627
|
+
omitFields(keys, msg, enableLogging) {
|
|
628
628
|
let msgs;
|
|
629
629
|
if (!_.isArray(msg)) {
|
|
630
630
|
msgs = [msg];
|
|
@@ -649,7 +649,7 @@ class Kafka {
|
|
|
649
649
|
}
|
|
650
650
|
else if (typeof key === 'object') {
|
|
651
651
|
const prefixKey = Object.keys(key)[0];
|
|
652
|
-
this.
|
|
652
|
+
this.omitFields(key[prefixKey], msg[prefixKey], enableLogging);
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restorecommerce/kafka-client",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.23",
|
|
4
4
|
"description": "Opinionated Kafka Client for Microservices",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"author": "Invend GmbH",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"typings": "lib/index.d.ts",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@restorecommerce/logger": "^0.10.
|
|
20
|
+
"@restorecommerce/logger": "^0.10.8",
|
|
21
21
|
"async": "^3.2.0",
|
|
22
22
|
"cls-rtracer": "^2.5.1",
|
|
23
23
|
"events": "^3.3.0",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">= 12.0.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "51e9a18661c573b93fb0901bcab6fda4575c2297"
|
|
66
66
|
}
|