import type { Agent } from './package-environment.mts'; import type { SocketYml } from '@socketsecurity/config'; import type { SocketSdkSuccessResult } from '@socketsecurity/sdk'; import type { Options as GlobOptions } from 'fast-glob'; // fast-glob silently discards `ignore` entries that end in `/` (it // treats them as literal directory paths, not glob patterns). The // gitignore convention of writing directory entries as `dist/` lands // here as `**/dist/` after `ignorePatternToMinimatch`, which fast-glob // then drops — defeating the entire ignore. Strip the trailing slash // so fast-glob actually honors the pattern. export declare function stripTrailingSlash(pattern: string): string; export declare function filterBySupportedScanFiles(filepaths: string[] | readonly string[], supportedFiles: SocketSdkSuccessResult<'getReportSupportedFiles'>['data']): string[]; export declare function createSupportedFilesFilter(supportedFiles: SocketSdkSuccessResult<'getReportSupportedFiles'>['data']): (filepath: string) => boolean; export declare function getSupportedFilePatterns(supportedFiles: SocketSdkSuccessResult<'getReportSupportedFiles'>['data']): string[]; type GlobWithGitIgnoreOptions = GlobOptions & { // Already-anchored minimatch patterns merged into fast-glob's `ignore` // option in every code path. These bypass the gitignore translator and // the `ignore` package matcher entirely; use this channel for CLI flags // whose contract is anchored micromatch from `cwd` (e.g. --exclude-paths). // Patterns in `socketConfig.projectIgnorePaths` and discovered `.gitignore` // files take the other channel: they're gitignore-translated first. additionalIgnores?: readonly string[] | undefined; // Optional filter function to apply during streaming. // When provided, only files passing this filter are accumulated. // This is critical for memory efficiency when scanning large monorepos. filter?: ((filepath: string) => boolean) | undefined; socketConfig?: SocketYml | undefined; }; export declare function globWithGitIgnore(patterns: string[] | readonly string[], options: GlobWithGitIgnoreOptions): Promise; export declare function globWorkspace(agent: Agent, cwd?: string): Promise; export declare function isReportSupportedFile(filepath: string, supportedFiles: SocketSdkSuccessResult<'getReportSupportedFiles'>['data']): boolean; export declare function pathsToGlobPatterns(paths: string[] | readonly string[], cwd?: string | undefined): string[]; export {}; //# sourceMappingURL=glob.d.mts.map