@principal-ai/codebase-composition 0.2.10 → 0.2.12
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/dist/adapters/NodeFileSystemAdapter.d.ts +28 -0
- package/dist/adapters/NodeFileSystemAdapter.d.ts.map +1 -0
- package/dist/adapters/NodeFileSystemAdapter.js +128 -0
- package/dist/adapters/NodeFileSystemAdapter.js.map +1 -0
- package/dist/helpers/QualityMetricsCalculator.d.ts +51 -0
- package/dist/helpers/QualityMetricsCalculator.d.ts.map +1 -0
- package/dist/helpers/QualityMetricsCalculator.js +200 -0
- package/dist/helpers/QualityMetricsCalculator.js.map +1 -0
- package/dist/helpers/packageLayerHelpers.d.ts +30 -0
- package/dist/helpers/packageLayerHelpers.d.ts.map +1 -0
- package/dist/helpers/packageLayerHelpers.js +88 -0
- package/dist/helpers/packageLayerHelpers.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/DependencyLayerModule.d.ts +44 -0
- package/dist/modules/DependencyLayerModule.d.ts.map +1 -0
- package/dist/modules/DependencyLayerModule.js +282 -0
- package/dist/modules/DependencyLayerModule.js.map +1 -0
- package/dist/modules/FileSystemModule.d.ts +30 -0
- package/dist/modules/FileSystemModule.d.ts.map +1 -0
- package/dist/modules/FileSystemModule.js +43 -0
- package/dist/modules/FileSystemModule.js.map +1 -0
- package/dist/modules/FileTypeLayerModule.d.ts +34 -0
- package/dist/modules/FileTypeLayerModule.d.ts.map +1 -0
- package/dist/modules/FileTypeLayerModule.js +165 -0
- package/dist/modules/FileTypeLayerModule.js.map +1 -0
- package/dist/modules/FrameworkLayerModule.d.ts +22 -0
- package/dist/modules/FrameworkLayerModule.d.ts.map +1 -0
- package/dist/modules/FrameworkLayerModule.js +384 -0
- package/dist/modules/FrameworkLayerModule.js.map +1 -0
- package/dist/modules/PackageLayerModule.d.ts +23 -0
- package/dist/modules/PackageLayerModule.d.ts.map +1 -0
- package/dist/modules/PackageLayerModule.js +866 -0
- package/dist/modules/PackageLayerModule.js.map +1 -0
- package/dist/modules/TypeExtractionModule.d.ts +37 -0
- package/dist/modules/TypeExtractionModule.d.ts.map +1 -0
- package/dist/modules/TypeExtractionModule.js +141 -0
- package/dist/modules/TypeExtractionModule.js.map +1 -0
- package/dist/modules/VersionControlLayerModule.d.ts +10 -0
- package/dist/modules/VersionControlLayerModule.d.ts.map +1 -0
- package/dist/modules/VersionControlLayerModule.js +26 -0
- package/dist/modules/VersionControlLayerModule.js.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/index.d.ts +4 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/index.d.ts.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/index.js +3 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/index.js.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/category.d.ts +15 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/category.d.ts.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/category.js +2 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/category.js.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/product.d.ts +34 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/product.d.ts.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/product.js +19 -0
- package/dist/modules/__fixtures__/typescript-packages/complex-types/src/models/product.js.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/simple-types/index.d.ts +39 -0
- package/dist/modules/__fixtures__/typescript-packages/simple-types/index.d.ts.map +1 -0
- package/dist/modules/__fixtures__/typescript-packages/simple-types/index.js +36 -0
- package/dist/modules/__fixtures__/typescript-packages/simple-types/index.js.map +1 -0
- package/dist/modules/extractors/TypeScriptExtractor.d.ts +18 -0
- package/dist/modules/extractors/TypeScriptExtractor.d.ts.map +1 -0
- package/dist/modules/extractors/TypeScriptExtractor.js +322 -0
- package/dist/modules/extractors/TypeScriptExtractor.js.map +1 -0
- package/dist/modules/index.d.ts +13 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/index.js +10 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/providers/GitVersionControlProvider.d.ts +108 -0
- package/dist/providers/GitVersionControlProvider.d.ts.map +1 -0
- package/dist/providers/GitVersionControlProvider.js +375 -0
- package/dist/providers/GitVersionControlProvider.js.map +1 -0
- package/dist/providers/PackageManagerApiProvider.d.ts +78 -0
- package/dist/providers/PackageManagerApiProvider.d.ts.map +1 -0
- package/dist/providers/PackageManagerApiProvider.js +10 -0
- package/dist/providers/PackageManagerApiProvider.js.map +1 -0
- package/dist/providers/index.d.ts +4 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +5 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/services/FilesystemService.d.ts +59 -0
- package/dist/services/FilesystemService.d.ts.map +1 -0
- package/dist/services/FilesystemService.js +394 -0
- package/dist/services/FilesystemService.js.map +1 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +3 -0
- package/dist/services/index.js.map +1 -0
- package/dist/types/file-system.d.ts +6 -0
- package/dist/types/file-system.d.ts.map +1 -0
- package/dist/types/file-system.js +6 -0
- package/dist/types/file-system.js.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/layer-types.d.ts +212 -0
- package/dist/types/layer-types.d.ts.map +1 -0
- package/dist/types/layer-types.js +6 -0
- package/dist/types/layer-types.js.map +1 -0
- package/dist/types/version-control-layer.d.ts +53 -0
- package/dist/types/version-control-layer.d.ts.map +1 -0
- package/dist/types/version-control-layer.js +2 -0
- package/dist/types/version-control-layer.js.map +1 -0
- package/dist/types/workspace-boundaries.d.ts +17 -0
- package/dist/types/workspace-boundaries.d.ts.map +1 -0
- package/dist/types/workspace-boundaries.js +6 -0
- package/dist/types/workspace-boundaries.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
import ignore from 'ignore';
|
|
2
|
+
// Use path operations that work in browser
|
|
3
|
+
const path = {
|
|
4
|
+
basename: (p) => p.split('/').pop() || '',
|
|
5
|
+
join: (...parts) => {
|
|
6
|
+
const joined = parts.filter(p => p).join('/');
|
|
7
|
+
return joined.replace(/\/+/g, '/');
|
|
8
|
+
},
|
|
9
|
+
relative: (from, to) => {
|
|
10
|
+
if (!from || from === '.') {
|
|
11
|
+
return to;
|
|
12
|
+
}
|
|
13
|
+
if (to.startsWith(from + '/')) {
|
|
14
|
+
return to.slice(from.length + 1);
|
|
15
|
+
}
|
|
16
|
+
if (to === from) {
|
|
17
|
+
return '.';
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
},
|
|
21
|
+
dirname: (p) => {
|
|
22
|
+
const lastSlash = p.lastIndexOf('/');
|
|
23
|
+
return lastSlash > 0 ? p.slice(0, lastSlash) : '';
|
|
24
|
+
},
|
|
25
|
+
extname: (p) => {
|
|
26
|
+
const lastDot = p.lastIndexOf('.');
|
|
27
|
+
return lastDot > 0 ? p.slice(lastDot) : '';
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
export class FilesystemService {
|
|
31
|
+
adapter;
|
|
32
|
+
filterStats = {
|
|
33
|
+
totalFiltered: 0,
|
|
34
|
+
filteredByLayer: {},
|
|
35
|
+
examples: [],
|
|
36
|
+
filteredByDirectory: {},
|
|
37
|
+
};
|
|
38
|
+
constructor(adapter) {
|
|
39
|
+
this.adapter = adapter;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Build file tree using the provided adapter with efficient filtering
|
|
43
|
+
*/
|
|
44
|
+
async buildFileSystemTreeFromPath(directoryPath, filters, options) {
|
|
45
|
+
console.time('[FilesystemService] Total build time');
|
|
46
|
+
// Reset filter stats
|
|
47
|
+
this.filterStats = {
|
|
48
|
+
totalFiltered: 0,
|
|
49
|
+
filteredByLayer: {},
|
|
50
|
+
examples: [],
|
|
51
|
+
filteredByDirectory: {},
|
|
52
|
+
};
|
|
53
|
+
const allFilters = filters || [];
|
|
54
|
+
// Handle both old and new options format for backward compatibility
|
|
55
|
+
const enableInverseFiltering = options?.enableInverseFiltering || false;
|
|
56
|
+
// Handle case when no adapter is provided
|
|
57
|
+
if (!this.adapter) {
|
|
58
|
+
// Return empty tree structure for backward compatibility
|
|
59
|
+
const rootDir = {
|
|
60
|
+
path: directoryPath,
|
|
61
|
+
name: directoryPath.split('/').pop() || directoryPath,
|
|
62
|
+
children: [],
|
|
63
|
+
fileCount: 0,
|
|
64
|
+
totalSize: 0,
|
|
65
|
+
depth: 0,
|
|
66
|
+
relativePath: '.',
|
|
67
|
+
};
|
|
68
|
+
return {
|
|
69
|
+
sha: '',
|
|
70
|
+
root: rootDir,
|
|
71
|
+
allFiles: [],
|
|
72
|
+
allDirectories: [rootDir],
|
|
73
|
+
stats: {
|
|
74
|
+
totalFiles: 0,
|
|
75
|
+
totalDirectories: 1,
|
|
76
|
+
totalSize: 0,
|
|
77
|
+
maxDepth: 0,
|
|
78
|
+
},
|
|
79
|
+
metadata: {
|
|
80
|
+
id: `fs-${Date.now()}`,
|
|
81
|
+
timestamp: new Date(),
|
|
82
|
+
sourceType: 'filesystem',
|
|
83
|
+
sourceInfo: { path: directoryPath },
|
|
84
|
+
},
|
|
85
|
+
filterStats: this.filterStats,
|
|
86
|
+
appliedFilters: allFilters,
|
|
87
|
+
inverseMatches: enableInverseFiltering ? [] : undefined,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
console.time('[FilesystemService] Build file tree');
|
|
91
|
+
// Use the adapter's optimized implementation
|
|
92
|
+
const patterns = [];
|
|
93
|
+
let sourceDir;
|
|
94
|
+
// Convert filters to patterns for the adapter
|
|
95
|
+
for (const filter of allFilters) {
|
|
96
|
+
if (filter.enabled && filter.filterData?.excludedPatterns) {
|
|
97
|
+
patterns.push(...filter.filterData.excludedPatterns.map(p => p.pattern));
|
|
98
|
+
if (filter.filterData.sourceDirectory) {
|
|
99
|
+
sourceDir = filter.filterData.sourceDirectory;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const adapterResult = await this.adapter.buildFilteredFileTree(directoryPath, patterns, sourceDir);
|
|
104
|
+
const crawledPaths = adapterResult.paths;
|
|
105
|
+
const fileStats = adapterResult.stats;
|
|
106
|
+
// Update filter stats
|
|
107
|
+
const ignoreInstances = this.createIgnoreInstances(allFilters);
|
|
108
|
+
for (const path of crawledPaths) {
|
|
109
|
+
if (!this.shouldIncludeFile(path, ignoreInstances, allFilters)) {
|
|
110
|
+
this.filterStats.totalFiltered++;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
console.timeEnd('[FilesystemService] Build file tree');
|
|
114
|
+
console.log(`[FilesystemService] Found ${crawledPaths.length} paths after filtering`);
|
|
115
|
+
// Convert paths to FileInfo and DirectoryInfo objects
|
|
116
|
+
console.time('[FilesystemService] Convert to tree structure');
|
|
117
|
+
const { allFiles, allDirectories, rootDir } = await this.convertPathsToTree(crawledPaths, directoryPath, fileStats);
|
|
118
|
+
console.timeEnd('[FilesystemService] Convert to tree structure');
|
|
119
|
+
// Handle inverse filtering for power users
|
|
120
|
+
let inverseMatches = [];
|
|
121
|
+
if (enableInverseFiltering) {
|
|
122
|
+
inverseMatches = await this.findInverseMatches(directoryPath, ignoreInstances, allFilters);
|
|
123
|
+
}
|
|
124
|
+
// Calculate stats
|
|
125
|
+
const totalSize = allFiles.reduce((sum, file) => sum + (file.size || 0), 0);
|
|
126
|
+
const maxDepth = Math.max(...allDirectories.map(d => d.depth || 0));
|
|
127
|
+
// Update filter layer stats
|
|
128
|
+
allFilters.forEach(layer => {
|
|
129
|
+
if (layer.enabled && this.filterStats.filteredByLayer[layer.id]) {
|
|
130
|
+
if (!layer.filterData.stats) {
|
|
131
|
+
layer.filterData.stats = {
|
|
132
|
+
totalFiltered: 0,
|
|
133
|
+
bytesExcluded: 0,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
layer.filterData.stats.totalFiltered = this.filterStats.filteredByLayer[layer.id];
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
const treeResult = {
|
|
140
|
+
sha: '',
|
|
141
|
+
root: rootDir || {
|
|
142
|
+
path: '.',
|
|
143
|
+
name: path.basename(directoryPath) || 'root',
|
|
144
|
+
children: [],
|
|
145
|
+
fileCount: 0,
|
|
146
|
+
totalSize: 0,
|
|
147
|
+
depth: 0,
|
|
148
|
+
relativePath: '.',
|
|
149
|
+
},
|
|
150
|
+
allFiles,
|
|
151
|
+
allDirectories,
|
|
152
|
+
stats: {
|
|
153
|
+
totalFiles: allFiles.length,
|
|
154
|
+
totalDirectories: allDirectories.length,
|
|
155
|
+
totalSize,
|
|
156
|
+
maxDepth,
|
|
157
|
+
},
|
|
158
|
+
metadata: {
|
|
159
|
+
id: `fs-${Date.now()}`,
|
|
160
|
+
timestamp: new Date(),
|
|
161
|
+
sourceType: 'filesystem',
|
|
162
|
+
sourceInfo: { path: directoryPath },
|
|
163
|
+
},
|
|
164
|
+
filterStats: this.filterStats,
|
|
165
|
+
appliedFilters: allFilters,
|
|
166
|
+
inverseMatches: inverseMatches,
|
|
167
|
+
};
|
|
168
|
+
console.timeEnd('[FilesystemService] Total build time');
|
|
169
|
+
return treeResult;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Create optimized ignore instances from filter layers
|
|
173
|
+
*/
|
|
174
|
+
createIgnoreInstances(filters) {
|
|
175
|
+
const ignoreInstances = new Map();
|
|
176
|
+
for (const filter of filters) {
|
|
177
|
+
if (!filter.enabled || !filter.filterData?.excludedPatterns)
|
|
178
|
+
continue;
|
|
179
|
+
const sourceDirectory = filter.filterData.sourceDirectory || '';
|
|
180
|
+
const key = `${filter.id}:${sourceDirectory}`;
|
|
181
|
+
const ig = ignore();
|
|
182
|
+
const patterns = filter.filterData.excludedPatterns.map(p => p.pattern);
|
|
183
|
+
ig.add(patterns);
|
|
184
|
+
ignoreInstances.set(key, {
|
|
185
|
+
ignore: ig,
|
|
186
|
+
sourceDirectory,
|
|
187
|
+
filterId: filter.id,
|
|
188
|
+
filterName: filter.name,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
return ignoreInstances;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Fast filtering using node-ignore during fdir crawl
|
|
195
|
+
*/
|
|
196
|
+
shouldIncludeFile(filePath, ignoreInstances, _filters) {
|
|
197
|
+
for (const [, { ignore: ig, sourceDirectory, filterId, filterName }] of ignoreInstances) {
|
|
198
|
+
// Check if this path is within the filter's scope
|
|
199
|
+
if (sourceDirectory !== '') {
|
|
200
|
+
if (!filePath.startsWith(sourceDirectory + '/') && filePath !== sourceDirectory) {
|
|
201
|
+
continue; // Skip this filter - path is outside its scope
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
// Get the path relative to the filter's source directory for testing
|
|
205
|
+
let pathToTest = filePath;
|
|
206
|
+
if (sourceDirectory !== '' && filePath.startsWith(sourceDirectory + '/')) {
|
|
207
|
+
pathToTest = filePath.slice(sourceDirectory.length + 1);
|
|
208
|
+
}
|
|
209
|
+
// Skip empty paths and "." which node-ignore doesn't handle
|
|
210
|
+
if (!pathToTest || pathToTest === '.') {
|
|
211
|
+
continue;
|
|
212
|
+
}
|
|
213
|
+
// Use node-ignore for fast pattern matching
|
|
214
|
+
if (ig.ignores(pathToTest)) {
|
|
215
|
+
// Track statistics
|
|
216
|
+
this.filterStats.totalFiltered++;
|
|
217
|
+
this.filterStats.filteredByLayer[filterId] =
|
|
218
|
+
(this.filterStats.filteredByLayer[filterId] || 0) + 1;
|
|
219
|
+
// Track by directory
|
|
220
|
+
const dirPath = path.dirname(filePath) || '.';
|
|
221
|
+
if (!this.filterStats.filteredByDirectory[dirPath]) {
|
|
222
|
+
this.filterStats.filteredByDirectory[dirPath] = { count: 0, reasons: new Set() };
|
|
223
|
+
}
|
|
224
|
+
this.filterStats.filteredByDirectory[dirPath].count++;
|
|
225
|
+
this.filterStats.filteredByDirectory[dirPath].reasons.add(filterName);
|
|
226
|
+
return false; // Exclude this file
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return true; // Include this file
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Convert array of paths to FileTree structure
|
|
233
|
+
*/
|
|
234
|
+
async convertPathsToTree(paths, rootPath, providedStats) {
|
|
235
|
+
const allFiles = [];
|
|
236
|
+
const allDirectories = [];
|
|
237
|
+
const directoryMap = new Map();
|
|
238
|
+
// Use provided stats or fetch them if adapter supports it
|
|
239
|
+
const fileStats = providedStats ||
|
|
240
|
+
new Map();
|
|
241
|
+
if (!providedStats && this.adapter && 'getFileStats' in this.adapter) {
|
|
242
|
+
// Batch file stats operations for better performance
|
|
243
|
+
const statPromises = paths.map(async (filePath) => {
|
|
244
|
+
try {
|
|
245
|
+
const fullPath = path.join(rootPath, filePath);
|
|
246
|
+
const stats = await this.adapter.getFileStats(fullPath);
|
|
247
|
+
if (stats) {
|
|
248
|
+
fileStats.set(filePath, {
|
|
249
|
+
size: stats.size || 0,
|
|
250
|
+
lastModified: stats.lastModified || new Date(),
|
|
251
|
+
isDirectory: stats.isDirectory || false,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
catch {
|
|
256
|
+
// Ignore stat errors, will use defaults
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
await Promise.all(statPromises);
|
|
260
|
+
}
|
|
261
|
+
// Create file and directory objects
|
|
262
|
+
for (const filePath of paths) {
|
|
263
|
+
const stats = fileStats.get(filePath);
|
|
264
|
+
const isDirectory = stats?.isDirectory || filePath.endsWith('/');
|
|
265
|
+
if (isDirectory) {
|
|
266
|
+
const dirInfo = {
|
|
267
|
+
path: filePath || '.',
|
|
268
|
+
name: path.basename(filePath) || 'root',
|
|
269
|
+
children: [],
|
|
270
|
+
fileCount: 0,
|
|
271
|
+
totalSize: 0,
|
|
272
|
+
depth: filePath.split('/').length - 1,
|
|
273
|
+
relativePath: filePath || '.',
|
|
274
|
+
};
|
|
275
|
+
allDirectories.push(dirInfo);
|
|
276
|
+
directoryMap.set(filePath, dirInfo);
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
const fileInfo = {
|
|
280
|
+
path: filePath,
|
|
281
|
+
name: path.basename(filePath),
|
|
282
|
+
extension: path.extname(filePath).toLowerCase(),
|
|
283
|
+
size: stats?.size || 0,
|
|
284
|
+
lastModified: stats?.lastModified || new Date(),
|
|
285
|
+
isDirectory: false,
|
|
286
|
+
relativePath: filePath,
|
|
287
|
+
};
|
|
288
|
+
allFiles.push(fileInfo);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
// Build hierarchical structure (simplified - just return root)
|
|
292
|
+
const rootDir = directoryMap.get('.') ||
|
|
293
|
+
directoryMap.get('') || {
|
|
294
|
+
path: '.',
|
|
295
|
+
name: path.basename(rootPath) || 'root',
|
|
296
|
+
children: [],
|
|
297
|
+
fileCount: allFiles.length,
|
|
298
|
+
totalSize: allFiles.reduce((sum, f) => sum + (f.size || 0), 0),
|
|
299
|
+
depth: 0,
|
|
300
|
+
relativePath: '.',
|
|
301
|
+
};
|
|
302
|
+
return { allFiles, allDirectories, rootDir };
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Find files that would match specific filters - for power user investigation
|
|
306
|
+
*/
|
|
307
|
+
async findInverseMatches(projectPath, ignoreInstances, _filters) {
|
|
308
|
+
console.log('[FilesystemService] Running inverse filter analysis...');
|
|
309
|
+
const inverseMatches = [];
|
|
310
|
+
// Get ALL files without any filtering to get the complete picture
|
|
311
|
+
if (!this.adapter) {
|
|
312
|
+
return [];
|
|
313
|
+
}
|
|
314
|
+
const unfilteredResult = await this.adapter.buildFilteredFileTree(projectPath);
|
|
315
|
+
const allPaths = unfilteredResult.paths;
|
|
316
|
+
console.log(`[FilesystemService] Found ${allPaths.length} total paths for inverse analysis`);
|
|
317
|
+
// Test each path against each filter to see what matches
|
|
318
|
+
for (const filePath of allPaths) {
|
|
319
|
+
const matchedFilters = [];
|
|
320
|
+
for (const [, { ignore: ig, sourceDirectory, filterName }] of ignoreInstances) {
|
|
321
|
+
// Check if this path is within the filter's scope
|
|
322
|
+
if (sourceDirectory !== '') {
|
|
323
|
+
if (!filePath.startsWith(sourceDirectory + '/') && filePath !== sourceDirectory) {
|
|
324
|
+
continue; // Skip this filter - path is outside its scope
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
// Get the path relative to the filter's source directory for testing
|
|
328
|
+
let pathToTest = filePath;
|
|
329
|
+
if (sourceDirectory !== '' && filePath.startsWith(sourceDirectory + '/')) {
|
|
330
|
+
pathToTest = filePath.slice(sourceDirectory.length + 1);
|
|
331
|
+
}
|
|
332
|
+
// Skip empty paths and "." which node-ignore doesn't handle
|
|
333
|
+
if (!pathToTest || pathToTest === '.') {
|
|
334
|
+
continue;
|
|
335
|
+
}
|
|
336
|
+
// Check if this filter would match this path
|
|
337
|
+
if (ig.ignores(pathToTest)) {
|
|
338
|
+
matchedFilters.push(filterName);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
// If any filters matched, record it
|
|
342
|
+
if (matchedFilters.length > 0) {
|
|
343
|
+
inverseMatches.push({
|
|
344
|
+
path: filePath,
|
|
345
|
+
matchedFilters,
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
console.log(`[FilesystemService] Inverse analysis complete: ${inverseMatches.length} files matched filters`);
|
|
350
|
+
return inverseMatches;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Get the filter statistics from the last build
|
|
354
|
+
*/
|
|
355
|
+
getFilterStats() {
|
|
356
|
+
return { ...this.filterStats };
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Create an empty tree structure - matches original FilesystemService API
|
|
360
|
+
*/
|
|
361
|
+
getEmptyTree(directoryPath) {
|
|
362
|
+
const rootDir = {
|
|
363
|
+
path: '.',
|
|
364
|
+
name: path.basename(directoryPath) || 'root',
|
|
365
|
+
children: [],
|
|
366
|
+
fileCount: 0,
|
|
367
|
+
totalSize: 0,
|
|
368
|
+
depth: 0,
|
|
369
|
+
relativePath: '.',
|
|
370
|
+
};
|
|
371
|
+
return {
|
|
372
|
+
sha: '',
|
|
373
|
+
root: rootDir,
|
|
374
|
+
allFiles: [],
|
|
375
|
+
allDirectories: [rootDir],
|
|
376
|
+
stats: {
|
|
377
|
+
totalFiles: 0,
|
|
378
|
+
totalDirectories: 1,
|
|
379
|
+
totalSize: 0,
|
|
380
|
+
maxDepth: 0,
|
|
381
|
+
},
|
|
382
|
+
metadata: {
|
|
383
|
+
id: `fs-${Date.now()}`,
|
|
384
|
+
timestamp: new Date(),
|
|
385
|
+
sourceType: 'filesystem',
|
|
386
|
+
sourceInfo: { path: directoryPath },
|
|
387
|
+
},
|
|
388
|
+
filterStats: this.filterStats,
|
|
389
|
+
appliedFilters: [],
|
|
390
|
+
inverseMatches: [],
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
//# sourceMappingURL=FilesystemService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilesystemService.js","sourceRoot":"","sources":["../../src/services/FilesystemService.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAM5B,2CAA2C;AAC3C,MAAM,IAAI,GAAG;IACX,QAAQ,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE;IACjD,IAAI,EAAE,CAAC,GAAG,KAAe,EAAE,EAAE;QAC3B,MAAM,MAAM,G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CAAC;YACzB,KAAK,EAAE;gBACL,UAAU,EAAE,CAAC;gBACb,gBAAgB,EAAE,CAAC;gBACnB,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,CAAC;aACZ;YACD,QAAQ,EAAE;gBACR,EAAE,EAAE,MAAM,IAAI,CAAC,GAAG,EAAE,EAAE;gBACtB,SAAS,EAAE,IAAI,IAAI,EAAE;gBACrB,UAAU,EAAE,YAAY;gBACxB,UAAU,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE;aACpC;YACD,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,cAAc,EAAE,EAAE;YAClB,cAAc,EAAE,EAAE;SACnB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-system.d.ts","sourceRoot":"","sources":["../../src/types/file-system.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-system.js","sourceRoot":"","sources":["../../src/types/file-system.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { FilePattern, FileSet, BaseLayer, PackageCommand, ConfigFile, PackageLayer, FileSystemFilterLayer, ExtractedType, PackageTypes, TypeDefinitionLayer, TypeExtractor, QualityMetrics, LensOperation, } from './layer-types';
|
|
2
|
+
export type { VersionControlLayer, VersionControlIgnorePattern, VersionControlProvider, } from './version-control-layer';
|
|
3
|
+
export type { FileInfo, DirectoryInfo, FileTree } from './file-system';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,WAAW,EACX,OAAO,EACP,SAAS,EACT,cAAc,EACd,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,aAAa,GACd,MAAM,eAAe,CAAC;AAGvB,YAAY,EACV,mBAAmB,EACnB,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AAGjC,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
|