@itentialopensource/adapter-gitlab 0.15.2 → 0.15.4

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/BROKER.md CHANGED
@@ -22,18 +22,25 @@ Below is an example of how you may set up the properties for this call.
22
22
  {
23
23
  "path": "/{org}/get/devices",
24
24
  "method": "GET",
25
+ "pagination": {
26
+ "offsetVar": "",
27
+ "limitVar": "",
28
+ "incrementBy": "limit",
29
+ "requestLocation": "query"
30
+ },
25
31
  "query": {},
26
32
  "body": {},
27
33
  "headers": {},
28
34
  "handleFailure": "ignore",
35
+ "responseDataKey": "",
29
36
  "requestFields": {
30
37
  "org": "555"
31
38
  },
32
39
  "responseFields": {
33
- "name": "host",
34
- "ostype": "os",
40
+ "name": "{hostField}",
41
+ "ostype": "{osField}",
35
42
  "ostypePrefix": "system-",
36
- "ipaddress": "attributes.ipaddr",
43
+ "ipaddress": "{attributes.ipaddr}",
37
44
  "port": "443"
38
45
  }
39
46
  },
@@ -44,16 +51,17 @@ Below is an example of how you may set up the properties for this call.
44
51
  "body": {},
45
52
  "headers": {},
46
53
  "handleFailure": "ignore",
54
+ "responseDataKey": "",
47
55
  "requestFields": {
48
56
  "org": "777"
49
57
  },
50
58
  "responseFields": {
51
- "name": "host",
52
- "ostype": "os",
59
+ "name": "{hostField}",
60
+ "ostype": "{osField}",
53
61
  "ostypePrefix": "system-",
54
- "ipaddress": "attributes.ipaddr",
62
+ "ipaddress": "{attributes.ipaddr}",
55
63
  "port": "443",
56
- "myorg": "org"
64
+ "myorg": "{orgField}"
57
65
  }
58
66
  }
59
67
  ]
@@ -88,12 +96,13 @@ Below is an example of how you may set up the properties for this call.
88
96
  "headers": {},
89
97
  "handleFailure": "ignore",
90
98
  "statusValue": "online",
99
+ "responseDataKey": "",
91
100
  "requestFields": {
92
- "org": "myorg",
93
- "id": "name"
101
+ "org": "{myorg}",
102
+ "id": "{name}"
94
103
  },
95
104
  "responseFields": {
96
- "status": "status"
105
+ "status": "{status}"
97
106
  }
98
107
  }
99
108
  ]
@@ -129,9 +138,10 @@ Below is an example of how you may set up the properties for this call.
129
138
  "body": {},
130
139
  "headers": {},
131
140
  "handleFailure": "ignore",
141
+ "responseDataKey": "",
132
142
  "requestFields": {
133
- "org": "myorg",
134
- "id": "name"
143
+ "org": "{myorg}",
144
+ "id": "{name}"
135
145
  }
136
146
  "responseFields": {}
137
147
  },
@@ -142,8 +152,9 @@ Below is an example of how you may set up the properties for this call.
142
152
  "body": {},
143
153
  "headers": {},
144
154
  "handleFailure": "ignore",
155
+ "responseDataKey": "",
145
156
  "requestFields": {
146
- "org": "myorg"
157
+ "org": "{myorg}"
147
158
  }
148
159
  "responseFields": {}
149
160
  }
@@ -178,17 +189,18 @@ Below is an example of how you may set up the properties for this call.
178
189
  "body": {},
179
190
  "headers": {},
180
191
  "handleFailure": "ignore",
192
+ "responseDataKey": "",
181
193
  "requestFields": {
182
- "org": "myorg",
183
- "id": "name"
194
+ "org": "{myorg}",
195
+ "id": "{name}"
184
196
  },
185
197
  "responseFields": {
186
- "name": "host",
187
- "ostype": "os",
198
+ "name": "{hostField}",
199
+ "ostype": "{osField}",
188
200
  "ostypePrefix": "system-",
189
- "ipaddress": "attributes.ipaddr",
201
+ "ipaddress": "{attributes.ipaddr}",
190
202
  "port": "443",
191
- "myorg": "org"
203
+ "myorg": "{orgField}"
192
204
  }
193
205
  }
194
206
  ]
package/CHANGELOG.md CHANGED
@@ -1,4 +1,20 @@
1
1
 
2
+ ## 0.15.4 [10-15-2024]
3
+
4
+ * Changes made at 2024.10.14_21:29PM
5
+
6
+ See merge request itentialopensource/adapters/adapter-gitlab!35
7
+
8
+ ---
9
+
10
+ ## 0.15.3 [08-26-2024]
11
+
12
+ * update dependencies and metadata
13
+
14
+ See merge request itentialopensource/adapters/adapter-gitlab!33
15
+
16
+ ---
17
+
2
18
  ## 0.15.2 [08-15-2024]
3
19
 
4
20
  * Changes made at 2024.08.14_19:48PM
package/TAB2.md CHANGED
@@ -62,9 +62,9 @@ Sample Properties can be used to help you configure the adapter in the Itential
62
62
  "protocol": "https",
63
63
  "authentication": {
64
64
  "auth_method": "static_token",
65
- "username": "exampleUsername",
66
- "password": "examplePassword",
67
- "token": "statictoken",
65
+ "username": "username",
66
+ "password": "password",
67
+ "token": "token",
68
68
  "token_timeout": 1800000,
69
69
  "token_cache": "local",
70
70
  "invalid_token_error": 401,
package/metadata.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "adapter-gitlab",
3
3
  "webName": "Adapter for Integration to GitLab",
4
+ "supportLevel": "certified",
4
5
  "vendor": "GitLab",
5
6
  "product": "GitLab",
7
+ "techAlliance": false,
6
8
  "osVersion": [],
7
9
  "apiVersions": [
8
10
  "4"
@@ -31,8 +33,8 @@
31
33
  "documentation": {
32
34
  "storeLink": "",
33
35
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-gitlab",
34
- "repoLink": "https://gitlab.com/itentialopensource/adapters/devops-netops/adapter-gitlab",
35
- "docLink": "https://docs.itential.com/opensource/docs/gitlab",
36
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-gitlab",
37
+ "docLink": "https://gitlab.com/itentialopensource/adapters/adapter-gitlab/-/blob/master/README.md?ref_type=heads",
36
38
  "demoLinks": [
37
39
  {
38
40
  "title": "How NetDevOps Teams can Rapidly Build & Design Network Automations",
@@ -64,7 +66,11 @@
64
66
  "public": true
65
67
  }
66
68
  ],
67
- "workshopLinks": [],
69
+ "workshopLinks": [
70
+ {
71
+ "title": "CI/CD Pipeline"
72
+ }
73
+ ],
68
74
  "workshopHomePage": "https://www.itential.com/get-started/"
69
75
  },
70
76
  "assets": [],
@@ -178,7 +184,5 @@
178
184
  "type": "API Key",
179
185
  "primary": true
180
186
  }
181
- ],
182
- "supportLevel": "community",
183
- "techAlliance": false
187
+ ]
184
188
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-gitlab",
3
- "version": "0.15.2",
3
+ "version": "0.15.4",
4
4
  "description": "This adapter integrates with system described as: gitlab.",
5
5
  "main": "adapter.js",
6
6
  "systemName": "Gitlab",
7
7
  "wizardVersion": "2.44.7",
8
- "engineVersion": "1.67.16",
8
+ "engineVersion": "1.68.2",
9
9
  "adapterType": "http",
10
10
  "scripts": {
11
11
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -54,7 +54,7 @@
54
54
  "author": "Itential",
55
55
  "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-gitlab#readme",
56
56
  "dependencies": {
57
- "@itentialopensource/adapter-utils": "^5.6.0",
57
+ "@itentialopensource/adapter-utils": "^5.9.4",
58
58
  "acorn": "^8.12.1",
59
59
  "ajv": "^8.17.1",
60
60
  "axios": "^1.7.4",
@@ -69,7 +69,7 @@
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": "0.13.5",
2
+ "version": "0.15.2",
3
3
  "configLines": 28652,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 45130,
6
- "testLines": 42558,
7
- "testCases": 2259,
8
- "totalCodeLines": 89471,
6
+ "testLines": 42542,
7
+ "testCases": 2258,
8
+ "totalCodeLines": 89455,
9
9
  "wfTasks": 571
10
10
  }
@@ -15,9 +15,9 @@
15
15
  "protocol": "https",
16
16
  "authentication": {
17
17
  "auth_method": "static_token",
18
- "username": "exampleUsername",
19
- "password": "examplePassword",
20
- "token": "statictoken",
18
+ "username": "username",
19
+ "password": "password",
20
+ "token": "token",
21
21
  "token_timeout": 1800000,
22
22
  "token_cache": "local",
23
23
  "invalid_token_error": 401,
@@ -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
  }
@@ -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;
@@ -323,7 +327,7 @@ describe('[unit] GitLab Adapter Test', () => {
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] GitLab 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', () => {
@@ -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
- ---------------------------------------------------------------------------------------------