@itentialopensource/adapter-selector_ai 0.1.7 → 0.1.9

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/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-selector_ai",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "This adapter integrates with system described as: selectorAiMetastoreInventory.",
5
5
  "main": "adapter.js",
6
6
  "systemName": "Selector_ai",
7
- "wizardVersion": "3.3.9",
8
- "engineVersion": "1.69.13",
7
+ "wizardVersion": "2.44.7",
8
+ "engineVersion": "1.71.2",
9
9
  "adapterType": "http",
10
10
  "scripts": {
11
11
  "preinstall": "node utils/setup.js",
@@ -24,9 +24,7 @@
24
24
  "troubleshoot": "node utils/tbScript.js troubleshoot",
25
25
  "healthcheck": "node utils/tbScript.js healthcheck",
26
26
  "basicget": "node utils/tbScript.js basicget",
27
- "connectivity": "node utils/tbScript.js connectivity",
28
- "deploy": "npm publish --registry=https://registry.npmjs.org --access=public",
29
- "build": "npm run deploy"
27
+ "connectivity": "node utils/tbScript.js connectivity"
30
28
  },
31
29
  "keywords": [
32
30
  "Itential",
@@ -49,10 +47,10 @@
49
47
  "author": "Itential",
50
48
  "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-selector_ai#readme",
51
49
  "dependencies": {
52
- "@itentialopensource/adapter-utils": "5.10.23",
50
+ "@itentialopensource/adapter-utils": "5.10.25",
53
51
  "acorn": "8.14.1",
54
52
  "ajv": "8.17.1",
55
- "axios": "1.9.0",
53
+ "axios": "1.12.2",
56
54
  "commander": "11.1.0",
57
55
  "fs-extra": "11.3.0",
58
56
  "json-query": "2.2.2",
@@ -7,6 +7,10 @@
7
7
  "type": "encryption",
8
8
  "pointer": "/authentication/token"
9
9
  },
10
+ {
11
+ "type": "encryption",
12
+ "pointer": "/authentication/client_secret"
13
+ },
10
14
  {
11
15
  "type": "encryption",
12
16
  "pointer": "/mongo/password"
@@ -83,10 +83,10 @@
83
83
  "https"
84
84
  ]
85
85
  },
86
- "service" : {
87
- "type" : "string",
86
+ "service": {
87
+ "type": "string",
88
88
  "description": "Service we are integrating with -- used with AWS Authentication",
89
- "examples" : [
89
+ "examples": [
90
90
  "ec2",
91
91
  "route53"
92
92
  ]
@@ -290,7 +290,9 @@
290
290
  "description": "the protocol to request token from system",
291
291
  "default": "",
292
292
  "enum": [
293
- "http", "https", ""
293
+ "http",
294
+ "https",
295
+ ""
294
296
  ]
295
297
  },
296
298
  "host": {
@@ -329,7 +331,7 @@
329
331
  "responseFields": {
330
332
  "type": "object",
331
333
  "description": "The fields from the step result"
332
- },
334
+ },
333
335
  "successfullResponseCode": {
334
336
  "type": "integer",
335
337
  "description": "Expected response code for given step, if not set any successfull http response is accepted",
@@ -1029,21 +1031,30 @@
1029
1031
  "type": "object",
1030
1032
  "description": "The json object with query parameters of the call to getDevice",
1031
1033
  "additionalProperties": {
1032
- "type": ["string", "number"]
1034
+ "type": [
1035
+ "string",
1036
+ "number"
1037
+ ]
1033
1038
  }
1034
1039
  },
1035
1040
  "body": {
1036
1041
  "type": "object",
1037
1042
  "description": "The json object with body of the call to getDevice",
1038
1043
  "additionalProperties": {
1039
- "type": ["string", "number"]
1044
+ "type": [
1045
+ "string",
1046
+ "number"
1047
+ ]
1040
1048
  }
1041
1049
  },
1042
1050
  "headers": {
1043
1051
  "type": "object",
1044
1052
  "description": "The json object with headers of the call to getDevice",
1045
1053
  "additionalProperties": {
1046
- "type": ["string", "number"]
1054
+ "type": [
1055
+ "string",
1056
+ "number"
1057
+ ]
1047
1058
  }
1048
1059
  },
1049
1060
  "handleFailure": {
@@ -1059,7 +1070,10 @@
1059
1070
  "type": "object",
1060
1071
  "description": "The json object with response fields of the call to getDevice",
1061
1072
  "additionalProperties": {
1062
- "type": ["string", "number"]
1073
+ "type": [
1074
+ "string",
1075
+ "number"
1076
+ ]
1063
1077
  },
1064
1078
  "properties": {}
1065
1079
  },
@@ -1072,7 +1086,10 @@
1072
1086
  "type": "object",
1073
1087
  "description": "The json object with response fields of the call to getDevice",
1074
1088
  "additionalProperties": {
1075
- "type": ["string", "number"]
1089
+ "type": [
1090
+ "string",
1091
+ "number"
1092
+ ]
1076
1093
  },
1077
1094
  "properties": {
1078
1095
  "name": {
@@ -1157,21 +1174,30 @@
1157
1174
  "type": "object",
1158
1175
  "description": "The json object with query parameters of the call to getDevicesFiltered",
1159
1176
  "additionalProperties": {
1160
- "type": ["string", "number"]
1177
+ "type": [
1178
+ "string",
1179
+ "number"
1180
+ ]
1161
1181
  }
1162
1182
  },
1163
1183
  "body": {
1164
1184
  "type": "object",
1165
1185
  "description": "The json object with body of the call to getDevicesFiltered",
1166
1186
  "additionalProperties": {
1167
- "type": ["string", "number"]
1187
+ "type": [
1188
+ "string",
1189
+ "number"
1190
+ ]
1168
1191
  }
1169
1192
  },
1170
1193
  "headers": {
1171
1194
  "type": "object",
1172
1195
  "description": "The json object with headers of the call to getDevicesFiltered",
1173
1196
  "additionalProperties": {
1174
- "type": ["string", "number"]
1197
+ "type": [
1198
+ "string",
1199
+ "number"
1200
+ ]
1175
1201
  }
1176
1202
  },
1177
1203
  "handleFailure": {
@@ -1187,7 +1213,10 @@
1187
1213
  "type": "object",
1188
1214
  "description": "The json object with response fields of the call to getDevice",
1189
1215
  "additionalProperties": {
1190
- "type": ["string", "number"]
1216
+ "type": [
1217
+ "string",
1218
+ "number"
1219
+ ]
1191
1220
  },
1192
1221
  "properties": {}
1193
1222
  },
@@ -1200,7 +1229,10 @@
1200
1229
  "type": "object",
1201
1230
  "description": "The json object with response fields of the call to getDevicesFiltered",
1202
1231
  "additionalProperties": {
1203
- "type": ["string", "number"]
1232
+ "type": [
1233
+ "string",
1234
+ "number"
1235
+ ]
1204
1236
  },
1205
1237
  "properties": {
1206
1238
  "name": {
@@ -1253,21 +1285,30 @@
1253
1285
  "type": "object",
1254
1286
  "description": "The json object with query parameters of the call to isAlive",
1255
1287
  "additionalProperties": {
1256
- "type": ["string", "number"]
1288
+ "type": [
1289
+ "string",
1290
+ "number"
1291
+ ]
1257
1292
  }
1258
1293
  },
1259
1294
  "body": {
1260
1295
  "type": "object",
1261
1296
  "description": "The json object with body of the call to isAlive",
1262
1297
  "additionalProperties": {
1263
- "type": ["string", "number"]
1298
+ "type": [
1299
+ "string",
1300
+ "number"
1301
+ ]
1264
1302
  }
1265
1303
  },
1266
1304
  "headers": {
1267
1305
  "type": "object",
1268
1306
  "description": "The json object with headers of the call to isAlive",
1269
1307
  "additionalProperties": {
1270
- "type": ["string", "number"]
1308
+ "type": [
1309
+ "string",
1310
+ "number"
1311
+ ]
1271
1312
  }
1272
1313
  },
1273
1314
  "handleFailure": {
@@ -1283,7 +1324,10 @@
1283
1324
  "type": "object",
1284
1325
  "description": "The json object with response fields of the call to getDevice",
1285
1326
  "additionalProperties": {
1286
- "type": ["string", "number"]
1327
+ "type": [
1328
+ "string",
1329
+ "number"
1330
+ ]
1287
1331
  },
1288
1332
  "properties": {}
1289
1333
  },
@@ -1296,7 +1340,10 @@
1296
1340
  "type": "object",
1297
1341
  "description": "The json object with response fields of the call to isAlive",
1298
1342
  "additionalProperties": {
1299
- "type": ["string", "number"]
1343
+ "type": [
1344
+ "string",
1345
+ "number"
1346
+ ]
1300
1347
  },
1301
1348
  "properties": {
1302
1349
  "status": {
@@ -1334,21 +1381,30 @@
1334
1381
  "type": "object",
1335
1382
  "description": "The json object with query parameters of the call to getConfig",
1336
1383
  "additionalProperties": {
1337
- "type": ["string", "number"]
1384
+ "type": [
1385
+ "string",
1386
+ "number"
1387
+ ]
1338
1388
  }
1339
1389
  },
1340
1390
  "body": {
1341
1391
  "type": "object",
1342
1392
  "description": "The json object with body of the call to getConfig",
1343
1393
  "additionalProperties": {
1344
- "type": ["string", "number"]
1394
+ "type": [
1395
+ "string",
1396
+ "number"
1397
+ ]
1345
1398
  }
1346
1399
  },
1347
1400
  "headers": {
1348
1401
  "type": "object",
1349
1402
  "description": "The json object with headers of the call to getConfig",
1350
1403
  "additionalProperties": {
1351
- "type": ["string", "number"]
1404
+ "type": [
1405
+ "string",
1406
+ "number"
1407
+ ]
1352
1408
  }
1353
1409
  },
1354
1410
  "handleFailure": {
@@ -1364,7 +1420,10 @@
1364
1420
  "type": "object",
1365
1421
  "description": "The json object with response fields of the call to getDevice",
1366
1422
  "additionalProperties": {
1367
- "type": ["string", "number"]
1423
+ "type": [
1424
+ "string",
1425
+ "number"
1426
+ ]
1368
1427
  },
1369
1428
  "properties": {}
1370
1429
  },
@@ -1377,7 +1436,10 @@
1377
1436
  "type": "object",
1378
1437
  "description": "The json object with response fields of the call to getConfig",
1379
1438
  "additionalProperties": {
1380
- "type": ["string", "number"]
1439
+ "type": [
1440
+ "string",
1441
+ "number"
1442
+ ]
1381
1443
  },
1382
1444
  "properties": {}
1383
1445
  }
@@ -1404,21 +1466,30 @@
1404
1466
  "type": "object",
1405
1467
  "description": "The json object with query parameters of the call to getCount",
1406
1468
  "additionalProperties": {
1407
- "type": ["string", "number"]
1469
+ "type": [
1470
+ "string",
1471
+ "number"
1472
+ ]
1408
1473
  }
1409
1474
  },
1410
1475
  "body": {
1411
1476
  "type": "object",
1412
1477
  "description": "The json object with body of the call to getCount",
1413
1478
  "additionalProperties": {
1414
- "type": ["string", "number"]
1479
+ "type": [
1480
+ "string",
1481
+ "number"
1482
+ ]
1415
1483
  }
1416
1484
  },
1417
1485
  "headers": {
1418
1486
  "type": "object",
1419
1487
  "description": "The json object with headers of the call to getCount",
1420
1488
  "additionalProperties": {
1421
- "type": ["string", "number"]
1489
+ "type": [
1490
+ "string",
1491
+ "number"
1492
+ ]
1422
1493
  }
1423
1494
  },
1424
1495
  "handleFailure": {
@@ -1434,7 +1505,10 @@
1434
1505
  "type": "object",
1435
1506
  "description": "The json object with response fields of the call to getDevice",
1436
1507
  "additionalProperties": {
1437
- "type": ["string", "number"]
1508
+ "type": [
1509
+ "string",
1510
+ "number"
1511
+ ]
1438
1512
  },
1439
1513
  "properties": {}
1440
1514
  },
@@ -1447,7 +1521,10 @@
1447
1521
  "type": "object",
1448
1522
  "description": "The json object with response fields of the call to getConfig",
1449
1523
  "additionalProperties": {
1450
- "type": ["string", "number"]
1524
+ "type": [
1525
+ "string",
1526
+ "number"
1527
+ ]
1451
1528
  },
1452
1529
  "properties": {}
1453
1530
  }
@@ -1553,21 +1630,30 @@
1553
1630
  "type": "object",
1554
1631
  "description": "The json object with query parameters of the call to getDevice",
1555
1632
  "additionalProperties": {
1556
- "type": ["string", "number"]
1633
+ "type": [
1634
+ "string",
1635
+ "number"
1636
+ ]
1557
1637
  }
1558
1638
  },
1559
1639
  "body": {
1560
1640
  "type": "object",
1561
1641
  "description": "The json object with body of the call to getDevice",
1562
1642
  "additionalProperties": {
1563
- "type": ["string", "number"]
1643
+ "type": [
1644
+ "string",
1645
+ "number"
1646
+ ]
1564
1647
  }
1565
1648
  },
1566
1649
  "headers": {
1567
1650
  "type": "object",
1568
1651
  "description": "The json object with headers of the call to getDevice",
1569
1652
  "additionalProperties": {
1570
- "type": ["string", "number"]
1653
+ "type": [
1654
+ "string",
1655
+ "number"
1656
+ ]
1571
1657
  }
1572
1658
  },
1573
1659
  "handleFailure": {
@@ -1583,7 +1669,10 @@
1583
1669
  "type": "object",
1584
1670
  "description": "The json object with response fields of the call to getDevice",
1585
1671
  "additionalProperties": {
1586
- "type": ["string", "number"]
1672
+ "type": [
1673
+ "string",
1674
+ "number"
1675
+ ]
1587
1676
  },
1588
1677
  "properties": {}
1589
1678
  },
@@ -1596,7 +1685,10 @@
1596
1685
  "type": "object",
1597
1686
  "description": "The json object with response fields of the call to getDevice",
1598
1687
  "additionalProperties": {
1599
- "type": ["string", "number"]
1688
+ "type": [
1689
+ "string",
1690
+ "number"
1691
+ ]
1600
1692
  }
1601
1693
  }
1602
1694
  }
@@ -1632,4 +1724,4 @@
1632
1724
  }
1633
1725
  }
1634
1726
  }
1635
- }
1727
+ }
@@ -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": "5.10.23"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 79
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": 662
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": 2293
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 126
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 1296
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 42
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1489
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": 5078
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 168
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -956,14 +956,16 @@ describe('[unit] Adapter Base Test', () => {
956
956
  });
957
957
  it('should get information for all of the requests currently in the queue', (done) => {
958
958
  try {
959
- const expectedFunctions = a.iapGetAdapterQueue();
960
- try {
961
- assert.equal(0, expectedFunctions.length);
962
- done();
963
- } catch (err) {
964
- log.error(`Test Failure: ${err}`);
965
- done(err);
966
- }
959
+ a.iapGetAdapterQueue((data, error) => {
960
+ try {
961
+ assert.notEqual(null, data);
962
+ assert.equal(0, data.length);
963
+ done();
964
+ } catch (err) {
965
+ log.error(`Test Failure: ${err}`);
966
+ done(err);
967
+ }
968
+ });
967
969
  } catch (error) {
968
970
  log.error(`Adapter Exception: ${error}`);
969
971
  done(error);
@@ -245,6 +245,7 @@ describe('[unit] Selector_ai Adapter Test', () => {
245
245
  assert.notEqual(undefined, packageDotJson.scripts);
246
246
  assert.notEqual(null, packageDotJson.scripts);
247
247
  assert.notEqual('', packageDotJson.scripts);
248
+ assert.equal('node utils/setup.js', packageDotJson.scripts.preinstall);
248
249
  assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js', packageDotJson.scripts.lint);
249
250
  assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet', packageDotJson.scripts['lint:errors']);
250
251
  assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
@@ -263,6 +264,9 @@ describe('[unit] Selector_ai Adapter Test', () => {
263
264
  assert.notEqual(undefined, packageDotJson.repository);
264
265
  assert.notEqual(null, packageDotJson.repository);
265
266
  assert.notEqual('', packageDotJson.repository);
267
+ assert.equal('git', packageDotJson.repository.type);
268
+ assert.equal('git@gitlab.com:itentialopensource/adapters/', packageDotJson.repository.url.substring(0, 43));
269
+ assert.equal('https://gitlab.com/itentialopensource/adapters/', packageDotJson.homepage.substring(0, 47));
266
270
  done();
267
271
  } catch (error) {
268
272
  log.error(`Test Failure: ${error}`);
@@ -276,7 +280,7 @@ describe('[unit] Selector_ai Adapter Test', () => {
276
280
  assert.notEqual(null, packageDotJson.dependencies);
277
281
  assert.notEqual('', packageDotJson.dependencies);
278
282
  assert.equal('8.17.1', packageDotJson.dependencies.ajv);
279
- assert.equal('1.9.0', packageDotJson.dependencies.axios);
283
+ assert.equal('1.12.2', packageDotJson.dependencies.axios);
280
284
  assert.equal('11.1.0', packageDotJson.dependencies.commander);
281
285
  assert.equal('11.3.0', packageDotJson.dependencies['fs-extra']);
282
286
  assert.equal('10.8.2', packageDotJson.dependencies.mocha);