@aikidosec/firewall
Version:
Zen by Aikido is an embedded Web Application Firewall that autonomously protects Node.js apps against common and critical attacks
21 lines (20 loc) • 813 B
TypeScript
import { BuiltinModule } from "./BuiltinModule";
import { Package } from "./Package";
/**
* Wraps the require function to intercept require calls.
* This function makes sure that the require function is only wrapped once.
*/
export declare function wrapRequire(): void;
/**
* Update the list of external packages that should be patched.
*/
export declare function setPackagesToPatch(packagesToPatch: Package[]): void;
/**
* Update the list of builtin modules that should be patched.
*/
export declare function setBuiltinModulesToPatch(builtinModulesToPatch: BuiltinModule[]): void;
/**
* Returns the unwrapped require function.
*/
export declare function getOriginalRequire(): (id: string) => any;
export declare function __internalRewritePackageName(packageName: string, aliasForTesting: string): void;