import { type Warning, type Dependency, type AstAnalyserOptions } from "@nodesecure/js-x-ray"; import * as conformance from "@nodesecure/conformance"; import { ManifestManager } from "@nodesecure/mama"; import pacote from "pacote"; import type { ScanResultPayload, DependencyRef } from "./types.ts"; import type { Path } from "./class/SourceCodeScanner.class.ts"; export interface ScanOptions { astAnalyserOptions?: AstAnalyserOptions; } export declare function scanPackageCore(locationOrManifest: string | ManifestManager, astAnalyserOptions?: AstAnalyserOptions): Promise; export declare function scanDirOrArchive(locationOrManifest: string | ManifestManager, ref: DependencyRef, options?: ScanOptions): Promise; export interface ScannedPackageResult { files: { /** Complete list of files for the given package */ list: string[]; /** Complete list of extensions (.js, .md etc.) */ extensions: string[]; /** List of minified javascript files */ minified: string[]; }; /** Size of the directory in bytes */ directorySize: number; /** Unique license contained in the tarball (MIT, ISC ..) */ uniqueLicenseIds: string[]; /** All licenses with their SPDX */ licenses: conformance.SpdxFileLicenseConformance[]; ast: { dependencies: Record>; warnings: Warning[]; }; path: Path; } export declare function scanPackage(manifestOrLocation: string | ManifestManager, options?: ScanOptions): Promise; export interface PacoteProvider { extract(spec: string, destination: string, options: pacote.Options): Promise; } export interface TarballResolutionOptions { spec: string; registry?: string; pacoteProvider?: PacoteProvider; } export declare function extractAndResolve(location: string, options: TarballResolutionOptions): Promise; //# sourceMappingURL=tarball.d.ts.map