@@ -8,7 +8,6 @@ import { readFileSync } from 'node:fs';
88import { dirname , join } from 'node:path' ;
99import { fileURLToPath } from 'node:url' ;
1010
11- import { get_config } from './config.js' ;
1211import { 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