diff --git a/index.js b/index.js index d0e4947..d7cd806 100644 --- a/index.js +++ b/index.js @@ -110,6 +110,8 @@ require(path.join(process.cwd(), "..", "server", "dist", "database.js")); // await saveLargeObject(allWorkFlowInfo, "./result-pretty-beforeProcess.json") // fs.writeFileSync("./result-beforeProcess.json", JSON.stringify(allWorkFlowInfo)); + //invalid haro ham dar yek araye zakhire kon + for await(let key of Object.keys(allWorkFlowInfo)){ if (!allWorkFlowInfo[key].isValid) { console.log(`workflow with id:'${key}' in invalid`); @@ -123,7 +125,10 @@ require(path.join(process.cwd(), "..", "server", "dist", "database.js")); for await(const workflow of Object.keys(allWorkFlowInfo)){ if(workflow==57){ - console.log(allWorkFlowInfo[workflow]); + const data = allWorkFlowInfo[workflow]; + const paths = data?.root?.validPaths || []; + if(paths?.length==0) allWorkFlowInfo[key].isValid = false; + console.log(paths); return; } }