@nodesecure/tarball
Version:
NodeSecure tarball scanner
30 lines • 1.23 kB
TypeScript
import * as conformance from "@nodesecure/conformance";
import { ManifestManager, type LocatedManifestManager } from "@nodesecure/mama";
import { AstAnalyser, type AstAnalyserOptions } from "@nodesecure/js-x-ray";
import { SourceCodeReport } from "./SourceCodeScanner.class.ts";
import { type TarballComposition } from "../utils/index.ts";
import { type Resolver } from "./DnsResolver.class.ts";
export interface ScannedFilesResult {
composition: TarballComposition;
conformance: conformance.SpdxExtractedResult;
code: SourceCodeReport;
}
export interface NpmTarballScanFilesOptions {
/**
* List of files and directories to exclude from the scan.
* Support glob patterns (e.g., "node_modules/**", "dist/**")
*/
exclude?: string[];
}
export type NpmTarballOptions = {
resolver?: Resolver;
astAnalyser?: AstAnalyser;
};
export declare class NpmTarball {
#private;
static JS_EXTENSIONS: Set<string>;
manifest: LocatedManifestManager;
constructor(mama: ManifestManager, options?: NpmTarballOptions);
scanFiles(astAnalyserOptions?: AstAnalyserOptions, options?: NpmTarballScanFilesOptions): Promise<ScannedFilesResult>;
}
//# sourceMappingURL=NpmTarball.class.d.ts.map