export declare function packageRootsForModule(target: string, moduleName: string): string[]; /** True when the resolved package root contains package.json (ignores empty dirs). */ export declare function moduleExistsInNodeModules(target: string, moduleName: string): boolean; export declare function unresolvedModulesFromLogSlice(lines: string[], startIndex?: number): string[]; export declare function bundleErrorExcerptHash(excerpt: string): string; export interface LogBoundaryScan { lastErr: number; lastOk: number; } export declare function scanLogBoundaries(lines: string[], options: { errorPattern: RegExp; okPattern: RegExp; }): LogBoundaryScan; /** * Return the last capture group from `errorPattern` when the error is not * superseded by a later `okPattern` line (e.g. stale native-module errors). */ export declare function supersededErrorCapture(logText: string, options: { errorPattern: RegExp; okPattern: RegExp; }): string | null; export interface BundleLogAnalysis { status: 'ok' | 'errors' | 'bundling' | 'no-log'; reason?: 'bundle-error' | 'unresolved-module' | 'stale-bundle-error'; excerpt?: string; /** * Bare package specifiers cited by the active error. They are missing when * reason is unresolved-module and already installed when it is stale-bundle-error. */ unresolvedModules?: string[]; /** Relative or absolute source paths that require a code or bundler fix. */ sourceImports?: string[]; } export interface AnalyzeBundleLogOptions { target: string; logText: string; errorPattern: RegExp; okPattern: RegExp; bundlingPattern?: RegExp; } export declare function analyzeBundleLog(options: AnalyzeBundleLogOptions): BundleLogAnalysis; export interface PersistentBundleErrorDecision { blocked: boolean; excerptHash: string; } /** Block when the same bundle-error excerpt was already recorded for this target. */ export declare function evaluatePersistentBundleError(target: string, excerpt: string, stateFile?: string): PersistentBundleErrorDecision; //# sourceMappingURL=log-analysis.d.ts.map