import { EventEmitter } from "events"; import { BuildData } from "../../data/build-data"; import { PrepareData } from "../../data/prepare-data"; import { IPlatformProjectServiceBase, IProjectData, IValidatePlatformOutput } from "../../definitions/project"; import { IOptions, IDependencyData } from "../../declarations"; import { IPlatformData } from "../../definitions/platform"; import { IPluginData } from "../../definitions/plugins"; import { IRelease, ISpawnResult } from "../../common/declarations"; import { IProjectChangesInfo, IPrepareInfo, IAddedNativePlatform } from "../../definitions/project-changes"; import { INotConfiguredEnvOptions } from "../../common/definitions/commands"; declare global { interface IBundlerCompilerService extends EventEmitter { compileWithWatch(platformData: IPlatformData, projectData: IProjectData, prepareData: IPrepareData): Promise; compileWithoutWatch(platformData: IPlatformData, projectData: IProjectData, prepareData: IPrepareData): Promise; stopBundlerCompiler(platform: string): Promise; } interface IBundlerEnvOptions { sourceMap?: boolean; uglify?: boolean; production?: boolean; } interface IProjectChangesService { checkForChanges(platformData: IPlatformData, projectData: IProjectData, prepareData: IPrepareData): Promise; getPrepareInfoFilePath(platformData: IPlatformData): string; getPrepareInfo(platformData: IPlatformData): IPrepareInfo; savePrepareInfo(platformData: IPlatformData, projectData: IProjectData, prepareData: IPrepareData): Promise; setNativePlatformStatus(platformData: IPlatformData, projectData: IProjectData, addedPlatform: IAddedNativePlatform): void; currentChanges: IProjectChangesInfo; } interface IFilesChangeEventData { platform: string; files: string[]; staleFiles: string[]; hmrData: IPlatformHmrData; hasOnlyHotUpdateFiles: boolean; hasNativeChanges: boolean; } interface IBundlerEmitMessage { emittedFiles: string[]; chunkFiles: string[]; hash: string; changedFiles?: string[]; isHMR?: boolean; filesToCopy?: string[]; buildType?: string; } interface IPlatformProjectService extends NodeJS.EventEmitter, IPlatformProjectServiceBase { getPlatformData(projectData: IProjectData): IPlatformData; validate(projectData: IProjectData, options: IOptions, notConfiguredEnvOptions?: INotConfiguredEnvOptions): Promise; createProject(frameworkDir: string, frameworkVersion: string, projectData: IProjectData): Promise; interpolateData(projectData: IProjectData): Promise; interpolateConfigurationFile(projectData: IProjectData): void; afterCreateProject(projectRoot: string, projectData: IProjectData): void; validateOptions(projectId?: string, provision?: true | string, teamId?: true | string): Promise; buildProject(projectRoot: string, projectData: IProjectData, buildConfig: TBuildData): Promise; prepareProject(projectData: IProjectData, prepareData: TPrepareData): Promise; prepareAppResources(projectData: IProjectData): void; isPlatformPrepared(projectRoot: string, projectData: IProjectData): boolean; preparePluginNativeCode(pluginData: IPluginData, options?: any): Promise; shouldRepreparePlugin?(pluginData: IPluginData, projectData: IProjectData): boolean; removePluginNativeCode(pluginData: IPluginData, projectData: IProjectData): Promise; beforePrepareAllPlugins(projectData: IProjectData, dependencies?: IDependencyData[]): Promise; handleNativeDependenciesChange(projectData: IProjectData, opts: IRelease): Promise; getAppResourcesDestinationDirectoryPath(projectData: IProjectData): string; cleanDeviceTempFolder(deviceIdentifier: string, projectData: IProjectData): Promise; processConfigurationFilesFromAppResources(projectData: IProjectData, opts: { release: boolean; }): Promise; ensureConfigurationFileInAppResources(projectData: IProjectData): void; stopServices?(projectRoot: string): Promise; cleanProject?(projectRoot: string): Promise; checkForChanges(changeset: IProjectChangesInfo, prepareData: TPrepareData, projectData: IProjectData): Promise; getDeploymentTarget?(projectData: IProjectData): any; } }