NoCustomNodes.ts 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 { RenamePropertiesMode } from '../../enums/node-transformers/rename-properties-transformers/RenamePropertiesMode';
  5. import { SourceMapMode } from '../../enums/source-map/SourceMapMode';
  6. import { SourceMapSourcesMode } from '../../enums/source-map/SourceMapSourcesMode';
  7. import { StringArrayEncoding } from '../../enums/node-transformers/string-array-transformers/StringArrayEncoding';
  8. import { StringArrayWrappersType } from '../../enums/node-transformers/string-array-transformers/StringArrayWrappersType';
  9. import { StringArrayIndexesType } from '../../enums/node-transformers/string-array-transformers/StringArrayIndexesType';
  10. export const NO_ADDITIONAL_NODES_PRESET: TInputOptions = Object.freeze({
  11. compact: true,
  12. controlFlowFlattening: false,
  13. controlFlowFlatteningThreshold: 0,
  14. deadCodeInjection: false,
  15. deadCodeInjectionThreshold: 0,
  16. debugProtection: false,
  17. debugProtectionInterval: false,
  18. disableConsoleOutput: false,
  19. domainLock: [],
  20. domainLockRedirectUrl: 'about:blank',
  21. exclude: [],
  22. forceTransformStrings: [],
  23. identifierNamesGenerator: IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,
  24. identifiersPrefix: '',
  25. identifiersDictionary: [],
  26. ignoreImports: false,
  27. inputFileName: '',
  28. log: false,
  29. numbersToExpressions: false,
  30. renameGlobals: false,
  31. renameProperties: false,
  32. renamePropertiesMode: RenamePropertiesMode.Safe,
  33. reservedNames: [],
  34. reservedStrings: [],
  35. stringArrayRotate: false,
  36. seed: 0,
  37. selfDefending: false,
  38. stringArrayShuffle: false,
  39. simplify: false,
  40. sourceMap: false,
  41. sourceMapBaseUrl: '',
  42. sourceMapFileName: '',
  43. sourceMapMode: SourceMapMode.Separate,
  44. sourceMapSourcesMode: SourceMapSourcesMode.SourcesContent,
  45. splitStrings: false,
  46. splitStringsChunkLength: 0,
  47. stringArray: false,
  48. stringArrayEncoding: [
  49. StringArrayEncoding.None
  50. ],
  51. stringArrayIndexesType: [
  52. StringArrayIndexesType.HexadecimalNumber
  53. ],
  54. stringArrayIndexShift: false,
  55. stringArrayWrappersChainedCalls: false,
  56. stringArrayWrappersCount: 0,
  57. stringArrayWrappersParametersMaxCount: 2,
  58. stringArrayWrappersType: StringArrayWrappersType.Variable,
  59. stringArrayThreshold: 0,
  60. target: ObfuscationTarget.Browser,
  61. transformObjectKeys: false,
  62. unicodeEscapeSequence: false
  63. });