vibecodingmachine-cli 2026.3.14-1537 → 2026.6.17-1956
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/auth/auth-compliance.js +7 -7
- package/bin/commands/agent-commands.js +15 -15
- package/bin/commands/auto-commands.js +3 -3
- package/bin/commands/command-aliases.js +13 -4
- package/bin/config/cli-config.js +15 -5
- package/bin/update/update-checker.js +5 -5
- package/bin/vibecodingmachine.js +2 -2
- package/package.json +2 -2
- package/src/commands/agents/add.js +5 -5
- package/src/commands/agents/check.js +19 -19
- package/src/commands/agents/list.js +24 -24
- package/src/commands/agents/remove.js +4 -4
- package/src/commands/agents-check.js +1 -1
- package/src/commands/analyze-file-sizes.js +43 -43
- package/src/commands/auto-direct/auto-provider-manager.js +19 -19
- package/src/commands/auto-direct/auto-start-phases.js +493 -0
- package/src/commands/auto-direct/auto-status-display.js +35 -35
- package/src/commands/auto-direct/auto-utils.js +50 -50
- package/src/commands/auto-direct/cline-installer.js +56 -0
- package/src/commands/auto-direct/code-processor.js +27 -27
- package/src/commands/auto-direct/file-scanner.js +19 -19
- package/src/commands/auto-direct/ide-completion-waiter.js +485 -0
- package/src/commands/auto-direct/ide-fallback-runner.js +226 -0
- package/src/commands/auto-direct/ide-provider-runner.js +103 -0
- package/src/commands/auto-direct/iteration-handlers.js +189 -0
- package/src/commands/auto-direct/iteration-runner.js +485 -0
- package/src/commands/auto-direct/provider-config.js +38 -7
- package/src/commands/auto-direct/provider-manager.js +132 -6
- package/src/commands/auto-direct/requirement-manager.js +169 -104
- package/src/commands/auto-direct/requirement-mover.js +350 -0
- package/src/commands/auto-direct/spec-handlers.js +155 -0
- package/src/commands/auto-direct/spec-ide-runner.js +318 -0
- package/src/commands/auto-direct/spec-processing.js +203 -0
- package/src/commands/auto-direct/status-display.js +9 -9
- package/src/commands/auto-direct/utils.js +83 -1
- package/src/commands/auto-direct-refactored.js +1 -413
- package/src/commands/auto-direct.js +127 -4119
- package/src/commands/auto-execution.js +21 -21
- package/src/commands/auto-status-helpers.js +0 -2
- package/src/commands/auto.js +22 -22
- package/src/commands/check-compliance.js +65 -65
- package/src/commands/computers.js +39 -39
- package/src/commands/continuous-scan.js +19 -19
- package/src/commands/ide.js +4 -4
- package/src/commands/locale.js +7 -7
- package/src/commands/refactor-file.js +59 -59
- package/src/commands/requirements/commands.js +17 -17
- package/src/commands/requirements/default-handlers.js +30 -30
- package/src/commands/requirements/disable.js +3 -3
- package/src/commands/requirements/enable.js +3 -3
- package/src/commands/requirements/utils.js +6 -6
- package/src/commands/requirements-refactored.js +3 -3
- package/src/commands/requirements-remote.js +38 -38
- package/src/commands/requirements.js +3 -3
- package/src/commands/settings.js +111 -0
- package/src/commands/specs/count.js +60 -0
- package/src/commands/specs/disable.js +3 -3
- package/src/commands/specs/enable.js +3 -3
- package/src/commands/status.js +10 -10
- package/src/commands/sync.js +25 -25
- package/src/commands/timeout.js +35 -35
- package/src/trui/TruiInterface.js +2 -2
- package/src/trui/agents/AgentInterface.js +4 -4
- package/src/trui/agents/handlers/CommandHandler.js +4 -4
- package/src/trui/agents/handlers/ContextManager.js +1 -1
- package/src/trui/agents/handlers/DisplayHandler.js +11 -11
- package/src/trui/agents/handlers/HelpHandler.js +1 -1
- package/src/utils/agent-selector.js +6 -6
- package/src/utils/antigravity-installer.js +4 -4
- package/src/utils/asset-cleanup.js +1 -1
- package/src/utils/auth.js +9 -12
- package/src/utils/clarification-actions.js +4 -4
- package/src/utils/cline-js-handler.js +5 -5
- package/src/utils/compliance-check.js +6 -6
- package/src/utils/config.js +12 -12
- package/src/utils/display-formatters-complete.js +2 -2
- package/src/utils/display-formatters-extracted.js +2 -2
- package/src/utils/display-formatters.js +2 -2
- package/src/utils/feedback-handler.js +2 -2
- package/src/utils/first-run.js +7 -7
- package/src/utils/ide-detection.js +1 -1
- package/src/utils/ide-handlers.js +6 -6
- package/src/utils/interactive/clarification-actions.js +3 -3
- package/src/utils/interactive/core-ui.js +7 -7
- package/src/utils/interactive/file-backup.js +6 -6
- package/src/utils/interactive/file-import-export.js +49 -49
- package/src/utils/interactive/file-operations.js +3 -3
- package/src/utils/interactive/file-validation.js +41 -41
- package/src/utils/interactive/interactive-prompts.js +41 -41
- package/src/utils/interactive/requirement-actions.js +5 -5
- package/src/utils/interactive/requirement-crud.js +4 -4
- package/src/utils/interactive/requirements-navigation.js +10 -10
- package/src/utils/interactive-broken.js +6 -6
- package/src/utils/interactive.js +37 -37
- package/src/utils/keyboard-handler.js +4 -4
- package/src/utils/prompt-helper.js +6 -6
- package/src/utils/provider-checker/agent-checker.js +1 -1
- package/src/utils/provider-checker/agent-runner.js +203 -314
- package/src/utils/provider-checker/agents-file-lock.js +134 -0
- package/src/utils/provider-checker/agents-manager.js +224 -36
- package/src/utils/provider-checker/cli-installer.js +28 -28
- package/src/utils/provider-checker/cli-utils.js +2 -2
- package/src/utils/provider-checker/cursor-approval-clicker.js +108 -0
- package/src/utils/provider-checker/format-utils.js +4 -4
- package/src/utils/provider-checker/ide-installer-helper.js +96 -0
- package/src/utils/provider-checker/ide-manager.js +19 -8
- package/src/utils/provider-checker/ide-quota-checker.js +120 -0
- package/src/utils/provider-checker/ide-utils.js +2 -2
- package/src/utils/provider-checker/node-detector.js +4 -4
- package/src/utils/provider-checker/node-utils.js +5 -5
- package/src/utils/provider-checker/opencode-checker.js +107 -73
- package/src/utils/provider-checker/process-utils.js +1 -1
- package/src/utils/provider-checker/provider-validator.js +11 -11
- package/src/utils/provider-checker/quota-checker.js +5 -5
- package/src/utils/provider-checker/quota-detector.js +5 -5
- package/src/utils/provider-checker/requirements-manager.js +6 -6
- package/src/utils/provider-checker/test-requirements.js +1 -1
- package/src/utils/provider-checker/vscode-approval-clicker.js +328 -0
- package/src/utils/provider-checker-new.js +6 -6
- package/src/utils/provider-checker.js +6 -6
- package/src/utils/provider-checkers/ide-manager.js +13 -13
- package/src/utils/provider-checkers/node-executable-finder.js +4 -4
- package/src/utils/provider-checkers/provider-checker-core.js +5 -5
- package/src/utils/provider-checkers/provider-checker-main.js +17 -17
- package/src/utils/provider-registry.js +5 -6
- package/src/utils/provider-utils.js +12 -12
- package/src/utils/quota-detectors.js +32 -32
- package/src/utils/requirement-action-handlers.js +12 -12
- package/src/utils/requirement-actions/requirement-operations.js +3 -3
- package/src/utils/requirement-actions.js +1 -1
- package/src/utils/requirement-file-operations.js +5 -5
- package/src/utils/requirement-helpers.js +1 -1
- package/src/utils/requirement-management.js +5 -5
- package/src/utils/requirement-navigation.js +2 -2
- package/src/utils/requirement-organization.js +3 -3
- package/src/utils/rui-trui-adapter.js +14 -14
- package/src/utils/simple-trui.js +3 -3
- package/src/utils/status-helpers-extracted.js +3 -3
- package/src/utils/trui-clarifications.js +11 -11
- package/src/utils/trui-debug.js +3 -2
- package/src/utils/trui-devin.js +217 -0
- package/src/utils/trui-feedback.js +7 -7
- package/src/utils/trui-kiro-integration.js +34 -34
- package/src/utils/trui-main-handlers.js +20 -21
- package/src/utils/trui-main-menu.js +19 -19
- package/src/utils/trui-nav-agents.js +59 -8
- package/src/utils/trui-nav-requirements.js +3 -3
- package/src/utils/trui-nav-settings.js +10 -10
- package/src/utils/trui-nav-specifications.js +1 -1
- package/src/utils/trui-navigation-backup.js +11 -11
- package/src/utils/trui-navigation.js +9 -9
- package/src/utils/trui-provider-health.js +25 -25
- package/src/utils/trui-provider-manager.js +28 -28
- package/src/utils/trui-quick-menu.js +2 -2
- package/src/utils/trui-req-actions-backup.js +21 -21
- package/src/utils/trui-req-actions.js +20 -20
- package/src/utils/trui-req-editor.js +10 -10
- package/src/utils/trui-req-file-ops.js +3 -3
- package/src/utils/trui-req-tree.js +7 -7
- package/src/utils/trui-windsurf.js +103 -103
- package/src/utils/user-tracking.js +15 -15
- package/src/utils/trui-req-tree-old.js +0 -719
|
@@ -15,7 +15,7 @@ function parseSearchReplaceBlocks(response) {
|
|
|
15
15
|
|
|
16
16
|
// Match FILE: path SEARCH: ``` old ``` REPLACE: ``` new ``` format
|
|
17
17
|
const fileBlockRegex = /FILE:\s*(.+?)\s*SEARCH:\s*```[\s\S]*?```[\s\S]*?REPLACE:\s*```[\s\S]*?```/g;
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
let match;
|
|
20
20
|
while ((match = fileBlockRegex.exec(response)) !== null) {
|
|
21
21
|
const fileBlock = match[0];
|
|
@@ -123,11 +123,11 @@ async function applyFileChange(change, repoPath) {
|
|
|
123
123
|
|
|
124
124
|
// Try multiple window sizes (±5 lines) to account for LLM not including enough context
|
|
125
125
|
const windowSizes = [0, 2, 5, 10, 15];
|
|
126
|
-
|
|
126
|
+
|
|
127
127
|
for (const windowSize of windowSizes) {
|
|
128
128
|
// Try to find the search block with fuzzy matching
|
|
129
129
|
let foundIndex = -1;
|
|
130
|
-
|
|
130
|
+
|
|
131
131
|
// First try exact match
|
|
132
132
|
const exactMatch = content.indexOf(change.search);
|
|
133
133
|
if (exactMatch !== -1) {
|
|
@@ -135,25 +135,25 @@ async function applyFileChange(change, repoPath) {
|
|
|
135
135
|
} else {
|
|
136
136
|
// Try fuzzy matching by looking for patterns
|
|
137
137
|
const searchPattern = extractPattern(change.search);
|
|
138
|
-
|
|
138
|
+
|
|
139
139
|
for (let i = 0; i <= lines.length - searchLines.length; i++) {
|
|
140
|
-
const window = lines.slice(Math.max(0, i - windowSize),
|
|
140
|
+
const window = lines.slice(Math.max(0, i - windowSize),
|
|
141
141
|
Math.min(lines.length, i + searchLines.length + windowSize));
|
|
142
142
|
const windowContent = window.join('\n');
|
|
143
143
|
const windowPattern = extractPattern(windowContent);
|
|
144
|
-
|
|
144
|
+
|
|
145
145
|
// Check if patterns match and key identifiers are present
|
|
146
146
|
if (windowPattern.includes(searchPattern) || searchPattern.includes(windowPattern)) {
|
|
147
147
|
const windowIdentifiers = extractIdentifiers(windowContent);
|
|
148
148
|
const commonIdentifiers = searchIdentifiers.filter(id => windowIdentifiers.includes(id));
|
|
149
|
-
|
|
149
|
+
|
|
150
150
|
// If we have enough common identifiers, consider it a match
|
|
151
151
|
if (commonIdentifiers.length >= Math.min(3, searchIdentifiers.length)) {
|
|
152
152
|
// Find the actual search block within this window
|
|
153
153
|
const windowStart = Math.max(0, i - windowSize);
|
|
154
|
-
const windowText = lines.slice(windowStart,
|
|
154
|
+
const windowText = lines.slice(windowStart,
|
|
155
155
|
Math.min(lines.length, i + searchLines.length + windowSize)).join('\n');
|
|
156
|
-
|
|
156
|
+
|
|
157
157
|
// Try to find the best match within the window
|
|
158
158
|
const bestMatch = findBestMatch(change.search, windowText);
|
|
159
159
|
if (bestMatch.similarity > 0.7) { // 70% similarity threshold
|
|
@@ -170,18 +170,18 @@ async function applyFileChange(change, repoPath) {
|
|
|
170
170
|
const beforeContent = content.substring(0, foundIndex);
|
|
171
171
|
const afterContent = content.substring(foundIndex);
|
|
172
172
|
const afterLines = afterContent.split('\n');
|
|
173
|
-
|
|
173
|
+
|
|
174
174
|
// Find the end of the block to replace
|
|
175
175
|
let endLineIndex = 0;
|
|
176
176
|
let currentLineContent = '';
|
|
177
|
-
|
|
177
|
+
|
|
178
178
|
for (let i = 0; i < afterLines.length; i++) {
|
|
179
179
|
currentLineContent += (i > 0 ? '\n' : '') + afterLines[i];
|
|
180
|
-
|
|
180
|
+
|
|
181
181
|
// Check if we've found a block that matches our search
|
|
182
182
|
const testContent = afterLines.slice(0, i + 1).join('\n');
|
|
183
183
|
const similarity = calculateSimilarity(change.search, testContent);
|
|
184
|
-
|
|
184
|
+
|
|
185
185
|
if (similarity > 0.8 || i >= searchLines.length + 5) { // Allow some extra lines
|
|
186
186
|
endLineIndex = i + 1;
|
|
187
187
|
break;
|
|
@@ -189,11 +189,11 @@ async function applyFileChange(change, repoPath) {
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
// Replace the content
|
|
192
|
-
const newContent = beforeContent + change.replace +
|
|
192
|
+
const newContent = beforeContent + change.replace +
|
|
193
193
|
afterLines.slice(endLineIndex).join('\n');
|
|
194
|
-
|
|
194
|
+
|
|
195
195
|
await fs.writeFile(fullPath, newContent);
|
|
196
|
-
|
|
196
|
+
|
|
197
197
|
console.log(chalk.green(` ✅ Applied change to ${change.file}`));
|
|
198
198
|
return { success: true };
|
|
199
199
|
}
|
|
@@ -201,7 +201,7 @@ async function applyFileChange(change, repoPath) {
|
|
|
201
201
|
|
|
202
202
|
console.log(chalk.yellow(` ⚠️ Could not find matching block in ${change.file}`));
|
|
203
203
|
return { success: false, error: 'Could not find matching block' };
|
|
204
|
-
|
|
204
|
+
|
|
205
205
|
} catch (error) {
|
|
206
206
|
console.error(chalk.red(` ❌ Error applying change to ${change.file}:`), error.message);
|
|
207
207
|
return { success: false, error: error.message };
|
|
@@ -214,18 +214,18 @@ async function applyFileChange(change, repoPath) {
|
|
|
214
214
|
function findBestMatch(searchText, textBlock) {
|
|
215
215
|
const searchLines = searchText.split('\n');
|
|
216
216
|
const textLines = textBlock.split('\n');
|
|
217
|
-
|
|
217
|
+
|
|
218
218
|
let bestMatch = { similarity: 0, offset: 0 };
|
|
219
|
-
|
|
219
|
+
|
|
220
220
|
for (let offset = 0; offset <= textLines.length - searchLines.length; offset++) {
|
|
221
221
|
const testBlock = textLines.slice(offset, offset + searchLines.length).join('\n');
|
|
222
222
|
const similarity = calculateSimilarity(searchText, testBlock);
|
|
223
|
-
|
|
223
|
+
|
|
224
224
|
if (similarity > bestMatch.similarity) {
|
|
225
225
|
bestMatch = { similarity, offset };
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
|
|
228
|
+
|
|
229
229
|
return bestMatch;
|
|
230
230
|
}
|
|
231
231
|
|
|
@@ -235,9 +235,9 @@ function findBestMatch(searchText, textBlock) {
|
|
|
235
235
|
function calculateSimilarity(str1, str2) {
|
|
236
236
|
const longer = str1.length > str2.length ? str1 : str2;
|
|
237
237
|
const shorter = str1.length > str2.length ? str2 : str1;
|
|
238
|
-
|
|
238
|
+
|
|
239
239
|
if (longer.length === 0) return 1.0;
|
|
240
|
-
|
|
240
|
+
|
|
241
241
|
const editDistance = levenshteinDistance(longer, shorter);
|
|
242
242
|
return (longer.length - editDistance) / longer.length;
|
|
243
243
|
}
|
|
@@ -247,15 +247,15 @@ function calculateSimilarity(str1, str2) {
|
|
|
247
247
|
*/
|
|
248
248
|
function levenshteinDistance(str1, str2) {
|
|
249
249
|
const matrix = [];
|
|
250
|
-
|
|
250
|
+
|
|
251
251
|
for (let i = 0; i <= str2.length; i++) {
|
|
252
252
|
matrix[i] = [i];
|
|
253
253
|
}
|
|
254
|
-
|
|
254
|
+
|
|
255
255
|
for (let j = 0; j <= str1.length; j++) {
|
|
256
256
|
matrix[0][j] = j;
|
|
257
257
|
}
|
|
258
|
-
|
|
258
|
+
|
|
259
259
|
for (let i = 1; i <= str2.length; i++) {
|
|
260
260
|
for (let j = 1; j <= str1.length; j++) {
|
|
261
261
|
if (str2.charAt(i - 1) === str1.charAt(j - 1)) {
|
|
@@ -269,7 +269,7 @@ function levenshteinDistance(str1, str2) {
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
|
|
272
|
+
|
|
273
273
|
return matrix[str2.length][str1.length];
|
|
274
274
|
}
|
|
275
275
|
|
|
@@ -32,10 +32,10 @@ async function findRelevantFiles(requirement, repoPath) {
|
|
|
32
32
|
// Search for files containing keywords
|
|
33
33
|
for (const pattern of patterns) {
|
|
34
34
|
const files = await glob(pattern, { cwd: repoPath, ignore: ['**/node_modules/**', '**/.git/**'] });
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
for (const file of files) {
|
|
37
37
|
const fullPath = path.join(repoPath, file);
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
// Skip if not a file
|
|
40
40
|
if (!await fs.pathExists(fullPath) || !await fs.stat(fullPath).then(stat => stat.isFile())) {
|
|
41
41
|
continue;
|
|
@@ -52,7 +52,7 @@ async function findRelevantFiles(requirement, repoPath) {
|
|
|
52
52
|
// Remove duplicates and sort by relevance
|
|
53
53
|
const uniqueFiles = [...new Set(relevantFiles)];
|
|
54
54
|
return uniqueFiles.slice(0, 20); // Limit to top 20 files
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
} catch (error) {
|
|
57
57
|
console.error('Error finding relevant files:', error.message);
|
|
58
58
|
return [];
|
|
@@ -68,7 +68,7 @@ async function readFileSnippets(files, repoPath, requirement) {
|
|
|
68
68
|
for (const file of files) {
|
|
69
69
|
try {
|
|
70
70
|
const fullPath = path.join(repoPath, file);
|
|
71
|
-
|
|
71
|
+
|
|
72
72
|
if (!await fs.pathExists(fullPath)) {
|
|
73
73
|
continue;
|
|
74
74
|
}
|
|
@@ -84,7 +84,7 @@ async function readFileSnippets(files, repoPath, requirement) {
|
|
|
84
84
|
// Try to find relevant sections based on requirement keywords
|
|
85
85
|
const keywords = extractKeywords(requirement);
|
|
86
86
|
const relevantSections = findRelevantSections(lines, keywords);
|
|
87
|
-
|
|
87
|
+
|
|
88
88
|
if (relevantSections.length > 0) {
|
|
89
89
|
// Use the most relevant section
|
|
90
90
|
const section = relevantSections[0];
|
|
@@ -97,7 +97,7 @@ async function readFileSnippets(files, repoPath, requirement) {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
const snippet = lines.slice(startLine, endLine).join('\n');
|
|
100
|
-
|
|
100
|
+
|
|
101
101
|
snippets.push({
|
|
102
102
|
file,
|
|
103
103
|
content: snippet,
|
|
@@ -158,9 +158,9 @@ async function isFileRelevant(filePath, keywords) {
|
|
|
158
158
|
try {
|
|
159
159
|
const content = await fs.readFile(filePath, 'utf8');
|
|
160
160
|
const lowerContent = content.toLowerCase();
|
|
161
|
-
|
|
161
|
+
|
|
162
162
|
// Check if any keywords are present in the file
|
|
163
|
-
return keywords.some(keyword =>
|
|
163
|
+
return keywords.some(keyword =>
|
|
164
164
|
lowerContent.includes(keyword.toLowerCase())
|
|
165
165
|
);
|
|
166
166
|
} catch (error) {
|
|
@@ -173,16 +173,16 @@ async function isFileRelevant(filePath, keywords) {
|
|
|
173
173
|
*/
|
|
174
174
|
function findRelevantSections(lines, keywords) {
|
|
175
175
|
const sections = [];
|
|
176
|
-
|
|
176
|
+
|
|
177
177
|
keywords.forEach(keyword => {
|
|
178
178
|
const lowerKeyword = keyword.toLowerCase();
|
|
179
|
-
|
|
179
|
+
|
|
180
180
|
lines.forEach((line, index) => {
|
|
181
181
|
if (line.toLowerCase().includes(lowerKeyword)) {
|
|
182
182
|
// Found a keyword, create a section around it
|
|
183
183
|
const start = Math.max(0, index - 5);
|
|
184
184
|
const end = Math.min(lines.length, index + 15);
|
|
185
|
-
|
|
185
|
+
|
|
186
186
|
sections.push({
|
|
187
187
|
keyword,
|
|
188
188
|
start,
|
|
@@ -209,27 +209,27 @@ function findRelevantSections(lines, keywords) {
|
|
|
209
209
|
*/
|
|
210
210
|
function calculateRelevanceScore(line) {
|
|
211
211
|
let score = 0;
|
|
212
|
-
|
|
212
|
+
|
|
213
213
|
// Higher score for function/class definitions
|
|
214
214
|
if (line.includes('function ') || line.includes('class ') || line.includes('const ')) {
|
|
215
215
|
score += 10;
|
|
216
216
|
}
|
|
217
|
-
|
|
217
|
+
|
|
218
218
|
// Higher score for exports
|
|
219
219
|
if (line.includes('module.exports') || line.includes('export ')) {
|
|
220
220
|
score += 8;
|
|
221
221
|
}
|
|
222
|
-
|
|
222
|
+
|
|
223
223
|
// Higher score for imports/requires
|
|
224
224
|
if (line.includes('require(') || line.includes('import ')) {
|
|
225
225
|
score += 5;
|
|
226
226
|
}
|
|
227
|
-
|
|
227
|
+
|
|
228
228
|
// Higher score for comments
|
|
229
229
|
if (line.includes('//') || line.includes('*') || line.includes('/*')) {
|
|
230
230
|
score += 3;
|
|
231
231
|
}
|
|
232
|
-
|
|
232
|
+
|
|
233
233
|
return score;
|
|
234
234
|
}
|
|
235
235
|
|
|
@@ -240,16 +240,16 @@ async function glob(pattern, options = {}) {
|
|
|
240
240
|
const { cwd = process.cwd(), ignore = [] } = options;
|
|
241
241
|
const { promisify } = require('util');
|
|
242
242
|
const { exec } = require('child_process');
|
|
243
|
-
|
|
243
|
+
|
|
244
244
|
try {
|
|
245
245
|
const { stdout } = await promisify(exec)(`find . -name "${pattern.replace('**/', '*')}"`, { cwd });
|
|
246
246
|
let files = stdout.trim().split('\n').filter(file => file);
|
|
247
|
-
|
|
247
|
+
|
|
248
248
|
// Apply ignore patterns
|
|
249
249
|
ignore.forEach(ignorePattern => {
|
|
250
250
|
files = files.filter(file => !file.includes(ignorePattern.replace('**/', '')));
|
|
251
251
|
});
|
|
252
|
-
|
|
252
|
+
|
|
253
253
|
return files;
|
|
254
254
|
} catch (error) {
|
|
255
255
|
return [];
|