va-log-parser
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -18,7 +18,2 @@ import moment from "moment"; | ||
function checkDirectory(path) { | ||
const stats = fs.statSync(path); | ||
return stats.isDirectory(); | ||
} | ||
function saveParsedFile(filePath, data) { | ||
@@ -25,0 +20,0 @@ const outputString = JSON.stringify(data); |
@@ -6,3 +6,9 @@ import inquirer from "inquirer"; | ||
import parseLogFile from "./parseLogFile.js"; | ||
import chalk from "chalk"; | ||
function checkDirectory(path) { | ||
const stats = fs.statSync(path); | ||
return stats.isDirectory(); | ||
} | ||
export default function startCLI() { | ||
@@ -29,3 +35,8 @@ const spinner = ora(); | ||
name: "Files", | ||
choices: directoryContents, | ||
choices: [ | ||
new inquirer.Separator(chalk.yellow("------Folders------")), | ||
...directoryContents.filter((Obj) => checkDirectory(Obj) === true), | ||
new inquirer.Separator(chalk.green("------Files------")), | ||
...directoryContents.filter((Obj) => checkDirectory(Obj) === false), | ||
], | ||
validate(answer) { | ||
@@ -32,0 +43,0 @@ if (answer.length < 1) { |
{ | ||
"name": "va-log-parser", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "A Log Parser for SailPoint VA logs", | ||
"main": "index.js", | ||
"type": "module", | ||
"keywords": [ | ||
"SailPoint", | ||
"Virtual", | ||
"Appliance", | ||
"Identity", | ||
"Now" | ||
], | ||
"scripts": { | ||
@@ -8,0 +15,0 @@ "test": "echo \"Error: no test specified\" && exit 1" |
7129
173