UNPKG

refakts

Version:

TypeScript refactoring tool built for AI coding agents to perform precise refactoring operations via command line instead of requiring complete code regeneration.

32 lines 1.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CommandRegistry = void 0; const extract_variable_command_1 = require("./commands/extract-variable-command"); const inline_variable_command_1 = require("./commands/inline-variable-command"); const rename_command_1 = require("./commands/rename-command"); const select_command_1 = require("./commands/select-command"); const variable_locator_command_1 = require("./commands/variable-locator-command"); const loadCommands = () => [ new extract_variable_command_1.ExtractVariableCommand(), new inline_variable_command_1.InlineVariableCommand(), new rename_command_1.RenameCommand(), new select_command_1.SelectCommand(), new variable_locator_command_1.VariableLocatorCommand() ]; class CommandRegistry { constructor() { this.commands = new Map(); this.registerCommands(); } registerCommands() { const commands = loadCommands(); for (const command of commands) { this.commands.set(command.name, command); } } getAllCommands() { return Array.from(this.commands.values()); } } exports.CommandRegistry = CommandRegistry; //# sourceMappingURL=command-registry.js.map