mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
concretize scope for bindings
This commit is contained in:
Vendored
+419
-422
File diff suppressed because it is too large
Load Diff
@@ -43,7 +43,8 @@ export class InversifyContainerFacade {
|
||||
|
||||
this.container
|
||||
.bind<IObfuscator>(ServiceIdentifiers.IObfuscator)
|
||||
.to(Obfuscator);
|
||||
.to(Obfuscator)
|
||||
.inSingletonScope();
|
||||
|
||||
this.container
|
||||
.bind<IObfuscationEventEmitter>(ServiceIdentifiers.IObfuscationEventEmitter)
|
||||
|
||||
@@ -7,5 +7,6 @@ import { FunctionControlFlowTransformer } from '../../node-transformers/node-con
|
||||
export const nodeControlFlowTransformersModule: interfaces.ContainerModule = new ContainerModule((bind: interfaces.Bind) => {
|
||||
bind<INodeTransformer>('INodeTransformer')
|
||||
.to(FunctionControlFlowTransformer)
|
||||
.inSingletonScope()
|
||||
.whenTargetNamed('FunctionControlFlowTransformer');
|
||||
});
|
||||
|
||||
@@ -15,37 +15,46 @@ import { VariableDeclarationObfuscator } from '../../node-transformers/node-obfu
|
||||
export const nodeObfuscatorsModule: interfaces.ContainerModule = new ContainerModule((bind: interfaces.Bind) => {
|
||||
bind<INodeTransformer>('INodeTransformer')
|
||||
.to(CatchClauseObfuscator)
|
||||
.inSingletonScope()
|
||||
.whenTargetNamed('CatchClauseObfuscator');
|
||||
|
||||
bind<INodeTransformer>('INodeTransformer')
|
||||
.to(FunctionDeclarationObfuscator)
|
||||
.inSingletonScope()
|
||||
.whenTargetNamed('FunctionDeclarationObfuscator');
|
||||
|
||||
bind<INodeTransformer>('INodeTransformer')
|
||||
.to(FunctionObfuscator)
|
||||
.inSingletonScope()
|
||||
.whenTargetNamed('FunctionObfuscator');
|
||||
|
||||
bind<INodeTransformer>('INodeTransformer')
|
||||
.to(LabeledStatementObfuscator)
|
||||
.inSingletonScope()
|
||||
.whenTargetNamed('LabeledStatementObfuscator');
|
||||
|
||||
bind<INodeTransformer>('INodeTransformer')
|
||||
.to(LiteralObfuscator)
|
||||
.inSingletonScope()
|
||||
.whenTargetNamed('LiteralObfuscator');
|
||||
|
||||
bind<INodeTransformer>('INodeTransformer')
|
||||
.to(MemberExpressionObfuscator)
|
||||
.inSingletonScope()
|
||||
.whenTargetNamed('MemberExpressionObfuscator');
|
||||
|
||||
bind<INodeTransformer>('INodeTransformer')
|
||||
.to(MethodDefinitionObfuscator)
|
||||
.inSingletonScope()
|
||||
.whenTargetNamed('MethodDefinitionObfuscator');
|
||||
|
||||
bind<INodeTransformer>('INodeTransformer')
|
||||
.to(ObjectExpressionObfuscator)
|
||||
.inSingletonScope()
|
||||
.whenTargetNamed('ObjectExpressionObfuscator');
|
||||
|
||||
bind<INodeTransformer>('INodeTransformer')
|
||||
.to(VariableDeclarationObfuscator)
|
||||
.inSingletonScope()
|
||||
.whenTargetNamed('VariableDeclarationObfuscator');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user