Default.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. forceTransformStrings: [],
  21. identifierNamesGenerator: IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,
  22. identifiersPrefix: '',
  23. identifiersDictionary: [],
  24. inputFileName: '',
  25. log: false,
  26. numbersToExpressions: false,
  27. optionsPreset: OptionsPreset.Default,
  28. renameGlobals: false,
  29. renameProperties: false,
  30. reservedNames: [],
  31. reservedStrings: [],
  32. rotateStringArray: true,
  33. seed: 0,
  34. selfDefending: false,
  35. shuffleStringArray: true,
  36. simplify: true,
  37. sourceMap: false,
  38. sourceMapBaseUrl: '',
  39. sourceMapFileName: '',
  40. sourceMapMode: SourceMapMode.Separate,
  41. splitStrings: false,
  42. splitStringsChunkLength: 10,
  43. stringArray: true,
  44. stringArrayEncoding: [
  45. StringArrayEncoding.None
  46. ],
  47. stringArrayWrappersChainedCalls: true,
  48. stringArrayWrappersCount: 1,
  49. stringArrayWrappersType: StringArrayWrappersType.Variable,
  50. stringArrayThreshold: 0.75,
  51. target: ObfuscationTarget.Browser,
  52. transformObjectKeys: false,
  53. unicodeEscapeSequence: false
  54. });