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.

22 lines 823 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RegexSelectionStrategy = void 0; const regex_pattern_matcher_1 = require("../services/regex-pattern-matcher"); class RegexSelectionStrategy { constructor() { this.regexMatcher = new regex_pattern_matcher_1.RegexPatternMatcher(); } canHandle(options) { return !!options.regex && !options.range && !options.structural && !options.boundaries; } async select(sourceFile, options) { return this.regexMatcher.findRegexMatches(sourceFile, options); } validateOptions(options) { if (!options.regex) { throw new Error('--regex must be specified'); } } } exports.RegexSelectionStrategy = RegexSelectionStrategy; //# sourceMappingURL=regex-selection-strategy.js.map