bobs-workshop 0.2.7 → 0.3.1
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/Claude.md +30 -4
- package/README.md +2 -2
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/prompts/architect.js +6 -1
- package/dist/prompts/architect.js.map +1 -1
- package/dist/prompts/debugger.js +5 -0
- package/dist/prompts/debugger.js.map +1 -1
- package/dist/prompts/engineer.js +6 -1
- package/dist/prompts/engineer.js.map +1 -1
- package/dist/prompts/reviewer.js +6 -1
- package/dist/prompts/reviewer.js.map +1 -1
- package/dist/tools/searchTools.js +82 -75
- package/dist/tools/searchTools.js.map +1 -1
- package/dist/tools/semgrep-patterns.js +296 -0
- package/dist/tools/semgrep-patterns.js.map +1 -0
- package/dist/tools/structural/__tests__/orchestrator.test.js +61 -0
- package/dist/tools/structural/__tests__/orchestrator.test.js.map +1 -0
- package/dist/tools/structural/cache.js +226 -0
- package/dist/tools/structural/cache.js.map +1 -0
- package/dist/tools/structural/engines/python/index.js +118 -0
- package/dist/tools/structural/engines/python/index.js.map +1 -0
- package/dist/tools/structural/engines/typescript/__tests__/typescript-engine.test.js +97 -0
- package/dist/tools/structural/engines/typescript/__tests__/typescript-engine.test.js.map +1 -0
- package/dist/tools/structural/engines/typescript/analyzer.js +433 -0
- package/dist/tools/structural/engines/typescript/analyzer.js.map +1 -0
- package/dist/tools/structural/engines/typescript/index.js +381 -0
- package/dist/tools/structural/engines/typescript/index.js.map +1 -0
- package/dist/tools/structural/engines/typescript/utils.js +279 -0
- package/dist/tools/structural/engines/typescript/utils.js.map +1 -0
- package/dist/tools/structural/index.js +248 -0
- package/dist/tools/structural/index.js.map +1 -0
- package/dist/tools/structural/types.js +18 -0
- package/dist/tools/structural/types.js.map +1 -0
- package/package.json +5 -1
- package/public/.well-known/mcp/manifest.json +6 -5
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { LRUCache } from "lru-cache";
|
|
2
|
+
import { createHash } from "crypto";
|
|
3
|
+
import { readFile, stat } from "fs/promises";
|
|
4
|
+
import { AnalysisError, ErrorCode } from "./types.js";
|
|
5
|
+
export class CacheManager {
|
|
6
|
+
constructor(options = {}) {
|
|
7
|
+
this.stats = {
|
|
8
|
+
hits: 0,
|
|
9
|
+
misses: 0,
|
|
10
|
+
evictions: 0,
|
|
11
|
+
memoryUsage: 0
|
|
12
|
+
};
|
|
13
|
+
this.options = {
|
|
14
|
+
invalidation: options.invalidation || "content-hash",
|
|
15
|
+
ttl: options.ttl || 3600000 // 1 hour default
|
|
16
|
+
};
|
|
17
|
+
// Initialize LRU caches as per specification
|
|
18
|
+
this.fileCache = new LRUCache({
|
|
19
|
+
max: 1000,
|
|
20
|
+
dispose: (value) => {
|
|
21
|
+
// Clean up source file when evicted
|
|
22
|
+
if (value?.sourceFile) {
|
|
23
|
+
try {
|
|
24
|
+
value.sourceFile.forget();
|
|
25
|
+
}
|
|
26
|
+
catch (e) {
|
|
27
|
+
// Ignore cleanup errors
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
this.stats.evictions++;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
this.symbolCache = new LRUCache({
|
|
34
|
+
max: 10000,
|
|
35
|
+
dispose: () => {
|
|
36
|
+
this.stats.evictions++;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
this.analysisCache = new LRUCache({
|
|
40
|
+
max: 5000,
|
|
41
|
+
dispose: () => {
|
|
42
|
+
this.stats.evictions++;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
async getContentHash(filePath) {
|
|
47
|
+
try {
|
|
48
|
+
const content = await readFile(filePath, "utf8");
|
|
49
|
+
return createHash("sha256").update(content).digest("hex");
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
throw new AnalysisError({
|
|
53
|
+
code: ErrorCode.FILE_NOT_FOUND,
|
|
54
|
+
message: `Failed to read file for hashing: ${filePath}`,
|
|
55
|
+
details: { file: filePath }
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async getFileStats(filePath) {
|
|
60
|
+
try {
|
|
61
|
+
const stats = await stat(filePath);
|
|
62
|
+
return {
|
|
63
|
+
lastModified: stats.mtimeMs,
|
|
64
|
+
size: stats.size
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
throw new AnalysisError({
|
|
69
|
+
code: ErrorCode.FILE_NOT_FOUND,
|
|
70
|
+
message: `Failed to get file stats: ${filePath}`,
|
|
71
|
+
details: { file: filePath }
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
async isFileCacheValid(filePath, cached) {
|
|
76
|
+
if (this.options.invalidation === "manual") {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
const stats = await this.getFileStats(filePath);
|
|
80
|
+
if (this.options.invalidation === "timestamp") {
|
|
81
|
+
return stats.lastModified <= cached.lastModified;
|
|
82
|
+
}
|
|
83
|
+
if (this.options.invalidation === "content-hash") {
|
|
84
|
+
const currentHash = await this.getContentHash(filePath);
|
|
85
|
+
return currentHash === cached.contentHash;
|
|
86
|
+
}
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
async getCachedFile(filePath) {
|
|
90
|
+
const cached = this.fileCache.get(filePath);
|
|
91
|
+
if (cached && await this.isFileCacheValid(filePath, cached)) {
|
|
92
|
+
this.stats.hits++;
|
|
93
|
+
return cached;
|
|
94
|
+
}
|
|
95
|
+
if (cached) {
|
|
96
|
+
this.fileCache.delete(filePath);
|
|
97
|
+
}
|
|
98
|
+
this.stats.misses++;
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
async setCachedFile(filePath, sourceFile) {
|
|
102
|
+
const stats = await this.getFileStats(filePath);
|
|
103
|
+
const contentHash = this.options.invalidation === "content-hash"
|
|
104
|
+
? await this.getContentHash(filePath)
|
|
105
|
+
: "";
|
|
106
|
+
this.fileCache.set(filePath, {
|
|
107
|
+
sourceFile,
|
|
108
|
+
lastModified: stats.lastModified,
|
|
109
|
+
contentHash
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
getCachedSymbol(key) {
|
|
113
|
+
const cached = this.symbolCache.get(key);
|
|
114
|
+
if (cached) {
|
|
115
|
+
this.stats.hits++;
|
|
116
|
+
return cached;
|
|
117
|
+
}
|
|
118
|
+
this.stats.misses++;
|
|
119
|
+
return undefined;
|
|
120
|
+
}
|
|
121
|
+
setCachedSymbol(key, symbol) {
|
|
122
|
+
this.symbolCache.set(key, symbol);
|
|
123
|
+
}
|
|
124
|
+
async getCachedAnalysis(key) {
|
|
125
|
+
const cached = this.analysisCache.get(key);
|
|
126
|
+
if (!cached) {
|
|
127
|
+
this.stats.misses++;
|
|
128
|
+
return undefined;
|
|
129
|
+
}
|
|
130
|
+
// Check TTL
|
|
131
|
+
if (Date.now() - cached.timestamp > this.options.ttl) {
|
|
132
|
+
this.analysisCache.delete(key);
|
|
133
|
+
this.stats.misses++;
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
this.stats.hits++;
|
|
137
|
+
return cached.data;
|
|
138
|
+
}
|
|
139
|
+
async setCachedAnalysis(key, data) {
|
|
140
|
+
this.analysisCache.set(key, {
|
|
141
|
+
data,
|
|
142
|
+
timestamp: Date.now()
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
generateCacheKey(...parts) {
|
|
146
|
+
const normalized = parts.map(part => {
|
|
147
|
+
if (part === undefined || part === null) {
|
|
148
|
+
return "null";
|
|
149
|
+
}
|
|
150
|
+
if (typeof part === "object") {
|
|
151
|
+
return JSON.stringify(part, Object.keys(part).sort());
|
|
152
|
+
}
|
|
153
|
+
return String(part);
|
|
154
|
+
}).join(":");
|
|
155
|
+
return createHash("sha256").update(normalized).digest("hex");
|
|
156
|
+
}
|
|
157
|
+
async clearFileCache() {
|
|
158
|
+
this.fileCache.clear();
|
|
159
|
+
}
|
|
160
|
+
async clearSymbolCache() {
|
|
161
|
+
this.symbolCache.clear();
|
|
162
|
+
}
|
|
163
|
+
async clearAnalysisCache() {
|
|
164
|
+
this.analysisCache.clear();
|
|
165
|
+
}
|
|
166
|
+
async clearAll() {
|
|
167
|
+
await this.clearFileCache();
|
|
168
|
+
await this.clearSymbolCache();
|
|
169
|
+
await this.clearAnalysisCache();
|
|
170
|
+
}
|
|
171
|
+
getMemoryUsage() {
|
|
172
|
+
const fileCount = this.fileCache.size;
|
|
173
|
+
const symbolCount = this.symbolCache.size;
|
|
174
|
+
const analysisCount = this.analysisCache.size;
|
|
175
|
+
// Rough estimation of memory usage
|
|
176
|
+
const avgFileSize = 50 * 1024; // 50KB average per file
|
|
177
|
+
const avgSymbolSize = 1024; // 1KB average per symbol
|
|
178
|
+
const avgAnalysisSize = 2 * 1024; // 2KB average per analysis
|
|
179
|
+
const totalMemory = (fileCount * avgFileSize) + (symbolCount * avgSymbolSize) + (analysisCount * avgAnalysisSize);
|
|
180
|
+
this.stats.memoryUsage = totalMemory;
|
|
181
|
+
return totalMemory;
|
|
182
|
+
}
|
|
183
|
+
getStats() {
|
|
184
|
+
return {
|
|
185
|
+
fileCache: {
|
|
186
|
+
size: this.fileCache.size,
|
|
187
|
+
capacity: 1000
|
|
188
|
+
},
|
|
189
|
+
symbolCache: {
|
|
190
|
+
size: this.symbolCache.size,
|
|
191
|
+
capacity: 10000
|
|
192
|
+
},
|
|
193
|
+
analysisCache: {
|
|
194
|
+
size: this.analysisCache.size,
|
|
195
|
+
capacity: 5000
|
|
196
|
+
},
|
|
197
|
+
stats: { ...this.stats, memoryUsage: this.getMemoryUsage() }
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
// Cache strategy based on project size
|
|
201
|
+
static getCacheStrategy(fileCount) {
|
|
202
|
+
if (fileCount < 100)
|
|
203
|
+
return "memory";
|
|
204
|
+
if (fileCount < 1000)
|
|
205
|
+
return "memory";
|
|
206
|
+
if (fileCount < 5000)
|
|
207
|
+
return "hybrid";
|
|
208
|
+
return "disk";
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
// Global cache instance
|
|
212
|
+
export const cacheManager = new CacheManager();
|
|
213
|
+
// Helper for caching function results
|
|
214
|
+
export function memoize(fn, keyGenerator) {
|
|
215
|
+
return (async (...args) => {
|
|
216
|
+
const key = keyGenerator ? keyGenerator(...args) : cacheManager.generateCacheKey(...args);
|
|
217
|
+
const cached = await cacheManager.getCachedAnalysis(key);
|
|
218
|
+
if (cached !== undefined) {
|
|
219
|
+
return cached;
|
|
220
|
+
}
|
|
221
|
+
const result = await fn(...args);
|
|
222
|
+
await cacheManager.setCachedAnalysis(key, result);
|
|
223
|
+
return result;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../src/tools/structural/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAc,aAAa,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AA4BlE,MAAM,OAAO,YAAY;IAYvB,YAAY,UAAwB,EAAE;QAP9B,UAAK,GAAe;YAC1B,IAAI,EAAE,CAAC;YACP,MAAM,EAAE,CAAC;YACT,SAAS,EAAE,CAAC;YACZ,WAAW,EAAE,CAAC;SACf,CAAC;QAGA,IAAI,CAAC,OAAO,GAAG;YACb,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,cAAc;YACpD,GAAG,EAAE,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,iBAAiB;SAC9C,CAAC;QAEF,6CAA6C;QAC7C,IAAI,CAAC,SAAS,GAAG,IAA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AC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { ErrorCode, AnalysisError } from "../../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Python Structural Search Engine (Stub Implementation)
|
|
4
|
+
*
|
|
5
|
+
* This is a placeholder for the Python structural search engine.
|
|
6
|
+
* Full implementation will use libcst for AST parsing and analysis.
|
|
7
|
+
*
|
|
8
|
+
* Planned features:
|
|
9
|
+
* - Find references and definitions in Python code
|
|
10
|
+
* - Analyze dependencies (import statements)
|
|
11
|
+
* - Detect circular dependencies
|
|
12
|
+
* - Find unused exports
|
|
13
|
+
* - Call graph analysis
|
|
14
|
+
*/
|
|
15
|
+
export class PythonEngine {
|
|
16
|
+
/**
|
|
17
|
+
* Find all references to a symbol
|
|
18
|
+
* @throws {AnalysisError} Not implemented
|
|
19
|
+
*/
|
|
20
|
+
async findReferences(symbolName, scope, options) {
|
|
21
|
+
throw new AnalysisError({
|
|
22
|
+
code: ErrorCode.PARSE_ERROR,
|
|
23
|
+
message: "Python structural search is not yet implemented. This feature is planned for Phase 2.",
|
|
24
|
+
details: {
|
|
25
|
+
symbolName,
|
|
26
|
+
file: scope,
|
|
27
|
+
suggestion: "Use lexical or semantic search modes for Python files, or contribute to the Python engine implementation!"
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Find the definition of a symbol
|
|
33
|
+
* @throws {AnalysisError} Not implemented
|
|
34
|
+
*/
|
|
35
|
+
async findDefinition(symbolName, scope, options) {
|
|
36
|
+
throw new AnalysisError({
|
|
37
|
+
code: ErrorCode.PARSE_ERROR,
|
|
38
|
+
message: "Python structural search is not yet implemented. This feature is planned for Phase 2.",
|
|
39
|
+
details: {
|
|
40
|
+
symbolName,
|
|
41
|
+
file: scope,
|
|
42
|
+
suggestion: "Use lexical or semantic search modes for Python files, or contribute to the Python engine implementation!"
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get dependencies of a file or symbol
|
|
48
|
+
* @throws {AnalysisError} Not implemented
|
|
49
|
+
*/
|
|
50
|
+
async getDependencies(target, options) {
|
|
51
|
+
throw new AnalysisError({
|
|
52
|
+
code: ErrorCode.PARSE_ERROR,
|
|
53
|
+
message: "Python structural search is not yet implemented. This feature is planned for Phase 2.",
|
|
54
|
+
details: {
|
|
55
|
+
file: target,
|
|
56
|
+
suggestion: "Use lexical or semantic search modes for Python files, or contribute to the Python engine implementation!"
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get dependency graph
|
|
62
|
+
* @throws {AnalysisError} Not implemented
|
|
63
|
+
*/
|
|
64
|
+
async getDependencyGraph(filePath, depth = 2) {
|
|
65
|
+
throw new AnalysisError({
|
|
66
|
+
code: ErrorCode.PARSE_ERROR,
|
|
67
|
+
message: "Python structural search is not yet implemented. This feature is planned for Phase 2.",
|
|
68
|
+
details: {
|
|
69
|
+
file: filePath,
|
|
70
|
+
suggestion: "Use lexical or semantic search modes for Python files, or contribute to the Python engine implementation!"
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Find architectural issues
|
|
76
|
+
* @throws {AnalysisError} Not implemented
|
|
77
|
+
*/
|
|
78
|
+
async findArchitecturalIssues(scope) {
|
|
79
|
+
throw new AnalysisError({
|
|
80
|
+
code: ErrorCode.PARSE_ERROR,
|
|
81
|
+
message: "Python structural search is not yet implemented. This feature is planned for Phase 2.",
|
|
82
|
+
details: {
|
|
83
|
+
file: scope,
|
|
84
|
+
suggestion: "Use lexical or semantic search modes for Python files, or contribute to the Python engine implementation!"
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Find unused exports
|
|
90
|
+
* @throws {AnalysisError} Not implemented
|
|
91
|
+
*/
|
|
92
|
+
async findUnusedExports(scope) {
|
|
93
|
+
throw new AnalysisError({
|
|
94
|
+
code: ErrorCode.PARSE_ERROR,
|
|
95
|
+
message: "Python structural search is not yet implemented. This feature is planned for Phase 2.",
|
|
96
|
+
details: {
|
|
97
|
+
file: scope,
|
|
98
|
+
suggestion: "Use lexical or semantic search modes for Python files, or contribute to the Python engine implementation!"
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Get refactor impact
|
|
104
|
+
* @throws {AnalysisError} Not implemented
|
|
105
|
+
*/
|
|
106
|
+
async getRefactorImpact(symbol, scope) {
|
|
107
|
+
throw new AnalysisError({
|
|
108
|
+
code: ErrorCode.PARSE_ERROR,
|
|
109
|
+
message: "Python structural search is not yet implemented. This feature is planned for Phase 2.",
|
|
110
|
+
details: {
|
|
111
|
+
symbolName: symbol,
|
|
112
|
+
file: scope,
|
|
113
|
+
suggestion: "Use lexical or semantic search modes for Python files, or contribute to the Python engine implementation!"
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/tools/structural/engines/python/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,SAAS,EACT,aAAa,EACd,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,YAAY;IACvB;;;OAGG;IACH,KAAK,CAAC,cAAc,CAClB,UAAkB,EAClB,KAAa,EACb,OAAiC;QAEjC,MAAM,IAAI,aAAa,CAAC;YACtB,IAAI,EAAE,SAAS,CAAC,WAAW;YAC3B,OAAO,EAAE,uFAAuF;YAChG,OAAO,EAAE;gBACP,UAAU;gBACV,IAAI,EAAE,KAAK;gBACX,UAAU,EAAE,2GAA2G;aACxH;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,cAAc,CAClB,UAAkB,EAClB,KA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AC;IACL,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,iBAAiB,CAAC,MAAc,EAAE,KAAa;QACnD,MAAM,IAAI,aAAa,CAAC;YACtB,IAAI,EAAE,SAAS,CAAC,WAAW;YAC3B,OAAO,EAAE,uFAAuF;YAChG,OAAO,EAAE;gBACP,UAAU,EAAE,MAAM;gBAClB,IAAI,EAAE,KAAK;gBACX,UAAU,EAAE,2GAA2G;aACxH;SACF,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { TypeScriptEngine } from '../index.js';
|
|
2
|
+
import { describe, it, expect, beforeEach } from '@jest/globals';
|
|
3
|
+
describe('TypeScriptEngine', () => {
|
|
4
|
+
let engine;
|
|
5
|
+
beforeEach(() => {
|
|
6
|
+
engine = new TypeScriptEngine();
|
|
7
|
+
});
|
|
8
|
+
describe('findReferences', () => {
|
|
9
|
+
it('should find references to a symbol', async () => {
|
|
10
|
+
// This is a placeholder test - in production, you'd use a test fixture
|
|
11
|
+
const results = await engine.findReferences('TypeScriptEngine', __dirname, { maxResults: 10 });
|
|
12
|
+
expect(Array.isArray(results)).toBe(true);
|
|
13
|
+
}, 30000); // 30 second timeout for AST parsing
|
|
14
|
+
it('should respect maxResults limit', async () => {
|
|
15
|
+
const results = await engine.findReferences('TypeScriptEngine', __dirname, { maxResults: 5 });
|
|
16
|
+
expect(results.length).toBeLessThanOrEqual(5);
|
|
17
|
+
}, 30000);
|
|
18
|
+
it('should handle non-existent symbols gracefully', async () => {
|
|
19
|
+
const results = await engine.findReferences('NonExistentSymbolXYZ123', __dirname, { maxResults: 10 });
|
|
20
|
+
expect(Array.isArray(results)).toBe(true);
|
|
21
|
+
expect(results.length).toBe(0);
|
|
22
|
+
}, 30000);
|
|
23
|
+
});
|
|
24
|
+
describe('findDefinition', () => {
|
|
25
|
+
it('should find definition of a symbol', async () => {
|
|
26
|
+
const result = await engine.findDefinition('TypeScriptEngine', __dirname);
|
|
27
|
+
// Result can be null if symbol not found in scope
|
|
28
|
+
expect(result === null || typeof result === 'object').toBe(true);
|
|
29
|
+
}, 30000);
|
|
30
|
+
it('should return null for non-existent symbols', async () => {
|
|
31
|
+
const result = await engine.findDefinition('NonExistentSymbolXYZ123', __dirname);
|
|
32
|
+
expect(result).toBeNull();
|
|
33
|
+
}, 30000);
|
|
34
|
+
});
|
|
35
|
+
describe('getDependencies', () => {
|
|
36
|
+
it('should get dependencies for a file', async () => {
|
|
37
|
+
const results = await engine.getDependencies(__filename, { maxResults: 20 });
|
|
38
|
+
expect(Array.isArray(results)).toBe(true);
|
|
39
|
+
}, 30000);
|
|
40
|
+
it('should return import information', async () => {
|
|
41
|
+
const results = await engine.getDependencies(__filename, { maxResults: 20 });
|
|
42
|
+
if (results.length > 0) {
|
|
43
|
+
expect(results[0]).toHaveProperty('file');
|
|
44
|
+
expect(results[0]).toHaveProperty('symbol');
|
|
45
|
+
expect(results[0]).toHaveProperty('kind');
|
|
46
|
+
}
|
|
47
|
+
}, 30000);
|
|
48
|
+
});
|
|
49
|
+
describe('findArchitecturalIssues', () => {
|
|
50
|
+
it('should return an array of issues', async () => {
|
|
51
|
+
const issues = await engine.findArchitecturalIssues(__dirname);
|
|
52
|
+
expect(Array.isArray(issues)).toBe(true);
|
|
53
|
+
}, 30000);
|
|
54
|
+
it('should identify circular dependencies if present', async () => {
|
|
55
|
+
const issues = await engine.findArchitecturalIssues(__dirname);
|
|
56
|
+
// Issues array can be empty if no problems found
|
|
57
|
+
issues.forEach(issue => {
|
|
58
|
+
expect(issue).toHaveProperty('type');
|
|
59
|
+
expect(issue).toHaveProperty('severity');
|
|
60
|
+
expect(issue).toHaveProperty('message');
|
|
61
|
+
expect(issue).toHaveProperty('location');
|
|
62
|
+
});
|
|
63
|
+
}, 30000);
|
|
64
|
+
});
|
|
65
|
+
describe('findUnusedExports', () => {
|
|
66
|
+
it('should return an array of unused exports', async () => {
|
|
67
|
+
const unused = await engine.findUnusedExports(__dirname);
|
|
68
|
+
expect(Array.isArray(unused)).toBe(true);
|
|
69
|
+
}, 30000);
|
|
70
|
+
it('should include symbol name and location', async () => {
|
|
71
|
+
const unused = await engine.findUnusedExports(__dirname);
|
|
72
|
+
unused.forEach(item => {
|
|
73
|
+
expect(item).toHaveProperty('name');
|
|
74
|
+
expect(item).toHaveProperty('kind');
|
|
75
|
+
expect(item).toHaveProperty('location');
|
|
76
|
+
expect(item).toHaveProperty('exportedFrom');
|
|
77
|
+
});
|
|
78
|
+
}, 30000);
|
|
79
|
+
});
|
|
80
|
+
describe('getRefactorImpact', () => {
|
|
81
|
+
it('should calculate refactor impact', async () => {
|
|
82
|
+
const impact = await engine.getRefactorImpact('TypeScriptEngine', __dirname);
|
|
83
|
+
expect(impact).toHaveProperty('symbol');
|
|
84
|
+
expect(impact).toHaveProperty('referenceCount');
|
|
85
|
+
expect(impact).toHaveProperty('affectedFiles');
|
|
86
|
+
expect(impact).toHaveProperty('testFiles');
|
|
87
|
+
expect(Array.isArray(impact.affectedFiles)).toBe(true);
|
|
88
|
+
expect(Array.isArray(impact.testFiles)).toBe(true);
|
|
89
|
+
}, 30000);
|
|
90
|
+
it('should return zero references for non-existent symbol', async () => {
|
|
91
|
+
const impact = await engine.getRefactorImpact('NonExistentSymbolXYZ123', __dirname);
|
|
92
|
+
expect(impact.referenceCount).toBe(0);
|
|
93
|
+
expect(impact.affectedFiles.length).toBe(0);
|
|
94
|
+
}, 30000);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=typescript-engine.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript-engine.test.js","sourceRoot":"","sources":["../../../../../../src/tools/structural/engines/typescript/__tests__/typescript-engine.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;A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