Skip to main content
Glama
SiroSuzume

MCP ts-morph Refactoring Tools

by SiroSuzume
move-file-system-entries.ts860 B
import logger from "../../utils/logger"; import type { RenameOperation } from "../types"; import { performance } from "node:perf_hooks"; export function moveFileSystemEntries( renameOperations: RenameOperation[], signal?: AbortSignal, ) { const startTime = performance.now(); signal?.throwIfAborted(); logger.debug( { count: renameOperations.length }, "Starting file system moves", ); for (const { sourceFile, newPath, oldPath } of renameOperations) { signal?.throwIfAborted(); logger.trace({ from: oldPath, to: newPath }, "Moving file"); try { sourceFile.move(newPath); } catch (err) { logger.error( { err, from: oldPath, to: newPath }, "Error during sourceFile.move()", ); throw err; } } const durationMs = (performance.now() - startTime).toFixed(2); logger.debug({ durationMs }, "Finished file system moves"); }

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/SiroSuzume/mcp-ts-morph'

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