@softeria/ms-365-mcp-server 0.13.1 → 0.13.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.
@@ -24,8 +24,8 @@ function registerAuthTools(server, authManager) {
24
24
  };
25
25
  }
26
26
  }
27
- const text = await new Promise((r) => {
28
- authManager.acquireTokenByDeviceCode(r);
27
+ const text = await new Promise((resolve, reject) => {
28
+ authManager.acquireTokenByDeviceCode(resolve).catch(reject);
29
29
  });
30
30
  return {
31
31
  content: [
@@ -58,7 +58,7 @@ function registerAuthTools(server, authManager) {
58
58
  }
59
59
  ]
60
60
  };
61
- } catch (error) {
61
+ } catch {
62
62
  return {
63
63
  content: [
64
64
  {
package/dist/auth.js CHANGED
@@ -163,7 +163,7 @@ class AuthManager {
163
163
  this.accessToken = response.accessToken;
164
164
  this.tokenExpiry = response.expiresOn ? new Date(response.expiresOn).getTime() : null;
165
165
  return this.accessToken;
166
- } catch (error) {
166
+ } catch {
167
167
  logger.error("Silent token acquisition failed");
168
168
  throw new Error("Silent token acquisition failed");
169
169
  }
@@ -107,7 +107,7 @@ class GraphClient {
107
107
  }
108
108
  try {
109
109
  return JSON.parse(text);
110
- } catch (jsonError) {
110
+ } catch {
111
111
  return { message: "OK!", rawResponse: text };
112
112
  }
113
113
  } catch (error) {
@@ -361,10 +361,11 @@ class GraphClient {
361
361
  obj.forEach((item) => removeODataProps(item));
362
362
  } else {
363
363
  Object.keys(obj).forEach((key) => {
364
+ const objRecord = obj;
364
365
  if (key.startsWith("@odata") && !["@odata.nextLink", "@odata.count"].includes(key)) {
365
- delete obj[key];
366
- } else if (typeof obj[key] === "object") {
367
- removeODataProps(obj[key]);
366
+ delete objRecord[key];
367
+ } else if (typeof objRecord[key] === "object") {
368
+ removeODataProps(objRecord[key]);
368
369
  }
369
370
  });
370
371
  }
@@ -15,7 +15,7 @@ function registerGraphTools(server, graphClient, readOnly = false, enabledToolsP
15
15
  try {
16
16
  enabledToolsRegex = new RegExp(enabledToolsPattern, "i");
17
17
  logger.info(`Tool filtering enabled with pattern: ${enabledToolsPattern}`);
18
- } catch (error) {
18
+ } catch {
19
19
  logger.error(`Invalid tool filter regex pattern: ${enabledToolsPattern}. Ignoring filter.`);
20
20
  }
21
21
  }
@@ -54,7 +54,7 @@ function registerGraphTools(server, graphClient, readOnly = false, enabledToolsP
54
54
  title: tool.alias,
55
55
  readOnlyHint: tool.method.toUpperCase() === "GET"
56
56
  },
57
- async (params, extra) => {
57
+ async (params) => {
58
58
  logger.info(`Tool ${tool.alias} called with params: ${JSON.stringify(params)}`);
59
59
  try {
60
60
  logger.info(`params: ${JSON.stringify(params)}`);
@@ -92,7 +92,7 @@ function registerGraphTools(server, graphClient, readOnly = false, enabledToolsP
92
92
  if (typeof paramValue === "string") {
93
93
  try {
94
94
  body = JSON.parse(paramValue);
95
- } catch (e) {
95
+ } catch {
96
96
  body = paramValue;
97
97
  }
98
98
  } else {
@@ -107,7 +107,7 @@ function registerGraphTools(server, graphClient, readOnly = false, enabledToolsP
107
107
  if (typeof paramValue === "string") {
108
108
  try {
109
109
  body = JSON.parse(paramValue);
110
- } catch (e) {
110
+ } catch {
111
111
  body = paramValue;
112
112
  }
113
113
  } else {
@@ -198,7 +198,7 @@ function registerGraphTools(server, graphClient, readOnly = false, enabledToolsP
198
198
  }
199
199
  const preview = responseText.substring(0, 500);
200
200
  logger.info(`Response preview: ${preview}${responseText.length > 500 ? "..." : ""}`);
201
- } catch (e) {
201
+ } catch {
202
202
  const preview = responseText.substring(0, 500);
203
203
  logger.info(
204
204
  `Response preview (non-JSON): ${preview}${responseText.length > 500 ? "..." : ""}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softeria/ms-365-mcp-server",
3
- "version": "0.13.1",
3
+ "version": "0.13.3",
4
4
  "description": "Microsoft 365 MCP Server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",