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.

15 lines (14 loc) 1.23 kB
import { Package } from "../Package"; import { BuiltinModule } from "../BuiltinModule"; import type { FileCallbackInfoObj, IntereptorCallbackInfoObj, PackageFileInstrumentationInstructionJSON } from "./types"; import { RequireInterceptor } from "../RequireInterceptor"; export declare function setPackagesToInstrument(_packages: Package[]): void; export declare function setBuiltinsToInstrument(builtinModules: BuiltinModule[]): void; export declare function shouldPatchPackage(name: string): boolean; export declare function getPackageFileInstrumentationInstructions(packageName: string, version: string, filePath: string): PackageFileInstrumentationInstructionJSON | undefined; export declare function shouldPatchFile(packageName: string, filePath: string): boolean; export declare function getFunctionCallbackInfo(identifier: string): IntereptorCallbackInfoObj | undefined; export declare function getBuiltinInterceptors(name: string): RequireInterceptor[]; export declare function shouldPatchBuiltin(name: string): boolean; export declare function getFileCallbackInfo(identifier: string): FileCallbackInfoObj | undefined; export declare function __internalRewritePackageNamesForTesting(rewrite: Record<string, string>): void;