@nodesecure/scanner
Version:
A package API to run a static analysis of your module's dependencies.
26 lines • 1.38 kB
TypeScript
import pacote from "pacote";
import * as tarball from "@nodesecure/tarball";
import type { PackageJSON } from "@nodesecure/npm-types";
import type Config from "@npmcli/config";
import { depWalker } from "./depWalker.ts";
import { Logger, ScannerLoggerEvents } from "./class/logger.class.ts";
import { comparePayloads } from "./comparePayloads.ts";
import type { Options, Payload } from "./types.ts";
export * from "./types.ts";
export * from "./extractors/index.ts";
export type WorkingDirOptions = Options & {
/**
* NPM runtime configuration (such as local .npmrc file)
* It is optionally used to fetch registry authentication tokens
*/
npmRcConfig?: Config;
cacheLookup?: (packageJSON: PackageJSON, integrity: string | null) => Promise<Payload | null>;
};
export declare function workingDir(location?: string, options?: WorkingDirOptions, logger?: Logger): Promise<Payload>;
export type FromOptions = Omit<Options, "includeDevDeps"> & {
cacheLookup?: (manifest: pacote.AbbreviatedManifest & pacote.ManifestResult) => Promise<Payload | null>;
};
export declare function from(spec: string, options?: FromOptions, logger?: Logger): Promise<Payload>;
export declare function verify(spec?: string): Promise<tarball.ScannedPackageResult>;
export { depWalker, tarball, comparePayloads, Logger, ScannerLoggerEvents };
//# sourceMappingURL=index.d.ts.map