@djodjonx/wiredi 0.0.8 → 0.0.9
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/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -2
- package/dist/plugin/ConfigurationAnalyzer.d.ts +0 -59
- package/dist/plugin/ConfigurationAnalyzer.d.ts.map +0 -1
- package/dist/plugin/ConfigurationAnalyzer.js +0 -321
- package/dist/plugin/ConfigurationAnalyzer.js.map +0 -1
- package/dist/plugin/DependencyAnalyzer.d.ts +0 -54
- package/dist/plugin/DependencyAnalyzer.d.ts.map +0 -1
- package/dist/plugin/DependencyAnalyzer.js +0 -208
- package/dist/plugin/DependencyAnalyzer.js.map +0 -1
- package/dist/plugin/TokenNormalizer.d.ts +0 -51
- package/dist/plugin/TokenNormalizer.d.ts.map +0 -1
- package/dist/plugin/TokenNormalizer.js +0 -208
- package/dist/plugin/TokenNormalizer.js.map +0 -1
- package/dist/plugin/ValidationEngine.d.ts +0 -53
- package/dist/plugin/ValidationEngine.d.ts.map +0 -1
- package/dist/plugin/ValidationEngine.js +0 -250
- package/dist/plugin/ValidationEngine.js.map +0 -1
- package/dist/plugin/index.d.ts +0 -2
- package/dist/plugin/index.d.ts.map +0 -1
- package/dist/plugin/index.js +0 -144
- package/dist/plugin/index.js.map +0 -1
- package/dist/plugin/package.json +0 -6
- package/dist/plugin/types.d.ts +0 -152
- package/dist/plugin/types.d.ts.map +0 -1
- package/dist/plugin/types.js +0 -3
- package/dist/plugin/types.js.map +0 -1
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TokenNormalizer = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Service de normalisation des tokens d'injection
|
|
6
|
-
*
|
|
7
|
-
* Génère des identifiants uniques pour comparer les tokens,
|
|
8
|
-
* qu'ils soient des symboles, des classes ou des chaînes.
|
|
9
|
-
*/
|
|
10
|
-
class TokenNormalizer {
|
|
11
|
-
constructor(typescript, checker) {
|
|
12
|
-
this.checker = checker;
|
|
13
|
-
this.typescript = typescript;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Normalise un token depuis un noeud AST
|
|
17
|
-
* Supporte: Symbol, Class, String literal, MemberExpression (TOKENS.X)
|
|
18
|
-
*/
|
|
19
|
-
normalize(node, sourceFile) {
|
|
20
|
-
const ts = this.typescript;
|
|
21
|
-
// Cas 1: String literal - @inject('API_KEY')
|
|
22
|
-
if (ts.isStringLiteral(node)) {
|
|
23
|
-
return {
|
|
24
|
-
id: `STRING:${node.text}`,
|
|
25
|
-
type: 'string',
|
|
26
|
-
displayName: `"${node.text}"`,
|
|
27
|
-
node,
|
|
28
|
-
sourceFile,
|
|
29
|
-
position: node.getStart(sourceFile),
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
// Cas 2: Identifier simple - @inject(MyClass) ou @inject(MY_TOKEN)
|
|
33
|
-
if (ts.isIdentifier(node)) {
|
|
34
|
-
return this.normalizeIdentifier(node, sourceFile);
|
|
35
|
-
}
|
|
36
|
-
// Cas 3: Member expression - @inject(TOKENS.Logger)
|
|
37
|
-
if (ts.isPropertyAccessExpression(node)) {
|
|
38
|
-
return this.normalizeMemberExpression(node, sourceFile);
|
|
39
|
-
}
|
|
40
|
-
// Cas 4: Call expression - Symbol('name')
|
|
41
|
-
if (ts.isCallExpression(node)) {
|
|
42
|
-
return this.normalizeCallExpression(node, sourceFile);
|
|
43
|
-
}
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Normalise un identifiant (classe ou variable symbol)
|
|
48
|
-
*/
|
|
49
|
-
normalizeIdentifier(node, sourceFile) {
|
|
50
|
-
const symbol = this.checker.getSymbolAtLocation(node);
|
|
51
|
-
if (!symbol)
|
|
52
|
-
return null;
|
|
53
|
-
// Résoudre les alias (imports)
|
|
54
|
-
const resolvedSymbol = this.resolveAlias(symbol);
|
|
55
|
-
if (!resolvedSymbol)
|
|
56
|
-
return null;
|
|
57
|
-
return this.createTokenFromSymbol(resolvedSymbol, node, sourceFile);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Normalise un accès membre (TOKENS.Logger)
|
|
61
|
-
*/
|
|
62
|
-
normalizeMemberExpression(node, sourceFile) {
|
|
63
|
-
const symbol = this.checker.getSymbolAtLocation(node);
|
|
64
|
-
if (!symbol)
|
|
65
|
-
return null;
|
|
66
|
-
const resolvedSymbol = this.resolveAlias(symbol);
|
|
67
|
-
if (!resolvedSymbol)
|
|
68
|
-
return null;
|
|
69
|
-
// Construire le nom d'affichage complet
|
|
70
|
-
const displayName = node.getText(sourceFile);
|
|
71
|
-
return this.createTokenFromSymbol(resolvedSymbol, node, sourceFile, displayName);
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Normalise un appel Symbol('name')
|
|
75
|
-
*/
|
|
76
|
-
normalizeCallExpression(node, sourceFile) {
|
|
77
|
-
const ts = this.typescript;
|
|
78
|
-
// Vérifier si c'est Symbol(...)
|
|
79
|
-
if (ts.isIdentifier(node.expression) && node.expression.text === 'Symbol') {
|
|
80
|
-
const arg = node.arguments[0];
|
|
81
|
-
if (arg && ts.isStringLiteral(arg)) {
|
|
82
|
-
// Symbol('name') inline - utiliser la position comme ID unique
|
|
83
|
-
return {
|
|
84
|
-
id: `INLINE_SYMBOL:${sourceFile.fileName}:${node.getStart(sourceFile)}`,
|
|
85
|
-
type: 'symbol',
|
|
86
|
-
displayName: `Symbol('${arg.text}')`,
|
|
87
|
-
node,
|
|
88
|
-
sourceFile,
|
|
89
|
-
position: node.getStart(sourceFile),
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Crée un token normalisé depuis un symbole TypeScript
|
|
97
|
-
*/
|
|
98
|
-
createTokenFromSymbol(symbol, originalNode, sourceFile, displayNameOverride) {
|
|
99
|
-
const declaration = symbol.valueDeclaration || symbol.declarations?.[0];
|
|
100
|
-
if (!declaration)
|
|
101
|
-
return null;
|
|
102
|
-
const declSourceFile = declaration.getSourceFile();
|
|
103
|
-
const type = this.determineTokenType(symbol, declaration);
|
|
104
|
-
// ID unique basé sur le fichier et la position de déclaration
|
|
105
|
-
const id = `${type.toUpperCase()}:${declSourceFile.fileName}:${declaration.getStart(declSourceFile)}`;
|
|
106
|
-
return {
|
|
107
|
-
id,
|
|
108
|
-
type,
|
|
109
|
-
displayName: displayNameOverride || symbol.getName(),
|
|
110
|
-
node: originalNode,
|
|
111
|
-
sourceFile,
|
|
112
|
-
position: originalNode.getStart(sourceFile),
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Détermine le type d'un token depuis son symbole
|
|
117
|
-
*/
|
|
118
|
-
determineTokenType(symbol, declaration) {
|
|
119
|
-
const ts = this.typescript;
|
|
120
|
-
// Vérifier si c'est une classe
|
|
121
|
-
if (ts.isClassDeclaration(declaration)) {
|
|
122
|
-
return 'class';
|
|
123
|
-
}
|
|
124
|
-
// Vérifier si c'est un symbole (variable initialisée avec Symbol())
|
|
125
|
-
if (ts.isVariableDeclaration(declaration)) {
|
|
126
|
-
const varDecl = declaration;
|
|
127
|
-
if (varDecl.initializer && ts.isCallExpression(varDecl.initializer)) {
|
|
128
|
-
const callExpr = varDecl.initializer;
|
|
129
|
-
if (ts.isIdentifier(callExpr.expression) && callExpr.expression.text === 'Symbol') {
|
|
130
|
-
return 'symbol';
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
// Vérifier si c'est une propriété d'objet avec Symbol()
|
|
135
|
-
if (ts.isPropertyAssignment(declaration)) {
|
|
136
|
-
const propDecl = declaration;
|
|
137
|
-
if (propDecl.initializer && ts.isCallExpression(propDecl.initializer)) {
|
|
138
|
-
const callExpr = propDecl.initializer;
|
|
139
|
-
if (ts.isIdentifier(callExpr.expression) && callExpr.expression.text === 'Symbol') {
|
|
140
|
-
return 'symbol';
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
// Vérifier le type via le TypeChecker
|
|
145
|
-
const type = this.checker.getTypeOfSymbolAtLocation(symbol, declaration);
|
|
146
|
-
const typeString = this.checker.typeToString(type);
|
|
147
|
-
if (typeString === 'symbol' || typeString.includes('unique symbol')) {
|
|
148
|
-
return 'symbol';
|
|
149
|
-
}
|
|
150
|
-
return 'unknown';
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Résout les alias d'import pour obtenir le symbole original
|
|
154
|
-
*/
|
|
155
|
-
resolveAlias(symbol) {
|
|
156
|
-
const ts = this.typescript;
|
|
157
|
-
// Suivre la chaîne d'alias
|
|
158
|
-
let current = symbol;
|
|
159
|
-
const visited = new Set();
|
|
160
|
-
while (current.flags & ts.SymbolFlags.Alias) {
|
|
161
|
-
if (visited.has(current)) {
|
|
162
|
-
// Cycle détecté
|
|
163
|
-
return null;
|
|
164
|
-
}
|
|
165
|
-
visited.add(current);
|
|
166
|
-
try {
|
|
167
|
-
current = this.checker.getAliasedSymbol(current);
|
|
168
|
-
}
|
|
169
|
-
catch {
|
|
170
|
-
// Erreur de résolution
|
|
171
|
-
return current;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
return current;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Compare deux tokens pour vérifier s'ils sont identiques
|
|
178
|
-
*/
|
|
179
|
-
areTokensEqual(token1, token2) {
|
|
180
|
-
return token1.id === token2.id;
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Normalise un token depuis un type (pour injection implicite par type)
|
|
184
|
-
*/
|
|
185
|
-
normalizeFromType(typeNode, sourceFile) {
|
|
186
|
-
const ts = this.typescript;
|
|
187
|
-
if (!ts.isTypeReferenceNode(typeNode)) {
|
|
188
|
-
return null;
|
|
189
|
-
}
|
|
190
|
-
const typeName = typeNode.typeName;
|
|
191
|
-
if (ts.isIdentifier(typeName)) {
|
|
192
|
-
return this.normalizeIdentifier(typeName, sourceFile);
|
|
193
|
-
}
|
|
194
|
-
if (ts.isQualifiedName(typeName)) {
|
|
195
|
-
// Pour les types qualifiés comme Namespace.Type
|
|
196
|
-
const symbol = this.checker.getSymbolAtLocation(typeName);
|
|
197
|
-
if (symbol) {
|
|
198
|
-
const resolvedSymbol = this.resolveAlias(symbol);
|
|
199
|
-
if (resolvedSymbol) {
|
|
200
|
-
return this.createTokenFromSymbol(resolvedSymbol, typeNode, sourceFile);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
return null;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
exports.TokenNormalizer = TokenNormalizer;
|
|
208
|
-
//# sourceMappingURL=TokenNormalizer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TokenNormalizer.js","sourceRoot":"","sources":["../../src/LanguageServer/plugin/TokenNormalizer.ts"],"names":[],"mappings":";;;AAGA;;;;;GAKG;AACH,MAAa,eAAe;IAGxB,YACI,UAAqB,EACb,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;QAE/B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAChC,CAAC;IAED;;;OAGG;IACH,SAAS,CAAC,IAAa,EAAE,UAAyB;QAC9C,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAA;QAE1B,6CAA6C;QAC7C,IAAI,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3B,OAAO;gBACH,EAAE,EAAE,UAAU,IAAI,CAAC,IAAI,EAAE;gBACzB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,IAAI,IAAI,CAAC,IAAI,GAA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moteur de validation des dépendances DI
|
|
5
|
-
*
|
|
6
|
-
* Orchestre l'analyse des configurations et des classes pour
|
|
7
|
-
* détecter les dépendances manquantes.
|
|
8
|
-
*/
|
|
9
|
-
export declare class ValidationEngine {
|
|
10
|
-
private checker;
|
|
11
|
-
private logger;
|
|
12
|
-
private configAnalyzer;
|
|
13
|
-
private dependencyAnalyzer;
|
|
14
|
-
private typescript;
|
|
15
|
-
constructor(typescript: typeof ts, checker: ts.TypeChecker, logger: (msg: string) => void);
|
|
16
|
-
/**
|
|
17
|
-
* Valide un programme TypeScript et retourne les erreurs
|
|
18
|
-
*/
|
|
19
|
-
validate(program: ts.Program): DIValidationError[];
|
|
20
|
-
/**
|
|
21
|
-
* Collecte toutes les configurations du programme
|
|
22
|
-
*/
|
|
23
|
-
private collectAllConfigs;
|
|
24
|
-
/**
|
|
25
|
-
* Collecte toutes les classes analysées du programme
|
|
26
|
-
*/
|
|
27
|
-
private collectAllClasses;
|
|
28
|
-
/**
|
|
29
|
-
* Valide une configuration spécifique
|
|
30
|
-
*/
|
|
31
|
-
private validateConfig;
|
|
32
|
-
/**
|
|
33
|
-
* Collecte toutes les classes qui doivent être validées pour une configuration
|
|
34
|
-
*/
|
|
35
|
-
private collectClassesToValidate;
|
|
36
|
-
/**
|
|
37
|
-
* Valide les dépendances d'une classe contre les tokens fournis
|
|
38
|
-
*/
|
|
39
|
-
private validateClassDependencies;
|
|
40
|
-
/**
|
|
41
|
-
* Vérifie la compatibilité de type entre le provider enregistré et le type attendu
|
|
42
|
-
*/
|
|
43
|
-
private checkTypeCompatibility;
|
|
44
|
-
/**
|
|
45
|
-
* Crée une erreur de dépendance manquante
|
|
46
|
-
*/
|
|
47
|
-
private createMissingDependencyError;
|
|
48
|
-
/**
|
|
49
|
-
* Convertit les erreurs de validation en diagnostics TypeScript
|
|
50
|
-
*/
|
|
51
|
-
convertToDiagnostics(errors: DIValidationError[]): ts.Diagnostic[];
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=ValidationEngine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationEngine.d.ts","sourceRoot":"","sources":["../../src/LanguageServer/plugin/ValidationEngine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAChC,OAAO,KAAK,EAGR,iBAAiB,EAIpB,MAAM,SAAS,CAAA;AAIhB;;;;;GAKG;AACH,qBAAa,gBAAgB;IAOrB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,MAAM;IAPlB,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,kBAAkB,CAAoB;IAC9C,OAAO,CAAC,UAAU,CAAW;gBAGzB,UAAU,EAAE,OAAO,EAAE,EACb,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI;IAOzC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,GAAG,iBAAiB,EAAE;IAsBlD;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAiBzB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAezB;;OAEG;IACH,OAAO,CAAC,cAAc;IAyCtB;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAkChC;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAoCjC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA6D9B;;OAEG;IACH,OAAO,CAAC,4BAA4B;IAmCpC;;OAEG;IACH,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE;CA4BrE"}
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ValidationEngine = void 0;
|
|
4
|
-
const ConfigurationAnalyzer_1 = require("./ConfigurationAnalyzer");
|
|
5
|
-
const DependencyAnalyzer_1 = require("./DependencyAnalyzer");
|
|
6
|
-
/**
|
|
7
|
-
* Moteur de validation des dépendances DI
|
|
8
|
-
*
|
|
9
|
-
* Orchestre l'analyse des configurations et des classes pour
|
|
10
|
-
* détecter les dépendances manquantes.
|
|
11
|
-
*/
|
|
12
|
-
class ValidationEngine {
|
|
13
|
-
constructor(typescript, checker, logger) {
|
|
14
|
-
this.checker = checker;
|
|
15
|
-
this.logger = logger;
|
|
16
|
-
this.typescript = typescript;
|
|
17
|
-
this.configAnalyzer = new ConfigurationAnalyzer_1.ConfigurationAnalyzer(typescript, checker, logger);
|
|
18
|
-
this.dependencyAnalyzer = new DependencyAnalyzer_1.DependencyAnalyzer(typescript, checker, logger);
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Valide un programme TypeScript et retourne les erreurs
|
|
22
|
-
*/
|
|
23
|
-
validate(program) {
|
|
24
|
-
const errors = [];
|
|
25
|
-
// Phase 1: Collecter toutes les configurations
|
|
26
|
-
const allConfigs = this.collectAllConfigs(program);
|
|
27
|
-
this.logger(`Trouvé ${allConfigs.size} configuration(s)`);
|
|
28
|
-
// Phase 2: Collecter toutes les classes analysées
|
|
29
|
-
const allClasses = this.collectAllClasses(program);
|
|
30
|
-
this.logger(`Trouvé ${allClasses.size} classe(s) avec dépendances`);
|
|
31
|
-
// Phase 3: Valider chaque configuration de type 'builder'
|
|
32
|
-
for (const [_symbol, config] of allConfigs) {
|
|
33
|
-
if (config.type !== 'builder')
|
|
34
|
-
continue;
|
|
35
|
-
const configErrors = this.validateConfig(config, allConfigs, allClasses);
|
|
36
|
-
errors.push(...configErrors);
|
|
37
|
-
}
|
|
38
|
-
return errors;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Collecte toutes les configurations du programme
|
|
42
|
-
*/
|
|
43
|
-
collectAllConfigs(program) {
|
|
44
|
-
const configs = new Map();
|
|
45
|
-
for (const sourceFile of program.getSourceFiles()) {
|
|
46
|
-
if (sourceFile.isDeclarationFile)
|
|
47
|
-
continue;
|
|
48
|
-
const fileConfigs = this.configAnalyzer.analyzeSourceFile(sourceFile);
|
|
49
|
-
for (const config of fileConfigs) {
|
|
50
|
-
if (config.symbol) {
|
|
51
|
-
configs.set(config.symbol, config);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return configs;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Collecte toutes les classes analysées du programme
|
|
59
|
-
*/
|
|
60
|
-
collectAllClasses(program) {
|
|
61
|
-
const classes = new Map();
|
|
62
|
-
for (const sourceFile of program.getSourceFiles()) {
|
|
63
|
-
if (sourceFile.isDeclarationFile)
|
|
64
|
-
continue;
|
|
65
|
-
const fileClasses = this.dependencyAnalyzer.analyzeSourceFile(sourceFile);
|
|
66
|
-
for (const cls of fileClasses) {
|
|
67
|
-
classes.set(cls.symbol, cls);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return classes;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Valide une configuration spécifique
|
|
74
|
-
*/
|
|
75
|
-
validateConfig(config, allConfigs, allClasses) {
|
|
76
|
-
const errors = [];
|
|
77
|
-
const visitedSet = new Set();
|
|
78
|
-
// Résoudre tous les tokens fournis (avec héritage)
|
|
79
|
-
const providedTokens = this.configAnalyzer.resolveAllProvidedTokens(config, allConfigs, visitedSet);
|
|
80
|
-
this.logger(`Config "${config.builderId}": ${providedTokens.size} token(s) fournis`);
|
|
81
|
-
// Collecter toutes les classes à valider (providers)
|
|
82
|
-
const classesToValidate = this.collectClassesToValidate(config, allConfigs, new Set());
|
|
83
|
-
// Valider chaque classe
|
|
84
|
-
for (const [classSymbol, provider] of classesToValidate) {
|
|
85
|
-
const analyzedClass = allClasses.get(classSymbol);
|
|
86
|
-
if (!analyzedClass) {
|
|
87
|
-
// La classe n'a peut-être pas de dépendances ou n'a pas été analysée
|
|
88
|
-
continue;
|
|
89
|
-
}
|
|
90
|
-
const classErrors = this.validateClassDependencies(analyzedClass, providedTokens, provider, config);
|
|
91
|
-
errors.push(...classErrors);
|
|
92
|
-
}
|
|
93
|
-
return errors;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Collecte toutes les classes qui doivent être validées pour une configuration
|
|
97
|
-
*/
|
|
98
|
-
collectClassesToValidate(config, allConfigs, visitedSet) {
|
|
99
|
-
const classes = new Map();
|
|
100
|
-
// Ajouter les providers locaux
|
|
101
|
-
for (const provider of config.localProviders) {
|
|
102
|
-
if (provider.providerClass) {
|
|
103
|
-
classes.set(provider.providerClass, provider);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
// Ajouter les providers des configs parentes
|
|
107
|
-
for (const parentSymbol of config.parentConfigs) {
|
|
108
|
-
const parentConfig = allConfigs.get(parentSymbol);
|
|
109
|
-
if (parentConfig) {
|
|
110
|
-
const parentClasses = this.collectClassesToValidate(parentConfig, allConfigs, visitedSet);
|
|
111
|
-
for (const [classSymbol, provider] of parentClasses) {
|
|
112
|
-
if (!classes.has(classSymbol)) {
|
|
113
|
-
classes.set(classSymbol, provider);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return classes;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Valide les dépendances d'une classe contre les tokens fournis
|
|
122
|
-
*/
|
|
123
|
-
validateClassDependencies(analyzedClass, providedTokens, provider, config) {
|
|
124
|
-
const errors = [];
|
|
125
|
-
for (const dependency of analyzedClass.dependencies) {
|
|
126
|
-
const registeredProvider = providedTokens.get(dependency.token.id);
|
|
127
|
-
if (!registeredProvider) {
|
|
128
|
-
// Token non enregistré
|
|
129
|
-
errors.push(this.createMissingDependencyError(analyzedClass, dependency, provider, config));
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
// Vérifier la compatibilité de type
|
|
133
|
-
const typeError = this.checkTypeCompatibility(dependency, registeredProvider, analyzedClass, config);
|
|
134
|
-
if (typeError) {
|
|
135
|
-
errors.push(typeError);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return errors;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Vérifie la compatibilité de type entre le provider enregistré et le type attendu
|
|
143
|
-
*/
|
|
144
|
-
checkTypeCompatibility(dependency, registeredProvider, analyzedClass, config) {
|
|
145
|
-
// Skip si pas de type attendu ou pas de type provider
|
|
146
|
-
if (!dependency.expectedType || !registeredProvider.providerType) {
|
|
147
|
-
return null;
|
|
148
|
-
}
|
|
149
|
-
// Skip pour les factories et values (type dynamique)
|
|
150
|
-
if (registeredProvider.registrationType === 'factory' ||
|
|
151
|
-
registeredProvider.registrationType === 'value') {
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
const expectedType = dependency.expectedType;
|
|
155
|
-
const providerType = registeredProvider.providerType;
|
|
156
|
-
// Vérifier si le type du provider est assignable au type attendu
|
|
157
|
-
// On utilise isTypeAssignableTo pour vérifier la compatibilité structurelle
|
|
158
|
-
const isCompatible = this.checker.isTypeAssignableTo(providerType, expectedType);
|
|
159
|
-
if (!isCompatible) {
|
|
160
|
-
const expectedTypeName = this.checker.typeToString(expectedType);
|
|
161
|
-
const providerTypeName = this.checker.typeToString(providerType);
|
|
162
|
-
const className = analyzedClass.name;
|
|
163
|
-
const tokenName = dependency.token.displayName;
|
|
164
|
-
const paramIndex = dependency.parameterIndex;
|
|
165
|
-
const _builderId = config.builderId || config.variableName || 'unknown';
|
|
166
|
-
// L'erreur est reportée sur le provider là où il est ENREGISTRÉ
|
|
167
|
-
// (peut être dans un partial différent du builder)
|
|
168
|
-
const errorNode = registeredProvider.node;
|
|
169
|
-
const errorSourceFile = errorNode.getSourceFile(); // Fichier où le provider est défini
|
|
170
|
-
return {
|
|
171
|
-
message: `[WireDI] Type mismatch: Provider doesn't match expected type\n\n` +
|
|
172
|
-
`Service '${className}' expects type '${expectedTypeName}' for '${tokenName}' (parameter #${paramIndex}),\n` +
|
|
173
|
-
`but the registered provider '${registeredProvider.providerClassName || 'unknown'}' ` +
|
|
174
|
-
`returns '${providerTypeName}'.\n\n` +
|
|
175
|
-
`💡 Fix: Register a provider that implements '${expectedTypeName}' or use a factory to adapt the type.`,
|
|
176
|
-
file: errorSourceFile,
|
|
177
|
-
start: errorNode.getStart(errorSourceFile),
|
|
178
|
-
length: errorNode.getWidth(errorSourceFile),
|
|
179
|
-
relatedInformation: [
|
|
180
|
-
{
|
|
181
|
-
file: dependency.parameterNode.getSourceFile(),
|
|
182
|
-
start: dependency.parameterNode.getStart(),
|
|
183
|
-
length: dependency.parameterNode.getWidth(),
|
|
184
|
-
message: `The type '${expectedTypeName}' is expected here`,
|
|
185
|
-
},
|
|
186
|
-
],
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
return null;
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Crée une erreur de dépendance manquante
|
|
193
|
-
*/
|
|
194
|
-
createMissingDependencyError(analyzedClass, dependency, provider, config) {
|
|
195
|
-
const className = analyzedClass.name;
|
|
196
|
-
const tokenName = dependency.token.displayName;
|
|
197
|
-
const builderId = config.builderId || config.variableName || 'unknown';
|
|
198
|
-
const paramIndex = dependency.parameterIndex;
|
|
199
|
-
// L'erreur est reportée sur le provider dans la configuration
|
|
200
|
-
const errorNode = provider.node;
|
|
201
|
-
const errorSourceFile = config.sourceFile;
|
|
202
|
-
return {
|
|
203
|
-
message: `[WireDI] Missing dependency: '${className}' requires '${tokenName}' but it's not registered\n\n` +
|
|
204
|
-
`The service '${className}' expects '${tokenName}' as parameter #${paramIndex}, ` +
|
|
205
|
-
`but this token is not provided in the '${builderId}' configuration or its partials.\n\n` +
|
|
206
|
-
`💡 Fix: Add '{ token: ${tokenName} }' to your injections array.`,
|
|
207
|
-
file: errorSourceFile,
|
|
208
|
-
start: errorNode.getStart(errorSourceFile),
|
|
209
|
-
length: errorNode.getWidth(errorSourceFile),
|
|
210
|
-
relatedInformation: [
|
|
211
|
-
{
|
|
212
|
-
file: dependency.parameterNode.getSourceFile(),
|
|
213
|
-
start: dependency.parameterNode.getStart(),
|
|
214
|
-
length: dependency.parameterNode.getWidth(),
|
|
215
|
-
message: `The dependency '${tokenName}' is required here`,
|
|
216
|
-
},
|
|
217
|
-
],
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Convertit les erreurs de validation en diagnostics TypeScript
|
|
222
|
-
*/
|
|
223
|
-
convertToDiagnostics(errors) {
|
|
224
|
-
const ts = this.typescript;
|
|
225
|
-
return errors.map(error => {
|
|
226
|
-
const diagnostic = {
|
|
227
|
-
file: error.file,
|
|
228
|
-
start: error.start,
|
|
229
|
-
length: error.length,
|
|
230
|
-
messageText: error.message,
|
|
231
|
-
category: ts.DiagnosticCategory.Error,
|
|
232
|
-
code: 90001, // Code arbitraire unique au plugin
|
|
233
|
-
source: 'di-validator',
|
|
234
|
-
};
|
|
235
|
-
if (error.relatedInformation && error.relatedInformation.length > 0) {
|
|
236
|
-
diagnostic.relatedInformation = error.relatedInformation.map(info => ({
|
|
237
|
-
file: info.file,
|
|
238
|
-
start: info.start,
|
|
239
|
-
length: info.length,
|
|
240
|
-
messageText: info.message,
|
|
241
|
-
category: ts.DiagnosticCategory.Message,
|
|
242
|
-
code: 90001,
|
|
243
|
-
}));
|
|
244
|
-
}
|
|
245
|
-
return diagnostic;
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
exports.ValidationEngine = ValidationEngine;
|
|
250
|
-
//# sourceMappingURL=ValidationEngine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationEngine.js","sourceRoot":"","sources":["../../src/LanguageServer/plugin/ValidationEngine.ts"],"names":[],"mappings":";;;AASA,mEAA+D;AAC/D,6DAAyD;AAEzD;;;;;GAKG;AACH,MAAa,gBAAgB;IAKzB,YACI,UAAqB,EACb,OAAuB,EACvB,MAA6B;QAD7B,YAAO,GAAP,OA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AAmB,SAAS,oBAAoB;iBAC5D;aACJ;SACJ,CAAA;IACL,CAAC;IAED;;OAEG;IACH,oBAAoB,CAAC,MAA2B;QAC5C,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAA;QAE1B,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;YACtB,MAAM,UAAU,GAAkB;gBAC9B,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,WAAW,EAAE,KAAK,CAAC,OAAO;gBAC1B,QAAQ,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAK;gBACrC,IAAI,EAAE,KAAK,EAAE,mCAAmC;gBAChD,MAAM,EAAE,cAAc;aACzB,CAAA;YAED,IAAI,KAAK,CAAC,kBAAkB,IAAI,KAAK,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAClE,UAAU,CAAC,kBAAkB,GAAG,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBAClE,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,WAAW,EAAE,IAAI,CAAC,OAAO;oBACzB,QAAQ,EAAE,EAAE,CAAC,kBAAkB,CAAC,OAAO;oBACvC,IAAI,EAAE,KAAK;iBACd,CAAC,CAAC,CAAA;YACP,CAAC;YAED,OAAO,UAAU,CAAA;QACrB,CAAC,CAAC,CAAA;IACN,CAAC;CACJ;AA3UD,4CA2UC"}
|
package/dist/plugin/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/LanguageServer/plugin/index.ts"],"names":[],"mappings":""}
|