|
1 | 1 | // Avoid exporting Vite types to prevent cross-version type mismatches in consumers |
2 | 2 | import ansis from 'ansis'; |
3 | 3 | import type { BrowserLogLevel } from '@browser-echo/core'; |
4 | | -import { mkdirSync, appendFileSync, existsSync, readFileSync, watch as fsWatch } from 'node:fs'; |
| 4 | +import { mkdirSync, appendFileSync, existsSync, readFileSync } from 'node:fs'; |
5 | 5 | import { join as joinPath, dirname } from 'node:path'; |
6 | 6 |
|
7 | 7 | export interface BrowserLogsToTerminalOptions { |
@@ -162,17 +162,8 @@ function attachMiddleware(server: any, options: ResolvedOptions) { |
162 | 162 | resolvedIngest = ''; |
163 | 163 | } |
164 | 164 |
|
165 | | - // Resolve once at startup and watch for project json changes to re-resolve |
| 165 | + // Resolve once at startup |
166 | 166 | resolveOnce(); |
167 | | - try { |
168 | | - const cfgPath = joinPath(process.cwd(), '.browser-echo-mcp.json'); |
169 | | - if (existsSync(cfgPath)) { |
170 | | - try { fsWatch(cfgPath, { persistent: false }, () => { try { resolveOnce(); } catch {} }); } catch {} |
171 | | - } else { |
172 | | - const parent = process.cwd(); |
173 | | - try { fsWatch(parent, { persistent: false }, (_evt: string, file?: string) => { if (String(file || '') === '.browser-echo-mcp.json') { try { resolveOnce(); } catch {} } }); } catch {} |
174 | | - } |
175 | | - } catch {} |
176 | 167 |
|
177 | 168 | server.middlewares.use(options.route, (req: import('http').IncomingMessage, res: import('http').ServerResponse, next: Function) => { |
178 | 169 | if (req.method !== 'POST') return next(); |
|
0 commit comments