feishu-doc-mcp 1.0.5 → 1.0.6
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/build/index.js +9 -0
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -263,7 +263,16 @@ class FeishuDocServer {
|
|
|
263
263
|
throw new Error(`Failed to fetch document: ${message}`);
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
+
// 清理临时目录
|
|
267
|
+
cleanupTempDir() {
|
|
268
|
+
if (fs.existsSync(TEMP_DOC_DIR)) {
|
|
269
|
+
fs.rmSync(TEMP_DOC_DIR, { recursive: true, force: true });
|
|
270
|
+
console.error(`[Cleanup] Removed temp directory: ${TEMP_DOC_DIR}`);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
266
273
|
async run() {
|
|
274
|
+
// 启动时清理临时目录
|
|
275
|
+
this.cleanupTempDir();
|
|
267
276
|
// 先初始化并注册工具
|
|
268
277
|
await this.initializeAndRegisterTools();
|
|
269
278
|
const transport = new StdioServerTransport();
|