import type Matchers from '@codemod/matchers'; import * as m from '@codemod/matchers'; import type { Sandbox } from './deobfuscate'; import type { Bundle } from './unpack'; export { type Sandbox } from './deobfuscate'; type Matchers = typeof m; export interface WebcrackResult { code: string; bundle: Bundle | undefined; /** * Save the deobufscated code and the extracted bundle to the given directory. * @param path Output directory */ save(path: string): Promise; } export interface Options { /** * Decompile react components to JSX. * @default true */ jsx?: boolean; /** * Extract modules from the bundle. * @default true */ unpack?: boolean; /** * Deobfuscate the code. * @default true */ deobfuscate?: boolean; /** * Unminify the code. Required for some of the deobfuscate/unpack/jsx transforms. * @default true */ unminify?: boolean; /** * Mangle variable names. * @default false */ mangle?: boolean; /** * Assigns paths to modules based on the given matchers. * This will also rewrite `require()` calls to use the new paths. * * @example * ```js * m => ({ * './utils/color.js': m.regExpLiteral('^#([0-9a-f]{3}){1,2}$') * }) * ``` */ mappings?: (m: Matchers) => Record>; /** * Function that executes a code expression and returns the result (typically from the obfuscator). */ sandbox?: Sandbox; /** * @param progress Progress in percent (0-100) */ onProgress?: (progress: number) => void; } export declare function webcrack(code: string, options?: Options): Promise; //# sourceMappingURL=index.d.ts.map