New option stringArrayWrappersType allows to select a type of the wrappers that are appending by the stringArrayWrappersCount option

This commit is contained in:
sanex
2020-09-15 11:09:22 +03:00
parent 47263a4c1c
commit d86ee4213c
42 changed files with 360 additions and 98 deletions
+8 -1
View File
@@ -15,7 +15,8 @@ import { LoggingPrefix } from '../enums/logger/LoggingPrefix';
import { ObfuscationTarget } from '../enums/ObfuscationTarget';
import { OptionsPreset } from '../enums/options/presets/OptionsPreset';
import { SourceMapMode } from '../enums/source-map/SourceMapMode';
import { StringArrayEncoding } from '../enums/StringArrayEncoding';
import { StringArrayEncoding } from '../enums/node-transformers/string-array-transformers/StringArrayEncoding';
import { StringArrayWrappersType } from '../enums/node-transformers/string-array-transformers/StringArrayWrappersType';
import { DEFAULT_PRESET } from '../options/presets/Default';
@@ -349,6 +350,12 @@ export class JavaScriptObfuscatorCLI implements IInitializable {
'Enables the chained calls between string array wrappers',
BooleanSanitizer
)
.option(
'--string-array-wrappers-type <string>',
'Allows to select a type of the wrappers that are appending by the `--string-array-wrappers-count` option. ' +
`Values: ${CLIUtils.stringifyOptionAvailableValues(StringArrayWrappersType)}. ` +
`Default: ${StringArrayWrappersType.Variable}`
)
.option(
'--string-array-threshold <number>',
'The probability that the literal string will be inserted into stringArray (Default: 0.8, Min: 0, Max: 1)',