import { DependencyRef, DepEcosystem, RemoteDepSpec } from './types.js'; export interface CollectOptions { /** Glob patterns (relative to the scan root) to exclude. */ ignore?: string[]; /** Also extract bare import specifiers from source files (default true). */ includeImports?: boolean; } export interface CollectResult { refs: DependencyRef[]; /** Dependencies declared with non-registry specifiers (git remotes, archive URLs). */ remoteSpecs: RemoteDepSpec[]; scannedFiles: string[]; /** Non-fatal problems, e.g. unparseable manifests. */ warnings: string[]; } /** Remove Python string literals (incl. docstrings) and # comments so example code inside them is not treated as real imports. */ export declare function stripPyLiterals(content: string): string; /** Remove JS/TS block and line comments so commented-out imports are not collected. */ export declare function stripJsComments(content: string): string; /** Reduce an npm import specifier to its package name (`@scope/pkg/sub` → `@scope/pkg`). */ export declare function npmPackageFromSpecifier(spec: string): string | undefined; export declare function extractJsImports(content: string): string[]; export declare function extractPyImports(content: string): string[]; /** PEP 508 direct reference: `name @ ` (environment markers after ';' ignored). */ export declare function directUrlRequirement(line: string): { name: string; spec: string; } | undefined; /** Strip a PEP 508 requirement line down to the distribution name. */ export declare function parseRequirementLine(line: string): string | undefined; /** * Collect dependency references from manifests (package.json, requirements*.txt, * pyproject.toml) and, optionally, bare import specifiers in source files. * Import-origin refs are only reported when not already declared in a manifest. */ export declare function collectDependencies(dir: string, opts?: CollectOptions): CollectResult; export declare function normalizeName(name: string, ecosystem: DepEcosystem): string;