relative / synchrony

javascript-obfuscator cleaner & deobfuscator
https://deobfuscate.relative.im/
GNU General Public License v3.0
840 stars 108 forks source link

User transformers #60

Closed e9x closed 1 year ago

e9x commented 1 year ago
  1. Move the TransformerArray into the Context file.
  2. Add support for user-supplied transformers.
  3. Replace esbuild with TSC for building the library.
  4. Allow custom transformers for renamers.

These changes enable users to create their own transformers by passing the constructor into the customTransformers array and specify the transformers they want to use for renaming variables. Although multiple renamers may cause issues, it provides flexibility for using custom renamers.

The removal of esbuild is justified since it only builds a single file, which limits the ability to have custom transformers. By using TSC, user code can access private APIs inside synchrony, allowing for better customizability.

These enhancements cater to specific use cases, such as fixing only certain renamed variables in obfuscated code, and provide greater flexibility for users working with the library.