@itentialopensource/adapter-servicenow 2.9.1 → 2.9.3

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
+ ## 2.9.3 [09-17-2024]
3
+
4
+ * add workshop and fix vulnerabilities
5
+
6
+ See merge request itentialopensource/adapters/adapter-servicenow!40
7
+
8
+ ---
9
+
10
+ ## 2.9.2 [08-15-2024]
11
+
12
+ * Changes made at 2024.08.14_19:49PM
13
+
14
+ See merge request itentialopensource/adapters/adapter-servicenow!39
15
+
16
+ ---
17
+
2
18
  ## 2.9.1 [08-07-2024]
3
19
 
4
20
  * Changes made at 2024.08.06_21:55PM
package/TAB2.md CHANGED
@@ -67,7 +67,7 @@ Sample Properties can be used to help you configure the adapter in the Itential
67
67
  "auth_method": "basic user_password",
68
68
  "username": "username",
69
69
  "password": "password",
70
- "token": "",
70
+ "token": "token",
71
71
  "token_timeout": 180000,
72
72
  "token_cache": "local",
73
73
  "invalid_token_error": 401,
package/metadata.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "adapter-servicenow",
3
3
  "webName": "Adapter for Integration to ServiceNow",
4
+ "supportLevel": "certified",
4
5
  "vendor": "ServiceNow",
5
6
  "product": "IT Service Management",
7
+ "techAlliance": true,
6
8
  "osVersions": [
7
9
  "San Diego",
8
10
  "Tokyo",
@@ -44,7 +46,7 @@
44
46
  "storeLink": "",
45
47
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-servicenow",
46
48
  "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-servicenow",
47
- "docLink": "https://docs.itential.com/opensource/docs/servicenow",
49
+ "docLink": "https://gitlab.com/itentialopensource/adapters/adapter-servicenow/-/blob/master/README.md?ref_type=heads",
48
50
  "demoLinks": [
49
51
  {
50
52
  "title": "Getting Real (Time) with Automating Network Change Management With ServiceNow",
@@ -52,7 +54,7 @@
52
54
  },
53
55
  {
54
56
  "title": "Integrating ServiceNow CMDB as a Source Of Truth to Drive Network Automation with Itential",
55
- "link": "https://www.itential.com/resource/demo/integrating-servicenow-cmdb-as-a-source-of-truth-to-drive-network-automation-with-itential-2/"
57
+ "link": "https://www.itential.com/resource/demo/integrating-servicenow-cmdb-as-a-source-of-truth-to-drive-network-automation-with-itential/"
56
58
  },
57
59
  {
58
60
  "title": "INTEGRATION - Itential + ServiceNow",
@@ -92,7 +94,16 @@
92
94
  "link": "https://developer.servicenow.com/dev.do#!/reference/api/vancouver/rest",
93
95
  "public": true
94
96
  }
95
- ]
97
+ ],
98
+ "workshopLinks": [
99
+ {
100
+ "title": "Create/Update Change Request"
101
+ },
102
+ {
103
+ "title": "Create/Update Incident"
104
+ }
105
+ ],
106
+ "workshopHomePage": "https://www.itential.com/get-started/"
96
107
  },
97
108
  "assets": [],
98
109
  "relatedItems": {
@@ -128,6 +139,5 @@
128
139
  ],
129
140
  "transformationProjects": [],
130
141
  "exampleProjects": []
131
- },
132
- "supportLevel": "community"
142
+ }
133
143
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-servicenow",
3
- "version": "2.9.1",
3
+ "version": "2.9.3",
4
4
  "description": "This adapter integrates with system described as: servicenowMadrid.",
5
5
  "main": "adapter.js",
6
6
  "systemName": "ServiceNow",
7
7
  "wizardVersion": "2.44.7",
8
- "engineVersion": "1.67.19",
8
+ "engineVersion": "1.68.2",
9
9
  "adapterType": "http",
10
10
  "scripts": {
11
11
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -54,22 +54,22 @@
54
54
  "author": "Itential",
55
55
  "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-servicenow#readme",
56
56
  "dependencies": {
57
- "@itentialopensource/adapter-utils": "^5.6.0",
57
+ "@itentialopensource/adapter-utils": "^5.8.0",
58
58
  "acorn": "^8.12.1",
59
59
  "ajv": "^8.17.1",
60
- "axios": "^1.7.2",
60
+ "axios": "^1.7.4",
61
61
  "commander": "^11.0.0",
62
62
  "dns-lookup-promise": "^1.0.4",
63
63
  "fs-extra": "^11.2.0",
64
64
  "json-query": "^2.2.2",
65
- "mocha": "^10.7.0",
65
+ "mocha": "^10.7.3",
66
66
  "mocha-param": "^2.0.1",
67
67
  "mongodb": "^4.16.0",
68
68
  "ping": "^0.4.4",
69
69
  "prompts": "^2.4.2",
70
70
  "readline-sync": "^1.4.10",
71
71
  "semver": "^7.6.3",
72
- "winston": "^3.13.1"
72
+ "winston": "^3.14.2"
73
73
  },
74
74
  "devDependencies": {
75
75
  "chai": "^4.3.7",
Binary file
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "2.8.7",
2
+ "version": "2.9.2",
3
3
  "configLines": 8406,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 12921,
6
- "testLines": 11858,
7
- "testCases": 613,
8
- "totalCodeLines": 26562,
6
+ "testLines": 11842,
7
+ "testCases": 612,
8
+ "totalCodeLines": 26546,
9
9
  "wfTasks": 165
10
10
  }
@@ -17,7 +17,7 @@
17
17
  "auth_method": "basic user_password",
18
18
  "username": "username",
19
19
  "password": "password",
20
- "token": "",
20
+ "token": "token",
21
21
  "token_timeout": 180000,
22
22
  "token_cache": "local",
23
23
  "invalid_token_error": 401,
@@ -136,7 +136,7 @@
136
136
  "ostypePrefix": "meraki-",
137
137
  "port": "{port}",
138
138
  "ipaddress": "{ip_addr}",
139
- "serial" : "{serial}"
139
+ "serial": "{serial}"
140
140
  }
141
141
  }
142
142
  ],
@@ -162,7 +162,7 @@
162
162
  "ostypePrefix": "meraki-",
163
163
  "port": "{port}",
164
164
  "ipaddress": "{ip_addr}",
165
- "serial" : "{serial}",
165
+ "serial": "{serial}",
166
166
  "id": "{myid}"
167
167
  }
168
168
  }
@@ -246,7 +246,7 @@
246
246
  "ostypePrefix": "meraki-",
247
247
  "port": "{port}",
248
248
  "ipaddress": "{ip_addr}",
249
- "serial" : "{serial}",
249
+ "serial": "{serial}",
250
250
  "id": "{myid}"
251
251
  }
252
252
  }
@@ -4,7 +4,6 @@
4
4
  /* eslint no-unused-vars: warn */
5
5
 
6
6
  const assert = require('assert');
7
- const http = require('http');
8
7
  const https = require('https');
9
8
  const mocha = require('mocha');
10
9
  const ping = require('ping');
@@ -53,29 +52,6 @@ describe('[integration] Adapter Test', () => {
53
52
  });
54
53
  });
55
54
 
56
- it('Support HTTP on port 80', (done) => {
57
- const requestOptions = {
58
- host,
59
- port: 80,
60
- method: 'HEAD'
61
- };
62
-
63
- const req = http.request(requestOptions, (res) => {
64
- try {
65
- assert.ok(res.statusCode >= 200 && res.statusCode < 400);
66
- done();
67
- } catch (error) {
68
- done(error);
69
- }
70
- });
71
-
72
- req.on('error', (err) => {
73
- done(err);
74
- });
75
-
76
- req.end();
77
- });
78
-
79
55
  it('Support HTTPS on port 443', (done) => {
80
56
  const requestOptions = {
81
57
  host,
@@ -36,13 +36,17 @@ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
36
36
  // these variables can be changed to run in integrated mode so easier to set them here
37
37
  // always check these in with bogus data!!!
38
38
  samProps.stub = true;
39
- samProps.host = 'replace.hostorip.here';
40
- samProps.authentication.username = 'username';
41
- samProps.authentication.password = 'password';
42
- samProps.protocol = 'http';
43
- samProps.port = 80;
44
- samProps.ssl.enabled = false;
45
- samProps.ssl.accept_invalid_cert = false;
39
+
40
+ // uncomment if connecting
41
+ // samProps.host = 'replace.hostorip.here';
42
+ // samProps.authentication.username = 'username';
43
+ // samProps.authentication.password = 'password';
44
+ // samProps.authentication.token = 'password';
45
+ // samProps.protocol = 'http';
46
+ // samProps.port = 80;
47
+ // samProps.ssl.enabled = false;
48
+ // samProps.ssl.accept_invalid_cert = false;
49
+
46
50
  if (samProps.request.attempt_timeout < 30000) {
47
51
  samProps.request.attempt_timeout = 30000;
48
52
  }
@@ -2504,7 +2508,7 @@ describe('[integration] Servicenow Adapter Test', () => {
2504
2508
 
2505
2509
  const usersCreateUsersBodyParam = {
2506
2510
  username: `IAP${randExt}`,
2507
- password: 'metemp'
2511
+ password: samProps.authentication.password
2508
2512
  };
2509
2513
  let usersId = '02826bf03710200044e0bfc8bcbe5d3f';
2510
2514
  const usersUpdateUsersBodyParam = { name: 'IAP TESTER' };
@@ -36,13 +36,17 @@ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
36
36
  // these variables can be changed to run in integrated mode so easier to set them here
37
37
  // always check these in with bogus data!!!
38
38
  samProps.stub = true;
39
- samProps.host = 'replace.hostorip.here';
40
- samProps.authentication.username = 'username';
41
- samProps.authentication.password = 'password';
42
- samProps.protocol = 'http';
43
- samProps.port = 80;
44
- samProps.ssl.enabled = false;
45
- samProps.ssl.accept_invalid_cert = false;
39
+
40
+ // uncomment if connecting
41
+ // samProps.host = 'replace.hostorip.here';
42
+ // samProps.authentication.username = 'username';
43
+ // samProps.authentication.password = 'password';
44
+ // samProps.authentication.token = 'password';
45
+ // samProps.protocol = 'http';
46
+ // samProps.port = 80;
47
+ // samProps.ssl.enabled = false;
48
+ // samProps.ssl.accept_invalid_cert = false;
49
+
46
50
  samProps.request.attempt_timeout = 1200000;
47
51
  const attemptTimeout = samProps.request.attempt_timeout;
48
52
  const { stub } = samProps;
@@ -315,15 +319,15 @@ describe('[unit] Servicenow Adapter Test', () => {
315
319
  assert.notEqual(null, packageDotJson.dependencies);
316
320
  assert.notEqual('', packageDotJson.dependencies);
317
321
  assert.equal('^8.17.1', packageDotJson.dependencies.ajv);
318
- assert.equal('^1.7.2', packageDotJson.dependencies.axios);
322
+ assert.equal('^1.7.4', packageDotJson.dependencies.axios);
319
323
  assert.equal('^11.0.0', packageDotJson.dependencies.commander);
320
324
  assert.equal('^11.2.0', packageDotJson.dependencies['fs-extra']);
321
- assert.equal('^10.7.0', packageDotJson.dependencies.mocha);
325
+ assert.equal('^10.7.3', packageDotJson.dependencies.mocha);
322
326
  assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
323
327
  assert.equal('^0.4.4', packageDotJson.dependencies.ping);
324
328
  assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
325
329
  assert.equal('^7.6.3', packageDotJson.dependencies.semver);
326
- assert.equal('^3.13.1', packageDotJson.dependencies.winston);
330
+ assert.equal('^3.14.2', packageDotJson.dependencies.winston);
327
331
  done();
328
332
  } catch (error) {
329
333
  log.error(`Test Failure: ${error}`);
@@ -561,7 +565,7 @@ describe('[unit] Servicenow Adapter Test', () => {
561
565
  log.error(`Adapter Exception: ${error}`);
562
566
  done(error);
563
567
  }
564
- });
568
+ }).timeout(attemptTimeout);
565
569
  });
566
570
 
567
571
  describe('propertiesSchema.json', () => {
@@ -6111,7 +6115,7 @@ describe('[unit] Servicenow Adapter Test', () => {
6111
6115
  }).timeout(attemptTimeout);
6112
6116
  it('should error on create a user - no username', (done) => {
6113
6117
  try {
6114
- const ubody = { password: 'badbody' };
6118
+ const ubody = { password: samProps.authentication.password };
6115
6119
  a.createUsers(ubody, (data, error) => {
6116
6120
  try {
6117
6121
  const displayE = 'Schema validation failed on must have required property \'username\'';
@@ -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
- ---------------------------------------------------------------------------------------------