@itentialopensource/adapter-gogetssl 0.7.1 → 0.9.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,12 @@
1
1
 
2
+ ## 0.9.0 [02-13-2026]
3
+
4
+ * minor/auto-migrate/20260213-111527
5
+
6
+ See merge request itentialopensource/adapters/adapter-gogetssl!28
7
+
8
+ ---
9
+
2
10
  ## 0.4.4 [10-15-2024]
3
11
 
4
12
  * Changes made at 2024.10.14_20:14PM
package/PROPERTIES.md CHANGED
@@ -54,7 +54,8 @@ This section defines **all** the properties that are available for the adapter,
54
54
  "healthcheck_on_timeout": false,
55
55
  "return_raw": false,
56
56
  "archiving": false,
57
- "return_request": false
57
+ "return_request": false,
58
+ "keep_alive_interval": 0
58
59
  },
59
60
  "ssl": {
60
61
  "ecdhCurve": "",
@@ -403,6 +404,10 @@ The request section defines properties to help handle requests.
403
404
  <td style="padding:15px">return_request</td>
404
405
  <td style="padding:15px">Optional flag. Default is false. Will return the actual request that is made including headers. This should only be used during debugging issues as there could be credentials in the actual request.</td>
405
406
  </tr>
407
+ <tr>
408
+ <td style="padding:15px">keep_alive_interval</td>
409
+ <td style="padding:15px">Optional. TCP keep-alive interval in seconds for long-lived connections. Set to 0 to disable keep-alive (default). When enabled, minimum value is 30 seconds.</td>
410
+ </tr>
406
411
  </table>
407
412
  <br>
408
413
 
package/TAB2.md CHANGED
@@ -138,7 +138,8 @@ Sample Properties can be used to help you configure the adapter in the Itential
138
138
  "healthcheck_on_timeout": true,
139
139
  "return_raw": false,
140
140
  "archiving": false,
141
- "return_request": false
141
+ "return_request": false,
142
+ "keep_alive_interval": 0
142
143
  },
143
144
  "proxy": {
144
145
  "enabled": false,
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-gogetssl",
3
- "version": "0.7.1",
3
+ "version": "0.9.0",
4
4
  "description": "This adapter integrates with system described as: gogetsslApi(v1)Documentation.",
5
5
  "main": "adapter.js",
6
- "wizardVersion": "3.8.0",
7
- "engineVersion": "1.79.2",
6
+ "wizardVersion": "3.12.1",
7
+ "engineVersion": "1.82.5",
8
8
  "adapterType": "http",
9
9
  "scripts": {
10
10
  "preinstall": "node utils/setup.js",
@@ -37,8 +37,8 @@
37
37
  ],
38
38
  "license": "Apache-2.0",
39
39
  "engines": {
40
- "node": ">= 14.0.0",
41
- "npm": ">= 6.0.0"
40
+ "node": ">= 18.18.0",
41
+ "npm": ">= 9.8.1"
42
42
  },
43
43
  "repository": {
44
44
  "type": "git",
@@ -47,14 +47,14 @@
47
47
  "author": "Itential",
48
48
  "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-gogetssl#readme",
49
49
  "dependencies": {
50
- "@itentialopensource/adapter-utils": "6.0.3",
50
+ "@itentialopensource/adapter-utils": "6.1.14",
51
51
  "acorn": "8.14.1",
52
52
  "ajv": "8.17.1",
53
- "axios": "1.12.2",
53
+ "axios": "1.13.5",
54
54
  "commander": "11.1.0",
55
55
  "fs-extra": "11.3.0",
56
56
  "json-query": "2.2.2",
57
- "mocha": "10.8.2",
57
+ "mocha": "11.3.0",
58
58
  "mocha-param": "2.0.1",
59
59
  "mongodb": "4.17.2",
60
60
  "ping": "0.4.4",
@@ -66,7 +66,7 @@
66
66
  "boolean",
67
67
  "string"
68
68
  ],
69
- "description": "When true the metrics collected by the adapter will be stored in mongo or on the filesystem",
69
+ "description": "When true the metrics collected by the adapter will be stored in mongo or in the adapter. If a full path is provided, metrics will be saved in the path provided.",
70
70
  "default": false
71
71
  },
72
72
  "stub": {
@@ -460,7 +460,7 @@
460
460
  "type": "integer",
461
461
  "description": "How often the healthcheck should run (in milliseconds).",
462
462
  "default": 300000,
463
- "minimum": 60000,
463
+ "minimum": 30000,
464
464
  "maximum": 3600000
465
465
  },
466
466
  "protocol": {
@@ -695,6 +695,13 @@
695
695
  "type": "boolean",
696
696
  "description": "This property turns on returning the response information - need to be carefull in case credentials are in the path",
697
697
  "default": false
698
+ },
699
+ "keep_alive_interval": {
700
+ "type": "integer",
701
+ "description": "TCP keep-alive interval in milliseconds to prevent connection timeout during long-running requests. 0 = disabled (default). Minimum value when enabled is 30000ms (30 seconds). Values below 30000ms will be auto-corrected to 30000ms with a warning.",
702
+ "default": 0,
703
+ "minimum": 0,
704
+ "maximum": 3600000
698
705
  }
699
706
  },
700
707
  "required": [
@@ -1106,7 +1113,7 @@
1106
1113
  },
1107
1114
  "requestFields": {
1108
1115
  "type": "object",
1109
- "description": "The json object with response fields of the call to getDevice",
1116
+ "description": "The json object with request fields of the call to getDevice",
1110
1117
  "additionalProperties": {
1111
1118
  "type": [
1112
1119
  "string",
@@ -1249,7 +1256,7 @@
1249
1256
  },
1250
1257
  "requestFields": {
1251
1258
  "type": "object",
1252
- "description": "The json object with response fields of the call to getDevice",
1259
+ "description": "The json object with request fields of the call to getDevice",
1253
1260
  "additionalProperties": {
1254
1261
  "type": [
1255
1262
  "string",
@@ -1360,7 +1367,7 @@
1360
1367
  },
1361
1368
  "requestFields": {
1362
1369
  "type": "object",
1363
- "description": "The json object with response fields of the call to getDevice",
1370
+ "description": "The json object with request fields of the call to getDevice",
1364
1371
  "additionalProperties": {
1365
1372
  "type": [
1366
1373
  "string",
@@ -1456,7 +1463,7 @@
1456
1463
  },
1457
1464
  "requestFields": {
1458
1465
  "type": "object",
1459
- "description": "The json object with response fields of the call to getDevice",
1466
+ "description": "The json object with request fields of the call to getDevice",
1460
1467
  "additionalProperties": {
1461
1468
  "type": [
1462
1469
  "string",
@@ -1541,7 +1548,7 @@
1541
1548
  },
1542
1549
  "requestFields": {
1543
1550
  "type": "object",
1544
- "description": "The json object with response fields of the call to getDevice",
1551
+ "description": "The json object with request fields of the call to getDevice",
1545
1552
  "additionalProperties": {
1546
1553
  "type": [
1547
1554
  "string",
@@ -1624,12 +1631,12 @@
1624
1631
  "properties": {
1625
1632
  "path": {
1626
1633
  "type": "string",
1627
- "description": "The fully qualified path of the call to getDevice (e.g. /rest/api/device/{deviceid})",
1634
+ "description": "The fully qualified path of the call to populate the cache (e.g. /rest/api/devices)",
1628
1635
  "default": ""
1629
1636
  },
1630
1637
  "method": {
1631
1638
  "type": "string",
1632
- "description": "The method of the call to getDevice",
1639
+ "description": "The method of the call to populate the cache",
1633
1640
  "default": "GET"
1634
1641
  },
1635
1642
  "pagination": {
@@ -1666,7 +1673,7 @@
1666
1673
  },
1667
1674
  "query": {
1668
1675
  "type": "object",
1669
- "description": "The json object with query parameters of the call to getDevice",
1676
+ "description": "The json object with query parameters of the call to populate the cache",
1670
1677
  "additionalProperties": {
1671
1678
  "type": [
1672
1679
  "string",
@@ -1676,7 +1683,7 @@
1676
1683
  },
1677
1684
  "body": {
1678
1685
  "type": "object",
1679
- "description": "The json object with body of the call to getDevice",
1686
+ "description": "The json object with body of the call to populate the cache",
1680
1687
  "additionalProperties": {
1681
1688
  "type": [
1682
1689
  "string",
@@ -1686,7 +1693,7 @@
1686
1693
  },
1687
1694
  "headers": {
1688
1695
  "type": "object",
1689
- "description": "The json object with headers of the call to getDevice",
1696
+ "description": "The json object with headers of the call to populate the cache",
1690
1697
  "additionalProperties": {
1691
1698
  "type": [
1692
1699
  "string",
@@ -1705,7 +1712,7 @@
1705
1712
  },
1706
1713
  "requestFields": {
1707
1714
  "type": "object",
1708
- "description": "The json object with response fields of the call to getDevice",
1715
+ "description": "The json object with request fields of the call to populate the cache",
1709
1716
  "additionalProperties": {
1710
1717
  "type": [
1711
1718
  "string",
@@ -1721,7 +1728,7 @@
1721
1728
  },
1722
1729
  "responseFields": {
1723
1730
  "type": "object",
1724
- "description": "The json object with response fields of the call to getDevice",
1731
+ "description": "The json object with response fields of the call to populate the cache",
1725
1732
  "additionalProperties": {
1726
1733
  "type": [
1727
1734
  "string",
@@ -1762,4 +1769,4 @@
1762
1769
  }
1763
1770
  }
1764
1771
  }
1765
- }
1772
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 0
8
+ },
9
+ {
10
+ "owner": "errorJson",
11
+ "description": "Adapter errors no longer available for use",
12
+ "value": 0
13
+ },
14
+ {
15
+ "owner": "errorJson",
16
+ "description": "Adapter errors that have been updated (e.g. recommendation changes)",
17
+ "value": 31
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 15
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 6
28
+ },
29
+ {
30
+ "owner": "packageJson",
31
+ "description": "Number of npm scripts",
32
+ "value": 17
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "6.1.7"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 83
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 345
48
+ },
49
+ {
50
+ "owner": "markdown",
51
+ "description": "Number of lines in the SUMMARY.md",
52
+ "value": 9
53
+ },
54
+ {
55
+ "owner": "markdown",
56
+ "description": "Number of lines in the PROPERTIES.md",
57
+ "value": 682
58
+ },
59
+ {
60
+ "owner": "markdown",
61
+ "description": "Number of lines in the TROUBLESHOOT.md",
62
+ "value": 57
63
+ },
64
+ {
65
+ "owner": "markdown",
66
+ "description": "Number of lines in the ENHANCE.md",
67
+ "value": 70
68
+ },
69
+ {
70
+ "owner": "markdown",
71
+ "description": "Number of lines in the BROKER.md",
72
+ "value": 70
73
+ },
74
+ {
75
+ "owner": "unitTestJS",
76
+ "description": "Number of lines of code in unit tests",
77
+ "value": 4976
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 287
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 1764
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 54
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1527
98
+ },
99
+ {
100
+ "owner": "staticFile",
101
+ "description": "Number of static files added",
102
+ "value": 37
103
+ },
104
+ {
105
+ "owner": "Overall",
106
+ "description": "Total lines of Code",
107
+ "value": 8267
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 341
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 0
8
+ },
9
+ {
10
+ "owner": "errorJson",
11
+ "description": "Adapter errors no longer available for use",
12
+ "value": 0
13
+ },
14
+ {
15
+ "owner": "errorJson",
16
+ "description": "Adapter errors that have been updated (e.g. recommendation changes)",
17
+ "value": 31
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 15
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 6
28
+ },
29
+ {
30
+ "owner": "packageJson",
31
+ "description": "Number of npm scripts",
32
+ "value": 17
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "6.1.14"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 83
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 345
48
+ },
49
+ {
50
+ "owner": "markdown",
51
+ "description": "Number of lines in the SUMMARY.md",
52
+ "value": 9
53
+ },
54
+ {
55
+ "owner": "markdown",
56
+ "description": "Number of lines in the PROPERTIES.md",
57
+ "value": 682
58
+ },
59
+ {
60
+ "owner": "markdown",
61
+ "description": "Number of lines in the TROUBLESHOOT.md",
62
+ "value": 57
63
+ },
64
+ {
65
+ "owner": "markdown",
66
+ "description": "Number of lines in the ENHANCE.md",
67
+ "value": 70
68
+ },
69
+ {
70
+ "owner": "markdown",
71
+ "description": "Number of lines in the BROKER.md",
72
+ "value": 70
73
+ },
74
+ {
75
+ "owner": "unitTestJS",
76
+ "description": "Number of lines of code in unit tests",
77
+ "value": 4976
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 287
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 1764
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 54
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1527
98
+ },
99
+ {
100
+ "owner": "staticFile",
101
+ "description": "Number of static files added",
102
+ "value": 37
103
+ },
104
+ {
105
+ "owner": "Overall",
106
+ "description": "Total lines of Code",
107
+ "value": 8267
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 341
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -83,7 +83,8 @@
83
83
  "healthcheck_on_timeout": true,
84
84
  "return_raw": false,
85
85
  "archiving": false,
86
- "return_request": false
86
+ "return_request": false,
87
+ "keep_alive_interval": 0
87
88
  },
88
89
  "proxy": {
89
90
  "enabled": false,
@@ -272,4 +273,4 @@
272
273
  "brokers": [],
273
274
  "logLevel": "none",
274
275
  "timeout": 120000
275
- }
276
+ }
@@ -280,10 +280,10 @@ describe('[unit] GoGetSSL Adapter Test', () => {
280
280
  assert.notEqual(null, packageDotJson.dependencies);
281
281
  assert.notEqual('', packageDotJson.dependencies);
282
282
  assert.equal('8.17.1', packageDotJson.dependencies.ajv);
283
- assert.equal('1.12.2', packageDotJson.dependencies.axios);
283
+ assert.equal('1.13.5', packageDotJson.dependencies.axios);
284
284
  assert.equal('11.1.0', packageDotJson.dependencies.commander);
285
285
  assert.equal('11.3.0', packageDotJson.dependencies['fs-extra']);
286
- assert.equal('10.8.2', packageDotJson.dependencies.mocha);
286
+ assert.equal('11.3.0', packageDotJson.dependencies.mocha);
287
287
  assert.equal('2.0.1', packageDotJson.dependencies['mocha-param']);
288
288
  assert.equal('0.4.4', packageDotJson.dependencies.ping);
289
289
  assert.equal('1.4.10', packageDotJson.dependencies['readline-sync']);
@@ -19,17 +19,14 @@ function createObjectForFunction(
19
19
  workflow
20
20
  ) {
21
21
  const funcObject = {};
22
- // if the entity path is not set, then the object is not created.
23
- if (entityPath !== undefined) {
24
- funcObject.method_signature = `${funcName}(${funcArgs.join(', ')})`;
25
- funcObject.path = entityPath;
26
- if (description === undefined) {
27
- funcObject.description = '';
28
- funcObject.workflow = 'No';
29
- } else {
30
- funcObject.description = description;
31
- funcObject.workflow = workflow;
32
- }
22
+ funcObject.method_signature = `${funcName}(${funcArgs.join(', ')})`;
23
+ funcObject.path = entityPath !== undefined ? entityPath : '';
24
+ if (description === undefined) {
25
+ funcObject.description = '';
26
+ funcObject.workflow = 'No';
27
+ } else {
28
+ funcObject.description = description;
29
+ funcObject.workflow = workflow;
33
30
  }
34
31
  return funcObject;
35
32
  }
@@ -77,7 +74,8 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
77
74
  // parsing the file to get the function and class declarations.
78
75
  const aFileFuncArgs = acorn.parse(aFile, { ecmaVersion: 2020 });
79
76
 
80
- let callName = 'identifyRequest';
77
+ // Track all method names that can be called (identifyRequest + any proxy methods)
78
+ const allowedCallNames = new Set(['identifyRequest']);
81
79
  // Looping through all the declarations parsed:
82
80
  aFileFuncArgs.body.forEach((e) => {
83
81
  // Getting only the class declaration as it has our required functions.
@@ -103,9 +101,10 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
103
101
  method.value.body.body.forEach((statement) => {
104
102
  recurseCallExpressions(statement, callList);
105
103
  });
104
+ // Find calls to identifyRequest OR any discovered proxy methods
106
105
  const requests = [];
107
106
  for (let i = 0; i < callList.length; i += 1) {
108
- if (callList[i].callee.property && callList[i].callee.property.name === callName) {
107
+ if (callList[i].callee.property && allowedCallNames.has(callList[i].callee.property.name)) {
109
108
  requests.push(callList[i]);
110
109
  }
111
110
  }
@@ -114,34 +113,60 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
114
113
  if (expr.arguments.length < 2) {
115
114
  throw new Error(`Bad inputs in method ${funcName}`);
116
115
  }
117
- const entity = expr.arguments[0].value;
118
- const actionName = expr.arguments[1].value;
119
- if (expr !== undefined && (expr.arguments[0].type !== 'Literal' || expr.arguments[1].type !== 'Literal')) {
120
- const param1 = method.value.params[0];
121
- const param2 = method.value.params[1];
122
- if (param1.type !== 'Identifier' || param2.type !== 'Identifier'
123
- || expr.arguments[0].type !== 'Identifier' || expr.arguments[1].type !== 'Identifier'
124
- || param1.name !== expr.arguments[0].name || param2.name !== expr.arguments[1].name) {
125
- throw new Error(`identifyRequest proxy method ${funcName} unknown format`);
126
- } else if (callName !== 'identifyRequest') {
127
- throw new Error(`MethodDocumentor not yet programmed to handle multiple helper methods: 1) ${callName}, 2) ${funcName}`);
116
+
117
+ const arg0Type = expr.arguments[0].type;
118
+ const arg1Type = expr.arguments[1].type;
119
+
120
+ let entityPath;
121
+
122
+ if (arg0Type === 'Literal' && arg1Type === 'Literal') {
123
+ const entity = expr.arguments[0].value;
124
+ const actionName = expr.arguments[1].value;
125
+ entityPath = getPathFromEntity(entity, actionName);
126
+ } else {
127
+ // Non-standard format: anything that's not both literals
128
+ // Special handling for proxy methods (both args are identifiers matching first 2 params)
129
+ if (arg0Type === 'Identifier' && arg1Type === 'Identifier') {
130
+ const param1 = method.value.params[0];
131
+ const param2 = method.value.params[1];
132
+ const arg0Name = expr.arguments[0].name;
133
+ const arg1Name = expr.arguments[1].name;
134
+
135
+ // Check if this is a valid proxy method
136
+ const isValidProxy = param1 && param2
137
+ && param1.type === 'Identifier' && param2.type === 'Identifier'
138
+ && param1.name === arg0Name && param2.name === arg1Name;
139
+
140
+ // Only process valid proxy methods
141
+ if (isValidProxy) {
142
+ const calledMethod = expr.callee.property.name;
143
+
144
+ // Skip nested proxies (proxies calling other proxies)
145
+ if (calledMethod !== 'identifyRequest') {
146
+ console.log(`Skipping nested proxy method: ${funcName} (calls ${calledMethod})`);
147
+ return;
148
+ }
149
+
150
+ // First-level proxy: calls identifyRequest directly
151
+ // Add this proxy to the set so other methods can call it
152
+ allowedCallNames.add(funcName);
153
+ }
128
154
  }
129
- callName = funcName;
155
+
156
+ // All non-standard formats get documented without path
157
+ entityPath = undefined;
130
158
  }
131
- const entityPath = getPathFromEntity(entity, actionName);
132
159
 
133
160
  // Creating and storing the object for the method.
134
- if (entityPath !== undefined) {
135
- functionList.push(
136
- createObjectForFunction(
137
- funcName,
138
- funcArgs,
139
- entityPath,
140
- descriptionObj[funcName],
141
- workflowObj[funcName]
142
- )
143
- );
144
- }
161
+ functionList.push(
162
+ createObjectForFunction(
163
+ funcName,
164
+ funcArgs,
165
+ entityPath,
166
+ descriptionObj[funcName],
167
+ workflowObj[funcName]
168
+ )
169
+ );
145
170
  }
146
171
  });
147
172
  }