Removed obfuscation-event-emitter to allow more flexible append of node inside custom code helper groups.

This commit is contained in:
sanex
2020-12-25 11:00:11 +03:00
parent 102cf2ff10
commit a118112095
19 changed files with 78 additions and 178 deletions
@@ -16,7 +16,6 @@ import { IStringArrayStorage } from '../../../interfaces/storages/string-array-t
import { initializable } from '../../../decorators/Initializable';
import { CustomCodeHelper } from '../../../enums/custom-code-helpers/CustomCodeHelper';
import { ObfuscationEvent } from '../../../enums/event-emitters/ObfuscationEvent';
import { StringArrayEncoding } from '../../../enums/node-transformers/string-array-transformers/StringArrayEncoding';
import { AbstractCustomCodeHelperGroup } from '../../AbstractCustomCodeHelperGroup';
@@ -42,11 +41,6 @@ export class StringArrayCodeHelperGroup extends AbstractCustomCodeHelperGroup {
@initializable()
protected customCodeHelpers!: Map <CustomCodeHelper, ICustomCodeHelper>;
/**
* @type {ObfuscationEvent}
*/
protected appendEvent: ObfuscationEvent = ObfuscationEvent.AfterObfuscation;
/**
* @type {TCustomCodeHelperFactory}
*/
@@ -82,7 +76,7 @@ export class StringArrayCodeHelperGroup extends AbstractCustomCodeHelperGroup {
* @param {TNodeWithStatements} nodeWithStatements
* @param {ICallsGraphData[]} callsGraphData
*/
public appendNodes (nodeWithStatements: TNodeWithStatements, callsGraphData: ICallsGraphData[]): void {
public appendOnFinalizing (nodeWithStatements: TNodeWithStatements, callsGraphData: ICallsGraphData[]): void {
if (!this.stringArrayStorage.getLength()) {
return;
}