mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Renamed ConsoleOutputDisable template
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
@@ -11,7 +11,7 @@ import { IRandomGenerator } from '../../interfaces/utils/IRandomGenerator';
|
||||
|
||||
import { ObfuscationTarget } from '../../enums/ObfuscationTarget';
|
||||
|
||||
import { ConsoleOutputDisableExpressionTemplate } from './templates/ConsoleOutputDisableExpressionTemplate';
|
||||
import { ConsoleOutputDisableTemplate } from './templates/ConsoleOutputDisableTemplate';
|
||||
import { GlobalVariableNoEvalTemplate } from '../common/templates/GlobalVariableNoEvalTemplate';
|
||||
|
||||
import { initializable } from '../../decorators/Initializable';
|
||||
@@ -82,7 +82,7 @@ export class ConsoleOutputDisableCodeHelper extends AbstractCustomCodeHelper {
|
||||
? this.getGlobalVariableTemplate()
|
||||
: GlobalVariableNoEvalTemplate();
|
||||
|
||||
return this.customCodeHelperFormatter.formatTemplate(ConsoleOutputDisableExpressionTemplate(), {
|
||||
return this.customCodeHelperFormatter.formatTemplate(ConsoleOutputDisableTemplate(), {
|
||||
callControllerFunctionName: this.callsControllerFunctionName,
|
||||
consoleLogDisableFunctionName: this.consoleOutputDisableFunctionName,
|
||||
globalVariableTemplate
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
export function ConsoleOutputDisableExpressionTemplate (): string {
|
||||
export function ConsoleOutputDisableTemplate (): string {
|
||||
return `
|
||||
const {consoleLogDisableFunctionName} = {callControllerFunctionName}(this, function () {
|
||||
{globalVariableTemplate}
|
||||
+3
-3
@@ -7,7 +7,7 @@ import * as sinon from 'sinon';
|
||||
|
||||
import { IInversifyContainerFacade } from '../../../../../src/interfaces/container/IInversifyContainerFacade';
|
||||
|
||||
import { ConsoleOutputDisableExpressionTemplate } from '../../../../../src/custom-code-helpers/console-output/templates/ConsoleOutputDisableExpressionTemplate';
|
||||
import { ConsoleOutputDisableTemplate } from '../../../../../src/custom-code-helpers/console-output/templates/ConsoleOutputDisableTemplate';
|
||||
import { GlobalVariableTemplate1 } from '../../../../../src/custom-code-helpers/common/templates/GlobalVariableTemplate1';
|
||||
|
||||
import { InversifyContainerFacade } from '../../../../../src/container/InversifyContainerFacade';
|
||||
@@ -52,7 +52,7 @@ function getFunctionFromTemplate (
|
||||
callsControllerFunctionName: string,
|
||||
consoleMethod: keyof Console
|
||||
): Function {
|
||||
const formattedTemplate: string = format(ConsoleOutputDisableExpressionTemplate(), templateData);
|
||||
const formattedTemplate: string = format(ConsoleOutputDisableTemplate(), templateData);
|
||||
|
||||
return Function(`
|
||||
var ${callsControllerFunctionName} = (function(){
|
||||
@@ -70,7 +70,7 @@ function getFunctionFromTemplate (
|
||||
`);
|
||||
}
|
||||
|
||||
describe('ConsoleOutputDisableExpressionTemplate', () => {
|
||||
describe('ConsoleOutputDisableTemplate', () => {
|
||||
const callControllerFunctionName: string = 'callsController';
|
||||
const consoleLogDisableFunctionName: string = 'consoleLogDisable';
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ import './functional-tests/analyzers/calls-graph-analyzer/CallsGraphAnalyzer.spe
|
||||
import './functional-tests/cli/JavaScriptObfuscatorCLI.spec';
|
||||
import './functional-tests/code-transformers/preparing-transformers/hashbang-operator-transformer/HashbangOperatorTransformer.spec';
|
||||
import './functional-tests/custom-code-helpers/console-output/ConsoleOutputDisableExpressionCodeHelper.spec';
|
||||
import './functional-tests/custom-code-helpers/console-output/templates/ConsoleOutputDisableExpressionTemplate.spec';
|
||||
import './functional-tests/custom-code-helpers/console-output/templates/ConsoleOutputDisableTemplate.spec';
|
||||
import './functional-tests/custom-code-helpers/common/templates/GlobalVariableNoEvalTemplate.spec';
|
||||
import './functional-tests/custom-code-helpers/debug-protection/templates/DebugProtectionFunctionCallTemplate.spec';
|
||||
import './functional-tests/custom-code-helpers/domain-lock/DomainLockCodeHelper.spec';
|
||||
|
||||
Reference in New Issue
Block a user