Merge branch 'master' into dev

This commit is contained in:
Nick O'Leary
2021-01-27 23:28:19 +00:00
44 changed files with 285 additions and 226 deletions

View File

@@ -27,17 +27,19 @@ async function getFlowsFromPath(path) {
var validFiles = [];
return fs.readdir(path).then(files => {
var promises = [];
files.forEach(function(file) {
var fullPath = fspath.join(path,file);
var stats = fs.lstatSync(fullPath);
if (stats.isDirectory()) {
validFiles.push(file);
promises.push(getFlowsFromPath(fullPath));
} else if (/\.json$/.test(file)){
validFiles.push(file);
promises.push(Promise.resolve(file.split(".")[0]))
}
})
if (files) {
files.forEach(function(file) {
var fullPath = fspath.join(path,file);
var stats = fs.lstatSync(fullPath);
if (stats.isDirectory()) {
validFiles.push(file);
promises.push(getFlowsFromPath(fullPath));
} else if (/\.json$/.test(file)){
validFiles.push(file);
promises.push(Promise.resolve(file.split(".")[0]))
}
})
}
return Promise.all(promises)
}).then(results => {
results.forEach(function(r,i) {