import { PhysicalFile } from './check-parser/parser.js'; export interface ResolveBundleFilesOptions { /** Absolute paths matched by the include globs. */ matchedPaths: string[]; /** Archive root. Every archive path is relative to this. */ bundleRoot: string; /** Directory the ignore patterns are relative to (the include glob's cwd). */ ignoreCwd: string; ignorePatterns: string[]; /** * Paths that files in the bundle refer to by spelling — e.g. a Playwright * config's testDir or globalSetup, exactly as written. Content discovery * resolves such paths through any symlinks and bundles the real files, but * the reference itself still reads the original spelling at run time, so * every symlink it traverses must exist in the archive for it to resolve. * The links are carried as symlink entries only; what they point at is * bundled by whoever discovered the content. */ referencedPaths?: string[]; /** * The workspace's member packages, in any order. A package link whose target * is a member directory — and whose node_modules name matches the member's * package name, so the import parser can resolve it — gets selective * treatment: link + manifest + whatever was matched through it, instead of * whole-directory expansion, mirroring how non-linked workspace dependencies * are bundled. Empty or absent means no workspace: every in-root link target * keeps the expansion behaviour. */ workspaceMembers?: Array<{ path: string; name: string; }>; } /** * Turns the paths matched by the include globs into archive entries, resolving * symlinks so that the resulting archive is both extractable and usable. * * Two problems make this necessary. * * Extractability: glob's `nodir` option filters on lstat, so a symlink pointing * at a directory is reported as if it were a regular file, while glob separately * walks *through* that same symlink and reports the files beneath it. Archiving * both yields a path that is simultaneously a symlink and a directory, which tar * refuses to extract. Package managers that link packages out of a shared store * (pnpm) make that the ordinary shape of node_modules. * * Usability: simply dereferencing the symlink does not work either. Under pnpm a * package's dependencies are siblings of it inside the store, not children, so a * flattened copy of node_modules/ cannot resolve anything it depends on. * * The archive therefore keeps symlinks as symlinks and brings their targets * along, which reproduces the layout the package manager built. The invariant * that makes it extractable: an entry is either a symlink, which by construction * never has children, or a regular file at a symlink-free archive path. */ export declare function resolveBundleFiles(options: ResolveBundleFilesOptions): Promise;