/** * @file Socket Firewall integration for dlx installs. * * - `npmPurl` — build a PURL string for an npm package * - `checkFirewallPurls` — scan an Arborist ideal tree against the public * Socket Firewall API; throws if any dep is critical/high Split out of * `dlx/package.ts` so the firewall logic + PURL helper can be reused by * other dlx flows without dragging in the install orchestrator. */ import type Arborist from '../external/@npmcli/arborist.js'; export interface FirewallAlert { severity?: string | undefined; type?: string | undefined; key?: string | undefined; } export interface FirewallResponse { alerts?: FirewallAlert[] | undefined; } /** * Check all resolved packages in an Arborist ideal tree against the public * Socket Firewall API, which requires no auth. Throws if any dependency has * critical or high severity alerts. * * @private * * @param arb - Arborist instance with populated idealTree. * @param requestedPackage - Top-level package name, used in error messages. */ export declare function checkFirewallPurls(arb: InstanceType, requestedPackage: string): Promise; /** * Build a PURL string for an npm package. Follows the PURL spec for the npm * type: - Scoped: `@scope/pkg` → `pkg:npm/%40scope/pkg@version` - Unscoped: * `pkg` → `pkg:npm/pkg@version` */ export declare function npmPurl(name: string, version: string): string;