import { z } from "zod"; /** * CI-runnable leak detection across an XCUITest run. * * Flow: * 1. Build the project for testing (`xcodebuild build-for-testing`). * 2. Launch the simulator + app via `xcodebuild test -only-testing:` running * a no-op test that just brings the app up. * 3. Capture a baseline `.memgraph` while the app is idle. * 4. Run the actual XCUITest cycle the user provided. * 5. Capture an "after" `.memgraph`. * 6. Diff the two and fail (return ok:false) if new ROOT CYCLEs appear that * aren't in the user's allowlist. * * The tool deliberately does NOT spin up its own simulator UI — it expects the * user has a simulator already booted and an app installed (per XCUITest's * normal contract). We only orchestrate captures around the test execution. */ export declare const detectLeaksInXCUITestSchema: z.ZodObject<{ workspace: z.ZodString; scheme: z.ZodString; testIdentifier: z.ZodString; appName: z.ZodString; destination: z.ZodDefault; outputDir: z.ZodDefault; allowlistPatterns: z.ZodDefault>; skipBuild: z.ZodDefault; outputHtmlPath: z.ZodOptional; }, "strip", z.ZodTypeAny, { appName: string; workspace: string; scheme: string; destination: string; outputDir: string; allowlistPatterns: string[]; skipBuild: boolean; testIdentifier: string; outputHtmlPath?: string | undefined; }, { appName: string; workspace: string; scheme: string; testIdentifier: string; destination?: string | undefined; outputDir?: string | undefined; allowlistPatterns?: string[] | undefined; skipBuild?: boolean | undefined; outputHtmlPath?: string | undefined; }>; export type DetectLeaksInXCUITestInput = z.infer; export interface XCUITestLeakResult { ok: boolean; /** True when no new (non-allowlisted) ROOT CYCLEs appeared after the test. */ passed: boolean; baselineMemgraph: string; afterMemgraph: string; testIdentifier: string; totals: { baselineLeaks: number; afterLeaks: number; leakDelta: number; }; newCycles: Array<{ rootClass: string; chainLength: number; /** True when this cycle matches an allowlist pattern. */ allowlisted: boolean; }>; failureReason?: string; steps: string[]; /** Absolute path to the rendered HTML report when `outputHtmlPath` was set. */ htmlReportPath?: string; } export declare function detectLeaksInXCUITest(input: DetectLeaksInXCUITestInput): Promise;