UNPKG

@aikidosec/firewall

Version:

Zen by Aikido is an embedded Application Firewall that autonomously protects Node.js apps against common and critical attacks, provides rate limiting, detects malicious traffic (including bots), and more.

21 lines (20 loc) 813 B
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;