Skip to main content
Glama

Starwind UI MCP Server

by starwind-ui
clean_dist.ts1.37 kB
import { readdir, unlink, stat } from "fs/promises"; import { join } from "path"; async function cleanDirectory(dirPath: string): Promise<string[]> { const removedFiles: string[] = []; try { const entries = await readdir(dirPath, { withFileTypes: true }); for (const entry of entries) { const fullPath = join(dirPath, entry.name); if (entry.isDirectory()) { // Recursively clean subdirectories const filesFromSubdir = await cleanDirectory(fullPath); removedFiles.push(...filesFromSubdir); } else if (entry.name.endsWith(".d.ts") || entry.name.endsWith(".map")) { // Remove matching files await unlink(fullPath); removedFiles.push(fullPath); } } } catch (error) { console.error(`Error processing directory ${dirPath}:`, error); } return removedFiles; } async function cleanDist() { const distPath = join(process.cwd(), "dist"); try { const removedFiles = await cleanDirectory(distPath); if (removedFiles.length > 0) { console.log("Successfully cleaned up files in dist directory"); // removedFiles.forEach((file) => console.log(`- ${file}`)); } else { console.log("No .d.ts or .map files found to remove."); } } catch (error) { console.error("Error cleaning dist directory:", error); process.exit(1); } } cleanDist();

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/starwind-ui/starwind-ui-mcp'

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