import type { BuildToolchain } from './build-toolchain.js'; /** * What the injected Safari packager reports back about the app it produced. * `bundleIdDerived` is the load-bearing one: a generated `dev.extensionjs.*` * identifier comes from the app name, so every project built from the same * source shares it and the first registration takes it. */ export interface SafariPackageSummary { appName?: string; bundleId?: string; bundleIdDerived?: boolean; /** The CFBundleShortVersionString and CFBundleVersion the app carries, * stamped from the manifest version. */ version?: string; appPath?: string; xcodeProjectPath?: string; macOsOnly?: boolean; } export type AddonLintSummary = { status: 'linted'; findings: number; } | { status: 'missing'; } | { status: 'failed'; reason: string; } | { status: 'skipped'; reason: 'disabled' | 'mode' | 'browser'; }; export type BuildSummary = { browser: string; buildType: 'production' | 'development'; /** Absolute dist directory the build emitted into. Hosts that shell out * would otherwise have to re-derive `/dist/` themselves. */ output_path?: string; /** The files the extension ships. Source maps are counted apart. */ total_assets: number; total_bytes: number; largest_asset_bytes: number; /** The `.map` files in the output folder, which no zip carries. Absent * when the build wrote none. */ source_map_assets?: number; source_map_bytes?: number; warnings_count: number; errors_count: number; /** Plain-text warning messages (ANSI-stripped, capped) so programmatic * consumers get a structured channel instead of scraping stdout. */ warnings?: string[]; /** What failed after the compile, such as an archive that was asked for * and not written. Absent on a green build. */ errors?: string[]; /** Present only for safari/webkit-based builds that ran the packager. */ safari?: SafariPackageSummary; addon_lint?: AddonLintSummary; /** The Node and package manager versions the build ran under, for the * reviewer note that asks a store to rebuild and compare. */ toolchain?: BuildToolchain; /** Archives this build wrote, with their promoted paths. The name is * rewritten from the manifest, so a caller reads it here rather than * composing it. Absent when neither --zip nor --zip-source was asked for. */ zip_artifacts?: Array<{ kind: 'source' | 'dist'; path: string; size: number; }>; }; export declare const MAX_SUMMARY_WARNINGS = 20; export declare function stripLoaderWrapper(message: string): string; export declare function getBuildSummary(browser: string, info: { assets?: Array<{ size?: number; }>; warnings?: unknown[]; errors?: unknown[]; } | null, outputPath?: string, outputFiles?: Array<{ size: number; name?: string; }>, codes?: ReadonlyMap, projectPath?: string): Omit;