@softeria/ms-365-mcp-server 0.106.1 → 0.106.2
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/.dockerignore +15 -0
- package/Dockerfile +2 -2
- package/dist/logger.js +23 -3
- package/package.json +1 -1
package/.dockerignore
ADDED
package/Dockerfile
CHANGED
|
@@ -3,7 +3,7 @@ FROM node:24-alpine AS builder
|
|
|
3
3
|
WORKDIR /app
|
|
4
4
|
|
|
5
5
|
COPY package*.json ./
|
|
6
|
-
RUN npm
|
|
6
|
+
RUN npm ci
|
|
7
7
|
|
|
8
8
|
COPY . .
|
|
9
9
|
RUN npm run generate
|
|
@@ -17,6 +17,6 @@ COPY --from=builder /app/dist /app/dist
|
|
|
17
17
|
COPY --from=builder /app/package*.json ./
|
|
18
18
|
|
|
19
19
|
ENV NODE_ENV=production
|
|
20
|
-
RUN npm
|
|
20
|
+
RUN npm ci --ignore-scripts --omit=dev
|
|
21
21
|
|
|
22
22
|
ENTRYPOINT ["node", "dist/index.js"]
|
package/dist/logger.js
CHANGED
|
@@ -7,7 +7,25 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
7
7
|
const logsDir = process.env.MS365_MCP_LOG_DIR || path.join(os.homedir(), ".ms-365-mcp-server", "logs");
|
|
8
8
|
if (!fs.existsSync(logsDir)) {
|
|
9
9
|
fs.mkdirSync(logsDir, { recursive: true, mode: 448 });
|
|
10
|
+
} else {
|
|
11
|
+
try {
|
|
12
|
+
fs.chmodSync(logsDir, 448);
|
|
13
|
+
} catch {
|
|
14
|
+
}
|
|
10
15
|
}
|
|
16
|
+
const FILE_MODE = 384;
|
|
17
|
+
function ensureFileMode(filePath) {
|
|
18
|
+
try {
|
|
19
|
+
if (fs.existsSync(filePath)) {
|
|
20
|
+
fs.chmodSync(filePath, FILE_MODE);
|
|
21
|
+
}
|
|
22
|
+
} catch {
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const errorLogPath = path.join(logsDir, "error.log");
|
|
26
|
+
const serverLogPath = path.join(logsDir, "mcp-server.log");
|
|
27
|
+
ensureFileMode(errorLogPath);
|
|
28
|
+
ensureFileMode(serverLogPath);
|
|
11
29
|
const logger = winston.createLogger({
|
|
12
30
|
level: process.env.LOG_LEVEL || "info",
|
|
13
31
|
format: winston.format.combine(
|
|
@@ -20,11 +38,13 @@ const logger = winston.createLogger({
|
|
|
20
38
|
),
|
|
21
39
|
transports: [
|
|
22
40
|
new winston.transports.File({
|
|
23
|
-
filename:
|
|
24
|
-
level: "error"
|
|
41
|
+
filename: errorLogPath,
|
|
42
|
+
level: "error",
|
|
43
|
+
options: { flags: "a", mode: FILE_MODE }
|
|
25
44
|
}),
|
|
26
45
|
new winston.transports.File({
|
|
27
|
-
filename:
|
|
46
|
+
filename: serverLogPath,
|
|
47
|
+
options: { flags: "a", mode: FILE_MODE }
|
|
28
48
|
})
|
|
29
49
|
]
|
|
30
50
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softeria/ms-365-mcp-server",
|
|
3
|
-
"version": "0.106.
|
|
3
|
+
"version": "0.106.2",
|
|
4
4
|
"description": " A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|