@contentstack/cli-cm-clone
Version:
Contentstack stack clone plugin
32 lines (31 loc) • 1.57 kB
TypeScript
import { ICommand, OrgCommandParams, StackCommandParams, BranchCommandParams, CreateStackCommandParams } from '../../types/command-types';
/**
* Base command class implementing the command pattern
*/
export declare class BaseCommand implements ICommand {
private executeFn;
private undoFn?;
params?: any;
constructor(executeFn: (params?: any) => Promise<any>, undoFn?: (params?: any) => Promise<void>, params?: any);
execute(params?: any): Promise<any>;
undo(params?: any): Promise<void>;
}
/**
* Command factory functions
*/
export declare function HandleOrgCommand(params: OrgCommandParams, parentContext: any): ICommand;
export declare function HandleStackCommand(params: StackCommandParams, parentContext: any): ICommand;
export declare function HandleBranchCommand(params: BranchCommandParams, parentContext: any, backStepHandler?: (params?: any) => Promise<void>): ICommand;
export declare function HandleDestinationStackCommand(params: StackCommandParams, parentContext: any): ICommand;
export declare function HandleExportCommand(params: any, parentContext: any): ICommand;
export declare function SetBranchCommand(params: any, parentContext: any): ICommand;
export declare function CreateNewStackCommand(params: CreateStackCommandParams, parentContext: any): ICommand;
export declare function CloneTypeSelectionCommand(params: any, parentContext: any): ICommand;
/**
* Clone command executor class
*/
export declare class Clone {
private commands;
execute(command: ICommand): Promise<any>;
undo(): Promise<void>;
}