export declare abstract class SetupCommand { readonly commandType = "setup"; /** * Executes the command */ abstract execute(): Promise; } export declare class SetupCommandChain { private commands; constructor(commands: SetupCommand[]); /** * Executes all commands in the chain */ execute(): Promise; } export declare abstract class AdaptCommand { readonly commandType = "adapt"; abstract accept(filename: string): boolean; /** * Executes the command on the specified file * @param files - Map of all files being processed * @param filename - The current file being processed */ abstract execute(files: Map, filename: string): Promise; } export declare abstract class MergeCommand { readonly commandType = "merge"; abstract accept(filename: string): boolean; /** * Executes the command on the specified file * @param files - Map of all files being processed * @param filename - The current file being processed * @param appVariantContent - Content from the app variant */ abstract execute(files: Map, filename: string, appVariantContent: string): Promise; } export declare abstract class ManifestUpdateCommand { readonly commandType = "manifestUpdate"; /** * The command modifies the manifest in-place. * @param manifest base app manifest content as JSON object. */ abstract execute(manifest: any): Promise; } export declare class ManifestUpdateCommandChain extends AdaptCommand { private commands; constructor(commands?: ManifestUpdateCommand[]); accept: (filename: string) => filename is "manifest.json"; execute(files: Map, filename: string): Promise; } export declare abstract class PostCommand { readonly commandType = "post"; /** * Executes the command on the specified file * @param files - Map of all files being processed */ abstract execute(files: Map): Promise; } /** * CommandChain implements the Chain of Responsibility pattern * It manages a collection of commands and executes them in sequence */ export declare class PostCommandChain { protected commands: PostCommand[]; constructor(commands?: PostCommand[]); /** * Executes all commands in the chain that accept the given filename * @param files - Map of all files being processed */ execute(files: ReadonlyMap): Promise>; } export declare class AdaptCommandChain { private files; private appVariantFiles; private adaptCommands; private mergeCommands; constructor(files: ReadonlyMap, appVariantFiles: ReadonlyMap, commands: (AdaptCommand | MergeCommand)[]); execute(): Promise>; } export interface IPromiseCommand { result: Promise; }