IOptions.ts 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import { TIdentifierNamesCache } from '../../types/caches/TIdentifierNamesCache';
  2. import { TOptionsPreset } from '../../types/options/TOptionsPreset';
  3. import { TStringArrayIndexesType } from '../../types/options/TStringArrayIndexesType';
  4. import { TStringArrayEncoding } from '../../types/options/TStringArrayEncoding';
  5. import { TStringArrayWrappersType } from '../../types/options/TStringArrayWrappersType';
  6. import { TRenamePropertiesMode } from '../../types/options/TRenamePropertiesMode';
  7. import { TTypeFromEnum } from '../../types/utils/TTypeFromEnum';
  8. import { IdentifierNamesGenerator } from '../../enums/generators/identifier-names-generators/IdentifierNamesGenerator';
  9. import { ObfuscationTarget } from '../../enums/ObfuscationTarget';
  10. import { SourceMapMode } from '../../enums/source-map/SourceMapMode';
  11. export interface IOptions {
  12. readonly compact: boolean;
  13. readonly controlFlowFlattening: boolean;
  14. readonly controlFlowFlatteningThreshold: number;
  15. readonly deadCodeInjection: boolean;
  16. readonly deadCodeInjectionThreshold: number;
  17. readonly debugProtection: boolean;
  18. readonly debugProtectionInterval: boolean;
  19. readonly disableConsoleOutput: boolean;
  20. readonly domainLock: string[];
  21. readonly forceTransformStrings: string[];
  22. readonly identifierNamesCache: TIdentifierNamesCache | null;
  23. readonly identifierNamesGenerator: TTypeFromEnum<typeof IdentifierNamesGenerator>;
  24. readonly identifiersDictionary: string[];
  25. readonly identifiersPrefix: string;
  26. readonly ignoreRequireImports: boolean;
  27. readonly inputFileName: string;
  28. readonly log: boolean;
  29. readonly numbersToExpressions: boolean;
  30. readonly optionsPreset: TOptionsPreset;
  31. readonly renameGlobals: boolean;
  32. readonly renameProperties: boolean;
  33. readonly renamePropertiesMode: TRenamePropertiesMode;
  34. readonly reservedNames: string[];
  35. readonly reservedStrings: string[];
  36. readonly rotateStringArray: boolean;
  37. readonly seed: string | number;
  38. readonly selfDefending: boolean;
  39. readonly shuffleStringArray: boolean;
  40. readonly simplify: boolean;
  41. readonly sourceMap: boolean;
  42. readonly sourceMapBaseUrl: string;
  43. readonly sourceMapFileName: string;
  44. readonly sourceMapMode: TTypeFromEnum<typeof SourceMapMode>;
  45. readonly splitStrings: boolean;
  46. readonly splitStringsChunkLength: number;
  47. readonly stringArray: boolean;
  48. readonly stringArrayEncoding: TStringArrayEncoding[];
  49. readonly stringArrayIndexesType: TStringArrayIndexesType[];
  50. readonly stringArrayIndexShift: boolean;
  51. readonly stringArrayWrappersChainedCalls: boolean;
  52. readonly stringArrayWrappersCount: number;
  53. readonly stringArrayWrappersParametersMaxCount: number;
  54. readonly stringArrayWrappersType: TStringArrayWrappersType;
  55. readonly stringArrayThreshold: number;
  56. readonly target: TTypeFromEnum<typeof ObfuscationTarget>;
  57. readonly transformObjectKeys: boolean;
  58. readonly unicodeEscapeSequence: boolean;
  59. }