@mustafagoksever/java-inspector 1.0.4
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/LICENSE +201 -0
- package/README.md +276 -0
- package/dist/analyzer/JavaClassAnalyzer.d.ts +61 -0
- package/dist/analyzer/JavaClassAnalyzer.d.ts.map +1 -0
- package/dist/analyzer/JavaClassAnalyzer.js +313 -0
- package/dist/analyzer/JavaClassAnalyzer.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +73 -0
- package/dist/cli.js.map +1 -0
- package/dist/decompiler/DecompilerService.d.ts +39 -0
- package/dist/decompiler/DecompilerService.d.ts.map +1 -0
- package/dist/decompiler/DecompilerService.js +270 -0
- package/dist/decompiler/DecompilerService.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +290 -0
- package/dist/index.js.map +1 -0
- package/dist/scanner/DependencyScanner.d.ts +56 -0
- package/dist/scanner/DependencyScanner.d.ts.map +1 -0
- package/dist/scanner/DependencyScanner.js +283 -0
- package/dist/scanner/DependencyScanner.js.map +1 -0
- package/dist/utils/cachePaths.d.ts +10 -0
- package/dist/utils/cachePaths.d.ts.map +1 -0
- package/dist/utils/cachePaths.js +25 -0
- package/dist/utils/cachePaths.js.map +1 -0
- package/lib/cfr-0.152.jar +0 -0
- package/package.json +88 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export interface ClassIndexEntry {
|
|
2
|
+
className: string;
|
|
3
|
+
jarPath: string;
|
|
4
|
+
packageName: string;
|
|
5
|
+
simpleName: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ScanResult {
|
|
8
|
+
jarCount: number;
|
|
9
|
+
classCount: number;
|
|
10
|
+
indexPath: string;
|
|
11
|
+
sampleEntries: string[];
|
|
12
|
+
}
|
|
13
|
+
export declare class DependencyScanner {
|
|
14
|
+
private indexCache;
|
|
15
|
+
/**
|
|
16
|
+
* Scan all dependencies of a Maven project and build mapping index from class names to JAR packages
|
|
17
|
+
*/
|
|
18
|
+
scanProject(projectPath: string, forceRefresh?: boolean, onProgress?: (message: string, progress?: number, total?: number) => Promise<void>): Promise<ScanResult>;
|
|
19
|
+
/**
|
|
20
|
+
* Get all JAR package paths from Maven dependency tree
|
|
21
|
+
*/
|
|
22
|
+
private getMavenDependencies;
|
|
23
|
+
/**
|
|
24
|
+
* Scan JAR packages from local Maven repository
|
|
25
|
+
*/
|
|
26
|
+
private scanLocalMavenRepo;
|
|
27
|
+
/**
|
|
28
|
+
* Resolve dependency coordinates to get JAR package path
|
|
29
|
+
*/
|
|
30
|
+
private resolveJarPath;
|
|
31
|
+
/**
|
|
32
|
+
* Extract all class file information from JAR package with timeout
|
|
33
|
+
*/
|
|
34
|
+
private extractClassesFromJarWithTimeout;
|
|
35
|
+
/**
|
|
36
|
+
* Extract all class file information from JAR package
|
|
37
|
+
*/
|
|
38
|
+
private extractClassesFromJar;
|
|
39
|
+
/**
|
|
40
|
+
* Find corresponding JAR package path by class name
|
|
41
|
+
*/
|
|
42
|
+
findJarForClass(className: string, projectPath: string): Promise<string | null>;
|
|
43
|
+
/**
|
|
44
|
+
* Get all indexed class names
|
|
45
|
+
*/
|
|
46
|
+
getAllClassNames(projectPath: string): Promise<string[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Get Maven command path
|
|
49
|
+
*/
|
|
50
|
+
private getMavenCommand;
|
|
51
|
+
/**
|
|
52
|
+
* Get Maven local repository path
|
|
53
|
+
*/
|
|
54
|
+
private getMavenRepositoryPath;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=DependencyScanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DependencyScanner.d.ts","sourceRoot":"","sources":["../../src/scanner/DependencyScanner.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,eAAe;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,qBAAa,iBAAiB;IAC1B,OAAO,CAAC,UAAU,CAA6C;IAE/D;;OAEG;IACG,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,GAAE,OAAe,EAAE,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IAmF9K;;OAEG;YACW,oBAAoB;IAyClC;;OAEG;YACW,kBAAkB;IA2BhC;;OAEG;YACW,cAAc;IAqB5B;;OAEG;YACW,gCAAgC;IAkB9C;;OAEG;YACW,qBAAqB;IAsDnC;;OAEG;IACG,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAcrF;;OAEG;IACG,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAa9D;;OAEG;IACH,OAAO,CAAC,eAAe;IAgBvB;;OAEG;IACH,OAAO,CAAC,sBAAsB;CAWjC"}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { execFile } from 'child_process';
|
|
2
|
+
import { promisify } from 'util';
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
import * as path from 'path';
|
|
5
|
+
import { parseString } from 'xml2js';
|
|
6
|
+
import * as yauzl from 'yauzl';
|
|
7
|
+
import { getClassIndexPath } from '../utils/cachePaths.js';
|
|
8
|
+
const execFileAsync = promisify(execFile);
|
|
9
|
+
const parseXmlAsync = promisify(parseString);
|
|
10
|
+
export class DependencyScanner {
|
|
11
|
+
indexCache = new Map();
|
|
12
|
+
/**
|
|
13
|
+
* Scan all dependencies of a Maven project and build mapping index from class names to JAR packages
|
|
14
|
+
*/
|
|
15
|
+
async scanProject(projectPath, forceRefresh = false, onProgress) {
|
|
16
|
+
const indexPath = getClassIndexPath(projectPath);
|
|
17
|
+
const isDebug = process.env.NODE_ENV === 'development';
|
|
18
|
+
// If force refresh, delete old index file first
|
|
19
|
+
if (forceRefresh && await fs.pathExists(indexPath)) {
|
|
20
|
+
if (isDebug) {
|
|
21
|
+
console.error('Force refresh: deleting old index file');
|
|
22
|
+
}
|
|
23
|
+
await onProgress?.('Force refresh: deleting old index file', 1, 100);
|
|
24
|
+
await fs.remove(indexPath);
|
|
25
|
+
}
|
|
26
|
+
// Check cache
|
|
27
|
+
if (!forceRefresh && await fs.pathExists(indexPath)) {
|
|
28
|
+
if (isDebug) {
|
|
29
|
+
console.error('Using cached class index');
|
|
30
|
+
}
|
|
31
|
+
await onProgress?.('Using cached class index', 100, 100);
|
|
32
|
+
const cachedIndex = await fs.readJson(indexPath);
|
|
33
|
+
return {
|
|
34
|
+
jarCount: cachedIndex.jarCount,
|
|
35
|
+
classCount: cachedIndex.classCount,
|
|
36
|
+
indexPath,
|
|
37
|
+
sampleEntries: cachedIndex.sampleEntries
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
if (isDebug) {
|
|
41
|
+
console.error('Starting Maven dependency scan...');
|
|
42
|
+
}
|
|
43
|
+
await onProgress?.('Starting Maven dependency scan...', 5, 100);
|
|
44
|
+
// 1. Get Maven dependency tree
|
|
45
|
+
const dependencies = await this.getMavenDependencies(projectPath);
|
|
46
|
+
console.error(`Found ${dependencies.length} dependency JARs`);
|
|
47
|
+
await onProgress?.(`Found ${dependencies.length} dependency JARs`, 10, 100);
|
|
48
|
+
// 2. Parse each JAR package and build class index
|
|
49
|
+
const classIndex = [];
|
|
50
|
+
let processedJars = 0;
|
|
51
|
+
for (const jarPath of dependencies) {
|
|
52
|
+
try {
|
|
53
|
+
console.error(`Processing JAR: ${jarPath}`);
|
|
54
|
+
const classes = await this.extractClassesFromJarWithTimeout(jarPath, 15000);
|
|
55
|
+
classIndex.push(...classes);
|
|
56
|
+
processedJars++;
|
|
57
|
+
if (processedJars % 10 === 0 || processedJars === dependencies.length) {
|
|
58
|
+
const msg = `Processed ${processedJars}/${dependencies.length} JARs`;
|
|
59
|
+
console.error(msg);
|
|
60
|
+
const progress = 10 + Math.floor((processedJars / dependencies.length) * 80);
|
|
61
|
+
await onProgress?.(msg, progress, 100);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
console.warn(`Failed to process JAR: ${jarPath}, error: ${error}`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// 3. Save index to file
|
|
69
|
+
await onProgress?.('Saving index to file...', 95, 100);
|
|
70
|
+
const result = {
|
|
71
|
+
jarCount: processedJars,
|
|
72
|
+
classCount: classIndex.length,
|
|
73
|
+
indexPath,
|
|
74
|
+
sampleEntries: classIndex.slice(0, 10).map(entry => `${entry.className} -> ${path.basename(entry.jarPath)}`)
|
|
75
|
+
};
|
|
76
|
+
await fs.outputJson(indexPath, {
|
|
77
|
+
...result,
|
|
78
|
+
classIndex,
|
|
79
|
+
lastUpdated: new Date().toISOString()
|
|
80
|
+
}, { spaces: 2 });
|
|
81
|
+
console.error(`Scan complete! Processed ${processedJars} JARs, indexed ${classIndex.length} classes`);
|
|
82
|
+
await onProgress?.(`Scan complete! ${processedJars} JARs, ${classIndex.length} classes`, 100, 100);
|
|
83
|
+
return result;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get all JAR package paths from Maven dependency tree
|
|
87
|
+
*/
|
|
88
|
+
async getMavenDependencies(projectPath) {
|
|
89
|
+
try {
|
|
90
|
+
// Build Maven command path
|
|
91
|
+
const mavenCmd = this.getMavenCommand();
|
|
92
|
+
// Execute mvn dependency:tree command
|
|
93
|
+
const { stdout } = await execFileAsync(mavenCmd, ['dependency:tree', '-DoutputType=text'], {
|
|
94
|
+
cwd: projectPath,
|
|
95
|
+
timeout: 60000, // 60 second timeout
|
|
96
|
+
shell: process.platform === 'win32'
|
|
97
|
+
});
|
|
98
|
+
// Parse output, extract JAR package paths
|
|
99
|
+
const jarPaths = new Set();
|
|
100
|
+
const lines = stdout.split('\n');
|
|
101
|
+
for (const line of lines) {
|
|
102
|
+
// Match lines like: [INFO] +- com.example:my-lib:jar:1.0.0:compile
|
|
103
|
+
const match = line.match(/\[INFO\].*?([a-zA-Z0-9._-]+:[a-zA-Z0-9._-]+:[a-zA-Z0-9._-]+:[a-zA-Z0-9._-]+:[a-zA-Z0-9._-]+)/);
|
|
104
|
+
if (match) {
|
|
105
|
+
const dependency = match[1];
|
|
106
|
+
// Build JAR package path
|
|
107
|
+
const jarPath = await this.resolveJarPath(dependency, projectPath);
|
|
108
|
+
if (jarPath && await fs.pathExists(jarPath)) {
|
|
109
|
+
jarPaths.add(jarPath);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return Array.from(jarPaths);
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
console.error('Failed to get Maven dependencies:', error);
|
|
117
|
+
// If Maven command fails, try scanning from local repository
|
|
118
|
+
return await this.scanLocalMavenRepo(projectPath);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Scan JAR packages from local Maven repository
|
|
123
|
+
*/
|
|
124
|
+
async scanLocalMavenRepo(projectPath) {
|
|
125
|
+
const mavenRepoPath = this.getMavenRepositoryPath();
|
|
126
|
+
if (!await fs.pathExists(mavenRepoPath)) {
|
|
127
|
+
throw new Error('Maven local repository does not exist');
|
|
128
|
+
}
|
|
129
|
+
const jarFiles = [];
|
|
130
|
+
const scanDir = async (dir) => {
|
|
131
|
+
const entries = await fs.readdir(dir, { withFileTypes: true });
|
|
132
|
+
for (const entry of entries) {
|
|
133
|
+
const fullPath = path.join(dir, entry.name);
|
|
134
|
+
if (entry.isDirectory()) {
|
|
135
|
+
await scanDir(fullPath);
|
|
136
|
+
}
|
|
137
|
+
else if (entry.isFile() && entry.name.endsWith('.jar')) {
|
|
138
|
+
jarFiles.push(fullPath);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
await scanDir(mavenRepoPath);
|
|
143
|
+
return jarFiles;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Resolve dependency coordinates to get JAR package path
|
|
147
|
+
*/
|
|
148
|
+
async resolveJarPath(dependency, projectPath) {
|
|
149
|
+
const [groupId, artifactId, type, version, scope] = dependency.split(':');
|
|
150
|
+
if (type !== 'jar') {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
// Use unified Maven repository path getter method
|
|
154
|
+
const mavenRepoPath = this.getMavenRepositoryPath();
|
|
155
|
+
const groupPath = groupId.replace(/\./g, '/');
|
|
156
|
+
const jarPath = path.join(mavenRepoPath, groupPath, artifactId, version, `${artifactId}-${version}.jar`);
|
|
157
|
+
return jarPath;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Extract all class file information from JAR package with timeout
|
|
161
|
+
*/
|
|
162
|
+
async extractClassesFromJarWithTimeout(jarPath, timeoutMs) {
|
|
163
|
+
return new Promise((resolve, reject) => {
|
|
164
|
+
const timer = setTimeout(() => {
|
|
165
|
+
reject(new Error(`Timeout after ${timeoutMs}ms reading JAR: ${jarPath}`));
|
|
166
|
+
}, timeoutMs);
|
|
167
|
+
this.extractClassesFromJar(jarPath)
|
|
168
|
+
.then((result) => {
|
|
169
|
+
clearTimeout(timer);
|
|
170
|
+
resolve(result);
|
|
171
|
+
})
|
|
172
|
+
.catch((err) => {
|
|
173
|
+
clearTimeout(timer);
|
|
174
|
+
reject(err);
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Extract all class file information from JAR package
|
|
180
|
+
*/
|
|
181
|
+
async extractClassesFromJar(jarPath) {
|
|
182
|
+
return new Promise((resolve, reject) => {
|
|
183
|
+
const classes = [];
|
|
184
|
+
yauzl.open(jarPath, { lazyEntries: true }, (err, zipfile) => {
|
|
185
|
+
if (err) {
|
|
186
|
+
reject(err);
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
zipfile.readEntry();
|
|
190
|
+
zipfile.on('entry', (entry) => {
|
|
191
|
+
if (entry.fileName.endsWith('.class') && !entry.fileName.includes('$')) {
|
|
192
|
+
const className = entry.fileName
|
|
193
|
+
.replace(/\.class$/, '')
|
|
194
|
+
.replace(/\//g, '.');
|
|
195
|
+
const lastDotIndex = className.lastIndexOf('.');
|
|
196
|
+
const packageName = lastDotIndex > 0 ? className.substring(0, lastDotIndex) : '';
|
|
197
|
+
const simpleName = lastDotIndex > 0 ? className.substring(lastDotIndex + 1) : className;
|
|
198
|
+
classes.push({
|
|
199
|
+
className,
|
|
200
|
+
jarPath,
|
|
201
|
+
packageName,
|
|
202
|
+
simpleName
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
zipfile.readEntry();
|
|
206
|
+
});
|
|
207
|
+
zipfile.on('end', () => {
|
|
208
|
+
try {
|
|
209
|
+
zipfile.close();
|
|
210
|
+
}
|
|
211
|
+
catch (e) {
|
|
212
|
+
// ignore close errors
|
|
213
|
+
}
|
|
214
|
+
resolve(classes);
|
|
215
|
+
});
|
|
216
|
+
zipfile.on('error', (err) => {
|
|
217
|
+
try {
|
|
218
|
+
zipfile.close();
|
|
219
|
+
}
|
|
220
|
+
catch (e) {
|
|
221
|
+
// ignore close errors
|
|
222
|
+
}
|
|
223
|
+
reject(err);
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Find corresponding JAR package path by class name
|
|
230
|
+
*/
|
|
231
|
+
async findJarForClass(className, projectPath) {
|
|
232
|
+
const indexPath = getClassIndexPath(projectPath);
|
|
233
|
+
if (!await fs.pathExists(indexPath)) {
|
|
234
|
+
throw new Error('Class index does not exist, please run dependency scan first');
|
|
235
|
+
}
|
|
236
|
+
const indexData = await fs.readJson(indexPath);
|
|
237
|
+
const classIndex = indexData.classIndex;
|
|
238
|
+
const entry = classIndex.find(entry => entry.className === className);
|
|
239
|
+
return entry ? entry.jarPath : null;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Get all indexed class names
|
|
243
|
+
*/
|
|
244
|
+
async getAllClassNames(projectPath) {
|
|
245
|
+
const indexPath = getClassIndexPath(projectPath);
|
|
246
|
+
if (!await fs.pathExists(indexPath)) {
|
|
247
|
+
return [];
|
|
248
|
+
}
|
|
249
|
+
const indexData = await fs.readJson(indexPath);
|
|
250
|
+
const classIndex = indexData.classIndex;
|
|
251
|
+
return classIndex.map(entry => entry.className);
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Get Maven command path
|
|
255
|
+
*/
|
|
256
|
+
getMavenCommand() {
|
|
257
|
+
// 1. Check MAVEN_HOME
|
|
258
|
+
const mavenHome = process.env.MAVEN_HOME;
|
|
259
|
+
if (mavenHome) {
|
|
260
|
+
const mavenCmd = process.platform === 'win32' ? 'mvn.cmd' : 'mvn';
|
|
261
|
+
return path.join(mavenHome, 'bin', mavenCmd);
|
|
262
|
+
}
|
|
263
|
+
// 2. On Windows, try mvn.cmd first (common for Scoop/Chocolatey/manual installs)
|
|
264
|
+
if (process.platform === 'win32') {
|
|
265
|
+
return 'mvn.cmd';
|
|
266
|
+
}
|
|
267
|
+
return 'mvn'; // Fallback to mvn in PATH
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Get Maven local repository path
|
|
271
|
+
*/
|
|
272
|
+
getMavenRepositoryPath() {
|
|
273
|
+
// 1. Prioritize repository path specified by MAVEN_REPO environment variable
|
|
274
|
+
const mavenRepo = process.env.MAVEN_REPO;
|
|
275
|
+
if (mavenRepo) {
|
|
276
|
+
return mavenRepo;
|
|
277
|
+
}
|
|
278
|
+
// 2. Use default Maven local repository path
|
|
279
|
+
const homeDir = process.env.HOME || process.env.USERPROFILE;
|
|
280
|
+
return path.join(homeDir, '.m2', 'repository');
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
//# sourceMappingURL=DependencyScanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DependencyScanner.js","sourceRoot":"","sources":["../../src/scanner/DependencyScanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC1C,MAAM,aAAa,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;AAgB7C,MAAM,OAAO,iBAAiB;IAClB,UAAU,GAAmC,IAAI,GAAG,EAAE,CAAC;IAE/D;;OAEG;IACH,KAAK,CAAC,WAAW,CAAC,WAAmB,EAAE,eAAwB,KAAK,EAAE,UAAkF;QACpJ,MAAM,SAAS,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACjD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC;QAEvD,gDAAgD;QAChD,IAAI,YAAY,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YACjD,IAAI,OAAO,EAAE,CAAC;gBACV,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C,IAAI,SAAS,EAAE,CAAC;YACZ,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,6CAA6C;QAC7C,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;QAC5D,OAAO,IAAI,CAAC,IAAI,CAAC,OAAQ,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC;IACpD,CAAC;CACJ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the project-specific cache directory under the user's home cache.
|
|
3
|
+
* Uses a hash of the resolved project path to avoid collisions between
|
|
4
|
+
* different repositories with the same folder name.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getProjectCacheDir(projectPath: string): string;
|
|
7
|
+
export declare function getDecompileCacheDir(projectPath: string): string;
|
|
8
|
+
export declare function getClassTempDir(projectPath: string): string;
|
|
9
|
+
export declare function getClassIndexPath(projectPath: string): string;
|
|
10
|
+
//# sourceMappingURL=cachePaths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cachePaths.d.ts","sourceRoot":"","sources":["../../src/utils/cachePaths.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAM9D;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE7D"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as path from 'path';
|
|
2
|
+
import * as os from 'os';
|
|
3
|
+
import { createHash } from 'crypto';
|
|
4
|
+
/**
|
|
5
|
+
* Get the project-specific cache directory under the user's home cache.
|
|
6
|
+
* Uses a hash of the resolved project path to avoid collisions between
|
|
7
|
+
* different repositories with the same folder name.
|
|
8
|
+
*/
|
|
9
|
+
export function getProjectCacheDir(projectPath) {
|
|
10
|
+
const normalizedPath = path.resolve(projectPath);
|
|
11
|
+
const hash = createHash('sha256').update(normalizedPath).digest('hex').substring(0, 12);
|
|
12
|
+
const baseName = path.basename(normalizedPath);
|
|
13
|
+
const dirName = `${baseName}_${hash}`;
|
|
14
|
+
return path.join(os.homedir(), '.cache', 'java-inspector', dirName);
|
|
15
|
+
}
|
|
16
|
+
export function getDecompileCacheDir(projectPath) {
|
|
17
|
+
return path.join(getProjectCacheDir(projectPath), 'decompile-cache');
|
|
18
|
+
}
|
|
19
|
+
export function getClassTempDir(projectPath) {
|
|
20
|
+
return path.join(getProjectCacheDir(projectPath), 'class-temp');
|
|
21
|
+
}
|
|
22
|
+
export function getClassIndexPath(projectPath) {
|
|
23
|
+
return path.join(getProjectCacheDir(projectPath), 'class-index.json');
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=cachePaths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cachePaths.js","sourceRoot":"","sources":["../../src/utils/cachePaths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAmB;IAClD,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACjD,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACxF,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,GAAG,QAAQ,IAAI,IAAI,EAAE,CAAC;IACtC,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,WAAmB;IACpD,OAAO,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,iBAAiB,CAAC,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,WAAmB;IAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,YAAY,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,WAAmB;IACjD,OAAO,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC,CAAC;AAC1E,CAAC"}
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mustafagoksever/java-inspector",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "MCP server that gives AI agents instant access to decompiled Java code from Maven/Gradle dependencies. Blazing fast Java class analysis for Claude, Cursor, and other LLM-powered IDEs.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"java-inspector": "dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist/**/*",
|
|
12
|
+
"lib/**/*",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc",
|
|
18
|
+
"start": "node dist/index.js",
|
|
19
|
+
"dev": "tsx src/index.ts",
|
|
20
|
+
"test": "jest",
|
|
21
|
+
"prepublishOnly": "npm run build",
|
|
22
|
+
"prepack": "npm run build",
|
|
23
|
+
"publish:npm": "npm publish",
|
|
24
|
+
"publish:beta": "npm publish --tag beta",
|
|
25
|
+
"version:patch": "npm version patch",
|
|
26
|
+
"version:minor": "npm version minor",
|
|
27
|
+
"version:major": "npm version major"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"mcp",
|
|
31
|
+
"model-context-protocol",
|
|
32
|
+
"java",
|
|
33
|
+
"decompiler",
|
|
34
|
+
"decompilation",
|
|
35
|
+
"java-decompiler",
|
|
36
|
+
"maven",
|
|
37
|
+
"gradle",
|
|
38
|
+
"claude",
|
|
39
|
+
"cursor",
|
|
40
|
+
"ai",
|
|
41
|
+
"llm",
|
|
42
|
+
"jarp",
|
|
43
|
+
"spring",
|
|
44
|
+
"spring-boot",
|
|
45
|
+
"jar",
|
|
46
|
+
"bytecode",
|
|
47
|
+
"reverse-engineering",
|
|
48
|
+
"class-analyzer",
|
|
49
|
+
"dependency-analysis",
|
|
50
|
+
"intellij",
|
|
51
|
+
"vscode",
|
|
52
|
+
"ai-assistant",
|
|
53
|
+
"copilot",
|
|
54
|
+
"anthropic"
|
|
55
|
+
],
|
|
56
|
+
"author": "mustafagoksever",
|
|
57
|
+
"license": "Apache-2.0",
|
|
58
|
+
"repository": {
|
|
59
|
+
"type": "git",
|
|
60
|
+
"url": "https://github.com/mustafagoksever/java-inspector.git"
|
|
61
|
+
},
|
|
62
|
+
"bugs": {
|
|
63
|
+
"url": "https://github.com/mustafagoksever/java-inspector/issues"
|
|
64
|
+
},
|
|
65
|
+
"homepage": "https://github.com/mustafagoksever/java-inspector#readme",
|
|
66
|
+
"engines": {
|
|
67
|
+
"node": ">=16.0.0"
|
|
68
|
+
},
|
|
69
|
+
"dependencies": {
|
|
70
|
+
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
71
|
+
"commander": "^14.0.2",
|
|
72
|
+
"fs-extra": "^11.3.3",
|
|
73
|
+
"xml2js": "^0.6.2",
|
|
74
|
+
"archiver": "^7.0.1",
|
|
75
|
+
"yauzl": "^3.2.0"
|
|
76
|
+
},
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"@types/node": "^22.10.0",
|
|
79
|
+
"@types/fs-extra": "^11.0.4",
|
|
80
|
+
"@types/xml2js": "^0.4.14",
|
|
81
|
+
"@types/archiver": "^6.0.2",
|
|
82
|
+
"@types/yauzl": "^2.10.3",
|
|
83
|
+
"typescript": "^5.7.0",
|
|
84
|
+
"tsx": "^4.19.0",
|
|
85
|
+
"jest": "^29.7.0",
|
|
86
|
+
"@types/jest": "^29.5.13"
|
|
87
|
+
}
|
|
88
|
+
}
|