@djodjonx/wiredi 0.0.11 → 0.0.13
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/README.md +148 -21
- package/dist/index.cjs +13 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +147 -34
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +147 -34
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +13 -5
- package/dist/index.mjs.map +1 -1
- package/dist/plugin/ConfigurationAnalyzer.d.ts +59 -0
- package/dist/plugin/ConfigurationAnalyzer.d.ts.map +1 -0
- package/dist/plugin/ConfigurationAnalyzer.js +321 -0
- package/dist/plugin/ConfigurationAnalyzer.js.map +1 -0
- package/dist/plugin/DependencyAnalyzer.d.ts +54 -0
- package/dist/plugin/DependencyAnalyzer.d.ts.map +1 -0
- package/dist/plugin/DependencyAnalyzer.js +208 -0
- package/dist/plugin/DependencyAnalyzer.js.map +1 -0
- package/dist/plugin/TokenNormalizer.d.ts +51 -0
- package/dist/plugin/TokenNormalizer.d.ts.map +1 -0
- package/dist/plugin/TokenNormalizer.js +208 -0
- package/dist/plugin/TokenNormalizer.js.map +1 -0
- package/dist/plugin/ValidationEngine.d.ts +53 -0
- package/dist/plugin/ValidationEngine.d.ts.map +1 -0
- package/dist/plugin/ValidationEngine.js +250 -0
- package/dist/plugin/ValidationEngine.js.map +1 -0
- package/dist/plugin/index.d.ts +2 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +144 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/package.json +6 -0
- package/dist/plugin/types.d.ts +152 -0
- package/dist/plugin/types.d.ts.map +1 -0
- package/dist/plugin/types.js +3 -0
- package/dist/plugin/types.js.map +1 -0
- package/package.json +10 -1
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfigurationAnalyzer = void 0;
|
|
4
|
+
const TokenNormalizer_1 = require("./TokenNormalizer");
|
|
5
|
+
/**
|
|
6
|
+
* Analyseur des configurations DI (defineBuilderConfig / definePartialConfig)
|
|
7
|
+
*
|
|
8
|
+
* Effectue une analyse sémantique profonde en utilisant le TypeChecker
|
|
9
|
+
* pour résoudre correctement les imports et les références.
|
|
10
|
+
*/
|
|
11
|
+
class ConfigurationAnalyzer {
|
|
12
|
+
constructor(typescript, checker, logger) {
|
|
13
|
+
this.checker = checker;
|
|
14
|
+
this.logger = logger;
|
|
15
|
+
this.typescript = typescript;
|
|
16
|
+
this.tokenNormalizer = new TokenNormalizer_1.TokenNormalizer(typescript, checker);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Analyse un fichier source pour trouver toutes les configurations DI
|
|
20
|
+
*/
|
|
21
|
+
analyzeSourceFile(sourceFile) {
|
|
22
|
+
const configs = [];
|
|
23
|
+
this.visitNode(sourceFile, sourceFile, configs);
|
|
24
|
+
return configs;
|
|
25
|
+
}
|
|
26
|
+
visitNode(node, sourceFile, configs) {
|
|
27
|
+
const ts = this.typescript;
|
|
28
|
+
// Chercher les déclarations de variables avec defineBuilderConfig ou definePartialConfig
|
|
29
|
+
if (ts.isVariableStatement(node)) {
|
|
30
|
+
for (const declaration of node.declarationList.declarations) {
|
|
31
|
+
if (declaration.initializer && ts.isCallExpression(declaration.initializer)) {
|
|
32
|
+
const config = this.analyzeCallExpression(declaration.initializer, sourceFile, ts.isIdentifier(declaration.name) ? declaration.name.text : undefined, declaration);
|
|
33
|
+
if (config) {
|
|
34
|
+
configs.push(config);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
// Chercher les exports par défaut: export default defineBuilderConfig(...)
|
|
40
|
+
if (ts.isExportAssignment(node) && node.expression && ts.isCallExpression(node.expression)) {
|
|
41
|
+
const config = this.analyzeCallExpression(node.expression, sourceFile);
|
|
42
|
+
if (config) {
|
|
43
|
+
configs.push(config);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
ts.forEachChild(node, (child) => this.visitNode(child, sourceFile, configs));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Analyse un appel de fonction pour déterminer si c'est une config DI
|
|
50
|
+
*/
|
|
51
|
+
analyzeCallExpression(node, sourceFile, variableName, declaration) {
|
|
52
|
+
const ts = this.typescript;
|
|
53
|
+
const functionName = this.getCalledFunctionName(node);
|
|
54
|
+
if (functionName !== 'defineBuilderConfig' && functionName !== 'definePartialConfig') {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
// Vérifier sémantiquement que c'est bien la fonction de notre librairie
|
|
58
|
+
if (!this.isFromContainerBuilder(node)) {
|
|
59
|
+
this.logger(`Fonction ${functionName} trouvée mais pas de WireDI`);
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
const isBuilder = functionName === 'defineBuilderConfig';
|
|
63
|
+
const arg = node.arguments[0];
|
|
64
|
+
if (!arg || !ts.isObjectLiteralExpression(arg)) {
|
|
65
|
+
this.logger(`Argument de ${functionName} n'est pas un objet littéral`);
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
const config = {
|
|
69
|
+
type: isBuilder ? 'builder' : 'partial',
|
|
70
|
+
variableName,
|
|
71
|
+
localProviders: [],
|
|
72
|
+
providedTokens: new Map(),
|
|
73
|
+
parentConfigs: [],
|
|
74
|
+
callNode: node,
|
|
75
|
+
sourceFile,
|
|
76
|
+
};
|
|
77
|
+
// Obtenir le symbole de la variable si disponible
|
|
78
|
+
if (declaration) {
|
|
79
|
+
const symbol = this.checker.getSymbolAtLocation(declaration.name);
|
|
80
|
+
if (symbol) {
|
|
81
|
+
config.symbol = symbol;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
// Parser les propriétés de l'objet de configuration
|
|
85
|
+
for (const prop of arg.properties) {
|
|
86
|
+
if (!ts.isPropertyAssignment(prop))
|
|
87
|
+
continue;
|
|
88
|
+
const propName = this.getPropertyName(prop);
|
|
89
|
+
if (propName === 'builderId' && ts.isStringLiteral(prop.initializer)) {
|
|
90
|
+
config.builderId = prop.initializer.text;
|
|
91
|
+
}
|
|
92
|
+
if (propName === 'injections' && ts.isArrayLiteralExpression(prop.initializer)) {
|
|
93
|
+
this.parseInjections(prop.initializer, sourceFile, config);
|
|
94
|
+
}
|
|
95
|
+
if (propName === 'extends' && ts.isArrayLiteralExpression(prop.initializer)) {
|
|
96
|
+
this.parseExtends(prop.initializer, sourceFile, config);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return config;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Vérifie si l'appel de fonction provient de WireDI
|
|
103
|
+
* Utilise le TypeChecker pour une vérification sémantique
|
|
104
|
+
*/
|
|
105
|
+
isFromContainerBuilder(node) {
|
|
106
|
+
const signature = this.checker.getResolvedSignature(node);
|
|
107
|
+
if (!signature) {
|
|
108
|
+
// Si pas de signature, accepter quand même si le nom de fonction correspond
|
|
109
|
+
// Cela permet de fonctionner même quand le type checker n'a pas toutes les infos
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
const declaration = signature.getDeclaration();
|
|
113
|
+
if (!declaration) {
|
|
114
|
+
return true; // Accepter par défaut
|
|
115
|
+
}
|
|
116
|
+
const declSourceFile = declaration.getSourceFile();
|
|
117
|
+
const fileName = declSourceFile.fileName;
|
|
118
|
+
// Vérifier si le fichier provient de WireDI ou du projet courant
|
|
119
|
+
return fileName.includes('WireDI') ||
|
|
120
|
+
fileName.includes('/src/index') ||
|
|
121
|
+
!fileName.includes('node_modules');
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Obtient le nom de la fonction appelée
|
|
125
|
+
*/
|
|
126
|
+
getCalledFunctionName(node) {
|
|
127
|
+
const ts = this.typescript;
|
|
128
|
+
if (ts.isIdentifier(node.expression)) {
|
|
129
|
+
return node.expression.text;
|
|
130
|
+
}
|
|
131
|
+
if (ts.isPropertyAccessExpression(node.expression)) {
|
|
132
|
+
return node.expression.name.text;
|
|
133
|
+
}
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Obtient le nom d'une propriété
|
|
138
|
+
*/
|
|
139
|
+
getPropertyName(prop) {
|
|
140
|
+
const ts = this.typescript;
|
|
141
|
+
if (ts.isIdentifier(prop.name)) {
|
|
142
|
+
return prop.name.text;
|
|
143
|
+
}
|
|
144
|
+
if (ts.isStringLiteral(prop.name)) {
|
|
145
|
+
return prop.name.text;
|
|
146
|
+
}
|
|
147
|
+
return '';
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Parse le tableau injections de la configuration
|
|
151
|
+
*/
|
|
152
|
+
parseInjections(array, sourceFile, config) {
|
|
153
|
+
const ts = this.typescript;
|
|
154
|
+
for (const element of array.elements) {
|
|
155
|
+
if (!ts.isObjectLiteralExpression(element))
|
|
156
|
+
continue;
|
|
157
|
+
const provider = this.parseInjectionEntry(element, sourceFile);
|
|
158
|
+
if (provider) {
|
|
159
|
+
config.localProviders.push(provider);
|
|
160
|
+
config.providedTokens.set(provider.token.id, provider);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Parse une entrée d'injection individuelle
|
|
166
|
+
*/
|
|
167
|
+
parseInjectionEntry(element, sourceFile) {
|
|
168
|
+
const ts = this.typescript;
|
|
169
|
+
let tokenNode = null;
|
|
170
|
+
let providerNode = null;
|
|
171
|
+
let hasValue = false;
|
|
172
|
+
let hasFactory = false;
|
|
173
|
+
for (const prop of element.properties) {
|
|
174
|
+
if (!ts.isPropertyAssignment(prop))
|
|
175
|
+
continue;
|
|
176
|
+
const propName = this.getPropertyName(prop);
|
|
177
|
+
if (propName === 'token') {
|
|
178
|
+
tokenNode = prop.initializer;
|
|
179
|
+
}
|
|
180
|
+
if (propName === 'provider') {
|
|
181
|
+
providerNode = prop.initializer;
|
|
182
|
+
}
|
|
183
|
+
if (propName === 'value') {
|
|
184
|
+
hasValue = true;
|
|
185
|
+
}
|
|
186
|
+
if (propName === 'factory') {
|
|
187
|
+
hasFactory = true;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
if (!tokenNode)
|
|
191
|
+
return null;
|
|
192
|
+
const token = this.tokenNormalizer.normalize(tokenNode, sourceFile);
|
|
193
|
+
if (!token) {
|
|
194
|
+
this.logger(`Impossible de normaliser le token: ${tokenNode.getText(sourceFile)}`);
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
// Déterminer le type d'enregistrement
|
|
198
|
+
let registrationType = 'class';
|
|
199
|
+
let providerClass;
|
|
200
|
+
let providerClassName;
|
|
201
|
+
if (hasFactory) {
|
|
202
|
+
registrationType = 'factory';
|
|
203
|
+
}
|
|
204
|
+
else if (hasValue) {
|
|
205
|
+
registrationType = 'value';
|
|
206
|
+
}
|
|
207
|
+
else if (providerNode) {
|
|
208
|
+
registrationType = 'symbol-provider';
|
|
209
|
+
// Résoudre la classe provider
|
|
210
|
+
if (ts.isIdentifier(providerNode)) {
|
|
211
|
+
const symbol = this.checker.getSymbolAtLocation(providerNode);
|
|
212
|
+
if (symbol) {
|
|
213
|
+
providerClass = this.resolveAlias(symbol);
|
|
214
|
+
providerClassName = providerNode.text;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
// Token est directement la classe
|
|
220
|
+
if (ts.isIdentifier(tokenNode)) {
|
|
221
|
+
const symbol = this.checker.getSymbolAtLocation(tokenNode);
|
|
222
|
+
if (symbol) {
|
|
223
|
+
providerClass = this.resolveAlias(symbol);
|
|
224
|
+
providerClassName = tokenNode.text;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
// Capturer le type d'INSTANCE du provider pour la vérification de compatibilité
|
|
229
|
+
// On veut le type de l'instance, pas le type du constructeur (typeof Class)
|
|
230
|
+
let providerType;
|
|
231
|
+
if (providerClass) {
|
|
232
|
+
const declaration = providerClass.valueDeclaration || providerClass.declarations?.[0];
|
|
233
|
+
if (declaration) {
|
|
234
|
+
const constructorType = this.checker.getTypeOfSymbolAtLocation(providerClass, declaration);
|
|
235
|
+
// Obtenir le type d'instance via les signatures de construction
|
|
236
|
+
const constructSignatures = constructorType.getConstructSignatures();
|
|
237
|
+
if (constructSignatures.length > 0) {
|
|
238
|
+
// Le type de retour de la signature de construction est le type d'instance
|
|
239
|
+
providerType = constructSignatures[0].getReturnType();
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
// Fallback: utiliser le type directement (peut être une interface/type)
|
|
243
|
+
providerType = constructorType;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return {
|
|
248
|
+
token,
|
|
249
|
+
providerClass,
|
|
250
|
+
providerClassName,
|
|
251
|
+
registrationType,
|
|
252
|
+
node: element,
|
|
253
|
+
providerType,
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Parse le tableau extends de la configuration
|
|
258
|
+
*/
|
|
259
|
+
parseExtends(array, _sourceFile, config) {
|
|
260
|
+
const ts = this.typescript;
|
|
261
|
+
for (const element of array.elements) {
|
|
262
|
+
if (ts.isIdentifier(element)) {
|
|
263
|
+
const symbol = this.checker.getSymbolAtLocation(element);
|
|
264
|
+
if (symbol) {
|
|
265
|
+
const resolved = this.resolveAlias(symbol);
|
|
266
|
+
if (resolved) {
|
|
267
|
+
config.parentConfigs.push(resolved);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Résout l'ensemble complet des tokens fournis (avec héritage)
|
|
275
|
+
* Gère la détection de cycles
|
|
276
|
+
*/
|
|
277
|
+
resolveAllProvidedTokens(config, allConfigs, visitedSet) {
|
|
278
|
+
// Vérifier les cycles
|
|
279
|
+
if (config.symbol && visitedSet.has(config.symbol)) {
|
|
280
|
+
this.logger(`Cycle détecté dans la configuration: ${config.variableName}`);
|
|
281
|
+
return config.providedTokens;
|
|
282
|
+
}
|
|
283
|
+
if (config.symbol) {
|
|
284
|
+
visitedSet.add(config.symbol);
|
|
285
|
+
}
|
|
286
|
+
// Commencer avec les tokens locaux
|
|
287
|
+
const allTokens = new Map(config.providedTokens);
|
|
288
|
+
// Ajouter les tokens des parents
|
|
289
|
+
for (const parentSymbol of config.parentConfigs) {
|
|
290
|
+
const parentConfig = allConfigs.get(parentSymbol);
|
|
291
|
+
if (parentConfig) {
|
|
292
|
+
const parentTokens = this.resolveAllProvidedTokens(parentConfig, allConfigs, visitedSet);
|
|
293
|
+
// Fusionner (les tokens locaux ont priorité)
|
|
294
|
+
for (const [tokenId, provider] of parentTokens) {
|
|
295
|
+
if (!allTokens.has(tokenId)) {
|
|
296
|
+
allTokens.set(tokenId, provider);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
return allTokens;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Résout un alias d'import
|
|
305
|
+
*/
|
|
306
|
+
resolveAlias(symbol) {
|
|
307
|
+
const ts = this.typescript;
|
|
308
|
+
let current = symbol;
|
|
309
|
+
while (current.flags & ts.SymbolFlags.Alias) {
|
|
310
|
+
try {
|
|
311
|
+
current = this.checker.getAliasedSymbol(current);
|
|
312
|
+
}
|
|
313
|
+
catch {
|
|
314
|
+
return current;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return current;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
exports.ConfigurationAnalyzer = ConfigurationAnalyzer;
|
|
321
|
+
//# sourceMappingURL=ConfigurationAnalyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurationAnalyzer.js","sourceRoot":"","sources":["../../src/LanguageServer/plugin/ConfigurationAnalyzer.ts"],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AAG,CAAC,YAAY,CAAC,CAAA;YACjD,IAAI,YAAY,EAAE,CAAC;gBACf,MAAM,YAAY,GAAG,IAAI,CAAC,wBAAwB,CAC9C,YAAY,EACZ,UAAU,EACV,UAAU,CACb,CAAA;gBAED,6CAA6C;gBAC7C,KAAK,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,YAAY,EAAE,CAAC;oBAC7C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;wBAC1B,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;oBACpC,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;QAED,OAAO,SAAS,CAAA;IACpB,CAAC;IAED;;OAEG;IACK,YAAY,CAAC,MAAiB;QAClC,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAA;QAE1B,IAAI,OAAO,GAAG,MAAM,CAAA;QACpB,OAAO,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;YAC1C,IAAI,CAAC;gBACD,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAA;YACpD,CAAC;YAAC,MAAM,CAAC;gBACL,OAAO,OAAO,CAAA;YAClB,CAAC;QACL,CAAC;QAED,OAAO,OAAO,CAAA;IAClB,CAAC;CACJ;AA5YD,sDA4YC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type ts from 'typescript';
|
|
2
|
+
import type { AnalyzedClass } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Analyseur des dépendances de constructeur des classes injectables
|
|
5
|
+
*
|
|
6
|
+
* Détecte les dépendances via:
|
|
7
|
+
* - Décorateurs @inject(TOKEN)
|
|
8
|
+
* - Types des paramètres (injection implicite)
|
|
9
|
+
*/
|
|
10
|
+
export declare class DependencyAnalyzer {
|
|
11
|
+
private checker;
|
|
12
|
+
private logger;
|
|
13
|
+
private tokenNormalizer;
|
|
14
|
+
private typescript;
|
|
15
|
+
constructor(typescript: typeof ts, checker: ts.TypeChecker, logger: (msg: string) => void);
|
|
16
|
+
/**
|
|
17
|
+
* Analyse une classe pour extraire ses dépendances de constructeur
|
|
18
|
+
*/
|
|
19
|
+
analyzeClass(classSymbol: ts.Symbol): AnalyzedClass | null;
|
|
20
|
+
/**
|
|
21
|
+
* Obtient la déclaration de classe depuis un symbole
|
|
22
|
+
*/
|
|
23
|
+
private getClassDeclaration;
|
|
24
|
+
/**
|
|
25
|
+
* Extrait les dépendances du constructeur d'une classe
|
|
26
|
+
*/
|
|
27
|
+
private extractConstructorDependencies;
|
|
28
|
+
/**
|
|
29
|
+
* Analyse un paramètre de constructeur pour extraire sa dépendance
|
|
30
|
+
*/
|
|
31
|
+
private analyzeParameter;
|
|
32
|
+
/**
|
|
33
|
+
* Trouve le décorateur @inject sur un paramètre
|
|
34
|
+
*/
|
|
35
|
+
private findInjectDecorator;
|
|
36
|
+
/**
|
|
37
|
+
* Vérifie si un identifiant 'inject' provient de tsyringe
|
|
38
|
+
*/
|
|
39
|
+
private isInjectFromTsyringe;
|
|
40
|
+
/**
|
|
41
|
+
* Extrait le token depuis un décorateur @inject(TOKEN)
|
|
42
|
+
*/
|
|
43
|
+
private extractTokenFromDecorator;
|
|
44
|
+
/**
|
|
45
|
+
* Vérifie si un token représente un type injectable (pas primitif)
|
|
46
|
+
*/
|
|
47
|
+
private isInjectableType;
|
|
48
|
+
/**
|
|
49
|
+
* Analyse toutes les classes d'un fichier source
|
|
50
|
+
*/
|
|
51
|
+
analyzeSourceFile(sourceFile: ts.SourceFile): AnalyzedClass[];
|
|
52
|
+
private visitNode;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=DependencyAnalyzer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DependencyAnalyzer.d.ts","sourceRoot":"","sources":["../../src/LanguageServer/plugin/DependencyAnalyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAChC,OAAO,KAAK,EAAE,aAAa,EAAsB,MAAM,SAAS,CAAA;AAGhE;;;;;;GAMG;AACH,qBAAa,kBAAkB;IAMvB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,MAAM;IANlB,OAAO,CAAC,eAAe,CAAiB;IACxC,OAAO,CAAC,UAAU,CAAW;gBAGzB,UAAU,EAAE,OAAO,EAAE,EACb,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI;IAMzC;;OAEG;IACH,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC,MAAM,GAAG,aAAa,GAAG,IAAI;IAgB1D;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAa3B;;OAEG;IACH,OAAO,CAAC,8BAA8B;IA2BtC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA0CxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAsB3B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAsB5B;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAkBjC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAoBxB;;OAEG;IACH,iBAAiB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,aAAa,EAAE;IAM7D,OAAO,CAAC,SAAS;CAepB"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DependencyAnalyzer = void 0;
|
|
4
|
+
const TokenNormalizer_1 = require("./TokenNormalizer");
|
|
5
|
+
/**
|
|
6
|
+
* Analyseur des dépendances de constructeur des classes injectables
|
|
7
|
+
*
|
|
8
|
+
* Détecte les dépendances via:
|
|
9
|
+
* - Décorateurs @inject(TOKEN)
|
|
10
|
+
* - Types des paramètres (injection implicite)
|
|
11
|
+
*/
|
|
12
|
+
class DependencyAnalyzer {
|
|
13
|
+
constructor(typescript, checker, logger) {
|
|
14
|
+
this.checker = checker;
|
|
15
|
+
this.logger = logger;
|
|
16
|
+
this.typescript = typescript;
|
|
17
|
+
this.tokenNormalizer = new TokenNormalizer_1.TokenNormalizer(typescript, checker);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Analyse une classe pour extraire ses dépendances de constructeur
|
|
21
|
+
*/
|
|
22
|
+
analyzeClass(classSymbol) {
|
|
23
|
+
const declaration = this.getClassDeclaration(classSymbol);
|
|
24
|
+
if (!declaration)
|
|
25
|
+
return null;
|
|
26
|
+
const sourceFile = declaration.getSourceFile();
|
|
27
|
+
const dependencies = this.extractConstructorDependencies(declaration, sourceFile);
|
|
28
|
+
return {
|
|
29
|
+
symbol: classSymbol,
|
|
30
|
+
name: classSymbol.getName(),
|
|
31
|
+
sourceFile,
|
|
32
|
+
declaration,
|
|
33
|
+
dependencies,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Obtient la déclaration de classe depuis un symbole
|
|
38
|
+
*/
|
|
39
|
+
getClassDeclaration(symbol) {
|
|
40
|
+
const ts = this.typescript;
|
|
41
|
+
const declaration = symbol.valueDeclaration || symbol.declarations?.[0];
|
|
42
|
+
if (!declaration)
|
|
43
|
+
return null;
|
|
44
|
+
if (ts.isClassDeclaration(declaration)) {
|
|
45
|
+
return declaration;
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Extrait les dépendances du constructeur d'une classe
|
|
51
|
+
*/
|
|
52
|
+
extractConstructorDependencies(classDecl, sourceFile) {
|
|
53
|
+
const ts = this.typescript;
|
|
54
|
+
const dependencies = [];
|
|
55
|
+
// Trouver le constructeur
|
|
56
|
+
const constructor = classDecl.members.find((member) => ts.isConstructorDeclaration(member));
|
|
57
|
+
if (!constructor) {
|
|
58
|
+
return dependencies;
|
|
59
|
+
}
|
|
60
|
+
// Analyser chaque paramètre
|
|
61
|
+
constructor.parameters.forEach((param, index) => {
|
|
62
|
+
const dependency = this.analyzeParameter(param, index, sourceFile);
|
|
63
|
+
if (dependency) {
|
|
64
|
+
dependencies.push(dependency);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
return dependencies;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Analyse un paramètre de constructeur pour extraire sa dépendance
|
|
71
|
+
*/
|
|
72
|
+
analyzeParameter(param, index, sourceFile) {
|
|
73
|
+
// Capturer le type attendu du paramètre
|
|
74
|
+
const expectedType = param.type
|
|
75
|
+
? this.checker.getTypeFromTypeNode(param.type)
|
|
76
|
+
: undefined;
|
|
77
|
+
// Priorité 1: Décorateur @inject()
|
|
78
|
+
const injectDecorator = this.findInjectDecorator(param);
|
|
79
|
+
if (injectDecorator) {
|
|
80
|
+
const token = this.extractTokenFromDecorator(injectDecorator, sourceFile);
|
|
81
|
+
if (token) {
|
|
82
|
+
return {
|
|
83
|
+
token,
|
|
84
|
+
parameterIndex: index,
|
|
85
|
+
parameterNode: param,
|
|
86
|
+
injectionMethod: 'decorator',
|
|
87
|
+
expectedType,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// Priorité 2: Type du paramètre (injection implicite)
|
|
92
|
+
if (param.type) {
|
|
93
|
+
const token = this.tokenNormalizer.normalizeFromType(param.type, sourceFile);
|
|
94
|
+
if (token && this.isInjectableType(token)) {
|
|
95
|
+
return {
|
|
96
|
+
token,
|
|
97
|
+
parameterIndex: index,
|
|
98
|
+
parameterNode: param,
|
|
99
|
+
injectionMethod: 'type',
|
|
100
|
+
expectedType,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Trouve le décorateur @inject sur un paramètre
|
|
108
|
+
*/
|
|
109
|
+
findInjectDecorator(param) {
|
|
110
|
+
const ts = this.typescript;
|
|
111
|
+
const decorators = ts.getDecorators(param);
|
|
112
|
+
if (!decorators)
|
|
113
|
+
return null;
|
|
114
|
+
for (const decorator of decorators) {
|
|
115
|
+
if (ts.isCallExpression(decorator.expression)) {
|
|
116
|
+
const callee = decorator.expression.expression;
|
|
117
|
+
if (ts.isIdentifier(callee) && callee.text === 'inject') {
|
|
118
|
+
// Vérifier sémantiquement que c'est bien @inject de tsyringe
|
|
119
|
+
if (this.isInjectFromTsyringe(callee)) {
|
|
120
|
+
return decorator;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Vérifie si un identifiant 'inject' provient de tsyringe
|
|
129
|
+
*/
|
|
130
|
+
isInjectFromTsyringe(node) {
|
|
131
|
+
const ts = this.typescript;
|
|
132
|
+
const symbol = this.checker.getSymbolAtLocation(node);
|
|
133
|
+
if (!symbol)
|
|
134
|
+
return true; // Assume true si pas de symbole
|
|
135
|
+
// Résoudre l'alias
|
|
136
|
+
let resolved = symbol;
|
|
137
|
+
while (resolved.flags & ts.SymbolFlags.Alias) {
|
|
138
|
+
try {
|
|
139
|
+
resolved = this.checker.getAliasedSymbol(resolved);
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const declaration = resolved.valueDeclaration || resolved.declarations?.[0];
|
|
146
|
+
if (!declaration)
|
|
147
|
+
return true;
|
|
148
|
+
const fileName = declaration.getSourceFile().fileName;
|
|
149
|
+
return fileName.includes('tsyringe') || !fileName.includes('node_modules');
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Extrait le token depuis un décorateur @inject(TOKEN)
|
|
153
|
+
*/
|
|
154
|
+
extractTokenFromDecorator(decorator, sourceFile) {
|
|
155
|
+
const ts = this.typescript;
|
|
156
|
+
if (!ts.isCallExpression(decorator.expression)) {
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
const args = decorator.expression.arguments;
|
|
160
|
+
if (args.length === 0) {
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
return this.tokenNormalizer.normalize(args[0], sourceFile);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Vérifie si un token représente un type injectable (pas primitif)
|
|
167
|
+
*/
|
|
168
|
+
isInjectableType(token) {
|
|
169
|
+
if (!token)
|
|
170
|
+
return false;
|
|
171
|
+
// Exclure les types primitifs et built-in
|
|
172
|
+
const nonInjectableTypes = new Set([
|
|
173
|
+
'string', 'number', 'boolean', 'object', 'any', 'unknown',
|
|
174
|
+
'never', 'void', 'null', 'undefined', 'symbol', 'bigint',
|
|
175
|
+
'String', 'Number', 'Boolean', 'Object', 'Function',
|
|
176
|
+
'Array', 'Map', 'Set', 'Promise', 'Date', 'RegExp', 'Error',
|
|
177
|
+
]);
|
|
178
|
+
// Vérifier par le nom d'affichage
|
|
179
|
+
if (nonInjectableTypes.has(token.displayName)) {
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
// Seules les classes sont injectables implicitement
|
|
183
|
+
return token.type === 'class';
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Analyse toutes les classes d'un fichier source
|
|
187
|
+
*/
|
|
188
|
+
analyzeSourceFile(sourceFile) {
|
|
189
|
+
const classes = [];
|
|
190
|
+
this.visitNode(sourceFile, classes);
|
|
191
|
+
return classes;
|
|
192
|
+
}
|
|
193
|
+
visitNode(node, classes) {
|
|
194
|
+
const ts = this.typescript;
|
|
195
|
+
if (ts.isClassDeclaration(node) && node.name) {
|
|
196
|
+
const symbol = this.checker.getSymbolAtLocation(node.name);
|
|
197
|
+
if (symbol) {
|
|
198
|
+
const analyzed = this.analyzeClass(symbol);
|
|
199
|
+
if (analyzed && analyzed.dependencies.length > 0) {
|
|
200
|
+
classes.push(analyzed);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
ts.forEachChild(node, (child) => this.visitNode(child, classes));
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
exports.DependencyAnalyzer = DependencyAnalyzer;
|
|
208
|
+
//# sourceMappingURL=DependencyAnalyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DependencyAnalyzer.js","sourceRoot":"","sources":["../../src/LanguageServer/plugin/DependencyAnalyzer.ts"],"names":[],"mappings":";;;AAEA,uDAAmD;AAEnD;;;;;;GAMG;AACH,MAAa,kBAAkB;IAI3B,YACI,UAAqB,EACb,OAAuB,EACvB,MAA6B;QAD7B,YAAO,GAAP,OAAO,CAAgB;QACvB,WAAM,GAAN,MAAM,CAAuB;QAErC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,eAAe,GAAG,IAAI,iCAAe,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;IACnE,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,WAAsB;QAC/B,MAAM,WAAW,GAAG,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAA;QACzD,IAAI,CAAC,WAAW;YAAE,OAAO,IAAI,CAAA;QAE7B,MAAM,UAAU,GAAG,WAAW,CAAC,aAAa,EAAE,CAAA;QAC9C,MAAM,YAAY,GAAG,IAAI,CAAC,8BAA8B,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;QAEjF,OAAO;YACH,MAAM,EAAE,WAAW;YACnB,IAAI,EAAE,WAAW,CAAC,OAAO,EAAE;YAC3B,UAAU;YACV,WAAW;YACX,YAAY;SACf,CAAA;IACL,CAAC;IAED;;OAEG;IACK,mBAAmB,CAAC,MAAiB;QACzC,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAA;QAE1B,MAAM,WAAW,GAAG,MAAM,CAAC,gBAAgB,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAA;QACvE,IAAI,CAAC,WAAW;YAAE,OAAO,IAAI,C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C,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YAC1D,IAAI,MAAM,EAAE,CAAC;gBACT,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA;gBAC1C,IAAI,QAAQ,IAAI,QAAQ,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC/C,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;gBAC1B,CAAC;YACL,CAAC;QACL,CAAC;QAED,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,KAAc,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAA;IAC7E,CAAC;CACJ;AAjPD,gDAiPC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type ts from 'typescript';
|
|
2
|
+
import type { NormalizedToken } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Service de normalisation des tokens d'injection
|
|
5
|
+
*
|
|
6
|
+
* Génère des identifiants uniques pour comparer les tokens,
|
|
7
|
+
* qu'ils soient des symboles, des classes ou des chaînes.
|
|
8
|
+
*/
|
|
9
|
+
export declare class TokenNormalizer {
|
|
10
|
+
private checker;
|
|
11
|
+
private typescript;
|
|
12
|
+
constructor(typescript: typeof ts, checker: ts.TypeChecker);
|
|
13
|
+
/**
|
|
14
|
+
* Normalise un token depuis un noeud AST
|
|
15
|
+
* Supporte: Symbol, Class, String literal, MemberExpression (TOKENS.X)
|
|
16
|
+
*/
|
|
17
|
+
normalize(node: ts.Node, sourceFile: ts.SourceFile): NormalizedToken | null;
|
|
18
|
+
/**
|
|
19
|
+
* Normalise un identifiant (classe ou variable symbol)
|
|
20
|
+
*/
|
|
21
|
+
private normalizeIdentifier;
|
|
22
|
+
/**
|
|
23
|
+
* Normalise un accès membre (TOKENS.Logger)
|
|
24
|
+
*/
|
|
25
|
+
private normalizeMemberExpression;
|
|
26
|
+
/**
|
|
27
|
+
* Normalise un appel Symbol('name')
|
|
28
|
+
*/
|
|
29
|
+
private normalizeCallExpression;
|
|
30
|
+
/**
|
|
31
|
+
* Crée un token normalisé depuis un symbole TypeScript
|
|
32
|
+
*/
|
|
33
|
+
private createTokenFromSymbol;
|
|
34
|
+
/**
|
|
35
|
+
* Détermine le type d'un token depuis son symbole
|
|
36
|
+
*/
|
|
37
|
+
private determineTokenType;
|
|
38
|
+
/**
|
|
39
|
+
* Résout les alias d'import pour obtenir le symbole original
|
|
40
|
+
*/
|
|
41
|
+
private resolveAlias;
|
|
42
|
+
/**
|
|
43
|
+
* Compare deux tokens pour vérifier s'ils sont identiques
|
|
44
|
+
*/
|
|
45
|
+
areTokensEqual(token1: NormalizedToken, token2: NormalizedToken): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Normalise un token depuis un type (pour injection implicite par type)
|
|
48
|
+
*/
|
|
49
|
+
normalizeFromType(typeNode: ts.TypeNode, sourceFile: ts.SourceFile): NormalizedToken | null;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=TokenNormalizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenNormalizer.d.ts","sourceRoot":"","sources":["../../src/LanguageServer/plugin/TokenNormalizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAChC,OAAO,KAAK,EAAE,eAAe,EAAa,MAAM,SAAS,CAAA;AAEzD;;;;;GAKG;AACH,qBAAa,eAAe;IAKpB,OAAO,CAAC,OAAO;IAJnB,OAAO,CAAC,UAAU,CAAW;gBAGzB,UAAU,EAAE,OAAO,EAAE,EACb,OAAO,EAAE,EAAE,CAAC,WAAW;IAKnC;;;OAGG;IACH,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,eAAe,GAAG,IAAI;IAiC3E;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAgBjC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAyB/B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAyB7B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAyC1B;;OAEG;IACH,OAAO,CAAC,YAAY;IAyBpB;;OAEG;IACH,cAAc,CAAC,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,GAAG,OAAO;IAIzE;;OAEG;IACH,iBAAiB,CACb,QAAQ,EAAE,EAAE,CAAC,QAAQ,EACrB,UAAU,EAAE,EAAE,CAAC,UAAU,GAC1B,eAAe,GAAG,IAAI;CA0B5B"}
|