@itentialopensource/adapter-kafkav2 0.22.6 → 0.23.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/CHANGELOG.md CHANGED
@@ -1,4 +1,20 @@
1
1
 
2
+ ## 0.23.0 [09-19-2024]
3
+
4
+ * switching dependencies
5
+
6
+ See merge request itentialopensource/adapters/adapter-kafkav2!31
7
+
8
+ ---
9
+
10
+ ## 0.22.7 [08-30-2024]
11
+
12
+ * update dependencies and metadata
13
+
14
+ See merge request itentialopensource/adapters/adapter-kafkav2!30
15
+
16
+ ---
17
+
2
18
  ## 0.22.6 [08-14-2024]
3
19
 
4
20
  * Changes made at 2024.08.14_17:49PM
package/adapter.js CHANGED
@@ -22,7 +22,7 @@ const util = require('util');
22
22
  const AdapterBaseCl = require(path.join(__dirname, 'adapterBase.js'));
23
23
  const DBUtil = require(path.join(__dirname, 'utils', 'dbUtil.js'));
24
24
 
25
- const request = require('request');
25
+ const axios = require('axios');
26
26
 
27
27
  let needRestart = false;
28
28
 
@@ -66,6 +66,7 @@ async function fetchSchema(registryUrl, topic, version) {
66
66
  return new Promise((resolve, reject) => {
67
67
  log.debug(`${registryUrl}/subjects/${topic}/versions/${version}`);
68
68
  try {
69
+ /*
69
70
  request(
70
71
  `${registryUrl}/subjects/${topic}/versions/${version}`,
71
72
  (err, res, body) => {
@@ -99,6 +100,41 @@ async function fetchSchema(registryUrl, topic, version) {
99
100
  return resolve(JSON.parse(body));
100
101
  }
101
102
  );
103
+ */
104
+ axios({
105
+ method: 'get',
106
+ url: `${registryUrl}/subjects/${topic}/versions/${version}`
107
+ })
108
+ .then((response) => {
109
+ if (!response || !response.statusCode || response.statusCode !== 200) {
110
+ log.debug('schema fetch - Evaluating error response');
111
+ return reject(
112
+ new Error(
113
+ 'Schema registry error: Did not receive a valid status code'
114
+ )
115
+ );
116
+ }
117
+ // this is the schema response
118
+ log.debug('returning schema response');
119
+ return resolve(JSON.parse(response));
120
+ })
121
+ .catch((error) => {
122
+ log.debug('schema fetch - evaluating error');
123
+ try {
124
+ const errorObj = JSON.parse(error);
125
+ return reject(
126
+ new Error(
127
+ `Schema registry error: ${errorObj.error_code} - ${errorObj.message}`
128
+ )
129
+ );
130
+ } catch (ex) {
131
+ return reject(
132
+ new Error(
133
+ `Schema registry error: ${error}`
134
+ )
135
+ );
136
+ }
137
+ });
102
138
  } catch (e) {
103
139
  log.error(`error sending request: ${e} \n${e.stack}`);
104
140
  return reject(e);
package/metadata.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "adapter-kafkav2",
3
3
  "webName": "Adapter for Integration to Kafka using kafkajs",
4
+ "supportLevel": "community",
4
5
  "vendor": "Kafka",
5
6
  "product": "Kafka v2",
7
+ "techAlliance": false,
6
8
  "osVersion": [],
7
9
  "apiVersions": [],
8
10
  "iapVersions": [
@@ -38,7 +40,7 @@
38
40
  "storeLink": "",
39
41
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-kafkav2",
40
42
  "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-kafkav2",
41
- "docLink": "",
43
+ "docLink": "https://gitlab.com/itentialopensource/adapters/adapter-kafkav2/-/blob/master/README.md?ref_type=heads",
42
44
  "demoLinks": [],
43
45
  "trainingLinks": [
44
46
  {
@@ -49,7 +51,7 @@
49
51
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
50
52
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
51
53
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
52
- "webLink": "",
54
+ "webLink": "https://www.itential.com/adapters/kafka-v2/",
53
55
  "vendorLink": "https://kafka.apache.org/",
54
56
  "productLink": "https://kafka.apache.org/",
55
57
  "apiLinks": [
@@ -100,7 +102,5 @@
100
102
  ],
101
103
  "transformationProjects": [],
102
104
  "exampleProjects": []
103
- },
104
- "supportLevel": "community",
105
- "techAlliance": false
105
+ }
106
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-kafkav2",
3
- "version": "0.22.6",
3
+ "version": "0.23.0",
4
4
  "description": "Itential adapter to connect to kafka",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.35.0",
@@ -46,13 +46,12 @@
46
46
  "ajv": "^8.17.1",
47
47
  "avro-schema-registry": "^2.1.0",
48
48
  "avsc": "^5.4.21",
49
+ "axios": "^1.7.4",
49
50
  "fs-extra": "^11.2.0",
50
51
  "json-query": "^2.2.2",
51
52
  "kafkajs": "2.2.3",
52
53
  "mongodb": "^6.2.0",
53
- "patch-package": "^6.4.7",
54
54
  "readline-sync": "^1.4.10",
55
- "request": "^2.88.2",
56
55
  "uuid": "^3.0.1"
57
56
  },
58
57
  "devDependencies": {
Binary file
@@ -1,9 +0,0 @@
1
- {
2
- "ComplianceEntries": [
3
- {
4
- "name": "Compliance Summary",
5
- "numInvalidProjects": 0,
6
- "numValidProjects": 0
7
- }
8
- ]
9
- }
@@ -1,5 +0,0 @@
1
- ---------------------------------------------------------------------------------------------
2
- **** Project Compliance Summary ****
3
- 0 project(s) are not valid
4
- 0 project(s) are valid
5
- ---------------------------------------------------------------------------------------------