Default.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import { TInputOptions } from '../../types/options/TInputOptions';
  2. import { IdentifierNamesGenerator } from '../../enums/generators/identifier-names-generators/IdentifierNamesGenerator';
  3. import { ObfuscationTarget } from '../../enums/ObfuscationTarget';
  4. import { OptionsPreset } from '../../enums/options/presets/OptionsPreset';
  5. import { SourceMapMode } from '../../enums/source-map/SourceMapMode';
  6. import { StringArrayEncoding } from '../../enums/node-transformers/string-array-transformers/StringArrayEncoding';
  7. import { StringArrayWrappersType } from '../../enums/node-transformers/string-array-transformers/StringArrayWrappersType';
  8. export const DEFAULT_PRESET: TInputOptions = Object.freeze({
  9. compact: true,
  10. config: '',
  11. controlFlowFlattening: false,
  12. controlFlowFlatteningThreshold: 0.75,
  13. deadCodeInjection: false,
  14. deadCodeInjectionThreshold: 0.4,
  15. debugProtection: false,
  16. debugProtectionInterval: false,
  17. disableConsoleOutput: false,
  18. domainLock: [],
  19. exclude: [],
  20. identifierNamesGenerator: IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,
  21. identifiersPrefix: '',
  22. identifiersDictionary: [],
  23. inputFileName: '',
  24. log: false,
  25. numbersToExpressions: false,
  26. optionsPreset: OptionsPreset.Default,
  27. renameGlobals: false,
  28. renameProperties: false,
  29. reservedNames: [],
  30. reservedStrings: [],
  31. rotateStringArray: true,
  32. seed: 0,
  33. selfDefending: false,
  34. shuffleStringArray: true,
  35. simplify: true,
  36. sourceMap: false,
  37. sourceMapBaseUrl: '',
  38. sourceMapFileName: '',
  39. sourceMapMode: SourceMapMode.Separate,
  40. splitStrings: false,
  41. splitStringsChunkLength: 10,
  42. stringArray: true,
  43. stringArrayEncoding: [
  44. StringArrayEncoding.None
  45. ],
  46. stringArrayWrappersChainedCalls: true,
  47. stringArrayWrappersCount: 1,
  48. stringArrayWrappersType: StringArrayWrappersType.Variable,
  49. stringArrayThreshold: 0.75,
  50. target: ObfuscationTarget.Browser,
  51. transformObjectKeys: false,
  52. unicodeEscapeSequence: false
  53. });