import type { ResolvedModule } from './discover.js'; import type { DiffMode } from './changed-files.js'; export interface ScopeResult { readonly modules: ReadonlySet; readonly all: boolean; /** * The affected set could not be computed (no git, no base branch, …) so the * scope was widened to every module rather than silently scoped to nothing. * The caller should log this loudly. Issue #325. */ readonly failedOpen?: boolean; /** * Human-readable statement of what this scope was computed FROM — the diff * mode, base ref, and file count, or the flag that pinned it. Callers print * it next to any result they report, so scope-of-invocation is always * visible next to scope-of-claim and a green can never silently rest on an * empty basis. */ readonly basis: string; } export type ScopeMode = { kind: 'all'; } | { kind: 'module'; path: string; } | { kind: 'diff'; mode: DiffMode; }; /** * `configDir` anchors the diff: module paths are relative to the directory * holding pipework.config.ts, so `changedFiles` must report paths in that same * coordinate system. Passing the invocation cwd here reintroduces the * path-prefix mismatch that made every scoped run widen to all modules * whenever the config dir sat below the git toplevel. */ export declare function resolveAffected(configDir: string, resolvedModules: readonly ResolvedModule[], projectName: string, scope: ScopeMode, baseBranches?: readonly string[]): ScopeResult; //# sourceMappingURL=affected.d.ts.map