Skip to content

Commit 6e6a2cb

Browse files
committed
chore: remove cleanup and logging from SvelteDocsServer
1 parent 1d25dbd commit 6e6a2cb

File tree

2 files changed

+7
-25
lines changed

2 files changed

+7
-25
lines changed

.changeset/legal-forks-bathe.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mcp-svelte-docs': patch
3+
---
4+
5+
remove cleanup and logging

src/index.ts

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { readFileSync } from 'node:fs';
88
import { dirname, join } from 'node:path';
99
import { fileURLToPath } from 'node:url';
1010

11-
import { get_config } from './config.js';
1211
import { register_definition_tools } from './tools/definition-tools.js';
1312

1413
// Get package info for server metadata
@@ -48,43 +47,22 @@ class SvelteDocsServer {
4847
);
4948

5049
// Handle process termination
51-
process.on('SIGINT', async () => {
52-
await this.cleanup();
50+
process.on('SIGINT', () => {
5351
process.exit(0);
5452
});
5553

56-
process.on('SIGTERM', async () => {
57-
await this.cleanup();
54+
process.on('SIGTERM', () => {
5855
process.exit(0);
5956
});
60-
61-
process.on('exit', () => {
62-
this.cleanup();
63-
});
64-
}
65-
66-
/**
67-
* Cleanup resources
68-
*/
69-
private async cleanup(): Promise<void> {
70-
try {
71-
// Server shutdown complete
72-
} catch (error) {
73-
// Error during cleanup
74-
}
7557
}
7658

7759
/**
7860
* Initialize the server with definition tools only
7961
*/
8062
private async initialize(): Promise<void> {
8163
try {
82-
// Load configuration
83-
const config = get_config();
84-
8564
// Register definition tools (single svelte_definition tool)
8665
register_definition_tools(this.server);
87-
8866
} catch (error) {
8967
process.exit(1);
9068
}
@@ -101,7 +79,6 @@ class SvelteDocsServer {
10179
// Setup transport
10280
const transport = new StdioTransport(this.server);
10381
transport.listen();
104-
10582
} catch (error) {
10683
process.exit(1);
10784
}

0 commit comments

Comments
 (0)