@itentialopensource/adapter-microsoft_graph 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ## 1.2.0 [11-07-2023]
3
+
4
+ * More Migration Changes
5
+
6
+ See merge request itentialopensource/adapters/cloud/adapter-microsoft_graph!5
7
+
8
+ ---
9
+
2
10
  ## 1.1.1 [10-11-2023]
3
11
 
4
12
  * Patch/adapt 2935
package/metadata.json CHANGED
@@ -15,9 +15,7 @@
15
15
  ],
16
16
  "method": "REST",
17
17
  "type": "Adapter",
18
- "domains": [
19
- "Cloud"
20
- ],
18
+ "domains": [],
21
19
  "tags": [],
22
20
  "useCases": [],
23
21
  "deprecated": {
@@ -27,7 +25,7 @@
27
25
  "documentation": {
28
26
  "storeLink": "",
29
27
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-microsoft_graph",
30
- "repoLink": "https://gitlab.com/itentialopensource/adapters/cloud/adapter-microsoft_graph.git",
28
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/cloud/adapter-microsoft_graph",
31
29
  "docLink": "https://docs.itential.com/opensource/docs/microsoft-graph",
32
30
  "demoLinks": [],
33
31
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-microsoft_graph",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "This adapter integrates with system described as: microsoftGraph.",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.7",
7
- "engineVersion": "1.67.8",
7
+ "engineVersion": "1.67.10",
8
8
  "adapterType": "http",
9
9
  "scripts": {
10
10
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -54,7 +54,7 @@
54
54
  "author": "Itential",
55
55
  "homepage": "https://gitlab.com/itentialopensource/adapters/cloud/adapter-microsoft_graph#readme",
56
56
  "dependencies": {
57
- "@itentialopensource/adapter-utils": "^5.1.7",
57
+ "@itentialopensource/adapter-utils": "^5.3.0",
58
58
  "acorn": "^8.10.0",
59
59
  "ajv": "^8.12.0",
60
60
  "axios": "^1.4.0",
@@ -109,6 +109,14 @@
109
109
  },
110
110
  "cache": {
111
111
  "$ref": "#/definitions/cache"
112
+ },
113
+ "service": {
114
+ "type": "string",
115
+ "description": "Service we are integrating with -- used with AWS Authentication",
116
+ "examples": [
117
+ "ec2",
118
+ "route53"
119
+ ]
112
120
  }
113
121
  },
114
122
  "required": [
@@ -131,7 +139,8 @@
131
139
  "jwt_token",
132
140
  "request_token",
133
141
  "no_authentication",
134
- "multi_step_authentication"
142
+ "multi_step_authentication",
143
+ "aws_authentication"
135
144
  ]
136
145
  },
137
146
  "username": {
Binary file
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "1.1.0",
3
- "configLines": 10902,
2
+ "version": "1.1.1",
3
+ "configLines": 10911,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 20170,
6
6
  "testLines": 15130,
@@ -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": 17
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": 22
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.3.0"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 77
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 347
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": 642
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": 7690
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 491
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 6188
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 211
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": 15331
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 702
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -77,6 +77,7 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
77
77
  // parsing the file to get the function and class declarations.
78
78
  const aFileFuncArgs = acorn.parse(aFile, { ecmaVersion: 2020 });
79
79
 
80
+ let callName = 'identifyRequest';
80
81
  // Looping through all the declarations parsed:
81
82
  aFileFuncArgs.body.forEach((e) => {
82
83
  // Getting only the class declaration as it has our required functions.
@@ -89,8 +90,10 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
89
90
  method.value.params.forEach((param) => {
90
91
  if (param.type === 'Identifier') {
91
92
  funcArgs.push(param.name);
93
+ } else if (param.type === 'RestElement') {
94
+ funcArgs.push(`...${param.argument.name}`);
92
95
  } else {
93
- const args = `${param.left.name} = ${param.right.value}`;
96
+ const args = `${param.left.name} = ${param.right.raw}`;
94
97
  funcArgs.push(args);
95
98
  }
96
99
  });
@@ -102,7 +105,7 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
102
105
  });
103
106
  const requests = [];
104
107
  for (let i = 0; i < callList.length; i += 1) {
105
- if (callList[i].callee.property && callList[i].callee.property.name === 'identifyRequest') {
108
+ if (callList[i].callee.property && callList[i].callee.property.name === callName) {
106
109
  requests.push(callList[i]);
107
110
  }
108
111
  }
@@ -114,7 +117,16 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
114
117
  const entity = expr.arguments[0].value;
115
118
  const actionName = expr.arguments[1].value;
116
119
  if (expr !== undefined && (expr.arguments[0].type !== 'Literal' || expr.arguments[1].type !== 'Literal')) {
117
- throw new Error(`Bad inputs in method ${funcName}`);
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}`);
128
+ }
129
+ callName = funcName;
118
130
  }
119
131
  const entityPath = getPathFromEntity(entity, actionName);
120
132
 
@@ -197,6 +209,7 @@ function readMDFile(filename, functionList) {
197
209
  // Creating the tags for each method to be appended to the file.
198
210
  const tdBeginTag = ' <td style="padding:15px">';
199
211
  const tdEndTag = '</td>';
212
+
200
213
  functionList.forEach((func) => {
201
214
  const signCommand = `${tdBeginTag}${func.method_signature}${tdEndTag}`;
202
215
  const descCommand = `${tdBeginTag}${func.description}${tdEndTag}`;