mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Renamed custom code helpers group method names
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -58,7 +58,7 @@ export class ConsoleOutputCodeHelperGroup extends AbstractCustomCodeHelperGroup
|
||||
* @param {TNodeWithStatements} nodeWithStatements
|
||||
* @param {ICallsGraphData[]} callsGraphData
|
||||
*/
|
||||
public appendOnPreparing (nodeWithStatements: TNodeWithStatements, callsGraphData: ICallsGraphData[]): void {
|
||||
public appendOnPreparingStage (nodeWithStatements: TNodeWithStatements, callsGraphData: ICallsGraphData[]): void {
|
||||
if (!this.options.disableConsoleOutput) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ export class DebugProtectionCodeHelperGroup extends AbstractCustomCodeHelperGrou
|
||||
* @param {TNodeWithStatements} nodeWithStatements
|
||||
* @param {ICallsGraphData[]} callsGraphData
|
||||
*/
|
||||
public appendOnPreparing (nodeWithStatements: TNodeWithStatements, callsGraphData: ICallsGraphData[]): void {
|
||||
public appendOnPreparingStage (nodeWithStatements: TNodeWithStatements, callsGraphData: ICallsGraphData[]): void {
|
||||
if (!this.options.debugProtection) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ export class DomainLockCustomCodeHelperGroup extends AbstractCustomCodeHelperGro
|
||||
* @param {TNodeWithStatements} nodeWithStatements
|
||||
* @param {ICallsGraphData[]} callsGraphData
|
||||
*/
|
||||
public appendOnPreparing (nodeWithStatements: TNodeWithStatements, callsGraphData: ICallsGraphData[]): void {
|
||||
public appendOnPreparingStage (nodeWithStatements: TNodeWithStatements, callsGraphData: ICallsGraphData[]): void {
|
||||
if (!this.options.domainLock.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ export class SelfDefendingCodeHelperGroup extends AbstractCustomCodeHelperGroup
|
||||
* @param {TNodeWithStatements} nodeWithStatements
|
||||
* @param {ICallsGraphData[]} callsGraphData
|
||||
*/
|
||||
public appendOnPreparing (nodeWithStatements: TNodeWithStatements, callsGraphData: ICallsGraphData[]): void {
|
||||
public appendOnPreparingStage (nodeWithStatements: TNodeWithStatements, callsGraphData: ICallsGraphData[]): void {
|
||||
if (!this.options.selfDefending) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class StringArrayCodeHelperGroup extends AbstractCustomCodeHelperGroup {
|
||||
* @param {TNodeWithStatements} nodeWithStatements
|
||||
* @param {ICallsGraphData[]} callsGraphData
|
||||
*/
|
||||
public appendOnFinalizing (nodeWithStatements: TNodeWithStatements, callsGraphData: ICallsGraphData[]): void {
|
||||
public appendOnFinalizingStage (nodeWithStatements: TNodeWithStatements, callsGraphData: ICallsGraphData[]): void {
|
||||
if (!this.stringArrayStorage.getLength()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ export class CustomCodeHelpersTransformer extends AbstractNodeTransformer {
|
||||
.getStorage()
|
||||
.forEach((customCodeHelperGroup: ICustomCodeHelperGroup) => {
|
||||
customCodeHelperGroup.initialize();
|
||||
customCodeHelperGroup.appendOnPreparing?.(node, this.callsGraphData);
|
||||
customCodeHelperGroup.appendOnPreparingStage?.(node, this.callsGraphData);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ export class CustomCodeHelpersTransformer extends AbstractNodeTransformer {
|
||||
this.customCodeHelperGroupStorage
|
||||
.getStorage()
|
||||
.forEach((customCodeHelperGroup: ICustomCodeHelperGroup) => {
|
||||
const methodName = <TCustomCodeHelpersGroupAppendMethodName>`appendOn${nodeTransformationStage}`;
|
||||
const methodName = <TCustomCodeHelpersGroupAppendMethodName>`appendOn${nodeTransformationStage}Stage`;
|
||||
|
||||
customCodeHelperGroup[methodName]?.(node, this.callsGraphData);
|
||||
});
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import { NodeTransformationStage } from '../../enums/node-transformers/NodeTransformationStage';
|
||||
|
||||
export type TCustomCodeHelpersGroupAppendMethodName = `appendOn${Capitalize<NodeTransformationStage>}`;
|
||||
export type TCustomCodeHelpersGroupAppendMethodName = `appendOn${Capitalize<NodeTransformationStage>}Stage`;
|
||||
|
||||
Reference in New Issue
Block a user