///
import { Arch, DebugLogger, TmpDir } from "@delicate/builder-util";
import { CancellationToken } from "@delicate/builder-util-runtime";
import { EventEmitter } from "events";
import { AppInfo } from "./appInfo";
import { AfterPackContext, Configuration } from "./configuration";
import { Platform, SourceRepositoryInfo, Target } from "./core";
import { Framework } from "./Framework";
import { Metadata } from "./options/metadata";
import { ArtifactCreated, PackagerOptions } from "./packagerApi";
import { PlatformPackager } from "./platformPackager";
export declare class Packager {
readonly cancellationToken: CancellationToken;
readonly projectDir: string;
private _appDir;
readonly appDir: string;
private _metadata;
readonly metadata: Metadata;
private _isPrepackedAppAsar;
readonly isPrepackedAppAsar: boolean;
private _devMetadata;
readonly devMetadata: Metadata | null;
private _configuration;
readonly config: Configuration;
isTwoPackageJsonProjectLayoutUsed: boolean;
readonly eventEmitter: EventEmitter;
_appInfo: AppInfo | null;
readonly appInfo: AppInfo;
readonly tempDirManager: TmpDir;
private _repositoryInfo;
private readonly afterPackHandlers;
private readonly afterSignHandlers;
readonly options: PackagerOptions;
readonly debugLogger: DebugLogger;
readonly repositoryInfo: Promise;
private _productionDeps;
private readonly productionDeps;
private _electronDownloader;
electronDownloader: (options: any) => Promise;
stageDirPathCustomizer: (target: Target, packager: PlatformPackager, arch: Arch) => string;
private _buildResourcesDir;
readonly buildResourcesDir: string;
readonly relativeBuildResourcesDirname: string;
private _framework;
readonly framework: Framework;
constructor(options: PackagerOptions, cancellationToken?: CancellationToken);
addAfterPackHandler(handler: (context: AfterPackContext) => Promise | null): void;
addAfterSignHandler(handler: (context: AfterPackContext) => Promise | null): void;
artifactCreated(handler: (event: ArtifactCreated) => void): Packager;
dispatchArtifactCreated(event: ArtifactCreated): void;
build(): Promise;
_build(configuration: Configuration, metadata: Metadata, devMetadata: Metadata | null, repositoryInfo?: SourceRepositoryInfo): Promise;
private readProjectMetadataIfTwoPackageStructureOrPrepacked;
private doBuild;
private createHelper;
private installAppDependencies;
afterPack(context: AfterPackContext): Promise;
afterSign(context: AfterPackContext): Promise;
}
export interface BuildResult {
readonly outDir: string;
readonly platformToTargets: Map>;
}