export type HistoryName = string ; export enum HistoryStatus { preAct = "preAct" , success = "success" , failed = "failed" , complete = "complete" } export function isHistoryStatus ( val ) { switch ( val ) { case "preAct" : case "success" : case "failed" : case "complete" : return true ; } return false ; } export function isStatusComplete ( status ) { return status === HistoryStatus . success || status === HistoryStatus . failed ; } export interface HistoryEntry { status : HistoryStatus ; dependenciesJson : string ; domXml : string ; stateJson : string ; observationsJson : string ; fileName : string ; projectRoot : string ; stackName : string ; dataDir : string ; } export interface HistoryStore { getDataDir ( withStatus ) : Promise < string > ; commitEntry ( toStore ) : Promise < void > ; releaseDataDir ( ) : Promise < void > ; historyEntry ( historyName ) : Promise < HistoryEntry > ; last ( withStatus ? ) : Promise < HistoryEntry | undefined > ; destroy ( ) : Promise < void > ; }