@itentialopensource/adapter-iap 0.5.10 → 0.6.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.
@@ -0,0 +1,9 @@
1
+ {
2
+ "ComplianceEntries": [
3
+ {
4
+ "name": "Compliance Summary",
5
+ "numInvalidProjects": 0,
6
+ "numValidProjects": 0
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,5 @@
1
+ ---------------------------------------------------------------------------------------------
2
+ **** Project Compliance Summary ****
3
+ 0 project(s) are not valid
4
+ 0 project(s) are valid
5
+ ---------------------------------------------------------------------------------------------
package/metadata.json CHANGED
@@ -25,21 +25,36 @@
25
25
  "isDeprecated": false
26
26
  },
27
27
  "brokerSince": "",
28
+ "authMethods": [
29
+ {
30
+ "type": "Cookie",
31
+ "primary": true
32
+ }
33
+ ],
28
34
  "documentation": {
29
35
  "storeLink": "",
30
36
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-iap",
31
37
  "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-iap",
32
38
  "docLink": "",
33
39
  "demoLinks": [],
34
- "trainingLinks": [],
40
+ "trainingLinks": [
41
+ {
42
+ "title": "Itential Academy",
43
+ "link": "https://www.itential.com/itential-academy/"
44
+ }
45
+ ],
35
46
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
36
47
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
37
48
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
38
49
  "webLink": "https://www.itential.com/adapters/itential-iap/",
39
50
  "vendorLink": "https://www.itential.com/",
40
- "productLink": "https://docs.itential.com/docs/automation-platform-4",
51
+ "productLink": "https://www.itential.com/automation-platform/",
41
52
  "apiLinks": [
42
- "https://apidocs.itential.com/"
53
+ {
54
+ "title": "Itential API Reference",
55
+ "link": "https://apidocs.itential.com/",
56
+ "public": true
57
+ }
43
58
  ]
44
59
  },
45
60
  "assets": [],
@@ -50,5 +65,6 @@
50
65
  "workflowProjects": [],
51
66
  "transformationProjects": [],
52
67
  "exampleProjects": []
53
- }
54
- }
68
+ },
69
+ "supportLevel": "community"
70
+ }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-iap",
3
- "version": "0.5.10",
3
+ "version": "0.6.1",
4
4
  "description": "This adapter integrates with system described as: iap.",
5
5
  "main": "adapter.js",
6
6
  "systemName": "Itential Automation Platform",
7
7
  "wizardVersion": "2.44.7",
8
- "engineVersion": "1.67.10",
8
+ "engineVersion": "1.67.20",
9
9
  "adapterType": "http",
10
10
  "scripts": {
11
11
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -16,7 +16,6 @@
16
16
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
17
17
  "test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
18
18
  "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
19
- "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
20
19
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
21
20
  "adapter:install": "npm i && node utils/tbScript.js install",
22
21
  "adapter:checkMigrate": "node utils/checkMigrate.js",
@@ -43,7 +42,7 @@
43
42
  ],
44
43
  "license": "Apache-2.0",
45
44
  "engines": {
46
- "node": ">= 8.0.0",
45
+ "node": ">= 14.0.0",
47
46
  "npm": ">= 6.0.0"
48
47
  },
49
48
  "repository": {
@@ -53,23 +52,22 @@
53
52
  "author": "Itential",
54
53
  "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-iap#readme",
55
54
  "dependencies": {
56
- "@itentialopensource/adapter-utils": "^5.3.10",
57
- "acorn": "^8.10.0",
58
- "ajv": "^8.12.0",
59
- "axios": "^1.6.8",
55
+ "@itentialopensource/adapter-utils": "^5.6.0",
56
+ "acorn": "^8.12.1",
57
+ "ajv": "^8.17.1",
58
+ "axios": "^1.7.2",
60
59
  "commander": "^11.0.0",
61
60
  "dns-lookup-promise": "^1.0.4",
62
- "fs-extra": "^11.1.1",
61
+ "fs-extra": "^11.2.0",
63
62
  "json-query": "^2.2.2",
64
- "mocha": "^10.3.0",
63
+ "mocha": "^10.7.0",
65
64
  "mocha-param": "^2.0.1",
66
65
  "mongodb": "^4.16.0",
67
- "nyc": "^15.1.0",
68
66
  "ping": "^0.4.4",
69
67
  "prompts": "^2.4.2",
70
68
  "readline-sync": "^1.4.10",
71
- "semver": "^7.5.3",
72
- "winston": "^3.9.0"
69
+ "semver": "^7.6.3",
70
+ "winston": "^3.13.1"
73
71
  },
74
72
  "devDependencies": {
75
73
  "chai": "^4.3.7",
@@ -945,6 +945,11 @@
945
945
  "devicebroker": {
946
946
  "type": "object",
947
947
  "properties": {
948
+ "enabled": {
949
+ "type": "boolean",
950
+ "description": "Whether or not the device broker calls have been mapped",
951
+ "default": false
952
+ },
948
953
  "getDevice": {
949
954
  "type": "array",
950
955
  "description": "Broker call(s) to getDevice",
Binary file
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.5.2",
3
- "configLines": 30130,
2
+ "version": "0.5.10",
3
+ "configLines": 30135,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 47398,
6
- "testLines": 34386,
6
+ "testLines": 34385,
7
7
  "testCases": 1840,
8
- "totalCodeLines": 83567,
8
+ "totalCodeLines": 83566,
9
9
  "wfTasks": 585
10
10
  }
@@ -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": 16
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": 21
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.5.0"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 78
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 344
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": 647
58
+ },
59
+ {
60
+ "owner": "markdown",
61
+ "description": "Number of lines in the TROUBLESHOOT.md",
62
+ "value": 48
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": 18012
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 1203
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 15121
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 567
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1453
98
+ },
99
+ {
100
+ "owner": "staticFile",
101
+ "description": "Number of static files added",
102
+ "value": 36
103
+ },
104
+ {
105
+ "owner": "Overall",
106
+ "description": "Total lines of Code",
107
+ "value": 34586
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 1770
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -4,7 +4,7 @@
4
4
  "properties": {
5
5
  "host": "itential.com",
6
6
  "port": 443,
7
- "choosepath" : "2021.2",
7
+ "choosepath": "2021.2",
8
8
  "base_path": "",
9
9
  "version": "",
10
10
  "cache_location": "none",
@@ -116,28 +116,32 @@
116
116
  }
117
117
  },
118
118
  "devicebroker": {
119
+ "enabled": false,
119
120
  "getDevice": [
120
121
  {
121
- "path": "/get/devices/{name}",
122
+ "path": "/not/mapped",
122
123
  "method": "GET",
123
124
  "query": {},
124
125
  "body": {},
125
126
  "headers": {},
126
127
  "handleFailure": "ignore",
127
- "requestFields": {},
128
+ "requestFields": {
129
+ "insample": "{port}"
130
+ },
128
131
  "responseDatakey": "",
129
132
  "responseFields": {
130
- "name": "{host}",
131
- "ostype": "{os}",
132
- "ostypePrefix": "system-",
133
- "ipaddress": "{attributes.ipaddr}",
134
- "port": "443"
133
+ "name": "{this}{||}{that}",
134
+ "ostype": "{osfield}",
135
+ "ostypePrefix": "meraki-",
136
+ "port": "{port}",
137
+ "ipaddress": "{ip_addr}",
138
+ "serial": "{serial}"
135
139
  }
136
140
  }
137
141
  ],
138
142
  "getDevicesFiltered": [
139
143
  {
140
- "path": "/get/devices",
144
+ "path": "/not/mapped",
141
145
  "method": "GET",
142
146
  "pagination": {
143
147
  "offsetVar": "",
@@ -152,46 +156,52 @@
152
156
  "requestFields": {},
153
157
  "responseDatakey": "",
154
158
  "responseFields": {
155
- "name": "{host}",
156
- "ostype": "{os}",
157
- "ostypePrefix": "system-",
158
- "ipaddress": "{attributes.ipaddr}",
159
- "port": "443"
159
+ "name": "{this}{||}{that}",
160
+ "ostype": "{osfield}",
161
+ "ostypePrefix": "meraki-",
162
+ "port": "{port}",
163
+ "ipaddress": "{ip_addr}",
164
+ "serial": "{serial}",
165
+ "id": "{myid}"
160
166
  }
161
167
  }
162
168
  ],
163
169
  "isAlive": [
164
170
  {
165
- "path": "/get/devices/{name}/status",
171
+ "path": "/not/mapped/{devID}",
166
172
  "method": "GET",
167
173
  "query": {},
168
174
  "body": {},
169
175
  "headers": {},
170
176
  "handleFailure": "ignore",
171
- "requestFields": {},
177
+ "requestFields": {
178
+ "devID": "{id}"
179
+ },
172
180
  "responseDatakey": "",
173
181
  "responseFields": {
174
- "status": "status",
175
- "statusValue": "online"
182
+ "status": "return2xx",
183
+ "statusValue": "AD.200"
176
184
  }
177
185
  }
178
186
  ],
179
187
  "getConfig": [
180
188
  {
181
- "path": "/get/devices/{name}/configPart1",
189
+ "path": "/not/mapped/{devID}",
182
190
  "method": "GET",
183
191
  "query": {},
184
192
  "body": {},
185
193
  "headers": {},
186
194
  "handleFailure": "ignore",
187
- "requestFields": {},
195
+ "requestFields": {
196
+ "devID": "{id}"
197
+ },
188
198
  "responseDatakey": "",
189
199
  "responseFields": {}
190
200
  }
191
201
  ],
192
202
  "getCount": [
193
203
  {
194
- "path": "/get/devices",
204
+ "path": "/not/mapped",
195
205
  "method": "GET",
196
206
  "query": {},
197
207
  "body": {},
@@ -207,15 +217,15 @@
207
217
  "enabled": false,
208
218
  "entities": [
209
219
  {
210
- "entityType": "",
211
- "frequency": 1440,
220
+ "entityType": "device",
221
+ "frequency": 3600,
212
222
  "flushOnFail": false,
213
- "limit": 1000,
223
+ "limit": 10000,
214
224
  "retryAttempts": 5,
215
225
  "sort": true,
216
226
  "populate": [
217
227
  {
218
- "path": "",
228
+ "path": "/not/mapped",
219
229
  "method": "GET",
220
230
  "pagination": {
221
231
  "offsetVar": "",
@@ -229,7 +239,15 @@
229
239
  "handleFailure": "ignore",
230
240
  "requestFields": {},
231
241
  "responseDatakey": "",
232
- "responseFields": {}
242
+ "responseFields": {
243
+ "name": "{this}{||}{that}",
244
+ "ostype": "{osfield}",
245
+ "ostypePrefix": "meraki-",
246
+ "port": "{port}",
247
+ "ipaddress": "{ip_addr}",
248
+ "serial": "{serial}",
249
+ "id": "{myid}"
250
+ }
233
251
  }
234
252
  ],
235
253
  "cachedTasks": [
@@ -247,4 +265,4 @@
247
265
  "brokers": [],
248
266
  "logLevel": "none",
249
267
  "timeout": 120000
250
- }
268
+ }
@@ -46,6 +46,7 @@ samProps.ssl.accept_invalid_cert = false;
46
46
  if (samProps.request.attempt_timeout < 30000) {
47
47
  samProps.request.attempt_timeout = 30000;
48
48
  }
49
+ samProps.devicebroker.enabled = true;
49
50
  const attemptTimeout = samProps.request.attempt_timeout;
50
51
  const { stub } = samProps;
51
52
 
@@ -284,7 +284,6 @@ describe('[unit] Iap Adapter Test', () => {
284
284
  assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
285
285
  assert.equal('mocha test/unit/adapterTestUnit.js --LOG=error', packageDotJson.scripts['test:unit']);
286
286
  assert.equal('mocha test/integration/adapterTestIntegration.js --LOG=error', packageDotJson.scripts['test:integration']);
287
- assert.equal('nyc --reporter html --reporter text mocha --reporter dot test/*', packageDotJson.scripts['test:cover']);
288
287
  assert.equal('npm run test:baseunit && npm run test:unit && npm run test:integration', packageDotJson.scripts.test);
289
288
  assert.equal('npm publish --registry=https://registry.npmjs.org --access=public', packageDotJson.scripts.deploy);
290
289
  assert.equal('npm run deploy', packageDotJson.scripts.build);
@@ -315,17 +314,16 @@ describe('[unit] Iap Adapter Test', () => {
315
314
  assert.notEqual(undefined, packageDotJson.dependencies);
316
315
  assert.notEqual(null, packageDotJson.dependencies);
317
316
  assert.notEqual('', packageDotJson.dependencies);
318
- assert.equal('^8.12.0', packageDotJson.dependencies.ajv);
319
- assert.equal('^1.6.8', packageDotJson.dependencies.axios);
317
+ assert.equal('^8.17.1', packageDotJson.dependencies.ajv);
318
+ assert.equal('^1.7.2', packageDotJson.dependencies.axios);
320
319
  assert.equal('^11.0.0', packageDotJson.dependencies.commander);
321
- assert.equal('^11.1.1', packageDotJson.dependencies['fs-extra']);
322
- assert.equal('^10.3.0', packageDotJson.dependencies.mocha);
320
+ assert.equal('^11.2.0', packageDotJson.dependencies['fs-extra']);
321
+ assert.equal('^10.7.0', packageDotJson.dependencies.mocha);
323
322
  assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
324
- assert.equal('^15.1.0', packageDotJson.dependencies.nyc);
325
323
  assert.equal('^0.4.4', packageDotJson.dependencies.ping);
326
324
  assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
327
- assert.equal('^7.5.3', packageDotJson.dependencies.semver);
328
- assert.equal('^3.9.0', packageDotJson.dependencies.winston);
325
+ assert.equal('^7.6.3', packageDotJson.dependencies.semver);
326
+ assert.equal('^3.13.1', packageDotJson.dependencies.winston);
329
327
  done();
330
328
  } catch (error) {
331
329
  log.error(`Test Failure: ${error}`);
@@ -563,7 +561,7 @@ describe('[unit] Iap Adapter Test', () => {
563
561
  log.error(`Adapter Exception: ${error}`);
564
562
  done(error);
565
563
  }
566
- });
564
+ }).timeout(attemptTimeout);
567
565
  });
568
566
 
569
567
  describe('propertiesSchema.json', () => {