@softeria/ms-365-mcp-server 0.13.2 → 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.
- package/dist/auth-tools.js +1 -1
- package/dist/auth.js +1 -1
- package/dist/graph-client.js +5 -4
- package/dist/graph-tools.js +5 -5
- package/package.json +1 -1
package/dist/auth-tools.js
CHANGED
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
|
|
166
|
+
} catch {
|
|
167
167
|
logger.error("Silent token acquisition failed");
|
|
168
168
|
throw new Error("Silent token acquisition failed");
|
|
169
169
|
}
|
package/dist/graph-client.js
CHANGED
|
@@ -107,7 +107,7 @@ class GraphClient {
|
|
|
107
107
|
}
|
|
108
108
|
try {
|
|
109
109
|
return JSON.parse(text);
|
|
110
|
-
} catch
|
|
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
|
|
366
|
-
} else if (typeof
|
|
367
|
-
removeODataProps(
|
|
366
|
+
delete objRecord[key];
|
|
367
|
+
} else if (typeof objRecord[key] === "object") {
|
|
368
|
+
removeODataProps(objRecord[key]);
|
|
368
369
|
}
|
|
369
370
|
});
|
|
370
371
|
}
|
package/dist/graph-tools.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
201
|
+
} catch {
|
|
202
202
|
const preview = responseText.substring(0, 500);
|
|
203
203
|
logger.info(
|
|
204
204
|
`Response preview (non-JSON): ${preview}${responseText.length > 500 ? "..." : ""}`
|