@devicecloud.dev/dcd
Version:
Better cloud maestro testing
71 lines (70 loc) • 2.19 kB
TypeScript
/** Email notification configuration */
interface INotificationsConfig {
email?: {
enabled?: boolean;
onSuccess?: boolean;
recipients?: string[];
};
}
/** Workspace configuration from config.yaml */
interface IWorkspaceConfig {
excludeTags?: null | string[];
executionOrder?: IExecutionOrder | null;
flows?: null | string[];
includeTags?: null | string[];
local?: ILocal | null;
notifications?: INotificationsConfig;
}
/** Local execution configuration */
interface ILocal {
deterministicOrder: boolean | null;
}
/** Sequential execution configuration */
interface IExecutionOrder {
continueOnFailure: boolean;
flowsOrder: string[];
}
/** Options for execution plan generation */
export interface PlanOptions {
configFile?: string;
debug?: boolean;
excludeFlows?: string[];
excludeTags?: string[];
includeTags?: string[];
input: string;
}
/** Execution plan containing all flows to run with metadata and dependencies */
export interface IExecutionPlan {
allExcludeTags?: null | string[];
allIncludeTags?: null | string[];
flowMetadata: Record<string, Record<string, unknown>>;
flowOverrides: Record<string, Record<string, unknown>>;
flowsToRun: string[];
referencedFiles: string[];
sequence?: IFlowSequence | null;
totalFlowFiles: number;
workspaceConfig?: IWorkspaceConfig;
}
/** Flow sequence configuration for ordered execution */
interface IFlowSequence {
continueOnFailure?: boolean;
flows: string[];
}
/**
* Generate execution plan for test flows
*
* Handles:
* - Single file or directory input
* - Workspace configuration (config.yaml)
* - Flow inclusion/exclusion patterns
* - Tag-based filtering (include/exclude)
* - Dependency resolution (runFlow, scripts, media)
* - Sequential execution ordering
* - DeviceCloud-specific overrides
*
* @param options - Plan generation options
* @returns Complete execution plan with flows, dependencies, and metadata
* @throws Error if input path doesn't exist, no flows found, or dependencies missing
*/
export declare function plan(options: PlanOptions): Promise<IExecutionPlan>;
export {};