/** * `MockSbomGenerator` — an in-memory fake of `SbomGenerator` * (../sbom-generator.ts) for tests. No live `syft`/`docker buildx`/ * `cyclonedx-maven`/`cdxgen`, no network: every method records its call and * returns a deterministic, canned `SbomDocument` derived from its inputs, the * same convention `../__tests__/mock-cloud-executor.ts` uses for * `CloudExecutor` (a fake digest suffix derived from the call's arguments, * stable across calls with the same args). * * Every test that exercises `generate-sbom` (../sbom.ts) builds one * `MockSbomGenerator` and passes it to `createGenerateSbomCapability`, * never touching a real scanner. */ import type { SbomGenerator } from "../sbom-generator.js"; export interface RecordedSbomCall { method: "forImage" | "forJar" | "forZip" | "forDir"; args: unknown; } export interface MockSbomGeneratorOptions { /** Force every call to fail (simulates a scanner crash/timeout). */ fail?: boolean; /** Package count reported for every generated SBOM. Default: 3. */ packageCount?: number; /** Generator/tool name reported. Default: "mock-syft". */ generatorName?: string; } export interface MockSbomGenerator { generator: SbomGenerator; calls: RecordedSbomCall[]; } /** Build a fresh mock `SbomGenerator`. Every method is deterministic and synchronous-fast — no real scan delay. */ export declare function createMockSbomGenerator(options?: MockSbomGeneratorOptions): MockSbomGenerator; //# sourceMappingURL=mock-sbom-generator.d.ts.map