IOptions.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { TypeFromEnum } from '@gradecam/tsenum';
  2. import { TStringArrayEncoding } from '../../types/options/TStringArrayEncoding';
  3. import { IdentifierNamesGenerator } from '../../enums/generators/identifier-names-generators/IdentifierNamesGenerator';
  4. import { ObfuscationTarget } from '../../enums/ObfuscationTarget';
  5. import { SourceMapMode } from '../../enums/source-map/SourceMapMode';
  6. export interface IOptions {
  7. readonly compact: boolean;
  8. readonly controlFlowFlattening: boolean;
  9. readonly controlFlowFlatteningThreshold: number;
  10. readonly deadCodeInjection: boolean;
  11. readonly deadCodeInjectionThreshold: number;
  12. readonly debugProtection: boolean;
  13. readonly debugProtectionInterval: boolean;
  14. readonly disableConsoleOutput: boolean;
  15. readonly domainLock: string[];
  16. readonly identifierNamesGenerator: TypeFromEnum<typeof IdentifierNamesGenerator>;
  17. readonly identifiersDictionary: string[];
  18. readonly identifiersPrefix: string;
  19. readonly inputFileName: string;
  20. readonly inputFilePath: string;
  21. readonly log: boolean;
  22. readonly renameGlobals: boolean;
  23. readonly reservedNames: string[];
  24. readonly reservedStrings: string[];
  25. readonly rotateStringArray: boolean;
  26. readonly seed: string | number;
  27. readonly selfDefending: boolean;
  28. readonly shuffleStringArray: boolean;
  29. readonly sourceMap: boolean;
  30. readonly sourceMapBaseUrl: string;
  31. readonly sourceMapFileName: string;
  32. readonly sourceMapMode: TypeFromEnum<typeof SourceMapMode>;
  33. readonly splitStrings: boolean;
  34. readonly splitStringsChunkLength: number;
  35. readonly stringArray: boolean;
  36. readonly stringArrayEncoding: TStringArrayEncoding;
  37. readonly stringArrayThreshold: number;
  38. readonly target: TypeFromEnum<typeof ObfuscationTarget>;
  39. readonly transformObjectKeys: boolean;
  40. readonly unicodeEscapeSequence: boolean;
  41. }