Skip to main content
Glama
log-level.ts829 B
import * as fs from 'fs'; /** * Convert log level numbers to readable names */ export function getLogLevelName(type: number): string { switch (type) { case 1: return 'Error'; case 2: return 'Warning'; case 3: return 'Info'; case 4: return 'Log'; default: return 'Unknown'; } } /** * Get default preloaded files based on common TypeScript patterns */ export function getDefaultPreloadFiles(): string[] { const candidates = [ './src/index.ts', './src/main.ts', './src/app.ts', './index.ts', './main.ts', ]; // Return the first file that exists for (const candidate of candidates) { try { if (fs.existsSync(candidate)) { return [candidate]; } } catch { // Ignore errors and continue } } return []; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/p1va/symbols-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server