docstodev 1.0.3 → 2.0.0
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/ai/analyzer.d.ts +3 -0
- package/dist/ai/analyzer.d.ts.map +1 -0
- package/dist/ai/analyzer.js +45 -0
- package/dist/ai/analyzer.js.map +1 -0
- package/dist/analyzers/languageAnalyzer.d.ts +20 -0
- package/dist/analyzers/languageAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/languageAnalyzer.js +513 -0
- package/dist/analyzers/languageAnalyzer.js.map +1 -0
- package/dist/cache/cacheManager.d.ts +38 -0
- package/dist/cache/cacheManager.d.ts.map +1 -0
- package/dist/cache/cacheManager.js +141 -0
- package/dist/cache/cacheManager.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +316 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/commands/generateSummary.d.ts +18 -0
- package/dist/commands/generateSummary.d.ts.map +1 -0
- package/dist/commands/generateSummary.js +116 -0
- package/dist/commands/generateSummary.js.map +1 -0
- package/dist/commands/run.d.ts +5 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/run.js +326 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/exporters/html.d.ts +6 -0
- package/dist/exporters/html.d.ts.map +1 -0
- package/dist/exporters/html.js +596 -0
- package/dist/exporters/html.js.map +1 -0
- package/docs/docs-to-dev.md +240 -0
- package/docs/report.html +633 -0
- package/docs/report.pdf +0 -0
- package/docs/summary.md +16 -0
- package/package.json +1 -1
- package/src/ai/analyzer.ts +258 -19
- package/src/commands/run.ts +149 -83
- package/src/exporters/html.ts +302 -48
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../../src/ai/analyzer.ts"],"names":[],"mappings":"AAEA,OAAO,eAAe,CAAC;AAEvB,wBAAsB,KAAK,CAAC,gBAAgB,EAAE,MAAM,gBA6CnD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Emplacement absolu : M:\workspace\extensions\docstodev\src\ai\analyzer.ts
|
|
2
|
+
import "dotenv/config"; // Pour lire GROQ_API_KEY dans ton .env
|
|
3
|
+
export async function askAI(technicalContext) {
|
|
4
|
+
// clé par défaut gratuite
|
|
5
|
+
const GROQ_API_KEY = process.env.GROQ_API_KEY || "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";
|
|
6
|
+
if (!GROQ_API_KEY) {
|
|
7
|
+
return "⚠️ Erreur : Clé API Groq manquante dans le fichier .env";
|
|
8
|
+
}
|
|
9
|
+
const systemPrompt = `
|
|
10
|
+
Vous êtes MakazouIA, l'assistant IA de DocsToDev, créé par Chadrack Massamba (EsporDev).
|
|
11
|
+
Votre mission : Transformer des données techniques brutes en descriptions métier claires.
|
|
12
|
+
|
|
13
|
+
Instructions :
|
|
14
|
+
- Vous allez recevoir une liste de fichiers, leurs rôles et leurs exports.
|
|
15
|
+
- Pour chaque fichier, rédigez UNE SEULE phrase concise expliquant sa responsabilité métier.
|
|
16
|
+
- Soyez pro, mais gardez votre touche amicale et votre pointe d'humour du Congo-Brazzaville.
|
|
17
|
+
- mentionnez les imports, technique ( "il y a une fonction X"), expliquez le BUT du fichier.
|
|
18
|
+
- selon le nombre d'occurance précisez les couleurs qui reviennen souvent eu suggérez un design systèm , pallette de couleur.
|
|
19
|
+
- donnez une très bref description du but de l'ensemble du projet.
|
|
20
|
+
`;
|
|
21
|
+
try {
|
|
22
|
+
const resp = await fetch("https://api.groq.com/openai/v1/chat/completions", {
|
|
23
|
+
method: "POST",
|
|
24
|
+
headers: {
|
|
25
|
+
Authorization: `Bearer ${GROQ_API_KEY}`,
|
|
26
|
+
"Content-Type": "application/json",
|
|
27
|
+
},
|
|
28
|
+
body: JSON.stringify({
|
|
29
|
+
model: "llama-3.3-70b-versatile",
|
|
30
|
+
messages: [
|
|
31
|
+
{ role: "system", content: systemPrompt },
|
|
32
|
+
{ role: "user", content: `Voici les données techniques du projet : \n${technicalContext}` }
|
|
33
|
+
],
|
|
34
|
+
temperature: 0.7,
|
|
35
|
+
}),
|
|
36
|
+
});
|
|
37
|
+
const data = await resp.json();
|
|
38
|
+
return data.choices?.[0]?.message?.content || "Désolé, je n'ai pas pu analyser ce fichier.";
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
console.error("Erreur IA:", error);
|
|
42
|
+
return "Erreur lors de la connexion à l'intelligence artificielle.";
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=analyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyzer.js","sourceRoot":"","sources":["../../src/ai/analyzer.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAE5E,OAAO,eAAe,CAAC,CAAC,uCAAuC;AAE/D,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,gBAAwB;IAEhD,0BAA0B;IAC1B,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,0DAA0D,CAAC;IAE5G,IAAI,CAAC,YAAY,EAAE,CAAC;QAChB,OAAO,yDAAyD,CAAC;IACrE,CAAC;IAED,MAAM,YAAY,GAAG;;;;;;;;;;;CAWxB,CAAC;IAEE,IAAI,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,iDAAiD,EAAE;YACxE,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACL,aAAa,EAAE,UAAU,YAAY,EAAE;gBACvC,cAAc,EAAE,kBAAkB;aACrC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACjB,KAAK,EAAE,yBAAyB;gBAChC,QAAQ,EAAE;oBACN,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE;oBACzC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,8CAA8C,gBAAgB,EAAE,EAAE;iBAC9F;gBACD,WAAW,EAAE,GAAG;aACnB,CAAC;SACL,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,IAAI,6CAA6C,CAAC;IAChG,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACnC,OAAO,4DAA4D,CAAC;IACxE,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface LanguageAnalyzer {
|
|
2
|
+
extensions: string[];
|
|
3
|
+
analyzeFile(content: string): FileAnalysisResult;
|
|
4
|
+
}
|
|
5
|
+
export interface FileAnalysisResult {
|
|
6
|
+
functions: string[];
|
|
7
|
+
classes: string[];
|
|
8
|
+
types: string[];
|
|
9
|
+
imports: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
type: string;
|
|
12
|
+
usage?: string | undefined;
|
|
13
|
+
}>;
|
|
14
|
+
exports: string[];
|
|
15
|
+
structure?: Record<string, any>;
|
|
16
|
+
}
|
|
17
|
+
export declare function getAnalyzer(filePath: string): LanguageAnalyzer;
|
|
18
|
+
export declare function getSupportedExtensions(): string[];
|
|
19
|
+
export declare function isExplicitlySupported(filePath: string): boolean;
|
|
20
|
+
//# sourceMappingURL=languageAnalyzer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languageAnalyzer.d.ts","sourceRoot":"","sources":["../../src/analyzers/languageAnalyzer.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,CAAC;CAClD;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,CAAC;IAC3E,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACjC;AAqiBD,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAM9D;AAED,wBAAgB,sBAAsB,IAAI,MAAM,EAAE,CAEjD;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAM/D"}
|
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
// Analyseur TypeScript/JavaScript
|
|
2
|
+
class TSJSAnalyzer {
|
|
3
|
+
extensions = [".ts", ".js", ".tsx", ".jsx", ".mjs", ".cjs"];
|
|
4
|
+
analyzeFile(content) {
|
|
5
|
+
const exports = [];
|
|
6
|
+
const exportRegex = /export\s+(?:default\s+)?(?:async\s+)?(?:function|const|let|class|type|interface|enum)\s+([a-zA-Z0-9_]+)/g;
|
|
7
|
+
let match;
|
|
8
|
+
while ((match = exportRegex.exec(content)) !== null) {
|
|
9
|
+
if (match[1])
|
|
10
|
+
exports.push(match[1]);
|
|
11
|
+
}
|
|
12
|
+
const functions = [];
|
|
13
|
+
const funcRegex = /(?:export\s+)?(?:async\s+)?function\s+([a-zA-Z0-9_]+)/g;
|
|
14
|
+
funcRegex.lastIndex = 0;
|
|
15
|
+
while ((match = funcRegex.exec(content)) !== null) {
|
|
16
|
+
if (match[1])
|
|
17
|
+
functions.push(match[1]);
|
|
18
|
+
}
|
|
19
|
+
const arrowRegex = /(?:export\s+)?const\s+([a-zA-Z0-9_]+)\s*=\s*(?:async\s*)?\([^)]*\)\s*=>/g;
|
|
20
|
+
while ((match = arrowRegex.exec(content)) !== null) {
|
|
21
|
+
if (match[1])
|
|
22
|
+
functions.push(match[1]);
|
|
23
|
+
}
|
|
24
|
+
const classes = [];
|
|
25
|
+
const classRegex = /(?:export\s+)?(?:abstract\s+)?class\s+([a-zA-Z0-9_]+)/g;
|
|
26
|
+
while ((match = classRegex.exec(content)) !== null) {
|
|
27
|
+
if (match[1])
|
|
28
|
+
classes.push(match[1]);
|
|
29
|
+
}
|
|
30
|
+
const types = [];
|
|
31
|
+
const typeRegex = /(?:export\s+)?(?:type|interface)\s+([a-zA-Z0-9_]+)/g;
|
|
32
|
+
while ((match = typeRegex.exec(content)) !== null) {
|
|
33
|
+
if (match[1])
|
|
34
|
+
types.push(match[1]);
|
|
35
|
+
}
|
|
36
|
+
const imports = [];
|
|
37
|
+
const lines = content.split(/\r?\n/);
|
|
38
|
+
const importLines = lines.filter(l => l.trim().startsWith("import "));
|
|
39
|
+
importLines.forEach(line => {
|
|
40
|
+
const fromMatch = line.match(/from ['"]([^'"]+)['"]/);
|
|
41
|
+
if (fromMatch?.[1]) {
|
|
42
|
+
const name = fromMatch[1];
|
|
43
|
+
const type = name.startsWith('.') ? 'Interne' : (name.startsWith('node:') ? 'Node.js' : 'NPM');
|
|
44
|
+
const importedMatch = line.match(/import\s+(?:\{([^}]+)\}|(\w+))/);
|
|
45
|
+
let usage = undefined;
|
|
46
|
+
if (importedMatch) {
|
|
47
|
+
const items = importedMatch[1] || importedMatch[2];
|
|
48
|
+
usage = items?.trim().split(',').map(s => s.trim()).join(', ');
|
|
49
|
+
}
|
|
50
|
+
imports.push({ name, type, usage });
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
return { functions, classes, types, imports, exports };
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// Analyseur Python
|
|
57
|
+
class PythonAnalyzer {
|
|
58
|
+
extensions = [".py"];
|
|
59
|
+
analyzeFile(content) {
|
|
60
|
+
const functions = [];
|
|
61
|
+
const funcRegex = /def\s+([a-zA-Z0-9_]+)\s*\(/g;
|
|
62
|
+
let match;
|
|
63
|
+
while ((match = funcRegex.exec(content)) !== null) {
|
|
64
|
+
if (match[1] && !match[1].startsWith('__'))
|
|
65
|
+
functions.push(match[1]);
|
|
66
|
+
}
|
|
67
|
+
const classes = [];
|
|
68
|
+
const classRegex = /class\s+([a-zA-Z0-9_]+)(?:\(|:)/g;
|
|
69
|
+
while ((match = classRegex.exec(content)) !== null) {
|
|
70
|
+
if (match[1])
|
|
71
|
+
classes.push(match[1]);
|
|
72
|
+
}
|
|
73
|
+
const imports = [];
|
|
74
|
+
const lines = content.split(/\r?\n/);
|
|
75
|
+
lines.forEach(line => {
|
|
76
|
+
const importMatch = line.match(/^import\s+([a-zA-Z0-9_., ]+)/);
|
|
77
|
+
const fromMatch = line.match(/^from\s+([a-zA-Z0-9_.]+)\s+import\s+(.+)/);
|
|
78
|
+
if (importMatch?.[1]) {
|
|
79
|
+
const modules = importMatch[1].split(',').map(m => m.trim());
|
|
80
|
+
modules.forEach(mod => {
|
|
81
|
+
const type = mod.startsWith('.') ? 'Interne' : 'PyPI';
|
|
82
|
+
imports.push({ name: mod, type });
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
else if (fromMatch?.[1]) {
|
|
86
|
+
const moduleName = fromMatch[1];
|
|
87
|
+
const imported = fromMatch[2]?.trim();
|
|
88
|
+
const type = moduleName.startsWith('.') ? 'Interne' : 'PyPI';
|
|
89
|
+
imports.push({ name: moduleName, type, usage: imported });
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
return { functions, classes, types: [], imports, exports: [] };
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// Analyseur Java
|
|
96
|
+
class JavaAnalyzer {
|
|
97
|
+
extensions = [".java"];
|
|
98
|
+
analyzeFile(content) {
|
|
99
|
+
const classes = [];
|
|
100
|
+
const classRegex = /(?:public\s+)?(?:abstract\s+)?class\s+([a-zA-Z0-9_]+)/g;
|
|
101
|
+
let match;
|
|
102
|
+
while ((match = classRegex.exec(content)) !== null) {
|
|
103
|
+
if (match[1])
|
|
104
|
+
classes.push(match[1]);
|
|
105
|
+
}
|
|
106
|
+
const interfaceRegex = /(?:public\s+)?interface\s+([a-zA-Z0-9_]+)/g;
|
|
107
|
+
while ((match = interfaceRegex.exec(content)) !== null) {
|
|
108
|
+
if (match[1])
|
|
109
|
+
classes.push(match[1]);
|
|
110
|
+
}
|
|
111
|
+
const functions = [];
|
|
112
|
+
const methodRegex = /(?:public|private|protected)\s+(?:static\s+)?(?:\w+(?:<[^>]+>)?)\s+([a-zA-Z0-9_]+)\s*\(/g;
|
|
113
|
+
while ((match = methodRegex.exec(content)) !== null) {
|
|
114
|
+
if (match[1])
|
|
115
|
+
functions.push(match[1]);
|
|
116
|
+
}
|
|
117
|
+
const imports = [];
|
|
118
|
+
const lines = content.split(/\r?\n/);
|
|
119
|
+
lines.forEach(line => {
|
|
120
|
+
const importMatch = line.match(/^import\s+([a-zA-Z0-9_.]+);/);
|
|
121
|
+
if (importMatch?.[1]) {
|
|
122
|
+
const name = importMatch[1];
|
|
123
|
+
const type = name.startsWith('java.') || name.startsWith('javax.') ? 'JDK' : 'Maven';
|
|
124
|
+
imports.push({ name, type });
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
return { functions, classes, types: [], imports, exports: [] };
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// Analyseur C#
|
|
131
|
+
class CSharpAnalyzer {
|
|
132
|
+
extensions = [".cs"];
|
|
133
|
+
analyzeFile(content) {
|
|
134
|
+
const classes = [];
|
|
135
|
+
const classRegex = /(?:public\s+)?(?:abstract\s+)?(?:partial\s+)?class\s+([a-zA-Z0-9_]+)/g;
|
|
136
|
+
let match;
|
|
137
|
+
while ((match = classRegex.exec(content)) !== null) {
|
|
138
|
+
if (match[1])
|
|
139
|
+
classes.push(match[1]);
|
|
140
|
+
}
|
|
141
|
+
const interfaceRegex = /(?:public\s+)?interface\s+([a-zA-Z0-9_]+)/g;
|
|
142
|
+
while ((match = interfaceRegex.exec(content)) !== null) {
|
|
143
|
+
if (match[1])
|
|
144
|
+
classes.push(match[1]);
|
|
145
|
+
}
|
|
146
|
+
const functions = [];
|
|
147
|
+
const methodRegex = /(?:public|private|protected|internal)\s+(?:static\s+)?(?:async\s+)?(?:\w+(?:<[^>]+>)?)\s+([a-zA-Z0-9_]+)\s*\(/g;
|
|
148
|
+
while ((match = methodRegex.exec(content)) !== null) {
|
|
149
|
+
if (match[1])
|
|
150
|
+
functions.push(match[1]);
|
|
151
|
+
}
|
|
152
|
+
const imports = [];
|
|
153
|
+
const lines = content.split(/\r?\n/);
|
|
154
|
+
lines.forEach(line => {
|
|
155
|
+
const usingMatch = line.match(/^using\s+([a-zA-Z0-9_.]+);/);
|
|
156
|
+
if (usingMatch?.[1]) {
|
|
157
|
+
const name = usingMatch[1];
|
|
158
|
+
const type = name.startsWith('System.') ? '.NET' : 'NuGet';
|
|
159
|
+
imports.push({ name, type });
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
return { functions, classes, types: [], imports, exports: [] };
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
// Analyseur Go
|
|
166
|
+
class GoAnalyzer {
|
|
167
|
+
extensions = [".go"];
|
|
168
|
+
analyzeFile(content) {
|
|
169
|
+
const functions = [];
|
|
170
|
+
const funcRegex = /func\s+(?:\([^)]+\)\s+)?([a-zA-Z0-9_]+)\s*\(/g;
|
|
171
|
+
let match;
|
|
172
|
+
while ((match = funcRegex.exec(content)) !== null) {
|
|
173
|
+
if (match[1])
|
|
174
|
+
functions.push(match[1]);
|
|
175
|
+
}
|
|
176
|
+
const types = [];
|
|
177
|
+
const typeRegex = /type\s+([a-zA-Z0-9_]+)\s+(?:struct|interface)/g;
|
|
178
|
+
while ((match = typeRegex.exec(content)) !== null) {
|
|
179
|
+
if (match[1])
|
|
180
|
+
types.push(match[1]);
|
|
181
|
+
}
|
|
182
|
+
const imports = [];
|
|
183
|
+
const lines = content.split(/\r?\n/);
|
|
184
|
+
lines.forEach(line => {
|
|
185
|
+
const importMatch = line.match(/^\s*"([^"]+)"/);
|
|
186
|
+
if (importMatch?.[1]) {
|
|
187
|
+
const name = importMatch[1];
|
|
188
|
+
const type = name.includes('.') ? 'External' : 'Standard';
|
|
189
|
+
imports.push({ name, type });
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
return { functions, classes: [], types, imports, exports: [] };
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
// Analyseur Rust
|
|
196
|
+
class RustAnalyzer {
|
|
197
|
+
extensions = [".rs"];
|
|
198
|
+
analyzeFile(content) {
|
|
199
|
+
const functions = [];
|
|
200
|
+
const funcRegex = /(?:pub\s+)?fn\s+([a-zA-Z0-9_]+)/g;
|
|
201
|
+
let match;
|
|
202
|
+
while ((match = funcRegex.exec(content)) !== null) {
|
|
203
|
+
if (match[1])
|
|
204
|
+
functions.push(match[1]);
|
|
205
|
+
}
|
|
206
|
+
const types = [];
|
|
207
|
+
const structRegex = /(?:pub\s+)?struct\s+([a-zA-Z0-9_]+)/g;
|
|
208
|
+
while ((match = structRegex.exec(content)) !== null) {
|
|
209
|
+
if (match[1])
|
|
210
|
+
types.push(match[1]);
|
|
211
|
+
}
|
|
212
|
+
const enumRegex = /(?:pub\s+)?enum\s+([a-zA-Z0-9_]+)/g;
|
|
213
|
+
while ((match = enumRegex.exec(content)) !== null) {
|
|
214
|
+
if (match[1])
|
|
215
|
+
types.push(match[1]);
|
|
216
|
+
}
|
|
217
|
+
const imports = [];
|
|
218
|
+
const lines = content.split(/\r?\n/);
|
|
219
|
+
lines.forEach(line => {
|
|
220
|
+
const useMatch = line.match(/^use\s+([a-zA-Z0-9_:]+)(?:::\{([^}]+)\})?/);
|
|
221
|
+
if (useMatch?.[1]) {
|
|
222
|
+
const name = useMatch[1];
|
|
223
|
+
const type = name.startsWith('std::') || name.startsWith('core::') ? 'Standard' : 'Crate';
|
|
224
|
+
const usage = useMatch[2];
|
|
225
|
+
imports.push({ name, type, usage });
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
return { functions, classes: [], types, imports, exports: [] };
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
// Analyseur HTML
|
|
232
|
+
class HTMLAnalyzer {
|
|
233
|
+
extensions = [".html", ".htm"];
|
|
234
|
+
analyzeFile(content) {
|
|
235
|
+
const structure = {
|
|
236
|
+
tags: new Set(),
|
|
237
|
+
ids: [],
|
|
238
|
+
classes: [],
|
|
239
|
+
scripts: [],
|
|
240
|
+
styles: []
|
|
241
|
+
};
|
|
242
|
+
// Extraire les balises
|
|
243
|
+
const tagRegex = /<(\w+)/g;
|
|
244
|
+
let match;
|
|
245
|
+
while ((match = tagRegex.exec(content)) !== null) {
|
|
246
|
+
if (match[1])
|
|
247
|
+
structure.tags.add(match[1].toLowerCase());
|
|
248
|
+
}
|
|
249
|
+
// Extraire les IDs
|
|
250
|
+
const idRegex = /id=["']([^"']+)["']/g;
|
|
251
|
+
while ((match = idRegex.exec(content)) !== null) {
|
|
252
|
+
if (match[1])
|
|
253
|
+
structure.ids.push(match[1]);
|
|
254
|
+
}
|
|
255
|
+
// Extraire les classes
|
|
256
|
+
const classRegex = /class=["']([^"']+)["']/g;
|
|
257
|
+
while ((match = classRegex.exec(content)) !== null) {
|
|
258
|
+
if (match[1]) {
|
|
259
|
+
structure.classes.push(...match[1].split(/\s+/).filter(Boolean));
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
// Extraire les scripts externes
|
|
263
|
+
const scriptRegex = /<script[^>]+src=["']([^"']+)["']/g;
|
|
264
|
+
while ((match = scriptRegex.exec(content)) !== null) {
|
|
265
|
+
if (match[1])
|
|
266
|
+
structure.scripts.push(match[1]);
|
|
267
|
+
}
|
|
268
|
+
// Extraire les stylesheets externes
|
|
269
|
+
const linkRegex = /<link[^>]+href=["']([^"']+\.css)["']/g;
|
|
270
|
+
while ((match = linkRegex.exec(content)) !== null) {
|
|
271
|
+
if (match[1])
|
|
272
|
+
structure.styles.push(match[1]);
|
|
273
|
+
}
|
|
274
|
+
structure.tags = Array.from(structure.tags);
|
|
275
|
+
return {
|
|
276
|
+
functions: [],
|
|
277
|
+
classes: structure.classes,
|
|
278
|
+
types: [],
|
|
279
|
+
imports: [
|
|
280
|
+
...structure.scripts.map((s) => ({ name: s, type: 'Script' })),
|
|
281
|
+
...structure.styles.map((s) => ({ name: s, type: 'Stylesheet' }))
|
|
282
|
+
],
|
|
283
|
+
exports: [],
|
|
284
|
+
structure
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
// Analyseur CSS/SCSS/SASS
|
|
289
|
+
class CSSAnalyzer {
|
|
290
|
+
extensions = [".css", ".scss", ".sass", ".less"];
|
|
291
|
+
analyzeFile(content) {
|
|
292
|
+
const structure = {
|
|
293
|
+
selectors: [],
|
|
294
|
+
ids: [],
|
|
295
|
+
classes: [],
|
|
296
|
+
variables: [],
|
|
297
|
+
mixins: [],
|
|
298
|
+
imports: []
|
|
299
|
+
};
|
|
300
|
+
// Classes CSS
|
|
301
|
+
const classRegex = /\.([a-zA-Z0-9_-]+)/g;
|
|
302
|
+
let match;
|
|
303
|
+
while ((match = classRegex.exec(content)) !== null) {
|
|
304
|
+
if (match[1] && !structure.classes.includes(match[1])) {
|
|
305
|
+
structure.classes.push(match[1]);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
// IDs CSS
|
|
309
|
+
const idRegex = /#([a-zA-Z0-9_-]+)/g;
|
|
310
|
+
while ((match = idRegex.exec(content)) !== null) {
|
|
311
|
+
if (match[1] && !structure.ids.includes(match[1])) {
|
|
312
|
+
structure.ids.push(match[1]);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
// Variables CSS/SCSS
|
|
316
|
+
const varRegex = /(?:--|\$)([a-zA-Z0-9_-]+)/g;
|
|
317
|
+
while ((match = varRegex.exec(content)) !== null) {
|
|
318
|
+
if (match[1] && !structure.variables.includes(match[1])) {
|
|
319
|
+
structure.variables.push(match[1]);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
// Mixins SCSS
|
|
323
|
+
const mixinRegex = /@mixin\s+([a-zA-Z0-9_-]+)/g;
|
|
324
|
+
while ((match = mixinRegex.exec(content)) !== null) {
|
|
325
|
+
if (match[1])
|
|
326
|
+
structure.mixins.push(match[1]);
|
|
327
|
+
}
|
|
328
|
+
// Imports
|
|
329
|
+
const importRegex = /@import\s+['"]([^'"]+)['"]/g;
|
|
330
|
+
while ((match = importRegex.exec(content)) !== null) {
|
|
331
|
+
if (match[1])
|
|
332
|
+
structure.imports.push(match[1]);
|
|
333
|
+
}
|
|
334
|
+
return {
|
|
335
|
+
functions: structure.mixins,
|
|
336
|
+
classes: structure.classes,
|
|
337
|
+
types: [],
|
|
338
|
+
imports: structure.imports.map((i) => ({ name: i, type: 'CSS' })),
|
|
339
|
+
exports: [],
|
|
340
|
+
structure
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
// Analyseur PHP
|
|
345
|
+
class PHPAnalyzer {
|
|
346
|
+
extensions = [".php"];
|
|
347
|
+
analyzeFile(content) {
|
|
348
|
+
const functions = [];
|
|
349
|
+
const funcRegex = /function\s+([a-zA-Z0-9_]+)\s*\(/g;
|
|
350
|
+
let match;
|
|
351
|
+
while ((match = funcRegex.exec(content)) !== null) {
|
|
352
|
+
if (match[1])
|
|
353
|
+
functions.push(match[1]);
|
|
354
|
+
}
|
|
355
|
+
const classes = [];
|
|
356
|
+
const classRegex = /class\s+([a-zA-Z0-9_]+)/g;
|
|
357
|
+
while ((match = classRegex.exec(content)) !== null) {
|
|
358
|
+
if (match[1])
|
|
359
|
+
classes.push(match[1]);
|
|
360
|
+
}
|
|
361
|
+
const imports = [];
|
|
362
|
+
const useRegex = /use\s+([a-zA-Z0-9_\\]+)/g;
|
|
363
|
+
while ((match = useRegex.exec(content)) !== null) {
|
|
364
|
+
if (match[1]) {
|
|
365
|
+
imports.push({ name: match[1], type: 'Composer' });
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
const requireRegex = /(?:require|include)(?:_once)?\s*['"]([^'"]+)['"]/g;
|
|
369
|
+
while ((match = requireRegex.exec(content)) !== null) {
|
|
370
|
+
if (match[1]) {
|
|
371
|
+
imports.push({ name: match[1], type: 'Local' });
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
return { functions, classes, types: [], imports, exports: [] };
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
// Analyseur Ruby
|
|
378
|
+
class RubyAnalyzer {
|
|
379
|
+
extensions = [".rb"];
|
|
380
|
+
analyzeFile(content) {
|
|
381
|
+
const functions = [];
|
|
382
|
+
const funcRegex = /def\s+([a-zA-Z0-9_?!]+)/g;
|
|
383
|
+
let match;
|
|
384
|
+
while ((match = funcRegex.exec(content)) !== null) {
|
|
385
|
+
if (match[1])
|
|
386
|
+
functions.push(match[1]);
|
|
387
|
+
}
|
|
388
|
+
const classes = [];
|
|
389
|
+
const classRegex = /class\s+([a-zA-Z0-9_]+)/g;
|
|
390
|
+
while ((match = classRegex.exec(content)) !== null) {
|
|
391
|
+
if (match[1])
|
|
392
|
+
classes.push(match[1]);
|
|
393
|
+
}
|
|
394
|
+
const imports = [];
|
|
395
|
+
const requireRegex = /require\s+['"]([^'"]+)['"]/g;
|
|
396
|
+
while ((match = requireRegex.exec(content)) !== null) {
|
|
397
|
+
if (match[1]) {
|
|
398
|
+
imports.push({ name: match[1], type: 'Gem' });
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
return { functions, classes, types: [], imports, exports: [] };
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
// Analyseur SQL
|
|
405
|
+
class SQLAnalyzer {
|
|
406
|
+
extensions = [".sql"];
|
|
407
|
+
analyzeFile(content) {
|
|
408
|
+
const structure = {
|
|
409
|
+
tables: [],
|
|
410
|
+
procedures: [],
|
|
411
|
+
functions: [],
|
|
412
|
+
views: []
|
|
413
|
+
};
|
|
414
|
+
const tableRegex = /CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?([a-zA-Z0-9_]+)/gi;
|
|
415
|
+
let match;
|
|
416
|
+
while ((match = tableRegex.exec(content)) !== null) {
|
|
417
|
+
if (match[1])
|
|
418
|
+
structure.tables.push(match[1]);
|
|
419
|
+
}
|
|
420
|
+
const procRegex = /CREATE\s+(?:OR\s+REPLACE\s+)?PROCEDURE\s+([a-zA-Z0-9_]+)/gi;
|
|
421
|
+
while ((match = procRegex.exec(content)) !== null) {
|
|
422
|
+
if (match[1])
|
|
423
|
+
structure.procedures.push(match[1]);
|
|
424
|
+
}
|
|
425
|
+
const funcRegex = /CREATE\s+(?:OR\s+REPLACE\s+)?FUNCTION\s+([a-zA-Z0-9_]+)/gi;
|
|
426
|
+
while ((match = funcRegex.exec(content)) !== null) {
|
|
427
|
+
if (match[1])
|
|
428
|
+
structure.functions.push(match[1]);
|
|
429
|
+
}
|
|
430
|
+
const viewRegex = /CREATE\s+(?:OR\s+REPLACE\s+)?VIEW\s+([a-zA-Z0-9_]+)/gi;
|
|
431
|
+
while ((match = viewRegex.exec(content)) !== null) {
|
|
432
|
+
if (match[1])
|
|
433
|
+
structure.views.push(match[1]);
|
|
434
|
+
}
|
|
435
|
+
return {
|
|
436
|
+
functions: structure.functions,
|
|
437
|
+
classes: structure.tables,
|
|
438
|
+
types: structure.views,
|
|
439
|
+
imports: [],
|
|
440
|
+
exports: [],
|
|
441
|
+
structure
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
// Analyseur par défaut pour tous les autres fichiers
|
|
446
|
+
class DefaultAnalyzer {
|
|
447
|
+
extensions = ["*"]; // Wildcard pour tous les fichiers
|
|
448
|
+
analyzeFile(content) {
|
|
449
|
+
const lines = content.split(/\r?\n/);
|
|
450
|
+
const structure = {
|
|
451
|
+
lineCount: lines.length,
|
|
452
|
+
nonEmptyLines: lines.filter(l => l.trim().length > 0).length,
|
|
453
|
+
size: content.length,
|
|
454
|
+
hasCode: /[a-zA-Z0-9_]+\s*[=:({]/.test(content),
|
|
455
|
+
encoding: 'UTF-8'
|
|
456
|
+
};
|
|
457
|
+
// Détection basique de patterns communs
|
|
458
|
+
const patterns = {
|
|
459
|
+
functions: [],
|
|
460
|
+
variables: [],
|
|
461
|
+
comments: []
|
|
462
|
+
};
|
|
463
|
+
// Détection générique de fonctions (pattern commun à beaucoup de langages)
|
|
464
|
+
const genericFuncRegex = /(?:function|func|def|fn|sub|procedure)\s+([a-zA-Z0-9_]+)/gi;
|
|
465
|
+
let match;
|
|
466
|
+
while ((match = genericFuncRegex.exec(content)) !== null) {
|
|
467
|
+
if (match[1])
|
|
468
|
+
patterns.functions.push(match[1]);
|
|
469
|
+
}
|
|
470
|
+
structure.patterns = patterns;
|
|
471
|
+
return {
|
|
472
|
+
functions: patterns.functions,
|
|
473
|
+
classes: [],
|
|
474
|
+
types: [],
|
|
475
|
+
imports: [],
|
|
476
|
+
exports: [],
|
|
477
|
+
structure
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
// Registry des analyseurs
|
|
482
|
+
const analyzers = [
|
|
483
|
+
new TSJSAnalyzer(),
|
|
484
|
+
new PythonAnalyzer(),
|
|
485
|
+
new JavaAnalyzer(),
|
|
486
|
+
new CSharpAnalyzer(),
|
|
487
|
+
new GoAnalyzer(),
|
|
488
|
+
new RustAnalyzer(),
|
|
489
|
+
new HTMLAnalyzer(),
|
|
490
|
+
new CSSAnalyzer(),
|
|
491
|
+
new PHPAnalyzer(),
|
|
492
|
+
new RubyAnalyzer(),
|
|
493
|
+
new SQLAnalyzer()
|
|
494
|
+
];
|
|
495
|
+
const defaultAnalyzer = new DefaultAnalyzer();
|
|
496
|
+
export function getAnalyzer(filePath) {
|
|
497
|
+
const lastDotIndex = filePath.lastIndexOf('.');
|
|
498
|
+
if (lastDotIndex === -1)
|
|
499
|
+
return defaultAnalyzer;
|
|
500
|
+
const ext = filePath.substring(lastDotIndex).toLowerCase();
|
|
501
|
+
return analyzers.find(a => a.extensions.includes(ext)) || defaultAnalyzer;
|
|
502
|
+
}
|
|
503
|
+
export function getSupportedExtensions() {
|
|
504
|
+
return analyzers.flatMap(a => a.extensions);
|
|
505
|
+
}
|
|
506
|
+
export function isExplicitlySupported(filePath) {
|
|
507
|
+
const lastDotIndex = filePath.lastIndexOf('.');
|
|
508
|
+
if (lastDotIndex === -1)
|
|
509
|
+
return false;
|
|
510
|
+
const ext = filePath.substring(lastDotIndex).toLowerCase();
|
|
511
|
+
return analyzers.some(a => a.extensions.includes(ext));
|
|
512
|
+
}
|
|
513
|
+
//# sourceMappingURL=languageAnalyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languageAnalyzer.js","sourceRoot":"","sources":["../../src/analyzers/languageAnalyzer.ts"],"names":[],"mappings":"AAcA,kCAAkC;AAClC,MAAM,YAAY;IAChB,UAAU,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAE5D,WAAW,CAAC,OAAe;QACzB,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,0GAA0G,CAAC;QAC/H,IAAI,KAA6B,CAAC;QAClC,OAAO,CAAC,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACpD,IAAI,KAAK,CAAC,CAAC,CAAC;gBAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,CAAC;QAED,MAAM,SAAS,GAAa,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAG,wDAAwD,CAAC;QAC3E,SAAS,CAAC,SAAS,GAAG,CAAC,CAAC;QACxB,OAAO,CA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C,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface CacheEntry {
|
|
2
|
+
hash: string;
|
|
3
|
+
timestamp: number;
|
|
4
|
+
analysis: any;
|
|
5
|
+
metadata: {
|
|
6
|
+
lines: number;
|
|
7
|
+
size: number;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface CacheManifest {
|
|
11
|
+
version: string;
|
|
12
|
+
files: Map<string, CacheEntry>;
|
|
13
|
+
lastUpdate: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class CacheManager {
|
|
16
|
+
private cacheDir;
|
|
17
|
+
private manifestPath;
|
|
18
|
+
private manifest;
|
|
19
|
+
private readonly CACHE_VERSION;
|
|
20
|
+
constructor(projectRoot: string);
|
|
21
|
+
private loadManifest;
|
|
22
|
+
private createNewManifest;
|
|
23
|
+
private saveManifest;
|
|
24
|
+
private computeHash;
|
|
25
|
+
isCached(filePath: string, content: string): boolean;
|
|
26
|
+
get(filePath: string): CacheEntry | null;
|
|
27
|
+
set(filePath: string, content: string, analysis: any): void;
|
|
28
|
+
invalidate(filePath: string): void;
|
|
29
|
+
invalidateAll(): void;
|
|
30
|
+
getStats(): {
|
|
31
|
+
total: number;
|
|
32
|
+
size: number;
|
|
33
|
+
oldestEntry: number;
|
|
34
|
+
};
|
|
35
|
+
pruneOldEntries(maxAgeMs?: number): number;
|
|
36
|
+
getModifiedFiles(files: string[]): string[];
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=cacheManager.d.ts.map
|