Converts OrderService → ORDER_SERVICE_TOKEN.
Uses word-boundary splitting to handle consecutive capitals (e.g. HTTPClient → HTTP_CLIENT_TOKEN).
Computes the relative module specifier from fromPath to toPath.
Strips the .ts extension to produce a valid import path.
Transforms all concrete @Injectable constructor parameters in
context.sourceFile.
Transform context of the consuming file
Transformed parameters, change count and per-parameter errors
Orchestrator for DIP violation transformation: turns concrete constructor injection into interface-based injection.
For each constructor parameter of an
@Injectableclass that injects a concrete@Injectableclass:I${ClassName}) and token name (CLASS_NAME_TOKEN)InjectionTokeninto the injected service file, unless the interface already exists there@Inject(TOKEN)to the parameterWorks directly on the ts-morph AST and modifies two files (the consuming file and the injected service file). Idempotent: parameters that already have
@Injectare skipped. Declaration files are skipped.